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>
63 #include "CLHEP/Units/GlobalSystemOfUnits.h"
64 
65 #include <iostream>
66 #include <stdlib.h>
67 #include <string>
68 #include <memory>
69 #include <vector>
70 
71 #include "TString.h"
72 
73 class PGlobalSimHit;
74 
76 {
77 
78  public:
79 
80  typedef std::vector<float> FloatVector;
81 
82  explicit GlobalHitsProducer(const edm::ParameterSet&);
83  virtual ~GlobalHitsProducer();
84  virtual void beginJob( void ) override;
85  virtual void endJob() override;
86  virtual void produce(edm::Event&, const edm::EventSetup&) override;
87 
88  private:
89 
90  //GlobalValidation(const GlobalValidation&);
91  //const GlobalValidation& operator=(const GlobalValidation&);
92 
93  // production related methods
94  void fillG4MC(edm::Event&);
95  void storeG4MC(PGlobalSimHit&);
96  void fillTrk(edm::Event&, const edm::EventSetup&);
97  void storeTrk(PGlobalSimHit&);
98  void fillMuon(edm::Event&, const edm::EventSetup&);
99  void storeMuon(PGlobalSimHit&);
100  void fillECal(edm::Event&, const edm::EventSetup&);
101  void storeECal(PGlobalSimHit&);
102  void fillHCal(edm::Event&, const edm::EventSetup&);
103  void storeHCal(PGlobalSimHit&);
104 
105  void clear();
106 
107  private:
108 
109  // parameter information
113  int vtxunit;
117 
118  // G4MC info
120  FloatVector G4VtxX;
121  FloatVector G4VtxY;
122  FloatVector G4VtxZ;
123  FloatVector G4TrkPt;
124  FloatVector G4TrkE;
125 
130 
131  // Electromagnetic info
132  // ECal info
133  FloatVector ECalE;
134  FloatVector ECalToF;
135  FloatVector ECalPhi;
136  FloatVector ECalEta;
141 
142  // Preshower info
143  FloatVector PreShE;
144  FloatVector PreShToF;
145  FloatVector PreShPhi;
146  FloatVector PreShEta;
149 
150  // Hadronic info
151  // HCal info
152  FloatVector HCalE;
153  FloatVector HCalToF;
154  FloatVector HCalPhi;
155  FloatVector HCalEta;
158 
159  // Tracker info
160  // Pixel info
161  FloatVector PxlBrlToF;
162  FloatVector PxlBrlR;
163  FloatVector PxlBrlPhi;
164  FloatVector PxlBrlEta;
165  FloatVector PxlFwdToF;
166  FloatVector PxlFwdZ;
167  FloatVector PxlFwdPhi;
168  FloatVector PxlFwdEta;
177 
178  // Strip info
179  FloatVector SiBrlToF;
180  FloatVector SiBrlR;
181  FloatVector SiBrlPhi;
182  FloatVector SiBrlEta;
183  FloatVector SiFwdToF;
184  FloatVector SiFwdZ;
185  FloatVector SiFwdPhi;
186  FloatVector SiFwdEta;
203 
204  // Muon info
205  // DT info
206  FloatVector MuonDtToF;
207  FloatVector MuonDtR;
208  FloatVector MuonDtPhi;
209  FloatVector MuonDtEta;
212  // CSC info
213  FloatVector MuonCscToF;
214  FloatVector MuonCscZ;
215  FloatVector MuonCscPhi;
216  FloatVector MuonCscEta;
219  // RPC info
220  FloatVector MuonRpcBrlToF;
221  FloatVector MuonRpcBrlR;
222  FloatVector MuonRpcBrlPhi;
223  FloatVector MuonRpcBrlEta;
224  FloatVector MuonRpcFwdToF;
225  FloatVector MuonRpcFwdZ;
226  FloatVector MuonRpcFwdPhi;
227  FloatVector MuonRpcFwdEta;
230 
231  // private statistics information
232  unsigned int count;
233 
234 }; // end class declaration
235 
236 #endif
237 
238 #ifndef GlobalHitMap
239 #define GlobalHitMap
240 // geometry mapping
241 static const int dTrk = 1;
242 static const int sdPxlBrl = 1;
243 static const int sdPxlFwd = 2;
244 static const int sdSiTIB = 3;
245 static const int sdSiTID = 4;
246 static const int sdSiTOB = 5;
247 static const int sdSiTEC = 6;
248 
249 static const int dMuon = 2;
250 static const int sdMuonDT = 1;
251 static const int sdMuonCSC = 2;
252 static const int sdMuonRPC = 3;
253 static const int sdMuonRPCRgnBrl = 0;
254 static const int sdMuonRPCRgnFwdp = 1;
255 static const int sdMuonRPCRgnFwdn = -1;
256 
257 static const int dEcal = 3;
258 static const int sdEcalBrl = 1;
259 static const int sdEcalFwd = 2;
260 static const int sdEcalPS = 3;
261 static const int sdEcalTT = 4;
262 static const int sdEcalLPnD = 5;
263 
264 static const int dHcal = 4;
265 static const int sdHcalEmpty = 0;
266 static const int sdHcalBrl = 1;
267 static const int sdHcalEC = 2;
268 static const int sdHcalOut = 3;
269 static const int sdHcalFwd = 4;
270 static const int sdHcalTT = 5;
271 static const int sdHcalCalib = 6;
272 static const int sdHcalCompst = 7;
273 
274 #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
virtual 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 &)
virtual 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
virtual 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