CMS 3D CMS Logo

JetVetoedTracksAssociatorAtVertex.cc
Go to the documentation of this file.
1 // \class JetVetoedTracksAssociatorAtVertex JetTracksAssociatorAtVertex.cc
2 //
3 // Original Author: Andrea Rizzi
4 // Created: Wed Apr 12 11:12:49 CEST 2006
5 // Accommodated for Jet Package by: Fedor Ratnikov Jul. 30, 2007
6 //
7 //
8 
14 
21 
23 
25 public:
28  void produce(edm::Event &, const edm::EventSetup &) override;
29 
30 private:
35 };
36 
38  : mJets(consumes<edm::View<reco::Jet>>(fConfig.getParameter<edm::InputTag>("jets"))),
39  mTracks(consumes<reco::TrackCollection>(fConfig.getParameter<edm::InputTag>("tracks"))),
40  mAssociator(fConfig.getParameter<double>("coneSize")),
41  classifier(fConfig, consumesCollector()) {
42  produces<reco::JetTracksAssociation::Container>();
43 }
44 
46 
48  // Gather contextual information for TrackCategories
49  classifier.newEvent(fEvent, fSetup);
50 
52  fEvent.getByToken(mJets, jets_h);
54  fEvent.getByToken(mTracks, tracks_h);
55 
56  std::unique_ptr<reco::JetTracksAssociation::Container> jetTracks(
58 
59  // format inputs
60  std::vector<edm::RefToBase<reco::Jet>> allJets;
61  allJets.reserve(jets_h->size());
62  for (unsigned i = 0; i < jets_h->size(); ++i)
63  allJets.push_back(jets_h->refAt(i));
64  std::vector<reco::TrackRef> allTracks;
65  allTracks.reserve(tracks_h->size());
66  for (unsigned i = 0; i < tracks_h->size(); ++i)
67  allTracks.push_back(reco::TrackRef(tracks_h, i));
68  // run algo
70  // store output
72 }
73 
JetVetoedTracksAssociatorAtVertex::JetVetoedTracksAssociatorAtVertex
JetVetoedTracksAssociatorAtVertex(const edm::ParameterSet &)
Definition: JetVetoedTracksAssociatorAtVertex.cc:37
JetTracksAssociation.h
mps_fire.i
i
Definition: mps_fire.py:428
MessageLogger.h
sistrip::View
View
Definition: ConstantsForView.h:26
JetVetoedTracksAssociatorAtVertex::~JetVetoedTracksAssociatorAtVertex
~JetVetoedTracksAssociatorAtVertex() override
Definition: JetVetoedTracksAssociatorAtVertex.cc:45
edm::EDGetTokenT
Definition: EDGetToken.h:33
edm
HLT enums.
Definition: AlignableModifier.h:19
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89287
muonTagProbeFilters_cff.allTracks
allTracks
Definition: muonTagProbeFilters_cff.py:22
EDProducer.h
Jet.h
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
edm::Handle
Definition: AssociativeIterator.h:50
JetVetoedTracksAssociatorAtVertex::classifier
TrackClassifier classifier
Definition: JetVetoedTracksAssociatorAtVertex.cc:34
edm::Ref< TrackCollection >
JetVetoedTracksAssociatorDRVertex.h
MakerMacros.h
Track.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
Jet
Definition: Jet.py:1
JetVetoedTracksAssociationDRVertex::produce
void produce(reco::JetTracksAssociation::Container *fAssociation, const std::vector< edm::RefToBase< reco::Jet >> &fJets, const std::vector< reco::TrackRef > &fTracks, TrackClassifier &classifier) const
Definition: JetVetoedTracksAssociatorDRVertex.cc:6
JetVetoedTracksAssociatorAtVertex
Definition: JetVetoedTracksAssociatorAtVertex.cc:24
edm::AssociationVector
Definition: AssociationVector.h:67
edm::ParameterSet
Definition: ParameterSet.h:47
JetVetoedTracksAssociatorAtVertex::mJets
edm::EDGetTokenT< edm::View< reco::Jet > > mJets
Definition: JetVetoedTracksAssociatorAtVertex.cc:31
Event.h
HLT_FULL_cff.jetTracks
jetTracks
Definition: HLT_FULL_cff.py:50858
TrackClassifier::newEvent
void newEvent(edm::Event const &, edm::EventSetup const &)
Pre-process event information (for accessing reconstraction information)
Definition: TrackClassifier.cc:44
JetVetoedTracksAssociatorAtVertex::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition: JetVetoedTracksAssociatorAtVertex.cc:47
edm::stream::EDProducer
Definition: EDProducer.h:38
reco::JetExtendedAssociation::allJets
std::vector< reco::JetBaseRef > allJets(const Container &)
fill list of all jets associated with values. Return # of jets in the list
Definition: JetExtendedAssociation.cc:60
edm::EventSetup
Definition: EventSetup.h:57
JetVetoedTracksAssociationDRVertex
Definition: JetVetoedTracksAssociatorDRVertex.h:13
InputTag.h
hcaldqm::fEvent
Definition: DQTask.h:32
eostools.move
def move(src, dest)
Definition: eostools.py:511
View.h
ParameterSet.h
TrackClassifier
Get track history and classify it in function of their .
Definition: TrackClassifier.h:29
edm::Event
Definition: Event.h:73
JetVetoedTracksAssociatorAtVertex::mAssociator
JetVetoedTracksAssociationDRVertex mAssociator
Definition: JetVetoedTracksAssociatorAtVertex.cc:33
EDProductfwd.h
reco::TrackCollection
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
JetVetoedTracksAssociatorAtVertex::mTracks
edm::EDGetTokenT< reco::TrackCollection > mTracks
Definition: JetVetoedTracksAssociatorAtVertex.cc:32
edm::RefToBaseProd
Definition: RefToBase.h:65