CMS 3D CMS Logo

GlobalHitsProdHist.h
Go to the documentation of this file.
1 #ifndef GlobalHitsProdHist_h
2 #define GlobalHitsProdHist_h
3 
11 // framework & common header files
26 
27 // DQM services
28 //#include "DQMServices/Core/interface/DQMStore.h"
29 //#include "FWCore/ServiceRegistry/interface/Service.h"
30 
31 // tracker info
36 
37 // muon info
45 
46 // calorimeter info
52 
53 // data in edm::event
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 "TH1F.h"
72 #include "TString.h"
73 
74 class GlobalHitsProdHist : public edm::one::EDProducer<edm::EndRunProducer> {
75 public:
76  // typedef std::vector<float> FloatVector;
77 
78  explicit GlobalHitsProdHist(const edm::ParameterSet &);
79  ~GlobalHitsProdHist() override;
80  void beginJob() override;
81  void endJob() override;
82  void produce(edm::Event &, const edm::EventSetup &) override;
83  void endRunProduce(edm::Run &, const edm::EventSetup &) override;
84 
85 private:
86  // production related methods
87  void fillG4MC(edm::Event &);
88  void fillTrk(edm::Event &, const edm::EventSetup &);
89  void fillMuon(edm::Event &, const edm::EventSetup &);
90  void fillECal(edm::Event &, const edm::EventSetup &);
91  void fillHCal(edm::Event &, const edm::EventSetup &);
92 
93 private:
94  // parameter information
96  int verbosity;
97  int frequency;
98  int vtxunit;
101 
102  // DQMStore *dbe;
103  // std::string outputfile;
104 
105  std::vector<std::string> histName_;
106  std::map<std::string, TH1F *> histMap_;
107 
108  // G4MC info
109  TH1F *hMCRGP[2];
110  TH1F *hMCG4Vtx[2];
111  TH1F *hGeantVtxX[2];
112  TH1F *hGeantVtxY[2];
113  TH1F *hGeantVtxZ[2];
114  TH1F *hMCG4Trk[2];
115  TH1F *hGeantTrkPt;
116  TH1F *hGeantTrkE;
118 
123 
124  // Electromagnetic info
125  // ECal info
126  TH1F *hCaloEcal[2];
127  TH1F *hCaloEcalE[2];
128  TH1F *hCaloEcalToF[2];
135 
136  // Preshower info
137  TH1F *hCaloPreSh[2];
138  TH1F *hCaloPreShE[2];
139  TH1F *hCaloPreShToF[2];
144 
145  // Hadronic info
146  // HCal info
147  TH1F *hCaloHcal[2];
148  TH1F *hCaloHcalE[2];
149  TH1F *hCaloHcalToF[2];
154 
155  // Tracker info
156  // Pixel info
157  int nPxlHits;
158  TH1F *hTrackerPx[2];
173 
174  // Strip info
175  int nSiHits;
176  TH1F *hTrackerSi[2];
199 
200  // Muon info
201  TH1F *hMuon[2];
202  TH1F *hMuonPhi;
203  TH1F *hMuonEta;
205 
206  // DT info
207  TH1F *hMuonDtToF[2];
208  TH1F *hMuonDtR;
211  // CSC info
212  TH1F *hMuonCscToF[2];
213  TH1F *hMuonCscZ;
216  // RPC info
217  TH1F *hMuonRpcFToF[2];
218  TH1F *hMuonRpcFZ;
219  TH1F *hMuonRpcBToF[2];
220  TH1F *hMuonRpcBR;
223 
224  // private statistics information
225  unsigned int count;
226 
227 }; // end class declaration
228 
229 #endif
230 
231 #ifndef GlobalHitMap
232 #define GlobalHitMap
233 // geometry mapping
234 static const int dTrk = 1;
235 static const int sdPxlBrl = 1;
236 static const int sdPxlFwd = 2;
237 static const int sdSiTIB = 3;
238 static const int sdSiTID = 4;
239 static const int sdSiTOB = 5;
240 static const int sdSiTEC = 6;
241 
242 static const int dMuon = 2;
243 static const int sdMuonDT = 1;
244 static const int sdMuonCSC = 2;
245 static const int sdMuonRPC = 3;
246 static const int sdMuonRPCRgnBrl = 0;
247 static const int sdMuonRPCRgnFwdp = 1;
248 static const int sdMuonRPCRgnFwdn = -1;
249 
250 static const int dEcal = 3;
251 static const int sdEcalBrl = 1;
252 static const int sdEcalFwd = 2;
253 static const int sdEcalPS = 3;
254 static const int sdEcalTT = 4;
255 static const int sdEcalLPnD = 5;
256 
257 static const int dHcal = 4;
258 static const int sdHcalEmpty = 0;
259 static const int sdHcalBrl = 1;
260 static const int sdHcalEC = 2;
261 static const int sdHcalOut = 3;
262 static const int sdHcalFwd = 4;
263 static const int sdHcalTT = 5;
264 static const int sdHcalCalib = 6;
265 static const int sdHcalCompst = 7;
266 
267 #endif
edm::InputTag SiTECHighSrc_
edm::EDGetTokenT< edm::PSimHitContainer > PxlFwdHighSrc_Token_
edm::EDGetTokenT< edm::PSimHitContainer > SiTECHighSrc_Token_
edm::InputTag SiTIDLowSrc_
void beginJob() override
edm::EDGetTokenT< edm::PSimHitContainer > PxlBrlHighSrc_Token_
static const int sdEcalFwd
static const int sdEcalPS
static const int sdMuonCSC
edm::InputTag SiTECLowSrc_
edm::EDGetTokenT< edm::PSimHitContainer > PxlBrlLowSrc_Token_
edm::EDGetTokenT< edm::PSimHitContainer > SiTOBHighSrc_Token_
static const int sdSiTIB
edm::InputTag MuonRpcSrc_
static const int sdHcalCompst
static const int sdHcalOut
edm::EDGetTokenT< edm::PSimHitContainer > MuonRpcSrc_Token_
edm::InputTag MuonCscSrc_
static const int sdMuonRPC
static const int dTrk
void fillHCal(edm::Event &, const edm::EventSetup &)
static const int sdEcalBrl
edm::InputTag SiTIBLowSrc_
std::map< std::string, TH1F * > histMap_
edm::EDGetTokenT< edm::PCaloHitContainer > ECalESSrc_Token_
std::vector< std::string > histName_
static const int sdEcalTT
void fillG4MC(edm::Event &)
edm::InputTag PxlFwdHighSrc_
edm::InputTag MuonDtSrc_
static const int sdSiTOB
static const int sdSiTID
static const int sdPxlBrl
edm::InputTag ECalEESrc_
void endRunProduce(edm::Run &, const edm::EventSetup &) override
static const int sdHcalEmpty
edm::InputTag SiTOBHighSrc_
void produce(edm::Event &, const edm::EventSetup &) override
static const int sdMuonDT
edm::EDGetTokenT< edm::SimTrackContainer > G4TrkSrc_Token_
static const int sdHcalTT
void fillTrk(edm::Event &, const edm::EventSetup &)
edm::EDGetTokenT< edm::PSimHitContainer > SiTIDLowSrc_Token_
edm::EDGetTokenT< edm::PSimHitContainer > SiTIDHighSrc_Token_
edm::EDGetTokenT< edm::PSimHitContainer > SiTOBLowSrc_Token_
edm::InputTag ECalESSrc_
edm::InputTag SiTIBHighSrc_
edm::EDGetTokenT< edm::PCaloHitContainer > ECalEBSrc_Token_
edm::EDGetTokenT< edm::PCaloHitContainer > ECalEESrc_Token_
edm::EDGetTokenT< edm::PSimHitContainer > SiTIBHighSrc_Token_
edm::EDGetTokenT< edm::PSimHitContainer > SiTIBLowSrc_Token_
static const int dMuon
edm::InputTag PxlFwdLowSrc_
static const int sdHcalFwd
edm::EDGetTokenT< edm::PCaloHitContainer > HCalSrc_Token_
static const int sdMuonRPCRgnBrl
void fillECal(edm::Event &, const edm::EventSetup &)
edm::EDGetTokenT< edm::PSimHitContainer > SiTECLowSrc_Token_
void endJob() override
edm::EDGetTokenT< edm::PSimHitContainer > MuonCscSrc_Token_
edm::EDGetTokenT< edm::PSimHitContainer > MuonDtSrc_Token_
edm::EDGetTokenT< edm::SimVertexContainer > G4VtxSrc_Token_
static const int sdSiTEC
edm::InputTag PxlBrlHighSrc_
static const int sdHcalBrl
void fillMuon(edm::Event &, const edm::EventSetup &)
edm::InputTag PxlBrlLowSrc_
static const int sdHcalEC
static const int sdEcalLPnD
static const int dEcal
static const int sdMuonRPCRgnFwdn
edm::InputTag SiTOBLowSrc_
static const int sdPxlFwd
edm::EDGetTokenT< edm::PSimHitContainer > PxlFwdLowSrc_Token_
GlobalHitsProdHist(const edm::ParameterSet &)
edm::InputTag ECalEBSrc_
static const int dHcal
edm::InputTag SiTIDHighSrc_
Definition: Run.h:45
static const int sdHcalCalib
static const int sdMuonRPCRgnFwdp