CMS 3D CMS Logo

GlobalHitsProducer.h
Go to the documentation of this file.
1 #ifndef GlobalHitsProducer_h
2 #define GlobalHitsProducer_h
3 
13 // framework & common header files
27 
28 // tracker info
33 
34 // muon info
42 
43 // calorimeter info
49 
50 // data in edm::event
57 //#include "SimDataFormats/CrossingFrame/interface/CrossingFrame.h"
58 //#include "SimDataFormats/CrossingFrame/interface/MixCollection.h"
59 
60 // helper files
61 //#include <CLHEP/Vector/LorentzVector.h>
62 #include "CLHEP/Units/GlobalSystemOfUnits.h"
64 
65 #include <cstdlib>
66 #include <iostream>
67 #include <memory>
68 #include <string>
69 #include <vector>
70 
71 #include "TString.h"
72 
73 class PGlobalSimHit;
74 
76 public:
77  typedef std::vector<float> FloatVector;
78 
79  explicit GlobalHitsProducer(const edm::ParameterSet &);
80  ~GlobalHitsProducer() override;
81  void beginJob(void) override;
82  void endJob() override;
83  void produce(edm::Event &, const edm::EventSetup &) override;
84 
85 private:
86  // GlobalValidation(const GlobalValidation&);
87  // const GlobalValidation& operator=(const GlobalValidation&);
88 
89  // production related methods
90  void fillG4MC(edm::Event &);
91  void storeG4MC(PGlobalSimHit &);
92  void fillTrk(edm::Event &, const edm::EventSetup &);
93  void storeTrk(PGlobalSimHit &);
94  void fillMuon(edm::Event &, const edm::EventSetup &);
95  void storeMuon(PGlobalSimHit &);
96  void fillECal(edm::Event &, const edm::EventSetup &);
97  void storeECal(PGlobalSimHit &);
98  void fillHCal(edm::Event &, const edm::EventSetup &);
99  void storeHCal(PGlobalSimHit &);
100 
101  void clear();
102 
103 private:
104  // parameter information
108  int vtxunit;
112 
113  // G4MC info
115  FloatVector G4VtxX;
116  FloatVector G4VtxY;
117  FloatVector G4VtxZ;
118  FloatVector G4TrkPt;
119  FloatVector G4TrkE;
120 
125 
126  // Electromagnetic info
127  // ECal info
128  FloatVector ECalE;
129  FloatVector ECalToF;
130  FloatVector ECalPhi;
131  FloatVector ECalEta;
136 
137  // Preshower info
138  FloatVector PreShE;
139  FloatVector PreShToF;
140  FloatVector PreShPhi;
141  FloatVector PreShEta;
144 
145  // Hadronic info
146  // HCal info
147  FloatVector HCalE;
148  FloatVector HCalToF;
149  FloatVector HCalPhi;
150  FloatVector HCalEta;
153 
154  // Tracker info
155  // Pixel info
156  FloatVector PxlBrlToF;
157  FloatVector PxlBrlR;
158  FloatVector PxlBrlPhi;
159  FloatVector PxlBrlEta;
160  FloatVector PxlFwdToF;
161  FloatVector PxlFwdZ;
162  FloatVector PxlFwdPhi;
163  FloatVector PxlFwdEta;
172 
173  // Strip info
174  FloatVector SiBrlToF;
175  FloatVector SiBrlR;
176  FloatVector SiBrlPhi;
177  FloatVector SiBrlEta;
178  FloatVector SiFwdToF;
179  FloatVector SiFwdZ;
180  FloatVector SiFwdPhi;
181  FloatVector SiFwdEta;
198 
199  // Muon info
200  // DT info
201  FloatVector MuonDtToF;
202  FloatVector MuonDtR;
203  FloatVector MuonDtPhi;
204  FloatVector MuonDtEta;
207  // CSC info
208  FloatVector MuonCscToF;
209  FloatVector MuonCscZ;
210  FloatVector MuonCscPhi;
211  FloatVector MuonCscEta;
214  // RPC info
215  FloatVector MuonRpcBrlToF;
216  FloatVector MuonRpcBrlR;
217  FloatVector MuonRpcBrlPhi;
218  FloatVector MuonRpcBrlEta;
219  FloatVector MuonRpcFwdToF;
220  FloatVector MuonRpcFwdZ;
221  FloatVector MuonRpcFwdPhi;
222  FloatVector MuonRpcFwdEta;
225 
226  // private statistics information
227  unsigned int count;
228 
229 }; // end class declaration
230 
231 #endif
232 
233 #ifndef GlobalHitMap
234 #define GlobalHitMap
235 // geometry mapping
236 static const int dTrk = 1;
237 static const int sdPxlBrl = 1;
238 static const int sdPxlFwd = 2;
239 static const int sdSiTIB = 3;
240 static const int sdSiTID = 4;
241 static const int sdSiTOB = 5;
242 static const int sdSiTEC = 6;
243 
244 static const int dMuon = 2;
245 static const int sdMuonDT = 1;
246 static const int sdMuonCSC = 2;
247 static const int sdMuonRPC = 3;
248 static const int sdMuonRPCRgnBrl = 0;
249 static const int sdMuonRPCRgnFwdp = 1;
250 static const int sdMuonRPCRgnFwdn = -1;
251 
252 static const int dEcal = 3;
253 static const int sdEcalBrl = 1;
254 static const int sdEcalFwd = 2;
255 static const int sdEcalPS = 3;
256 static const int sdEcalTT = 4;
257 static const int sdEcalLPnD = 5;
258 
259 static const int dHcal = 4;
260 static const int sdHcalEmpty = 0;
261 static const int sdHcalBrl = 1;
262 static const int sdHcalEC = 2;
263 static const int sdHcalOut = 3;
264 static const int sdHcalFwd = 4;
265 static const int sdHcalTT = 5;
266 static const int sdHcalCalib = 6;
267 static const int sdHcalCompst = 7;
268 
269 #endif
edm::InputTag ECalESSrc_
void storeECal(PGlobalSimHit &)
edm::EDGetTokenT< edm::PSimHitContainer > SiTIBHighSrc_Token_
edm::EDGetTokenT< edm::PSimHitContainer > SiTECHighSrc_Token_
static const int sdEcalBrl
static const int sdSiTEC
void produce(edm::Event &, const edm::EventSetup &) override
edm::InputTag ECalEESrc_
static const int sdHcalBrl
edm::EDGetTokenT< edm::PSimHitContainer > MuonRpcSrc_Token_
edm::InputTag MuonCscSrc_
static const int sdHcalEC
edm::InputTag MuonDtSrc_
edm::InputTag SiTOBHighSrc_
edm::InputTag PxlBrlHighSrc_
edm::InputTag PxlBrlLowSrc_
void storeMuon(PGlobalSimHit &)
edm::InputTag PxlFwdLowSrc_
static const int sdMuonCSC
void storeG4MC(PGlobalSimHit &)
static const int sdPxlBrl
edm::EDGetTokenT< edm::PSimHitContainer > PxlBrlHighSrc_Token_
edm::InputTag SiTIDLowSrc_
void storeTrk(PGlobalSimHit &)
void beginJob(void) override
static const int sdHcalCalib
edm::EDGetTokenT< edm::PSimHitContainer > PxlFwdHighSrc_Token_
static const int sdEcalFwd
edm::InputTag SiTECHighSrc_
edm::EDGetTokenT< edm::PSimHitContainer > SiTIBLowSrc_Token_
edm::InputTag ECalEBSrc_
static const int sdMuonRPCRgnFwdn
void fillMuon(edm::Event &, const edm::EventSetup &)
edm::EDGetTokenT< edm::PCaloHitContainer > HCalSrc_Token_
edm::EDGetTokenT< edm::PSimHitContainer > MuonCscSrc_Token_
GlobalHitsProducer(const edm::ParameterSet &)
static const int sdHcalFwd
void endJob() override
void fillTrk(edm::Event &, const edm::EventSetup &)
static const int dEcal
static const int sdSiTIB
edm::InputTag SiTIBLowSrc_
edm::EDGetTokenT< edm::PSimHitContainer > SiTIDLowSrc_Token_
edm::InputTag SiTECLowSrc_
static const int sdPxlFwd
static const int sdMuonRPCRgnBrl
static const int sdSiTID
edm::InputTag SiTIDHighSrc_
edm::EDGetTokenT< edm::PSimHitContainer > SiTOBLowSrc_Token_
static const int sdHcalEmpty
static const int sdMuonRPC
edm::EDGetTokenT< edm::SimTrackContainer > G4TrkSrc_Token_
edm::InputTag PxlFwdHighSrc_
static const int dHcal
edm::EDGetTokenT< edm::PCaloHitContainer > ECalESSrc_Token_
std::vector< float > FloatVector
static const int sdEcalPS
static const int sdEcalLPnD
static const int sdMuonRPCRgnFwdp
static const int sdSiTOB
edm::EDGetTokenT< edm::PSimHitContainer > SiTOBHighSrc_Token_
void fillECal(edm::Event &, const edm::EventSetup &)
void fillHCal(edm::Event &, const edm::EventSetup &)
static const int sdHcalTT
edm::EDGetTokenT< edm::PSimHitContainer > SiTIDHighSrc_Token_
void storeHCal(PGlobalSimHit &)
edm::InputTag SiTOBLowSrc_
edm::EDGetTokenT< edm::PSimHitContainer > PxlFwdLowSrc_Token_
edm::EDGetTokenT< edm::PSimHitContainer > MuonDtSrc_Token_
edm::EDGetTokenT< edm::PSimHitContainer > PxlBrlLowSrc_Token_
edm::EDGetTokenT< edm::SimVertexContainer > G4VtxSrc_Token_
static const int dTrk
edm::EDGetTokenT< edm::PCaloHitContainer > ECalEBSrc_Token_
edm::EDGetTokenT< edm::PCaloHitContainer > ECalEESrc_Token_
static const int sdMuonDT
static const int sdHcalCompst
static const int dMuon
void fillG4MC(edm::Event &)
edm::EDGetTokenT< edm::PSimHitContainer > SiTECLowSrc_Token_
edm::InputTag SiTIBHighSrc_
static const int sdEcalTT
edm::InputTag MuonRpcSrc_
static const int sdHcalOut