test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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>
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 #include "TH1F.h"
73 
74 class GlobalHitsProdHist : public edm::one::EDProducer<edm::EndRunProducer>
75 {
76 
77  public:
78 
79  //typedef std::vector<float> FloatVector;
80 
81  explicit GlobalHitsProdHist(const edm::ParameterSet&);
82  virtual ~GlobalHitsProdHist();
83  virtual void beginJob() override;
84  virtual void endJob() override;
85  virtual void produce(edm::Event&, const edm::EventSetup&) override;
86  virtual void endRunProduce(edm::Run&, const edm::EventSetup&) override;
87 
88  private:
89 
90  // production related methods
91  void fillG4MC(edm::Event&);
92  void fillTrk(edm::Event&, const edm::EventSetup&);
93  void fillMuon(edm::Event&, const edm::EventSetup&);
94  void fillECal(edm::Event&, const edm::EventSetup&);
95  void fillHCal(edm::Event&, const edm::EventSetup&);
96 
97  private:
98 
99  // parameter information
103  int vtxunit;
106 
107  //DQMStore *dbe;
108  //std::string outputfile;
109 
110  std::vector<std::string> histName_;
111  std::map<std::string, TH1F*> histMap_;
112 
113  // G4MC info
114  TH1F *hMCRGP[2];
115  TH1F *hMCG4Vtx[2];
116  TH1F *hGeantVtxX[2];
117  TH1F *hGeantVtxY[2];
118  TH1F *hGeantVtxZ[2];
119  TH1F *hMCG4Trk[2];
120  TH1F *hGeantTrkPt;
121  TH1F *hGeantTrkE;
123 
128 
129  // Electromagnetic info
130  // ECal info
131  TH1F *hCaloEcal[2];
132  TH1F *hCaloEcalE[2];
133  TH1F *hCaloEcalToF[2];
135  TH1F *hCaloEcalEta;
140 
141  // Preshower info
142  TH1F *hCaloPreSh[2];
143  TH1F *hCaloPreShE[2];
144  TH1F *hCaloPreShToF[2];
149 
150  // Hadronic info
151  // HCal info
152  TH1F *hCaloHcal[2];
153  TH1F *hCaloHcalE[2];
154  TH1F *hCaloHcalToF[2];
156  TH1F *hCaloHcalEta;
159 
160  // Tracker info
161  // Pixel info
162  int nPxlHits;
163  TH1F *hTrackerPx[2];
178 
179  // Strip info
180  int nSiHits;
181  TH1F *hTrackerSi[2];
204 
205  // Muon info
206  TH1F *hMuon[2];
207  TH1F *hMuonPhi;
208  TH1F *hMuonEta;
210 
211  // DT info
212  TH1F *hMuonDtToF[2];
213  TH1F *hMuonDtR;
216  // CSC info
217  TH1F *hMuonCscToF[2];
218  TH1F *hMuonCscZ;
221  // RPC info
222  TH1F *hMuonRpcFToF[2];
223  TH1F *hMuonRpcFZ;
224  TH1F *hMuonRpcBToF[2];
225  TH1F *hMuonRpcBR;
228 
229  // private statistics information
230  unsigned int count;
231 
232 }; // end class declaration
233 
234 #endif
235 
236 #ifndef GlobalHitMap
237 #define GlobalHitMap
238 // geometry mapping
239 static const int dTrk = 1;
240 static const int sdPxlBrl = 1;
241 static const int sdPxlFwd = 2;
242 static const int sdSiTIB = 3;
243 static const int sdSiTID = 4;
244 static const int sdSiTOB = 5;
245 static const int sdSiTEC = 6;
246 
247 static const int dMuon = 2;
248 static const int sdMuonDT = 1;
249 static const int sdMuonCSC = 2;
250 static const int sdMuonRPC = 3;
251 static const int sdMuonRPCRgnBrl = 0;
252 static const int sdMuonRPCRgnFwdp = 1;
253 static const int sdMuonRPCRgnFwdn = -1;
254 
255 static const int dEcal = 3;
256 static const int sdEcalBrl = 1;
257 static const int sdEcalFwd = 2;
258 static const int sdEcalPS = 3;
259 static const int sdEcalTT = 4;
260 static const int sdEcalLPnD = 5;
261 
262 static const int dHcal = 4;
263 static const int sdHcalEmpty = 0;
264 static const int sdHcalBrl = 1;
265 static const int sdHcalEC = 2;
266 static const int sdHcalOut = 3;
267 static const int sdHcalFwd = 4;
268 static const int sdHcalTT = 5;
269 static const int sdHcalCalib = 6;
270 static const int sdHcalCompst = 7;
271 
272 #endif
edm::InputTag SiTECHighSrc_
edm::EDGetTokenT< edm::PSimHitContainer > PxlFwdHighSrc_Token_
edm::EDGetTokenT< edm::PSimHitContainer > SiTECHighSrc_Token_
edm::InputTag SiTIDLowSrc_
std::map< std::string, TH1F * > histMap_
virtual 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_
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_
virtual void endRunProduce(edm::Run &, const edm::EventSetup &) override
static const int sdHcalEmpty
edm::InputTag SiTOBHighSrc_
virtual 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_
virtual 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:43
static const int sdHcalCalib
static const int sdMuonRPCRgnFwdp