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
120 
125 
126  // Electromagnetic info
127  // ECal info
136 
137  // Preshower info
144 
145  // Hadronic info
146  // HCal info
153 
154  // Tracker info
155  // Pixel info
172 
173  // Strip info
198 
199  // Muon info
200  // DT info
207  // CSC info
214  // RPC info
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
GlobalHitsProducer::PxlFwdZ
FloatVector PxlFwdZ
Definition: GlobalHitsProducer.h:161
GlobalHitsProducer::MuonCscPhi
FloatVector MuonCscPhi
Definition: GlobalHitsProducer.h:210
sdPxlFwd
static const int sdPxlFwd
Definition: GlobalHitsProducer.h:238
GlobalHitsProducer::frequency
int frequency
Definition: GlobalHitsProducer.h:107
Handle.h
GlobalHitsProducer::MuonRpcBrlPhi
FloatVector MuonRpcBrlPhi
Definition: GlobalHitsProducer.h:217
GlobalHitsProducer::PxlFwdToF
FloatVector PxlFwdToF
Definition: GlobalHitsProducer.h:160
GlobalHitsProducer::clear
void clear()
Definition: GlobalHitsProducer.cc:1363
PixelSubdetector.h
GlobalHitsProducer::MuonCscSrc_Token_
edm::EDGetTokenT< edm::PSimHitContainer > MuonCscSrc_Token_
Definition: GlobalHitsProducer.h:213
MessageLogger.h
GlobalHitsProducer::fillMuon
void fillMuon(edm::Event &, const edm::EventSetup &)
Definition: GlobalHitsProducer.cc:771
TrackerGeometry.h
sdMuonRPCRgnFwdp
static const int sdMuonRPCRgnFwdp
Definition: GlobalHitsProducer.h:249
GlobalHitsProducer::SiTECHighSrc_
edm::InputTag SiTECHighSrc_
Definition: GlobalHitsProducer.h:189
GlobalHitsProducer::SiTIBHighSrc_Token_
edm::EDGetTokenT< edm::PSimHitContainer > SiTIBHighSrc_Token_
Definition: GlobalHitsProducer.h:191
GlobalHitsProducer::MuonRpcSrc_
edm::InputTag MuonRpcSrc_
Definition: GlobalHitsProducer.h:223
EDProducer.h
GlobalHitsProducer::ECalEESrc_Token_
edm::EDGetTokenT< edm::PCaloHitContainer > ECalEESrc_Token_
Definition: GlobalHitsProducer.h:135
ESHandle.h
sdHcalFwd
static const int sdHcalFwd
Definition: GlobalHitsProducer.h:264
GlobalHitsProducer::FloatVector
std::vector< float > FloatVector
Definition: GlobalHitsProducer.h:77
edm::EDGetTokenT< edm::SimVertexContainer >
GlobalHitsProducer::label
std::string label
Definition: GlobalHitsProducer.h:109
GlobalHitsProducer::PreShPhi
FloatVector PreShPhi
Definition: GlobalHitsProducer.h:140
GlobalHitsProducer::SiBrlR
FloatVector SiBrlR
Definition: GlobalHitsProducer.h:175
GlobalHitsProducer::MuonRpcFwdToF
FloatVector MuonRpcFwdToF
Definition: GlobalHitsProducer.h:219
PSimHitContainer.h
sdMuonDT
static const int sdMuonDT
Definition: GlobalHitsProducer.h:245
sdHcalTT
static const int sdHcalTT
Definition: GlobalHitsProducer.h:265
GlobalHitsProducer::SiTECLowSrc_
edm::InputTag SiTECLowSrc_
Definition: GlobalHitsProducer.h:188
GlobalHitsProducer::SiFwdPhi
FloatVector SiFwdPhi
Definition: GlobalHitsProducer.h:180
GlobalHitsProducer::SiBrlPhi
FloatVector SiBrlPhi
Definition: GlobalHitsProducer.h:176
GlobalHitsProducer::beginJob
void beginJob(void) override
Definition: GlobalHitsProducer.cc:138
GlobalHitsProducer::PreShToF
FloatVector PreShToF
Definition: GlobalHitsProducer.h:139
GlobalHitsProducer::MuonDtSrc_Token_
edm::EDGetTokenT< edm::PSimHitContainer > MuonDtSrc_Token_
Definition: GlobalHitsProducer.h:206
GlobalHitsProducer::SiTIDHighSrc_Token_
edm::EDGetTokenT< edm::PSimHitContainer > SiTIDHighSrc_Token_
Definition: GlobalHitsProducer.h:195
GlobalHitsProducer::PxlFwdEta
FloatVector PxlFwdEta
Definition: GlobalHitsProducer.h:163
sdSiTID
static const int sdSiTID
Definition: GlobalHitsProducer.h:240
GlobalHitsProducer::HCalEta
FloatVector HCalEta
Definition: GlobalHitsProducer.h:150
dHcal
static const int dHcal
Definition: GlobalHitsProducer.h:259
sdHcalEmpty
static const int sdHcalEmpty
Definition: GlobalHitsProducer.h:260
GlobalHitsProducer::fillECal
void fillECal(edm::Event &, const edm::EventSetup &)
Definition: GlobalHitsProducer.cc:1073
GlobalHitsProducer::HCalSrc_Token_
edm::EDGetTokenT< edm::PCaloHitContainer > HCalSrc_Token_
Definition: GlobalHitsProducer.h:152
GlobalHitsProducer::SiTOBLowSrc_
edm::InputTag SiTOBLowSrc_
Definition: GlobalHitsProducer.h:184
GlobalHitsProducer::MuonCscZ
FloatVector MuonCscZ
Definition: GlobalHitsProducer.h:209
GlobalHitsProducer::PxlBrlLowSrc_
edm::InputTag PxlBrlLowSrc_
Definition: GlobalHitsProducer.h:164
GlobalHitsProducer::SiBrlToF
FloatVector SiBrlToF
Definition: GlobalHitsProducer.h:174
GlobalHitsProducer::SiTOBLowSrc_Token_
edm::EDGetTokenT< edm::PSimHitContainer > SiTOBLowSrc_Token_
Definition: GlobalHitsProducer.h:192
GlobalHitsProducer::MuonDtToF
FloatVector MuonDtToF
Definition: GlobalHitsProducer.h:201
GlobalHitsProducer::fillG4MC
void fillG4MC(edm::Event &)
Definition: GlobalHitsProducer.cc:240
GlobalHitsProducer::MuonCscToF
FloatVector MuonCscToF
Definition: GlobalHitsProducer.h:208
PGlobalSimHit
Definition: PValidationFormats.h:20
GlobalHitsProducer::MuonDtEta
FloatVector MuonDtEta
Definition: GlobalHitsProducer.h:204
sdSiTOB
static const int sdSiTOB
Definition: GlobalHitsProducer.h:241
GlobalHitsProducer::MuonRpcBrlEta
FloatVector MuonRpcBrlEta
Definition: GlobalHitsProducer.h:218
GlobalHitsProducer::PxlBrlEta
FloatVector PxlBrlEta
Definition: GlobalHitsProducer.h:159
GlobalHitsProducer::ECalEBSrc_Token_
edm::EDGetTokenT< edm::PCaloHitContainer > ECalEBSrc_Token_
Definition: GlobalHitsProducer.h:134
GlobalHitsProducer::SiFwdEta
FloatVector SiFwdEta
Definition: GlobalHitsProducer.h:181
dMuon
static const int dMuon
Definition: GlobalHitsProducer.h:244
GlobalHitsProducer::MuonRpcBrlR
FloatVector MuonRpcBrlR
Definition: GlobalHitsProducer.h:216
GlobalHitsProducer::G4TrkSrc_
edm::InputTag G4TrkSrc_
Definition: GlobalHitsProducer.h:122
GlobalHitsProducer::ECalESSrc_
edm::InputTag ECalESSrc_
Definition: GlobalHitsProducer.h:142
MakerMacros.h
GlobalHitsProducer::SiTIDHighSrc_
edm::InputTag SiTIDHighSrc_
Definition: GlobalHitsProducer.h:187
GlobalHitsProducer::PxlBrlHighSrc_Token_
edm::EDGetTokenT< edm::PSimHitContainer > PxlBrlHighSrc_Token_
Definition: GlobalHitsProducer.h:169
GlobalHitsProducer::~GlobalHitsProducer
~GlobalHitsProducer() override
Definition: GlobalHitsProducer.cc:136
GlobalHitsProducer::getAllProvenances
bool getAllProvenances
Definition: GlobalHitsProducer.h:110
GlobalHitsProducer::ECalEESrc_
edm::InputTag ECalEESrc_
Definition: GlobalHitsProducer.h:133
GlobalHitsProducer::SiTIBHighSrc_
edm::InputTag SiTIBHighSrc_
Definition: GlobalHitsProducer.h:183
GlobalHitsProducer::HCalE
FloatVector HCalE
Definition: GlobalHitsProducer.h:147
dTrk
static const int dTrk
Definition: GlobalHitsProducer.h:236
Provenance.h
GlobalHitsProducer::G4VtxSrc_Token_
edm::EDGetTokenT< edm::SimVertexContainer > G4VtxSrc_Token_
Definition: GlobalHitsProducer.h:123
GlobalHitsProducer::G4VtxY
FloatVector G4VtxY
Definition: GlobalHitsProducer.h:116
GlobalHitsProducer::PxlFwdLowSrc_Token_
edm::EDGetTokenT< edm::PSimHitContainer > PxlFwdLowSrc_Token_
Definition: GlobalHitsProducer.h:170
GlobalHitsProducer::MuonCscSrc_
edm::InputTag MuonCscSrc_
Definition: GlobalHitsProducer.h:212
GlobalHitsProducer::storeMuon
void storeMuon(PGlobalSimHit &)
Definition: GlobalHitsProducer.cc:1006
GlobalHitsProducer::SiTIDLowSrc_
edm::InputTag SiTIDLowSrc_
Definition: GlobalHitsProducer.h:186
GlobalHitsProducer::MuonDtSrc_
edm::InputTag MuonDtSrc_
Definition: GlobalHitsProducer.h:205
GlobalHitsProducer::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition: GlobalHitsProducer.cc:147
sdHcalCompst
static const int sdHcalCompst
Definition: GlobalHitsProducer.h:267
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EcalSubdetector.h
DTGeometry.h
GlobalHitsProducer::PxlFwdPhi
FloatVector PxlFwdPhi
Definition: GlobalHitsProducer.h:162
RPCDetId.h
GlobalHitsProducer::storeG4MC
void storeG4MC(PGlobalSimHit &)
Definition: GlobalHitsProducer.cc:348
sdHcalOut
static const int sdHcalOut
Definition: GlobalHitsProducer.h:263
TrackerDigiGeometryRecord.h
CaloSubdetectorGeometry.h
GlobalHitsProducer::ECalE
FloatVector ECalE
Definition: GlobalHitsProducer.h:128
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
GlobalHitsProducer::verbosity
int verbosity
Definition: GlobalHitsProducer.h:106
GlobalHitsProducer::G4VtxX
FloatVector G4VtxX
Definition: GlobalHitsProducer.h:115
GlobalHitsProducer::count
unsigned int count
Definition: GlobalHitsProducer.h:227
GlobalHitsProducer::nRawGenPart
int nRawGenPart
Definition: GlobalHitsProducer.h:114
sdEcalTT
static const int sdEcalTT
Definition: GlobalHitsProducer.h:256
GlobalHitsProducer::SiTECHighSrc_Token_
edm::EDGetTokenT< edm::PSimHitContainer > SiTECHighSrc_Token_
Definition: GlobalHitsProducer.h:197
LorentzVector.h
GlobalHitsProducer::fillHCal
void fillHCal(edm::Event &, const edm::EventSetup &)
Definition: GlobalHitsProducer.cc:1257
GlobalHitsProducer::storeHCal
void storeHCal(PGlobalSimHit &)
Definition: GlobalHitsProducer.cc:1338
sdHcalEC
static const int sdHcalEC
Definition: GlobalHitsProducer.h:262
GlobalHitsProducer::ECalPhi
FloatVector ECalPhi
Definition: GlobalHitsProducer.h:130
sdPxlBrl
static const int sdPxlBrl
Definition: GlobalHitsProducer.h:237
sdSiTEC
static const int sdSiTEC
Definition: GlobalHitsProducer.h:242
GlobalHitsProducer::SiTECLowSrc_Token_
edm::EDGetTokenT< edm::PSimHitContainer > SiTECLowSrc_Token_
Definition: GlobalHitsProducer.h:196
GlobalHitsProducer::ECalEBSrc_
edm::InputTag ECalEBSrc_
Definition: GlobalHitsProducer.h:132
edm::EventSetup
Definition: EventSetup.h:58
HcalSubdetector.h
GlobalHitsProducer::G4TrkE
FloatVector G4TrkE
Definition: GlobalHitsProducer.h:119
MuonSubdetId.h
GlobalHitsProducer
Definition: GlobalHitsProducer.h:75
GlobalHitsProducer::printProvenanceInfo
bool printProvenanceInfo
Definition: GlobalHitsProducer.h:111
InputTag.h
sdHcalCalib
static const int sdHcalCalib
Definition: GlobalHitsProducer.h:266
GlobalHitsProducer::ECalESSrc_Token_
edm::EDGetTokenT< edm::PCaloHitContainer > ECalESSrc_Token_
Definition: GlobalHitsProducer.h:143
GlobalHitsProducer::endJob
void endJob() override
Definition: GlobalHitsProducer.cc:140
sdEcalBrl
static const int sdEcalBrl
Definition: GlobalHitsProducer.h:253
GlobalHitsProducer::PxlBrlLowSrc_Token_
edm::EDGetTokenT< edm::PSimHitContainer > PxlBrlLowSrc_Token_
Definition: GlobalHitsProducer.h:168
GlobalHitsProducer::fillTrk
void fillTrk(edm::Event &, const edm::EventSetup &)
Definition: GlobalHitsProducer.cc:384
GlobalHitsProducer::SiBrlEta
FloatVector SiBrlEta
Definition: GlobalHitsProducer.h:177
GlobalHitsProducer::PxlBrlR
FloatVector PxlBrlR
Definition: GlobalHitsProducer.h:157
GlobalHitsProducer::PxlBrlToF
FloatVector PxlBrlToF
Definition: GlobalHitsProducer.h:156
GeomDet.h
GlobalHitsProducer::SiTIBLowSrc_
edm::InputTag SiTIBLowSrc_
Definition: GlobalHitsProducer.h:182
CaloCellGeometry.h
sdMuonRPCRgnFwdn
static const int sdMuonRPCRgnFwdn
Definition: GlobalHitsProducer.h:250
GlobalHitsProducer::vtxunit
int vtxunit
Definition: GlobalHitsProducer.h:108
GlobalHitsProducer::MuonDtR
FloatVector MuonDtR
Definition: GlobalHitsProducer.h:202
GlobalHitsProducer::SiTIBLowSrc_Token_
edm::EDGetTokenT< edm::PSimHitContainer > SiTIBLowSrc_Token_
Definition: GlobalHitsProducer.h:190
sdHcalBrl
static const int sdHcalBrl
Definition: GlobalHitsProducer.h:261
GlobalHitsProducer::MuonRpcFwdPhi
FloatVector MuonRpcFwdPhi
Definition: GlobalHitsProducer.h:221
GlobalHitsProducer::MuonRpcBrlToF
FloatVector MuonRpcBrlToF
Definition: GlobalHitsProducer.h:215
DTWireId.h
GlobalHitsProducer::MuonRpcSrc_Token_
edm::EDGetTokenT< edm::PSimHitContainer > MuonRpcSrc_Token_
Definition: GlobalHitsProducer.h:224
DetId.h
GlobalHitsProducer::SiFwdToF
FloatVector SiFwdToF
Definition: GlobalHitsProducer.h:178
Frameworkfwd.h
GlobalHitsProducer::storeTrk
void storeTrk(PGlobalSimHit &)
Definition: GlobalHitsProducer.cc:704
CaloGeometry.h
GlobalHitsProducer::HCalSrc_
edm::InputTag HCalSrc_
Definition: GlobalHitsProducer.h:151
GlobalHitsProducer::ECalToF
FloatVector ECalToF
Definition: GlobalHitsProducer.h:129
GlobalHitsProducer::PxlBrlHighSrc_
edm::InputTag PxlBrlHighSrc_
Definition: GlobalHitsProducer.h:165
GlobalHitsProducer::PxlFwdHighSrc_Token_
edm::EDGetTokenT< edm::PSimHitContainer > PxlFwdHighSrc_Token_
Definition: GlobalHitsProducer.h:171
sdMuonCSC
static const int sdMuonCSC
Definition: GlobalHitsProducer.h:246
GlobalHitsProducer::MuonDtPhi
FloatVector MuonDtPhi
Definition: GlobalHitsProducer.h:203
GlobalHitsProducer::GlobalHitsProducer
GlobalHitsProducer(const edm::ParameterSet &)
Definition: GlobalHitsProducer.cc:12
GlobalHitsProducer::MuonCscEta
FloatVector MuonCscEta
Definition: GlobalHitsProducer.h:211
EventSetup.h
edm::EDProducer
Definition: EDProducer.h:35
sdEcalFwd
static const int sdEcalFwd
Definition: GlobalHitsProducer.h:254
GlobalHitsProducer::PreShE
FloatVector PreShE
Definition: GlobalHitsProducer.h:138
PCaloHitContainer.h
GlobalHitsProducer::PreShEta
FloatVector PreShEta
Definition: GlobalHitsProducer.h:141
GlobalHitsProducer::HCalPhi
FloatVector HCalPhi
Definition: GlobalHitsProducer.h:149
GlobalHitsProducer::G4TrkSrc_Token_
edm::EDGetTokenT< edm::SimTrackContainer > G4TrkSrc_Token_
Definition: GlobalHitsProducer.h:124
GlobalHitsProducer::PxlBrlPhi
FloatVector PxlBrlPhi
Definition: GlobalHitsProducer.h:158
dEcal
static const int dEcal
Definition: GlobalHitsProducer.h:252
ParameterSet.h
HepMCProduct.h
MuonGeometryRecord.h
GlobalHitsProducer::G4VtxZ
FloatVector G4VtxZ
Definition: GlobalHitsProducer.h:117
GlobalHitsProducer::fName
std::string fName
Definition: GlobalHitsProducer.h:105
GlobalHitsProducer::G4TrkPt
FloatVector G4TrkPt
Definition: GlobalHitsProducer.h:118
edm::Event
Definition: Event.h:73
GlobalHitsProducer::SiTOBHighSrc_Token_
edm::EDGetTokenT< edm::PSimHitContainer > SiTOBHighSrc_Token_
Definition: GlobalHitsProducer.h:193
GlobalHitsProducer::storeECal
void storeECal(PGlobalSimHit &)
Definition: GlobalHitsProducer.cc:1218
GlobalHitsProducer::SiTOBHighSrc_
edm::InputTag SiTOBHighSrc_
Definition: GlobalHitsProducer.h:185
GlobalHitsProducer::HCalToF
FloatVector HCalToF
Definition: GlobalHitsProducer.h:148
sdMuonRPCRgnBrl
static const int sdMuonRPCRgnBrl
Definition: GlobalHitsProducer.h:248
GlobalHitsProducer::MuonRpcFwdZ
FloatVector MuonRpcFwdZ
Definition: GlobalHitsProducer.h:220
GlobalHitsProducer::G4VtxSrc_
edm::InputTag G4VtxSrc_
Definition: GlobalHitsProducer.h:121
GlobalHitsProducer::ECalEta
FloatVector ECalEta
Definition: GlobalHitsProducer.h:131
GlobalHitsProducer::SiFwdZ
FloatVector SiFwdZ
Definition: GlobalHitsProducer.h:179
StripSubdetector.h
RPCGeometry.h
SimTrackContainer.h
sdMuonRPC
static const int sdMuonRPC
Definition: GlobalHitsProducer.h:247
GlobalHitsProducer::SiTIDLowSrc_Token_
edm::EDGetTokenT< edm::PSimHitContainer > SiTIDLowSrc_Token_
Definition: GlobalHitsProducer.h:194
edm::InputTag
Definition: InputTag.h:15
SimVertexContainer.h
sdEcalPS
static const int sdEcalPS
Definition: GlobalHitsProducer.h:255
PValidationFormats.h
GlobalHitsProducer::PxlFwdHighSrc_
edm::InputTag PxlFwdHighSrc_
Definition: GlobalHitsProducer.h:167
CSCGeometry.h
sdSiTIB
static const int sdSiTIB
Definition: GlobalHitsProducer.h:239
GlobalHitsProducer::PxlFwdLowSrc_
edm::InputTag PxlFwdLowSrc_
Definition: GlobalHitsProducer.h:166
sdEcalLPnD
static const int sdEcalLPnD
Definition: GlobalHitsProducer.h:257
GlobalHitsProducer::MuonRpcFwdEta
FloatVector MuonRpcFwdEta
Definition: GlobalHitsProducer.h:222