CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
37  JetConstituent(const EcalRecHit &ehit) : id(ehit.detid()), energy(ehit.energy()) {}
38  JetConstituent(const CaloRecHit &ehit) : id(ehit.detid()), energy(ehit.energy()) {}
39  };
40 
41  JetMatchingTools (const edm::Event& fEvent, edm::ConsumesCollector&& iC );
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 
90 
91 
92 
93  private:
106 
118 
119 };
120 
121 #endif
const edm::PCaloHitContainer * mHcalSimHitCollection
std::vector< const PCaloHit * > getPCaloHits(DetId fId)
get PCaloHits contributing to the detId
int generatorId(unsigned fSimTrackId)
Generator ID.
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::SimVertexContainer * getSimVertexCollection()
const reco::CandidateCollection * getGenParticlesCollection()
const edm::PCaloHitContainer * mEBSimHitCollection
edm::EDGetTokenT< edm::SimVertexContainer > input_simvertex_token_
std::vector< DetId > getConstituentIds(const CaloTower &fTower)
get cells contributing to the tower
const HFRecHitCollection * getHFRecHitCollection()
const reco::CandidateCollection * mGenParticleCollection
JetConstituent(const EcalRecHit &ehit)
const reco::GenParticle * getGenParticle(int fGeneratorId)
GenParticle.
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 edm::PCaloHitContainer * getEESimHitCollection()
const edm::PCaloHitContainer * getEBSimHitCollection()
const EERecHitCollection * mEERecHitCollection
JetMatchingTools(const edm::Event &fEvent, edm::ConsumesCollector &&iC)
const EBRecHitCollection * getEBRecHitCollection()
int j
Definition: DBlmapReader.cc:9
Jets made from MC generator particles.
Definition: GenJet.h:24
JetConstituent(const CaloRecHit &ehit)
const EERecHitCollection * getEERecHitCollection()
const HORecHitCollection * getHORecHitCollection()
const HBHERecHitCollection * getHBHERecHitCollection()
std::vector< const CaloTower * > getCaloTowers(int fGeneratorId)
CaloTowers.
edm::EDGetTokenT< HFRecHitCollection > input_hfrechits_token_
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
double lostEnergyFraction(const reco::CaloJet &fJet)
energy in broken links
const edm::SimTrackContainer * getSimTrackCollection()
std::vector< const reco::GenParticle * > getGenParticles(const reco::CaloJet &fJet, bool fVerbose=true)
GenParticles for CaloJet.
const edm::PCaloHitContainer * getHcalSimHitCollection()
std::vector< JetConstituent > getConstituentHits(const CaloTower &fTower)
get CaloRecHits contributing to the tower
const edm::Event * mEvent
JetConstituent(const JetConstituent &j)
std::vector< const CaloTower * > getConstituents(const reco::CaloJet &fJet)
get towers contributing to CaloJet
const SimTrack * getTrack(unsigned fSimTrackId)
convert trackId to SimTrack
const HORecHitCollection * mHORecHitCollection
edm::EDGetTokenT< HBHERecHitCollection > input_hbherechits_token_
int getTrackId(const PCaloHit &fHit)
GEANT track ID.
std::vector< SimTrack > SimTrackContainer
double overlapEnergyFraction(const std::vector< const reco::GenParticle * > &fObject, const std::vector< const reco::GenParticle * > &fReference) const
energy overlap
edm::EDGetTokenT< edm::PCaloHitContainer > input_pcalohits_hcal_token_
const HFRecHitCollection * mHFRecHitCollection
const HBHERecHitCollection * mHBHERecHitCollection