54 jetTrackToken = consumes<reco::JetTracksAssociationCollection>(jetTrackTag);
56 vertexToken = consumes<reco::VertexCollection>(
vertexTag);
58 beamSpotToken = consumes<reco::BeamSpot>(
beamSpotTag);
59 usingBeamSpot = iConfig.
getParameter<
bool>(
"useBeamSpot");
63 produces<reco::JetTagCollection>();
64 produces<reco::IsolatedTauTagInfoCollection>();
78 desc.
add<
bool>(
"useBeamSpot",
false);
80 descriptions.
add(
"coneIsolationTauJetTags", desc);
88 iEvent.
getByToken(jetTrackToken, jetTracksAssociation);
90 std::unique_ptr<reco::JetTagCollection> tagCollection;
92 if (not jetTracksAssociation->empty()) {
94 tagCollection = std::make_unique<reco::JetTagCollection>(prod);
96 tagCollection = std::make_unique<reco::JetTagCollection>();
112 if (vertCollection.begin() != vertCollection.end())
113 myPVtmp = *(vertCollection.begin());
121 iEvent.
getByToken(beamSpotToken, recoBeamSpotHandle);
122 vertexBeamSpot = *recoBeamSpotHandle;
123 Vertex::Point bspoint(vertexBeamSpot.x0(), vertexBeamSpot.y0(), myPVtmp.
z());
125 myPV = combinedVertex;
130 for (
unsigned int i = 0;
i < jetTracksAssociation->size(); ++
i) {
131 pair<float, IsolatedTauTagInfo> myPair =
133 tagCollection->setValue(
i, myPair.first);
134 extCollection->push_back(myPair.second);
static void fillDescription(edm::ParameterSetDescription &desc)
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
math::Error< dimension >::type Error
covariance error matrix (3x3)
std::vector< Vertex > VertexCollection
collection of Vertex objects
~ConeIsolation() override
std::vector< IsolatedTauTagInfo > IsolatedTauTagInfoCollection
double chi2() const
chi-squares
double z() const
z coordinate
math::XYZPoint Point
point in the space
ParameterDescriptionBase * add(U const &iLabel, T const &value)
size_t tracksSize() const
number of tracks
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
T getParameter(std::string const &) const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Error error() const
return SMatrix
RefToBaseProd< T > makeRefToBaseProdFrom(RefToBase< T > const &iRef, Event const &iEvent)
void produce(edm::Event &, const edm::EventSetup &) override
ConeIsolation(const edm::ParameterSet &)