CMS 3D CMS Logo

JetMatchingTools.h
Go to the documentation of this file.
1 #ifndef JetMatchingTools_h
2 #define JetMatchingTools_h
3 
4 #include <vector>
5 
14 
15 namespace edm {
16  class Event;
17 }
18 namespace reco {
19  class CaloJet;
20  class GenJet;
21 }
22 
23 class CaloTower;
24 class CaloRecHit;
25 class DetId;
26 class PCaloHit;
27 
29  public:
30  struct JetConstituent {
32  double energy;
33 
36  JetConstituent(const JetConstituent &j) : id(j.id), energy(j.energy) {}
37  JetConstituent(const EcalRecHit &ehit) : id(ehit.detid()), energy(ehit.energy()) {}
38  JetConstituent(const CaloRecHit &ehit) : id(ehit.detid()), energy(ehit.energy()) {}
39  };
40 
42  ~JetMatchingTools ();
43 
45  std::vector <const CaloTower*> getConstituents (const reco::CaloJet& fJet ) ;
47  std::vector <JetConstituent> getConstituentHits(const CaloTower& fTower);
49  std::vector <DetId> getConstituentIds (const CaloTower& fTower) ;
51  std::vector <const PCaloHit*> getPCaloHits (DetId fId) ;
53  int getTrackId (const PCaloHit& fHit) ;
55  const SimTrack* getTrack (unsigned fSimTrackId);
57  int generatorId (unsigned fSimTrackId) ;
59  const reco::GenParticle* getGenParticle (int fGeneratorId);
61  std::vector <const reco::GenParticle*> getGenParticles (const reco::CaloJet& fJet, bool fVerbose = true);
63  std::vector <const reco::GenParticle*> getGenParticles (const reco::GenJet& fJet);
64 
65  // reverse propagation
67  std::vector <const PCaloHit*> getPCaloHits (int fGeneratorId);
69  std::vector <const CaloTower*> getCaloTowers (int fGeneratorId);
70 
72  double lostEnergyFraction (const reco::CaloJet& fJet );
73 
75  double overlapEnergyFraction (const std::vector <const reco::GenParticle*>& fObject,
76  const std::vector <const reco::GenParticle*>& fReference) const;
77 
78 
79  const EBRecHitCollection* getEBRecHitCollection ();
80  const EERecHitCollection* getEERecHitCollection ();
81  const HBHERecHitCollection* getHBHERecHitCollection ();
82  const HORecHitCollection* getHORecHitCollection ();
83  const HFRecHitCollection* getHFRecHitCollection ();
84  const edm::PCaloHitContainer* getEBSimHitCollection ();
85  const edm::PCaloHitContainer* getEESimHitCollection ();
86  const edm::PCaloHitContainer* getHcalSimHitCollection ();
87  const edm::SimTrackContainer* getSimTrackCollection ();
88  const edm::SimVertexContainer* getSimVertexCollection ();
89  const reco::CandidateCollection* getGenParticlesCollection ();
90 
91 
92 
93  private:
106 
118 
119 };
120 
121 #endif
const edm::PCaloHitContainer * mHcalSimHitCollection
std::vector< PCaloHit > PCaloHitContainer
const EBRecHitCollection * mEBRecHitCollection
Jets made from CaloTowers.
Definition: CaloJet.h:29
edm::EDGetTokenT< edm::PCaloHitContainer > input_pcalohits_ebcal_token_
const edm::PCaloHitContainer * mEBSimHitCollection
edm::EDGetTokenT< edm::SimVertexContainer > input_simvertex_token_
const reco::CandidateCollection * mGenParticleCollection
JetConstituent(const EcalRecHit &ehit)
edm::EDGetTokenT< EERecHitCollection > input_eerechits_token_
const edm::PCaloHitContainer * mEESimHitCollection
edm::EDGetTokenT< reco::CandidateCollection > input_cands_token_
edm::EDGetTokenT< EBRecHitCollection > input_ebrechits_token_
const edm::SimTrackContainer * mSimTrackCollection
const EERecHitCollection * mEERecHitCollection
Jets made from MC generator particles.
Definition: GenJet.h:25
JetConstituent(const CaloRecHit &ehit)
edm::EDGetTokenT< HFRecHitCollection > input_hfrechits_token_
static const TrackGhostTrackState * getTrack(const BasicGhostTrackState *basic)
Definition: DetId.h:18
edm::EDGetTokenT< HORecHitCollection > input_horechits_token_
const edm::SimVertexContainer * mSimVertexCollection
edm::EDGetTokenT< edm::PCaloHitContainer > input_pcalohits_eecal_token_
edm::EDGetTokenT< edm::SimTrackContainer > input_simtrack_token_
std::vector< SimVertex > SimVertexContainer
const edm::Event * mEvent
fixed size matrix
HLT enums.
JetConstituent(const JetConstituent &j)
const HORecHitCollection * mHORecHitCollection
edm::EDGetTokenT< HBHERecHitCollection > input_hbherechits_token_
std::vector< SimTrack > SimTrackContainer
edm::EDGetTokenT< edm::PCaloHitContainer > input_pcalohits_hcal_token_
const HFRecHitCollection * mHFRecHitCollection
const HBHERecHitCollection * mHBHERecHitCollection