CMS 3D CMS Logo

CaloSimInfo.h
Go to the documentation of this file.
1 /*
2 Functions to give the details of parent track of SimHits.
3 
4 Authors: Seema Sharma, Sunanda Banerjee
5 Created: August 2009
6 */
7 
8 #ifndef CalibrationIsolatedParticlesCaloSimInfo_h
9 #define CalibrationIsolatedParticlesCaloSimInfo_h
10 
11 // system include files
12 #include <memory>
13 #include <map>
14 #include <vector>
15 #include <string>
16 
17 // user include files
19 
21 
27 
33 
39 
40 namespace spr {
41 
42  struct caloSimInfo {
44  double pdgMatched;
45  double eMatched;
46  double eGamma;
47  double eNeutralHad;
48  double eChargedHad;
49  double eRest;
50  double eTotal;
51  };
52 
53  // takes the EcalSimHits and returns a map energy matched to SimTrack, photons, neutral hadrons etc. in a symmetric matrix (2*ieta+1)*(2*iphi+1)
54  template <typename T>
55  void eECALSimInfo(const edm::Event&,
56  const DetId& det,
57  const CaloGeometry* geo,
58  const CaloTopology* caloTopology,
59  edm::Handle<T>& hitsEB,
60  edm::Handle<T>& hitsEE,
63  const reco::Track* pTrack,
64  TrackerHitAssociator& associate,
65  int ieta,
66  int iphi,
68  double timeCut = 150,
69  bool debug = false);
70 
71  template <typename T>
72  std::map<std::string, double> eECALSimInfo(const edm::Event&,
73  const DetId& det,
74  const CaloGeometry* geo,
75  const CaloTopology* caloTopology,
76  edm::Handle<T>& hitsEB,
77  edm::Handle<T>& hitsEE,
80  const reco::Track* pTrack,
81  TrackerHitAssociator& associate,
82  int ieta,
83  int iphi,
84  double timeCut = 150,
85  bool debug = false);
86 
87  // takes the EcalSimHits and returns a map energy matched to SimTrack, photons, neutral hadrons etc. in an symmetric matrix (ietaE+ietaW+1)*(iphiN+iphiS+1)
88  template <typename T>
89  void eECALSimInfo(const edm::Event&,
90  const DetId& det,
91  const CaloGeometry* geo,
92  const CaloTopology* caloTopology,
93  edm::Handle<T>& hitsEB,
94  edm::Handle<T>& hitsEE,
97  const reco::Track* pTrack,
98  TrackerHitAssociator& associate,
99  int ietaE,
100  int ietaW,
101  int iphiN,
102  int iphiS,
103  caloSimInfo& info,
104  double timeCut = 150,
105  bool debug = false);
106 
107  // takes the HcalSimHits and returns a map energy matched to SimTrack, photons, neutral hadrons etc. in a symmetric matrix (2*ieta+1)*(2*iphi+1)
108  template <typename T>
109  std::map<std::string, double> eHCALSimInfo(const edm::Event&,
110  const HcalTopology* topology,
111  const DetId& det,
112  const CaloGeometry* geo,
116  const reco::Track* pTrack,
117  TrackerHitAssociator& associate,
118  int ieta,
119  int iphi,
120  double timeCut = 150,
121  bool includeHO = false,
122  bool debug = false);
123  template <typename T>
124  void eHCALSimInfo(const edm::Event&,
125  const HcalTopology* topology,
126  const DetId& det,
127  const CaloGeometry* geo,
131  const reco::Track* pTrack,
132  TrackerHitAssociator& associate,
133  int ieta,
134  int iphi,
135  caloSimInfo& info,
136  double timeCut = 150,
137  bool includeHO = false,
138  bool debug = false);
139 
140  //takes the HcalSimHits and returns a map energy matched to SimTrack, photons, neutral hadrons etc. in an symmetric matrix (ietaE+ietaW+1)*(iphiN+iphiS+1)
141  template <typename T>
142  void eHCALSimInfo(const edm::Event&,
143  const HcalTopology* topology,
144  const DetId& det,
145  const CaloGeometry* geo,
149  const reco::Track* pTrack,
150  TrackerHitAssociator& associate,
151  int ietaE,
152  int ietaW,
153  int iphiN,
154  int iphiS,
155  caloSimInfo& info,
156  double timeCut = 150,
157  bool includeHO = false,
158  bool debug = false);
159 
160  // takes the HcalSimHits and returns a map energy matched to SimTrack, photons, neutral hadrons etc. in a symmetric matrix (2*ieta+1)*(2*iphi+1) and also a multiplicity vector
161  template <typename T>
162  std::map<std::string, double> eHCALSimInfo(const edm::Event& iEvent,
163  const HcalTopology* topology,
164  const DetId& det,
168  const reco::Track* pTrack,
169  TrackerHitAssociator& associate,
170  int ieta,
171  int iphi,
172  std::vector<int>& multiplicityVector,
173  bool debug = false);
174 
175  // Actual function which does the matching of SimHits to SimTracks using geantTrackId
176  template <typename T>
177  void eCaloSimInfo(std::vector<DetId> vdets,
178  const CaloGeometry* geo,
179  edm::Handle<T>& hitsEB,
180  edm::Handle<T>& hitsEE,
183  edm::SimTrackContainer::const_iterator trkInfo,
184  caloSimInfo& info,
185  double timeCut = 150,
186  bool debug = false);
187  template <typename T>
188  void eCaloSimInfo(const CaloGeometry* geo,
192  std::vector<typename T::const_iterator> hit,
193  edm::SimTrackContainer::const_iterator trkInfo,
194  caloSimInfo& info,
195  double timeCut = 150,
196  bool includeHO = false,
197  bool debug = false);
198  std::map<std::string, double> eCaloSimInfo(caloSimInfo& info);
199 
200  // Returns total energy of CaloSimHits which originate from the matching SimTrack
201  template <typename T>
202  double eCaloSimInfo(const edm::Event&,
203  const CaloGeometry* geo,
207  const reco::Track* pTrack,
208  TrackerHitAssociator& associate,
209  double timeCut = 150,
210  bool includeHO = false,
211  bool debug = false);
212 
213  template <typename T>
214  double eCaloSimInfo(const edm::Event&,
215  const CaloGeometry* geo,
216  edm::Handle<T>& hitsEB,
217  edm::Handle<T>& hitsEE,
220  const reco::Track* pTrack,
221  TrackerHitAssociator& associate,
222  double timeCut = 150,
223  bool debug = false);
224 
225  template <typename T>
226  std::map<std::string, double> eCaloSimInfo(edm::Handle<T>& hits,
229  std::vector<typename T::const_iterator> hit,
230  edm::SimTrackContainer::const_iterator trkInfo,
231  std::vector<int>& multiplicityVector,
232  bool debug = false);
233 
234  double timeOfFlight(DetId id, const CaloGeometry* geo, bool debug = false);
235 } // namespace spr
236 
237 #include "Calibration/IsolatedParticles/interface/CaloSimInfo.icc"
238 #endif
spr::caloSimInfo::eRest
double eRest
Definition: CaloSimInfo.h:49
Handle.h
spr
Definition: CaloConstants.h:6
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
spr::caloSimInfo::eMatched
double eMatched
Definition: CaloSimInfo.h:45
HcalTopology
Definition: HcalTopology.h:26
spr::eHCALSimInfo
std::map< std::string, double > eHCALSimInfo(const edm::Event &, const HcalTopology *topology, const DetId &det, const CaloGeometry *geo, edm::Handle< T > &hits, edm::Handle< edm::SimTrackContainer > &SimTk, edm::Handle< edm::SimVertexContainer > &SimVtx, const reco::Track *pTrack, TrackerHitAssociator &associate, int ieta, int iphi, double timeCut=150, bool includeHO=false, bool debug=false)
info
static const TGPicture * info(bool iBackgroundIsBlack)
Definition: FWCollectionSummaryWidget.cc:153
TrackerHitAssociator.h
edm::Handle
Definition: AssociativeIterator.h:50
CaloTopology
Definition: CaloTopology.h:19
spr::caloSimInfo::eGamma
double eGamma
Definition: CaloSimInfo.h:46
LEDCalibrationChannels.iphi
iphi
Definition: LEDCalibrationChannels.py:64
spr::caloSimInfo::eTotal
double eTotal
Definition: CaloSimInfo.h:50
DetId
Definition: DetId.h:17
spr::timeOfFlight
double timeOfFlight(DetId id, const CaloGeometry *geo, bool debug=false)
Definition: CaloSimInfo.cc:17
CaloGeometry
Definition: CaloGeometry.h:21
debug
#define debug
Definition: HDRShower.cc:19
Track.h
TrackFwd.h
SimVertex.h
reco::Track
Definition: Track.h:27
MatrixECALDetIds.h
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
Event.h
spr::caloSimInfo::eNeutralHad
double eNeutralHad
Definition: CaloSimInfo.h:47
spr::caloSimInfo::caloSimInfo
caloSimInfo()
Definition: CaloSimInfo.h:43
iEvent
int iEvent
Definition: GenABIO.cc:224
spr::eECALSimInfo
void eECALSimInfo(const edm::Event &, const DetId &det, const CaloGeometry *geo, const CaloTopology *caloTopology, edm::Handle< T > &hitsEB, edm::Handle< T > &hitsEE, edm::Handle< edm::SimTrackContainer > &SimTk, edm::Handle< edm::SimVertexContainer > &SimVtx, const reco::Track *pTrack, TrackerHitAssociator &associate, int ieta, int iphi, caloSimInfo &info, double timeCut=150, bool debug=false)
CaloTowerNavigator.h
CaloTopology.h
TrackerHitAssociator
Definition: TrackerHitAssociator.h:55
HcalTopology.h
DetId.h
Frameworkfwd.h
CaloGeometry.h
spr::caloSimInfo::eChargedHad
double eChargedHad
Definition: CaloSimInfo.h:48
spr::caloSimInfo
Definition: CaloSimInfo.h:42
Candidate.h
SimTrack.h
edm::Event
Definition: Event.h:73
spr::eCaloSimInfo
void eCaloSimInfo(std::vector< DetId > vdets, const CaloGeometry *geo, edm::Handle< T > &hitsEB, edm::Handle< T > &hitsEE, edm::Handle< edm::SimTrackContainer > &SimTk, edm::Handle< edm::SimVertexContainer > &SimVtx, edm::SimTrackContainer::const_iterator trkInfo, caloSimInfo &info, double timeCut=150, bool debug=false)
SimTrackContainer.h
SimVertexContainer.h
spr::caloSimInfo::pdgMatched
double pdgMatched
Definition: CaloSimInfo.h:44
hit
Definition: SiStripHitEffFromCalibTree.cc:88