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 } // namespace reco
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 
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 
89 
90 private:
103 
115 };
116 
117 #endif
JetMatchingTools::getGenParticles
std::vector< const reco::GenParticle * > getGenParticles(const reco::CaloJet &fJet, bool fVerbose=true)
GenParticles for CaloJet.
Definition: JetMatchingTools.cc:271
JetMatchingTools::getEESimHitCollection
const edm::PCaloHitContainer * getEESimHitCollection()
Definition: JetMatchingTools.cc:113
JetMatchingTools::getConstituentHits
std::vector< JetConstituent > getConstituentHits(const CaloTower &fTower)
get CaloRecHits contributing to the tower
Definition: JetMatchingTools.cc:164
JetMatchingTools::JetConstituent::id
DetId id
Definition: JetMatchingTools.h:31
reco::CaloJet
Jets made from CaloTowers.
Definition: CaloJet.h:27
EcalRecHit
Definition: EcalRecHit.h:15
JetMatchingTools::mEESimHitCollection
const edm::PCaloHitContainer * mEESimHitCollection
Definition: JetMatchingTools.h:98
JetMatchingTools::mSimTrackCollection
const edm::SimTrackContainer * mSimTrackCollection
Definition: JetMatchingTools.h:100
reco::GenJet
Jets made from MC generator particles.
Definition: GenJet.h:23
reco::GenParticle
Definition: GenParticle.h:21
edm::EDGetTokenT
Definition: EDGetToken.h:33
edm
HLT enums.
Definition: AlignableModifier.h:19
JetMatchingTools::mEvent
const edm::Event * mEvent
Definition: JetMatchingTools.h:91
JetMatchingTools::JetConstituent::JetConstituent
JetConstituent()
Definition: JetMatchingTools.h:34
JetMatchingTools::getEBRecHitCollection
const EBRecHitCollection * getEBRecHitCollection()
Definition: JetMatchingTools.cc:65
JetMatchingTools::getConstituents
std::vector< const CaloTower * > getConstituents(const reco::CaloJet &fJet)
get towers contributing to CaloJet
Definition: JetMatchingTools.cc:155
JetMatchingTools::mEERecHitCollection
const EERecHitCollection * mEERecHitCollection
Definition: JetMatchingTools.h:93
btagElecInJet_cfi.CaloJet
CaloJet
Definition: btagElecInJet_cfi.py:4
edm::SortedCollection< EcalRecHit >
JetMatchingTools::input_hbherechits_token_
edm::EDGetTokenT< HBHERecHitCollection > input_hbherechits_token_
Definition: JetMatchingTools.h:106
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
JetMatchingTools::mHFRecHitCollection
const HFRecHitCollection * mHFRecHitCollection
Definition: JetMatchingTools.h:96
CaloRecHit
Definition: CaloRecHit.h:23
JetMatchingTools::mHcalSimHitCollection
const edm::PCaloHitContainer * mHcalSimHitCollection
Definition: JetMatchingTools.h:99
EcalRecHitCollections.h
JetMatchingTools::input_hfrechits_token_
edm::EDGetTokenT< HFRecHitCollection > input_hfrechits_token_
Definition: JetMatchingTools.h:108
JetMatchingTools::getPCaloHits
std::vector< const PCaloHit * > getPCaloHits(DetId fId)
get PCaloHits contributing to the detId
Definition: JetMatchingTools.cc:216
JetMatchingTools::input_pcalohits_hcal_token_
edm::EDGetTokenT< edm::PCaloHitContainer > input_pcalohits_hcal_token_
Definition: JetMatchingTools.h:111
JetMatchingTools::JetConstituent::~JetConstituent
~JetConstituent()
Definition: JetMatchingTools.h:35
GenParticle.h
DetId
Definition: DetId.h:17
JetMatchingTools::input_simtrack_token_
edm::EDGetTokenT< edm::SimTrackContainer > input_simtrack_token_
Definition: JetMatchingTools.h:112
JetMatchingTools::getSimVertexCollection
const edm::SimVertexContainer * getSimVertexCollection()
Definition: JetMatchingTools.cc:137
JetMatchingTools::input_pcalohits_eecal_token_
edm::EDGetTokenT< edm::PCaloHitContainer > input_pcalohits_eecal_token_
Definition: JetMatchingTools.h:109
JetMatchingTools::getConstituentIds
std::vector< DetId > getConstituentIds(const CaloTower &fTower)
get cells contributing to the tower
Definition: JetMatchingTools.cc:207
JetMatchingTools::getSimTrackCollection
const edm::SimTrackContainer * getSimTrackCollection()
Definition: JetMatchingTools.cc:129
JetMatchingTools::generatorId
int generatorId(unsigned fSimTrackId)
Generator ID.
Definition: JetMatchingTools.cc:240
JetMatchingTools::getHcalSimHitCollection
const edm::PCaloHitContainer * getHcalSimHitCollection()
Definition: JetMatchingTools.cc:121
JetMatchingTools::lostEnergyFraction
double lostEnergyFraction(const reco::CaloJet &fJet)
energy in broken links
Definition: JetMatchingTools.cc:311
JetMatchingTools::input_pcalohits_ebcal_token_
edm::EDGetTokenT< edm::PCaloHitContainer > input_pcalohits_ebcal_token_
Definition: JetMatchingTools.h:110
JetMatchingTools::JetConstituent::JetConstituent
JetConstituent(const EcalRecHit &ehit)
Definition: JetMatchingTools.h:37
JetMatchingTools::getGenParticlesCollection
const reco::CandidateCollection * getGenParticlesCollection()
Definition: JetMatchingTools.cc:145
Event
JetMatchingTools::mSimVertexCollection
const edm::SimVertexContainer * mSimVertexCollection
Definition: JetMatchingTools.h:101
JetMatchingTools::input_simvertex_token_
edm::EDGetTokenT< edm::SimVertexContainer > input_simvertex_token_
Definition: JetMatchingTools.h:113
JetMatchingTools::input_eerechits_token_
edm::EDGetTokenT< EERecHitCollection > input_eerechits_token_
Definition: JetMatchingTools.h:105
JetMatchingTools::getTrack
const SimTrack * getTrack(unsigned fSimTrackId)
convert trackId to SimTrack
Definition: JetMatchingTools.cc:232
JetMatchingTools::getTrackId
int getTrackId(const PCaloHit &fHit)
GEANT track ID.
Definition: JetMatchingTools.cc:230
JetMatchingTools::JetConstituent::JetConstituent
JetConstituent(const CaloRecHit &ehit)
Definition: JetMatchingTools.h:38
JetMatchingTools::mHORecHitCollection
const HORecHitCollection * mHORecHitCollection
Definition: JetMatchingTools.h:95
CaloTower
Definition: CaloTower.h:26
JetMatchingTools::JetConstituent
Definition: JetMatchingTools.h:30
PCaloHit
Definition: PCaloHit.h:8
JetMatchingTools::JetConstituent::energy
double energy
Definition: JetMatchingTools.h:32
JetMatchingTools::input_cands_token_
edm::EDGetTokenT< reco::CandidateCollection > input_cands_token_
Definition: JetMatchingTools.h:114
CaloTowerCollection.h
JetMatchingTools::mHBHERecHitCollection
const HBHERecHitCollection * mHBHERecHitCollection
Definition: JetMatchingTools.h:94
JetMatchingTools
Definition: JetMatchingTools.h:28
hcaldqm::fEvent
Definition: DQTask.h:32
JetMatchingTools::overlapEnergyFraction
double overlapEnergyFraction(const std::vector< const reco::GenParticle * > &fObject, const std::vector< const reco::GenParticle * > &fReference) const
energy overlap
Definition: JetMatchingTools.cc:340
JetMatchingTools::mEBRecHitCollection
const EBRecHitCollection * mEBRecHitCollection
Definition: JetMatchingTools.h:92
JetMatchingTools::mEBSimHitCollection
const edm::PCaloHitContainer * mEBSimHitCollection
Definition: JetMatchingTools.h:97
edm::SimTrackContainer
std::vector< SimTrack > SimTrackContainer
Definition: SimTrackContainer.h:12
SimTrack
Definition: SimTrack.h:6
JetMatchingTools::JetConstituent::JetConstituent
JetConstituent(const JetConstituent &j)
Definition: JetMatchingTools.h:36
JetMatchingTools::getHFRecHitCollection
const HFRecHitCollection * getHFRecHitCollection()
Definition: JetMatchingTools.cc:97
JetMatchingTools::JetMatchingTools
JetMatchingTools(const edm::Event &fEvent, edm::ConsumesCollector &&iC)
Definition: JetMatchingTools.cc:37
JetMatchingTools::getEBSimHitCollection
const edm::PCaloHitContainer * getEBSimHitCollection()
Definition: JetMatchingTools.cc:105
edm::PCaloHitContainer
std::vector< PCaloHit > PCaloHitContainer
Definition: PCaloHitContainer.h:8
HcalRecHitCollections.h
JetMatchingTools::getEERecHitCollection
const EERecHitCollection * getEERecHitCollection()
Definition: JetMatchingTools.cc:73
PCaloHitContainer.h
JetMatchingTools::getHORecHitCollection
const HORecHitCollection * getHORecHitCollection()
Definition: JetMatchingTools.cc:89
ConsumesCollector.h
nanoDQM_cfi.GenJet
GenJet
Definition: nanoDQM_cfi.py:226
JetMatchingTools::getGenParticle
const reco::GenParticle * getGenParticle(int fGeneratorId)
GenParticle.
Definition: JetMatchingTools.cc:260
JetMatchingTools::mGenParticleCollection
const reco::CandidateCollection * mGenParticleCollection
Definition: JetMatchingTools.h:102
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
JetMatchingTools::input_horechits_token_
edm::EDGetTokenT< HORecHitCollection > input_horechits_token_
Definition: JetMatchingTools.h:107
edm::Event
Definition: Event.h:73
JetMatchingTools::~JetMatchingTools
~JetMatchingTools()
Definition: JetMatchingTools.cc:63
JetMatchingTools::getHBHERecHitCollection
const HBHERecHitCollection * getHBHERecHitCollection()
Definition: JetMatchingTools.cc:81
SimTrackContainer.h
edm::SimVertexContainer
std::vector< SimVertex > SimVertexContainer
Definition: SimVertexContainer.h:12
edm::ConsumesCollector
Definition: ConsumesCollector.h:39
SimVertexContainer.h
JetMatchingTools::getCaloTowers
std::vector< const CaloTower * > getCaloTowers(int fGeneratorId)
CaloTowers.
JetMatchingTools::input_ebrechits_token_
edm::EDGetTokenT< EBRecHitCollection > input_ebrechits_token_
Definition: JetMatchingTools.h:104
edm::OwnVector
Definition: OwnVector.h:24