CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Private Attributes
TrackerHitAnalyzer Class Reference

#include <TrackerHitAnalyzer.h>

Inheritance diagram for TrackerHitAnalyzer:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 TrackerHitAnalyzer (const edm::ParameterSet &ps)
 Constructor. More...
 
 ~TrackerHitAnalyzer ()
 Destructor. More...
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndex indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c)
 Analyze. More...
 
void endJob (void)
 
- Protected Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Private Attributes

DQMStorefDBE
 
std::string fOutputFile
 
edm::InputTag G4TrkSrc_
 
MonitorElementh1e [12]
 
MonitorElementh1ex [12]
 
MonitorElementh1ey [12]
 
MonitorElementh1ez [12]
 
MonitorElementh1lx [12]
 
MonitorElementh1ly [12]
 
MonitorElementh2e [12]
 
MonitorElementh2ex [12]
 
MonitorElementh2ey [12]
 
MonitorElementh2ez [12]
 
MonitorElementh2lx [12]
 
MonitorElementh2ly [12]
 
MonitorElementh3e [12]
 
MonitorElementh3ex [12]
 
MonitorElementh3ey [12]
 
MonitorElementh3ez [12]
 
MonitorElementh3lx [12]
 
MonitorElementh3ly [12]
 
MonitorElementh4e [12]
 
MonitorElementh4ex [12]
 
MonitorElementh4ey [12]
 
MonitorElementh4ez [12]
 
MonitorElementh4lx [12]
 
MonitorElementh4ly [12]
 
MonitorElementh5e [12]
 
MonitorElementh5ex [12]
 
MonitorElementh5ey [12]
 
MonitorElementh5ez [12]
 
MonitorElementh5lx [12]
 
MonitorElementh5ly [12]
 
MonitorElementh6e [12]
 
MonitorElementh6ex [12]
 
MonitorElementh6ey [12]
 
MonitorElementh6ez [12]
 
MonitorElementh6lx [12]
 
MonitorElementh6ly [12]
 
MonitorElementhtofeta
 
MonitorElementhtofeta_profile
 
MonitorElementhtofphi
 
MonitorElementhtofphi_profile
 
MonitorElementhtofr
 
MonitorElementhtofr_profile
 
MonitorElementhtofz
 
MonitorElementhtofz_profile
 
edm::InputTag PxlBrlHighSrc_
 
edm::InputTag PxlBrlLowSrc_
 
edm::InputTag PxlFwdHighSrc_
 
edm::InputTag PxlFwdLowSrc_
 
edm::InputTag SiTECHighSrc_
 
edm::InputTag SiTECLowSrc_
 
edm::InputTag SiTIBHighSrc_
 
edm::InputTag SiTIBLowSrc_
 
edm::InputTag SiTIDHighSrc_
 
edm::InputTag SiTIDLowSrc_
 
edm::InputTag SiTOBHighSrc_
 
edm::InputTag SiTOBLowSrc_
 
bool verbose_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 

Detailed Description

Definition at line 43 of file TrackerHitAnalyzer.h.

Constructor & Destructor Documentation

TrackerHitAnalyzer::TrackerHitAnalyzer ( const edm::ParameterSet ps)

Constructor.

Definition at line 35 of file TrackerHitAnalyzer.cc.

References DQMStore::book1D(), DQMStore::book2D(), fDBE, fOutputFile, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), h1e, h1ex, h1ey, h1ez, h1lx, h1ly, h2e, h2ex, h2ey, h2ez, h2lx, h2ly, h3e, h3ex, h3ey, h3ez, h3lx, h3ly, h4e, h4ex, h4ey, h4ez, h4lx, h4ly, h5e, h5ex, h5ey, h5ez, h5lx, h5ly, h6e, h6ex, h6ey, h6ez, h6lx, h6ly, htofeta, htofphi, htofr, htofz, i, NULL, cppFunctionSkipper::operator, PxlBrlHighSrc_, PxlBrlLowSrc_, PxlFwdHighSrc_, PxlFwdLowSrc_, DQMStore::setCurrentFolder(), DQMStore::setVerbose(), DQMStore::showDirStructure(), SiTECHighSrc_, SiTECLowSrc_, SiTIBHighSrc_, SiTIBLowSrc_, SiTIDHighSrc_, SiTIDLowSrc_, SiTOBHighSrc_, SiTOBLowSrc_, and verbose_.

35  :
36  G4TrkSrc_(ps.getParameter<edm::InputTag>("G4TrkSrc")) {
37 
39  fOutputFile = ps.getUntrackedParameter<string>("outputFile", "TrackerHitHisto.root");
40  verbose_ = ps.getUntrackedParameter<bool>("Verbosity",false);
41  //get Labels to use to extract information
42  PxlBrlLowSrc_ = ps.getParameter<edm::InputTag>("PxlBrlLowSrc");
43  PxlBrlHighSrc_ = ps.getParameter<edm::InputTag>("PxlBrlHighSrc");
44  PxlFwdLowSrc_ = ps.getParameter<edm::InputTag>("PxlFwdLowSrc");
45  PxlFwdHighSrc_ = ps.getParameter<edm::InputTag>("PxlFwdHighSrc");
46 
47  SiTIBLowSrc_ = ps.getParameter<edm::InputTag>("SiTIBLowSrc");
48  SiTIBHighSrc_ = ps.getParameter<edm::InputTag>("SiTIBHighSrc");
49  SiTOBLowSrc_ = ps.getParameter<edm::InputTag>("SiTOBLowSrc");
50  SiTOBHighSrc_ = ps.getParameter<edm::InputTag>("SiTOBHighSrc");
51  SiTIDLowSrc_ = ps.getParameter<edm::InputTag>("SiTIDLowSrc");
52  SiTIDHighSrc_ = ps.getParameter<edm::InputTag>("SiTIDHighSrc");
53  SiTECLowSrc_ = ps.getParameter<edm::InputTag>("SiTECLowSrc");
54  SiTECHighSrc_ = ps.getParameter<edm::InputTag>("SiTECHighSrc");
55 
56 
58 
59  Char_t hname1[50], htitle1[80];
60  Char_t hname2[50], htitle2[80];
61  Char_t hname3[50], htitle3[80];
62  Char_t hname4[50], htitle4[80];
63  Char_t hname5[50], htitle5[80];
64  Char_t hname6[50], htitle6[80];
65 
66  if ( fDBE ) {
67  if ( verbose_ ) {
68  fDBE->setVerbose(1);
69  } else {
70  fDBE->setVerbose(0);
71  }
72  }
73 
74  if ( fDBE) {
75  if ( verbose_ ) fDBE->showDirStructure();
76  }
77 
78  if ( fDBE != NULL ) {
79 // fDBE->setCurrentFolder("TrackerHitsV/TrackerHitTask");
80 
81  // is there any way to record CPU Info ???
82  // if so, it can be done once - via beginJob()
83  int nbin = 5000;
84 
85  fDBE->setCurrentFolder("TrackerHitsV/TrackerHit/");
86  htofeta = fDBE->book2D ("tof_eta", "Time of flight vs eta", nbin , -3.0 , 3.0,200,-100,100);
87  htofphi = fDBE->book2D("tof_phi", "Time of flight vs phi", nbin,-180,180,200,-100,100);
88  htofr = fDBE->book2D("tof_r", "Time of flight vs r", nbin , 0 , 300, 200, -100,100);
89  htofz = fDBE->book2D("tof_z", "Time of flight vs z", nbin , -280 , 280, 200, -100,100);
90 
91 
92  const float E2NEL = 1.;
93 
94  const char *Region[] = {"005","051","115","152","225","253",
95  "-050","-105","-151","-215","-252","-325"};
96  nbin = 10000;
97 
98 // Energy loss histograms
99  for(int i=0; i<12; i++) {
100 
101  sprintf (htitle1,"Energy loss in TIB %s", Region[i]);
102  sprintf (htitle2,"Energy loss in TOB %s", Region[i]);
103  sprintf (htitle3,"Energy loss in TID %s", Region[i]);
104  sprintf (htitle4,"Energy loss in TEC %s", Region[i]);
105  sprintf (htitle5,"Energy loss in BPIX %s", Region[i]);
106  sprintf (htitle6,"Energy loss in FPIX %s", Region[i]);
107 
108  sprintf (hname1,"Eloss_TIB_%i",i+1);
109  sprintf (hname2,"Eloss_TOB_%i",i+1);
110  sprintf (hname3,"Eloss_TID_%i",i+1);
111  sprintf (hname4,"Eloss_TEC_%i",i+1);
112  sprintf (hname5,"Eloss_BPIX_%i",i+1);
113  sprintf (hname6,"Eloss_FPIX_%i",i+1);
114 
115  fDBE->setCurrentFolder("TrackerHitsV/TrackerHit/TIBHit");
116  h1e[i] = fDBE->book1D (hname1, htitle1, nbin , 0.0 , 0.001*E2NEL);
117  fDBE->setCurrentFolder("TrackerHitsV/TrackerHit/TOBHit");
118  h2e[i] = fDBE->book1D (hname2, htitle2, nbin , 0.0 , 0.001*E2NEL);
119  fDBE->setCurrentFolder("TrackerHitsV/TrackerHit/TIDHit");
120  h3e[i] = fDBE->book1D (hname3, htitle3, nbin , 0.0 , 0.001*E2NEL);
121  fDBE->setCurrentFolder("TrackerHitsV/TrackerHit/TECHit");
122  h4e[i] = fDBE->book1D (hname4, htitle4, nbin , 0.0 , 0.001*E2NEL);
123  fDBE->setCurrentFolder("TrackerHitsV/TrackerHit/BPIXHit");
124  h5e[i] = fDBE->book1D (hname5, htitle5, nbin , 0.0 , 0.001*E2NEL);
125  fDBE->setCurrentFolder("TrackerHitsV/TrackerHit/FPIXHit");
126  h6e[i] = fDBE->book1D (hname6, htitle6, nbin , 0.0 , 0.001*E2NEL);
127 
128  }
129 
130 // limits
131 const float high[] = {0.03, 0.03, 0.02, 0.03, 0.03, 0.03};
132 const float low[] = {-0.03, -0.03, -0.02, -0.03, -0.03, -0.03};
133 
134  for(int i=0; i<12; i++) {
135 
136  sprintf (htitle1,"Entryx-Exitx in TIB %s", Region[i]);
137  sprintf (htitle2,"Entryx-Exitx in TOB %s", Region[i]);
138  sprintf (htitle3,"Entryx-Exitx in TID %s", Region[i]);
139  sprintf (htitle4,"Entryx-Exitx in TEC %s", Region[i]);
140  sprintf (htitle5,"Entryx-Exitx in BPIX %s", Region[i]);
141  sprintf (htitle6,"Entryx-Exitx in FPIX %s", Region[i]);
142 
143  sprintf (hname1,"Entryx-Exitx_TIB_%i",i+1);
144  sprintf (hname2,"Entryx-Exitx_TOB_%i",i+1);
145  sprintf (hname3,"Entryx-Exitx_TID_%i",i+1);
146  sprintf (hname4,"Entryx-Exitx_TEC_%i",i+1);
147  sprintf (hname5,"Entryx-Exitx_BPIX_%i",i+1);
148  sprintf (hname6,"Entryx-Exitx_FPIX_%i",i+1);
149 
150  fDBE->setCurrentFolder("TrackerHitsV/TrackerHit/TIBHit");
151  h1ex[i] = fDBE->book1D (hname1, htitle1, nbin , low[0] , high[0]);
152  fDBE->setCurrentFolder("TrackerHitsV/TrackerHit/TOBHit");
153  h2ex[i] = fDBE->book1D (hname2, htitle2, nbin , low[1] , high[1]);
154  fDBE->setCurrentFolder("TrackerHitsV/TrackerHit/TIDHit");
155  h3ex[i] = fDBE->book1D (hname3, htitle3, nbin , low[2] , high[2]);
156  fDBE->setCurrentFolder("TrackerHitsV/TrackerHit/TECHit");
157  h4ex[i] = fDBE->book1D (hname4, htitle4, nbin , low[3] , high[3]);
158  fDBE->setCurrentFolder("TrackerHitsV/TrackerHit/BPIXHit");
159  h5ex[i] = fDBE->book1D (hname5, htitle5, nbin , low[4] , high[4]);
160  fDBE->setCurrentFolder("TrackerHitsV/TrackerHit/FPIXHit");
161  h6ex[i] = fDBE->book1D (hname6, htitle6, nbin , low[5] , high[5]);
162 
163  }
164 
165 const float high0[] = {0.05, 0.06, 0.03, 0.03, 0.03, 0.03};
166 const float low0[] = {-0.05, -0.06, -0.03, -0.03, -0.03, -0.03};
167 
168  for(int i=0; i<12; i++) {
169 
170  sprintf (htitle1,"Entryy-Exity in TIB %s", Region[i]);
171  sprintf (htitle2,"Entryy-Exity in TOB %s", Region[i]);
172  sprintf (htitle3,"Entryy-Exity in TID %s", Region[i]);
173  sprintf (htitle4,"Entryy-Exity in TEC %s", Region[i]);
174  sprintf (htitle5,"Entryy-Exity in BPIX %s", Region[i]);
175  sprintf (htitle6,"Entryy-Exity in FPIX %s", Region[i]);
176 
177  sprintf (hname1,"Entryy-Exity_TIB_%i",i+1);
178  sprintf (hname2,"Entryy-Exity_TOB_%i",i+1);
179  sprintf (hname3,"Entryy-Exity_TID_%i",i+1);
180  sprintf (hname4,"Entryy-Exity_TEC_%i",i+1);
181  sprintf (hname5,"Entryy-Exity_BPIX_%i",i+1);
182  sprintf (hname6,"Entryy-Exity_FPIX_%i",i+1);
183 
184  fDBE->setCurrentFolder("TrackerHitsV/TrackerHit/TIBHit");
185  h1ey[i] = fDBE->book1D (hname1, htitle1, nbin , low0[0] , high0[0]);
186  fDBE->setCurrentFolder("TrackerHitsV/TrackerHit/TOBHit");
187  h2ey[i] = fDBE->book1D (hname2, htitle2, nbin , low0[1] , high0[1]);
188  fDBE->setCurrentFolder("TrackerHitsV/TrackerHit/TIDHit");
189  h3ey[i] = fDBE->book1D (hname3, htitle3, nbin , low0[2] , high0[2]);
190  fDBE->setCurrentFolder("TrackerHitsV/TrackerHit/TECHit");
191  h4ey[i] = fDBE->book1D (hname4, htitle4, nbin , low0[3] , high0[3]);
192  fDBE->setCurrentFolder("TrackerHitsV/TrackerHit/BPIXHit");
193  h5ey[i] = fDBE->book1D (hname5, htitle5, nbin , low0[4] , high0[4]);
194  fDBE->setCurrentFolder("TrackerHitsV/TrackerHit/FPIXHit");
195  h6ey[i] = fDBE->book1D (hname6, htitle6, nbin , low0[5] , high0[5]);
196 
197  }
198 
199 const float high1[] = {0.05, 0.06, 0.05, 0.06, 0.05, 0.05};
200 const float low1[] = {0.,0.,0.,0.,0.,0.};
201 
202  for(int i=0; i<12; i++) {
203 
204  sprintf (htitle1,"abs(Entryz-Exitz) in TIB %s", Region[i]);
205  sprintf (htitle2,"abs(Entryz-Exitz) in TOB %s", Region[i]);
206  sprintf (htitle3,"abs(Entryz-Exitz) in TID %s", Region[i]);
207  sprintf (htitle4,"abs(Entryz-Exitz) in TEC %s", Region[i]);
208  sprintf (htitle5,"abs(Entryz-Exitz) in BPIX %s", Region[i]);
209  sprintf (htitle6,"abs(Entryz-Exitz) in FPIX %s", Region[i]);
210 
211  sprintf (hname1,"Entryz-Exitz_TIB_%i",i+1);
212  sprintf (hname2,"Entryz-Exitz_TOB_%i",i+1);
213  sprintf (hname3,"Entryz-Exitz_TID_%i",i+1);
214  sprintf (hname4,"Entryz-Exitz_TEC_%i",i+1);
215  sprintf (hname5,"Entryz-Exitz_BPIX_%i",i+1);
216  sprintf (hname6,"Entryz-Exitz_FPIX_%i",i+1);
217 
218  fDBE->setCurrentFolder("TrackerHitsV/TrackerHit/TIBHit");
219  h1ez[i] = fDBE->book1D (hname1, htitle1, nbin , low1[0] , high1[0]);
220  fDBE->setCurrentFolder("TrackerHitsV/TrackerHit/TOBHit");
221  h2ez[i] = fDBE->book1D (hname2, htitle2, nbin , low1[1] , high1[1]);
222  fDBE->setCurrentFolder("TrackerHitsV/TrackerHit/TIDHit");
223  h3ez[i] = fDBE->book1D (hname3, htitle3, nbin , low1[2] , high1[2]);
224  fDBE->setCurrentFolder("TrackerHitsV/TrackerHit/TECHit");
225  h4ez[i] = fDBE->book1D (hname4, htitle4, nbin , low1[3] , high1[3]);
226  fDBE->setCurrentFolder("TrackerHitsV/TrackerHit/BPIXHit");
227  h5ez[i] = fDBE->book1D (hname5, htitle5, nbin , low1[4] , high1[4]);
228  fDBE->setCurrentFolder("TrackerHitsV/TrackerHit/FPIXHit");
229  h6ez[i] = fDBE->book1D (hname6, htitle6, nbin , low1[5] , high1[5]);
230 
231  }
232 
233 
234 const float high2[] = {3.2, 5.0, 5.5, 6.2, 0.85, 0.5};
235 const float low2[] = {-3.2, -5.0, -5.5, -6.2, -0.85, -0.5};
236 
237  for(int i=0; i<12; i++) {
238 
239  sprintf (htitle1,"Localx in TIB %s", Region[i]);
240  sprintf (htitle2,"Localx in TOB %s", Region[i]);
241  sprintf (htitle3,"Localx in TID %s", Region[i]);
242  sprintf (htitle4,"Localx in TEC %s", Region[i]);
243  sprintf (htitle5,"Localx in BPIX %s", Region[i]);
244  sprintf (htitle6,"Localx in FPIX %s", Region[i]);
245 
246  sprintf (hname1,"Localx_TIB_%i",i+1);
247  sprintf (hname2,"Localx_TOB_%i",i+1);
248  sprintf (hname3,"Localx_TID_%i",i+1);
249  sprintf (hname4,"Localx_TEC_%i",i+1);
250  sprintf (hname5,"Localx_BPIX_%i",i+1);
251  sprintf (hname6,"Localx_FPIX_%i",i+1);
252 
253  fDBE->setCurrentFolder("TrackerHitsV/TrackerHit/TIBHit");
254  h1lx[i] = fDBE->book1D (hname1, htitle1, nbin , low2[0] , high2[0]);
255  fDBE->setCurrentFolder("TrackerHitsV/TrackerHit/TOBHit");
256  h2lx[i] = fDBE->book1D (hname2, htitle2, nbin , low2[1] , high2[1]);
257  fDBE->setCurrentFolder("TrackerHitsV/TrackerHit/TIDHit");
258  h3lx[i] = fDBE->book1D (hname3, htitle3, nbin , low2[2] , high2[2]);
259  fDBE->setCurrentFolder("TrackerHitsV/TrackerHit/TECHit");
260  h4lx[i] = fDBE->book1D (hname4, htitle4, nbin , low2[3] , high2[3]);
261  fDBE->setCurrentFolder("TrackerHitsV/TrackerHit/BPIXHit");
262  h5lx[i] = fDBE->book1D (hname5, htitle5, nbin , low2[4] , high2[4]);
263  fDBE->setCurrentFolder("TrackerHitsV/TrackerHit/FPIXHit");
264  h6lx[i] = fDBE->book1D (hname6, htitle6, nbin , low2[5] , high2[5]);
265 
266  }
267 
268 
269 const float high3[] = {6.0, 10., 5.6, 10.5, 3.4, 0.52};
270 const float low3[] = {-6.0, -10., -5.6, -10.5, -3.4, -0.52};
271 
272  for(int i=0; i<12; i++) {
273 
274  sprintf (htitle1,"Localy in TIB %s", Region[i]);
275  sprintf (htitle2,"Localy in TOB %s", Region[i]);
276  sprintf (htitle3,"Localy in TID %s", Region[i]);
277  sprintf (htitle4,"Localy in TEC %s", Region[i]);
278  sprintf (htitle5,"Localy in BPIX %s", Region[i]);
279  sprintf (htitle6,"Localy in FPIX %s", Region[i]);
280 
281  sprintf (hname1,"Localy_TIB_%i",i+1);
282  sprintf (hname2,"Localy_TOB_%i",i+1);
283  sprintf (hname3,"Localy_TID_%i",i+1);
284  sprintf (hname4,"Localy_TEC_%i",i+1);
285  sprintf (hname5,"Localy_BPIX_%i",i+1);
286  sprintf (hname6,"Localy_FPIX_%i",i+1);
287 
288  fDBE->setCurrentFolder("TrackerHitsV/TrackerHit/TIBHit");
289  h1ly[i] = fDBE->book1D (hname1, htitle1, nbin , low3[0] , high3[0]);
290  fDBE->setCurrentFolder("TrackerHitsV/TrackerHit/TOBHit");
291  h2ly[i] = fDBE->book1D (hname2, htitle2, nbin , low3[1] , high3[1]);
292  fDBE->setCurrentFolder("TrackerHitsV/TrackerHit/TIDHit");
293  h3ly[i] = fDBE->book1D (hname3, htitle3, nbin , low3[2] , high3[2]);
294  fDBE->setCurrentFolder("TrackerHitsV/TrackerHit/TECHit");
295  h4ly[i] = fDBE->book1D (hname4, htitle4, nbin , low3[3] , high3[3]);
296  fDBE->setCurrentFolder("TrackerHitsV/TrackerHit/BPIXHit");
297  h5ly[i] = fDBE->book1D (hname5, htitle5, nbin , low3[4] , high3[4]);
298  fDBE->setCurrentFolder("TrackerHitsV/TrackerHit/FPIXHit");
299  h6ly[i] = fDBE->book1D (hname6, htitle6, nbin , low3[5] , high3[5]);
300 
301  }
302 
303 
304  }
305 }
MonitorElement * h1e[12]
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
MonitorElement * h2lx[12]
edm::InputTag PxlBrlLowSrc_
MonitorElement * h4e[12]
MonitorElement * h1lx[12]
MonitorElement * h6ex[12]
MonitorElement * h1ey[12]
MonitorElement * h3ly[12]
MonitorElement * h5ez[12]
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:722
MonitorElement * h4ex[12]
edm::InputTag SiTIBLowSrc_
MonitorElement * h1ez[12]
MonitorElement * h3ez[12]
edm::InputTag SiTIDLowSrc_
edm::InputTag SiTIBHighSrc_
MonitorElement * h5ey[12]
#define NULL
Definition: scimark2.h:8
MonitorElement * h3lx[12]
edm::InputTag PxlFwdLowSrc_
MonitorElement * htofr
MonitorElement * h6ly[12]
MonitorElement * h5ex[12]
edm::InputTag SiTECLowSrc_
MonitorElement * h5ly[12]
MonitorElement * htofeta
edm::InputTag SiTECHighSrc_
MonitorElement * h1ex[12]
MonitorElement * h2e[12]
edm::InputTag SiTOBHighSrc_
Region
Definition: Region.h:7
MonitorElement * h6ey[12]
MonitorElement * h4lx[12]
edm::InputTag SiTOBLowSrc_
void setVerbose(unsigned level)
Definition: DQMStore.cc:398
edm::InputTag G4TrkSrc_
MonitorElement * h2ex[12]
MonitorElement * h6ez[12]
MonitorElement * h2ez[12]
MonitorElement * htofz
MonitorElement * htofphi
MonitorElement * h5lx[12]
MonitorElement * h4ey[12]
MonitorElement * h1ly[12]
MonitorElement * h4ly[12]
MonitorElement * h3ex[12]
MonitorElement * h3ey[12]
MonitorElement * h2ey[12]
edm::InputTag PxlBrlHighSrc_
MonitorElement * h2ly[12]
MonitorElement * h3e[12]
void showDirStructure(void) const
Definition: DQMStore.cc:2766
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:850
MonitorElement * h6e[12]
edm::InputTag SiTIDHighSrc_
MonitorElement * h5e[12]
MonitorElement * h6lx[12]
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:434
MonitorElement * h4ez[12]
edm::InputTag PxlFwdHighSrc_
TrackerHitAnalyzer::~TrackerHitAnalyzer ( )

Destructor.

Definition at line 307 of file TrackerHitAnalyzer.cc.

308 {
309  // don't try to delete any pointers - they're handled by DQM machinery
310 }

Member Function Documentation

void TrackerHitAnalyzer::analyze ( const edm::Event e,
const edm::EventSetup c 
)
protectedvirtual

Analyze.

Implements edm::EDAnalyzer.

Definition at line 341 of file TrackerHitAnalyzer.cc.

References Geom::Phi< T >::degrees(), cond::rpcobgas::detid, PV3DBase< T, PVType, FrameType >::eta(), eta(), edm::EventID::event(), MonitorElement::Fill(), G4TrkSrc_, edm::EventSetup::get(), edm::Event::getByLabel(), h1e, h1ex, h1ey, h1ez, h1lx, h1ly, h2e, h2ex, h2ey, h2ez, h2lx, h2ly, h3e, h3ex, h3ey, h3ez, h3lx, h3ly, h4e, h4ex, h4ey, h4ez, h4lx, h4ly, h5e, h5ex, h5ey, h5ez, h5lx, h5ly, h6e, h6ex, h6ey, h6ez, h6lx, h6ly, htofeta, htofphi, htofr, htofz, edm::EventBase::id(), edm::HandleBase::isValid(), create_public_lumi_plots::log, PV3DBase< T, PVType, FrameType >::mag(), siStripFEDMonitor_P5_cff::Max, siStripFEDMonitor_P5_cff::Min, AlCaHLTBitMon_ParallelJobs::p, PV3DBase< T, PVType, FrameType >::phi(), PxlBrlHighSrc_, PxlBrlLowSrc_, PxlFwdHighSrc_, PxlFwdLowSrc_, hitfit::return, edm::EventID::run(), SiTECHighSrc_, SiTECLowSrc_, SiTIBHighSrc_, SiTIBLowSrc_, SiTIDHighSrc_, SiTIDLowSrc_, SiTOBHighSrc_, SiTOBLowSrc_, mathSSE::sqrt(), funct::tan(), theta(), patCandidatesForDimuonsSequences_cff::tracker, and PV3DBase< T, PVType, FrameType >::z().

342 {
343 
344  LogInfo("EventInfo") << " Run = " << e.id().run() << " Event = " << e.id().event();
345 
346  // iterator to access containers
347  edm::PSimHitContainer::const_iterator itHit;
349  // get Pixel Barrel information
351  // extract low container
352  edm::Handle<edm::PSimHitContainer> PxlBrlLowContainer;
353  e.getByLabel(PxlBrlLowSrc_,PxlBrlLowContainer);
354  if (!PxlBrlLowContainer.isValid()) {
355  edm::LogError("TrackerHitAnalyzer::analyze")
356  << "Unable to find TrackerHitsPixelBarrelLowTof in event!";
357  return;
358  }
359  // extract high container
360  edm::Handle<edm::PSimHitContainer> PxlBrlHighContainer;
361  e.getByLabel(PxlBrlHighSrc_,PxlBrlHighContainer);
362  if (!PxlBrlHighContainer.isValid()) {
363  edm::LogError("TrackerHitAnalyzer::analyze")
364  << "Unable to find TrackerHitsPixelBarrelHighTof in event!";
365  return;
366  }
368  // get Pixel Forward information
370  // extract low container
371  edm::Handle<edm::PSimHitContainer> PxlFwdLowContainer;
372  e.getByLabel(PxlFwdLowSrc_,PxlFwdLowContainer);
373  if (!PxlFwdLowContainer.isValid()) {
374  edm::LogError("TrackerHitAnalyzer::analyze")
375  << "Unable to find TrackerHitsPixelEndcapLowTof in event!";
376  return;
377  }
378  // extract high container
379  edm::Handle<edm::PSimHitContainer> PxlFwdHighContainer;
380  e.getByLabel(PxlFwdHighSrc_,PxlFwdHighContainer);
381  if (!PxlFwdHighContainer.isValid()) {
382  edm::LogError("TrackerHitAnalyzer::analyze")
383  << "Unable to find TrackerHitsPixelEndcapHighTof in event!";
384  return;
385  }
386 
388  // get Silicon TIB information
390  // extract TIB low container
391  edm::Handle<edm::PSimHitContainer> SiTIBLowContainer;
392 // iEvent.getByLabel("g4SimHits","TrackerHitsTIBLowTof",SiTIBLowContainer);
393  e.getByLabel(SiTIBLowSrc_,SiTIBLowContainer);
394  if (!SiTIBLowContainer.isValid()) {
395  edm::LogError("TrackerHitProducer::analyze")
396  << "Unable to find TrackerHitsTIBLowTof in event!";
397  return;
398  }
400  // extract TIB low container
401  edm::Handle<edm::PSimHitContainer> SiTIBHighContainer;
402 // iEvent.getByLabel("g4SimHits","TrackerHitsTIBHighTof",SiTIBHighContainer);
403  e.getByLabel(SiTIBHighSrc_,SiTIBHighContainer);
404  if (!SiTIBHighContainer.isValid()) {
405  edm::LogError("TrackerHitProducer::analyze")
406  << "Unable to find TrackerHitsTIBHighTof in event!";
407  return;
408  }
410  // get Silicon TOB information
412  // extract TOB low container
413  edm::Handle<edm::PSimHitContainer> SiTOBLowContainer;
414 // iEvent.getByLabel("g4SimHits","TrackerHitsTOBLowTof",SiTOBLowContainer);
415  e.getByLabel(SiTOBLowSrc_,SiTOBLowContainer);
416  if (!SiTOBLowContainer.isValid()) {
417  edm::LogError("TrackerHitProducer::analyze")
418  << "Unable to find TrackerHitsTOBLowTof in event!";
419  return;
420  }
422  // extract TOB low container
423  edm::Handle<edm::PSimHitContainer> SiTOBHighContainer;
424 // iEvent.getByLabel("g4SimHits","TrackerHitsTOBHighTof",SiTOBHighContainer);
425  e.getByLabel(SiTOBHighSrc_,SiTOBHighContainer);
426  if (!SiTOBHighContainer.isValid()) {
427  edm::LogError("TrackerHitProducer::analyze")
428  << "Unable to find TrackerHitsTOBHighTof in event!";
429  return;
430  }
431 
433  // get Silicon TID information
435  // extract TID low container
436  edm::Handle<edm::PSimHitContainer> SiTIDLowContainer;
437 // iEvent.getByLabel("g4SimHits","TrackerHitsTIDLowTof",SiTIDLowContainer);
438  e.getByLabel(SiTIDLowSrc_,SiTIDLowContainer);
439  if (!SiTIDLowContainer.isValid()) {
440  edm::LogError("TrackerHitProducer::analyze")
441  << "Unable to find TrackerHitsTIDLowTof in event!";
442  return;
443  }
445  // extract TID low container
446  edm::Handle<edm::PSimHitContainer> SiTIDHighContainer;
447 // iEvent.getByLabel("g4SimHits","TrackerHitsTIDHighTof",SiTIDHighContainer);
448  e.getByLabel(SiTIDHighSrc_,SiTIDHighContainer);
449  if (!SiTIDHighContainer.isValid()) {
450  edm::LogError("TrackerHitProducer::analyze")
451  << "Unable to find TrackerHitsTIDHighTof in event!";
452  return;
453  }
455  // get Silicon TEC information
457  // extract TEC low container
458  edm::Handle<edm::PSimHitContainer> SiTECLowContainer;
459 // iEvent.getByLabel("g4SimHits","TrackerHitsTECLowTof",SiTECLowContainer);
460  e.getByLabel(SiTECLowSrc_,SiTECLowContainer);
461  if (!SiTECLowContainer.isValid()) {
462  edm::LogError("TrackerHitProducer::analyze")
463  << "Unable to find TrackerHitsTECLowTof in event!";
464  return;
465  }
467  // extract TEC low container
468  edm ::Handle<edm::PSimHitContainer> SiTECHighContainer;
469 // iEvent.getByLabel("g4SimHits","TrackerHitsTECHighTof",SiTECHighContainer);
470  e.getByLabel(SiTECHighSrc_,SiTECHighContainer);
471  if (!SiTECHighContainer.isValid()) {
472  edm::LogError("TrackerHitProducer::analyze")
473  << "Unable to find TrackerHitsTECHighTof in event!";
474  return;
475  }
476 
478  // get G4Track information
480 
482  e.getByLabel(G4TrkSrc_, G4TrkContainer);
483  if (!G4TrkContainer.isValid()) {
484  edm::LogError("TrackerHitAnalyzer::analyze")
485  << "Unable to find SimTrack in event!";
486  return;
487  }
488 
489  // Get geometry information
490 
492  c.get<TrackerDigiGeometryRecord>().get( tracker );
493 
494 
495 
496  int ir = -100;
497  edm::SimTrackContainer::const_iterator itTrk;
498  for (itTrk = G4TrkContainer->begin(); itTrk != G4TrkContainer->end();
499  ++itTrk) {
500 
501 // cout << "itTrk = "<< itTrk << endl;
502  double eta =0, p =0;
503  const CLHEP::HepLorentzVector& G4Trk = CLHEP::HepLorentzVector(itTrk->momentum().x(),
504  itTrk->momentum().y(),
505  itTrk->momentum().z(),
506  itTrk->momentum().e());
507  p =sqrt(G4Trk[0]*G4Trk[0]+G4Trk[1]*G4Trk[1]+G4Trk[2]*G4Trk[2]);
508  if ( p == 0)
509  edm::LogError("TrackerHitAnalyzer::analyze")
510  << "TrackerTest::INFO: Primary has p = 0 ";
511  else {
512  double costheta = G4Trk[2]/p;
513  double theta = acos(TMath::Min(TMath::Max(costheta, -1.),1.));
514  eta = -log(tan(theta/2));
515 
516  if (eta>0.0 && eta<=0.5) ir = 0;
517  if (eta>0.5 && eta<=1.0) ir = 1;
518  if (eta>1.0 && eta<=1.5) ir = 2;
519  if (eta>1.5 && eta<=2.0) ir = 3;
520  if (eta>2.0 && eta<=2.5) ir = 4;
521  if (eta>2.5) ir = 5;
522 
523  if (eta>-0.5 && eta<= 0.0) ir = 6;
524  if (eta>-1.0 && eta<=-0.5) ir = 7;
525  if (eta>-1.5 && eta<=-1.0) ir = 8;
526  if (eta>-2.0 && eta<=-1.5) ir = 9;
527  if (eta>-2.5 && eta<=-2.0) ir = 10;
528  if (eta<=-2.5) ir = 11;
529 // LogInfo("EventInfo") << " eta = " << eta << " ir = " << ir;
530 // cout << " " <<endl;
531 // cout << "eta " << eta << " ir = " << ir << endl;
532 // cout << " " <<endl;
533  }
534  }
536  // get Pixel information
538  for (itHit = PxlBrlLowContainer->begin(); itHit != PxlBrlLowContainer->end(); ++itHit) {
539  DetId detid=DetId(itHit->detUnitId());
540  const GeomDetUnit * det=(const GeomDetUnit*)tracker->idToDetUnit( detid );
541  GlobalPoint gpos=det->toGlobal(itHit->localPosition());
542  htofeta->Fill(gpos.eta(), itHit->timeOfFlight());
543  htofphi->Fill(gpos.phi().degrees(), itHit->timeOfFlight());
544  htofr->Fill(gpos.mag(), itHit->timeOfFlight());
545  htofz->Fill(gpos.z(), itHit->timeOfFlight());
546 
547  h5e[ir]->Fill(itHit->energyLoss());
548  h5ex[ir]->Fill(itHit->entryPoint().x()-itHit->exitPoint().x());
549  h5ey[ir]->Fill(itHit->entryPoint().y()-itHit->exitPoint().y());
550  h5ez[ir]->Fill(std::fabs(itHit->entryPoint().z()-itHit->exitPoint().z()));
551  h5lx[ir]->Fill(itHit->localPosition().x());
552  h5ly[ir]->Fill(itHit->localPosition().y());
553  }
554  for (itHit = PxlBrlHighContainer->begin(); itHit != PxlBrlHighContainer->end(); ++itHit) {
555  DetId detid=DetId(itHit->detUnitId());
556  const GeomDetUnit * det=(const GeomDetUnit*)tracker->idToDetUnit( detid );
557  GlobalPoint gpos=det->toGlobal(itHit->localPosition());
558  htofeta->Fill(gpos.eta(), itHit->timeOfFlight());
559  htofphi->Fill(gpos.phi().degrees(), itHit->timeOfFlight());
560  htofr->Fill(gpos.mag(), itHit->timeOfFlight());
561  htofz->Fill(gpos.z(), itHit->timeOfFlight());
562 
563 
564  h5e[ir]->Fill(itHit->energyLoss());
565  h5ex[ir]->Fill(itHit->entryPoint().x()-itHit->exitPoint().x());
566  h5ey[ir]->Fill(itHit->entryPoint().y()-itHit->exitPoint().y());
567  h5ez[ir]->Fill(std::fabs(itHit->entryPoint().z()-itHit->exitPoint().z()));
568  h5lx[ir]->Fill(itHit->localPosition().x());
569  h5ly[ir]->Fill(itHit->localPosition().y());
570  }
571  for (itHit = PxlFwdLowContainer->begin(); itHit != PxlFwdLowContainer->end(); ++itHit) {
572  DetId detid=DetId(itHit->detUnitId());
573  const GeomDetUnit * det=(const GeomDetUnit*)tracker->idToDetUnit( detid );
574  GlobalPoint gpos=det->toGlobal(itHit->localPosition());
575  htofeta->Fill(gpos.eta(), itHit->timeOfFlight());
576  htofphi->Fill(gpos.phi().degrees(), itHit->timeOfFlight());
577  htofr->Fill(gpos.mag(), itHit->timeOfFlight());
578  htofz->Fill(gpos.z(), itHit->timeOfFlight());
579 
580 
581  h6e[ir]->Fill(itHit->energyLoss());
582  h6ex[ir]->Fill(itHit->entryPoint().x()-itHit->exitPoint().x());
583  h6ey[ir]->Fill(itHit->entryPoint().y()-itHit->exitPoint().y());
584  h6ez[ir]->Fill(std::fabs(itHit->entryPoint().z()-itHit->exitPoint().z()));
585  h6lx[ir]->Fill(itHit->localPosition().x());
586  h6ly[ir]->Fill(itHit->localPosition().y());
587  }
588  for (itHit = PxlFwdHighContainer->begin(); itHit != PxlFwdHighContainer->end(); ++itHit) {
589  DetId detid=DetId(itHit->detUnitId());
590  const GeomDetUnit * det=(const GeomDetUnit*)tracker->idToDetUnit( detid );
591  GlobalPoint gpos=det->toGlobal(itHit->localPosition());
592  htofeta->Fill(gpos.eta(), itHit->timeOfFlight());
593  htofphi->Fill(gpos.phi().degrees(), itHit->timeOfFlight());
594  htofr->Fill(gpos.mag(), itHit->timeOfFlight());
595  htofz->Fill(gpos.z(), itHit->timeOfFlight());
596 
597 
598  h6e[ir]->Fill(itHit->energyLoss());
599  h6ex[ir]->Fill(itHit->entryPoint().x()-itHit->exitPoint().x());
600  h6ey[ir]->Fill(itHit->entryPoint().y()-itHit->exitPoint().y());
601  h6ez[ir]->Fill(std::fabs(itHit->entryPoint().z()-itHit->exitPoint().z()));
602  h6lx[ir]->Fill(itHit->localPosition().x());
603  h6ly[ir]->Fill(itHit->localPosition().y());
604  }
606  // get TIB information
608  for (itHit = SiTIBLowContainer->begin(); itHit != SiTIBLowContainer->end(); ++itHit) {
609  DetId detid=DetId(itHit->detUnitId());
610  const GeomDetUnit * det=(const GeomDetUnit*)tracker->idToDetUnit( detid );
611  GlobalPoint gpos=det->toGlobal(itHit->localPosition());
612  htofeta->Fill(gpos.eta(), itHit->timeOfFlight());
613  htofphi->Fill(gpos.phi().degrees(), itHit->timeOfFlight());
614  htofr->Fill(gpos.mag(), itHit->timeOfFlight());
615  htofz->Fill(gpos.z(), itHit->timeOfFlight());
616 
617 
618  h1e[ir]->Fill(itHit->energyLoss());
619  h1ex[ir]->Fill(itHit->entryPoint().x()-itHit->exitPoint().x());
620  h1ey[ir]->Fill(itHit->entryPoint().y()-itHit->exitPoint().y());
621  h1ez[ir]->Fill(std::fabs(itHit->entryPoint().z()-itHit->exitPoint().z()));
622  h1lx[ir]->Fill(itHit->localPosition().x());
623  h1ly[ir]->Fill(itHit->localPosition().y());
624  }
625  for (itHit = SiTIBHighContainer->begin(); itHit != SiTIBHighContainer->end(); ++itHit) {
626  DetId detid=DetId(itHit->detUnitId());
627  const GeomDetUnit * det=(const GeomDetUnit*)tracker->idToDetUnit( detid );
628  GlobalPoint gpos=det->toGlobal(itHit->localPosition());
629  htofeta->Fill(gpos.eta(), itHit->timeOfFlight());
630  htofphi->Fill(gpos.phi().degrees(), itHit->timeOfFlight());
631  htofr->Fill(gpos.mag(), itHit->timeOfFlight());
632  htofz->Fill(gpos.z(), itHit->timeOfFlight());
633 
634 
635  h1e[ir]->Fill(itHit->energyLoss());
636  h1ex[ir]->Fill(itHit->entryPoint().x()-itHit->exitPoint().x());
637  h1ey[ir]->Fill(itHit->entryPoint().y()-itHit->exitPoint().y());
638  h1ez[ir]->Fill(std::fabs(itHit->entryPoint().z()-itHit->exitPoint().z()));
639  h1lx[ir]->Fill(itHit->localPosition().x());
640  h1ly[ir]->Fill(itHit->localPosition().y());
641  }
643  // get TOB information
645  for (itHit = SiTOBLowContainer->begin(); itHit != SiTOBLowContainer->end(); ++itHit) {
646  DetId detid=DetId(itHit->detUnitId());
647  const GeomDetUnit * det=(const GeomDetUnit*)tracker->idToDetUnit( detid );
648  GlobalPoint gpos=det->toGlobal(itHit->localPosition());
649  htofeta->Fill(gpos.eta(), itHit->timeOfFlight());
650  htofphi->Fill(gpos.phi().degrees(), itHit->timeOfFlight());
651  htofr->Fill(gpos.mag(), itHit->timeOfFlight());
652  htofz->Fill(gpos.z(), itHit->timeOfFlight());
653 
654 
655  h2e[ir]->Fill(itHit->energyLoss());
656  h2ex[ir]->Fill(itHit->entryPoint().x()-itHit->exitPoint().x());
657  h2ey[ir]->Fill(itHit->entryPoint().y()-itHit->exitPoint().y());
658  h2ez[ir]->Fill(std::fabs(itHit->entryPoint().z()-itHit->exitPoint().z()));
659  h2lx[ir]->Fill(itHit->localPosition().x());
660  h2ly[ir]->Fill(itHit->localPosition().y());
661  }
662  for (itHit = SiTOBHighContainer->begin(); itHit != SiTOBHighContainer->end(); ++itHit) {
663  DetId detid=DetId(itHit->detUnitId());
664  const GeomDetUnit * det=(const GeomDetUnit*)tracker->idToDetUnit( detid );
665  GlobalPoint gpos=det->toGlobal(itHit->localPosition());
666  htofeta->Fill(gpos.eta(), itHit->timeOfFlight());
667  htofphi->Fill(gpos.phi().degrees(), itHit->timeOfFlight());
668  htofr->Fill(gpos.mag(), itHit->timeOfFlight());
669  htofz->Fill(gpos.z(), itHit->timeOfFlight());
670 
671  h2e[ir]->Fill(itHit->energyLoss());
672  h2ex[ir]->Fill(itHit->entryPoint().x()-itHit->exitPoint().x());
673  h2ey[ir]->Fill(itHit->entryPoint().y()-itHit->exitPoint().y());
674  h2ez[ir]->Fill(std::fabs(itHit->entryPoint().z()-itHit->exitPoint().z()));
675  h2lx[ir]->Fill(itHit->localPosition().x());
676  h2ly[ir]->Fill(itHit->localPosition().y());
677  }
679  // get TID information
681  for (itHit = SiTIDLowContainer->begin(); itHit != SiTIDLowContainer->end(); ++itHit) {
682  DetId detid=DetId(itHit->detUnitId());
683  const GeomDetUnit * det=(const GeomDetUnit*)tracker->idToDetUnit( detid );
684  GlobalPoint gpos=det->toGlobal(itHit->localPosition());
685  htofeta->Fill(gpos.eta(), itHit->timeOfFlight());
686  htofphi->Fill(gpos.phi().degrees(), itHit->timeOfFlight());
687  htofr->Fill(gpos.mag(), itHit->timeOfFlight());
688  htofz->Fill(gpos.z(), itHit->timeOfFlight());
689 
690  h3e[ir]->Fill(itHit->energyLoss());
691  h3ex[ir]->Fill(itHit->entryPoint().x()-itHit->exitPoint().x());
692  h3ey[ir]->Fill(itHit->entryPoint().y()-itHit->exitPoint().y());
693  h3ez[ir]->Fill(std::fabs(itHit->entryPoint().z()-itHit->exitPoint().z()));
694  h3lx[ir]->Fill(itHit->localPosition().x());
695  h3ly[ir]->Fill(itHit->localPosition().y());
696  }
697  for (itHit = SiTIDHighContainer->begin(); itHit != SiTIDHighContainer->end(); ++itHit) {
698  DetId detid=DetId(itHit->detUnitId());
699  const GeomDetUnit * det=(const GeomDetUnit*)tracker->idToDetUnit( detid );
700  GlobalPoint gpos=det->toGlobal(itHit->localPosition());
701  htofeta->Fill(gpos.eta(), itHit->timeOfFlight());
702  htofphi->Fill(gpos.phi().degrees(), itHit->timeOfFlight());
703  htofr->Fill(gpos.mag(), itHit->timeOfFlight());
704  htofz->Fill(gpos.z(), itHit->timeOfFlight());
705 
706  h3e[ir]->Fill(itHit->energyLoss());
707  h3ex[ir]->Fill(itHit->entryPoint().x()-itHit->exitPoint().x());
708  h3ey[ir]->Fill(itHit->entryPoint().y()-itHit->exitPoint().y());
709  h3ez[ir]->Fill(std::fabs(itHit->entryPoint().z()-itHit->exitPoint().z()));
710  h3lx[ir]->Fill(itHit->localPosition().x());
711  h3ly[ir]->Fill(itHit->localPosition().y());
712  }
714  // get TEC information
716  for (itHit = SiTECLowContainer->begin(); itHit != SiTECLowContainer->end(); ++itHit) {
717  DetId detid=DetId(itHit->detUnitId());
718  const GeomDetUnit * det=(const GeomDetUnit*)tracker->idToDetUnit( detid );
719  GlobalPoint gpos=det->toGlobal(itHit->localPosition());
720  htofeta->Fill(gpos.eta(), itHit->timeOfFlight());
721  htofphi->Fill(gpos.phi().degrees(), itHit->timeOfFlight());
722  htofr->Fill(gpos.mag(), itHit->timeOfFlight());
723  htofz->Fill(gpos.z(), itHit->timeOfFlight());
724 
725  h4e[ir]->Fill(itHit->energyLoss());
726  h4ex[ir]->Fill(itHit->entryPoint().x()-itHit->exitPoint().x());
727  h4ey[ir]->Fill(itHit->entryPoint().y()-itHit->exitPoint().y());
728  h4ez[ir]->Fill(std::fabs(itHit->entryPoint().z()-itHit->exitPoint().z()));
729  h4lx[ir]->Fill(itHit->localPosition().x());
730  h4ly[ir]->Fill(itHit->localPosition().y());
731  }
732  for (itHit = SiTECHighContainer->begin(); itHit != SiTECHighContainer->end(); ++itHit) {
733  DetId detid=DetId(itHit->detUnitId());
734  const GeomDetUnit * det=(const GeomDetUnit*)tracker->idToDetUnit( detid );
735  GlobalPoint gpos=det->toGlobal(itHit->localPosition());
736  htofeta->Fill(gpos.eta(), itHit->timeOfFlight());
737  htofphi->Fill(gpos.phi().degrees(), itHit->timeOfFlight());
738  htofr->Fill(gpos.mag(), itHit->timeOfFlight());
739  htofz->Fill(gpos.z(), itHit->timeOfFlight());
740 
741  h4e[ir]->Fill(itHit->energyLoss());
742  h4ex[ir]->Fill(itHit->entryPoint().x()-itHit->exitPoint().x());
743  h4ey[ir]->Fill(itHit->entryPoint().y()-itHit->exitPoint().y());
744  h4ez[ir]->Fill(std::fabs(itHit->entryPoint().z()-itHit->exitPoint().z()));
745  h4lx[ir]->Fill(itHit->localPosition().x());
746  h4ly[ir]->Fill(itHit->localPosition().y());
747  }
748 
749 
750  return ;
751 
752 }
RunNumber_t run() const
Definition: EventID.h:42
MonitorElement * h1e[12]
EventNumber_t event() const
Definition: EventID.h:44
MonitorElement * h2lx[12]
edm::InputTag PxlBrlLowSrc_
MonitorElement * h4e[12]
MonitorElement * h1lx[12]
MonitorElement * h6ex[12]
MonitorElement * h1ey[12]
MonitorElement * h3ly[12]
MonitorElement * h5ez[12]
MonitorElement * h4ex[12]
edm::InputTag SiTIBLowSrc_
MonitorElement * h1ez[12]
MonitorElement * h3ez[12]
edm::InputTag SiTIDLowSrc_
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
Geom::Theta< T > theta() const
edm::InputTag SiTIBHighSrc_
MonitorElement * h5ey[12]
MonitorElement * h3lx[12]
edm::InputTag PxlFwdLowSrc_
T eta() const
MonitorElement * htofr
MonitorElement * h6ly[12]
MonitorElement * h5ex[12]
edm::InputTag SiTECLowSrc_
MonitorElement * h5ly[12]
void Fill(long long x)
MonitorElement * htofeta
T mag() const
Definition: PV3DBase.h:67
edm::InputTag SiTECHighSrc_
T sqrt(T t)
Definition: SSEVec.h:48
MonitorElement * h1ex[12]
T z() const
Definition: PV3DBase.h:64
MonitorElement * h2e[12]
edm::InputTag SiTOBHighSrc_
MonitorElement * h6ey[12]
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
MonitorElement * h4lx[12]
edm::InputTag SiTOBLowSrc_
edm::InputTag G4TrkSrc_
bool isValid() const
Definition: HandleBase.h:76
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:361
MonitorElement * h2ex[12]
MonitorElement * h6ez[12]
MonitorElement * h2ez[12]
MonitorElement * htofz
Definition: DetId.h:20
MonitorElement * htofphi
MonitorElement * h5lx[12]
MonitorElement * h4ey[12]
MonitorElement * h1ly[12]
const T & get() const
Definition: EventSetup.h:55
MonitorElement * h4ly[12]
T eta() const
Definition: PV3DBase.h:76
MonitorElement * h3ex[12]
edm::EventID id() const
Definition: EventBase.h:56
MonitorElement * h3ey[12]
MonitorElement * h2ey[12]
edm::InputTag PxlBrlHighSrc_
MonitorElement * h2ly[12]
MonitorElement * h3e[12]
T degrees() const
Definition: Phi.h:54
MonitorElement * h6e[12]
edm::InputTag SiTIDHighSrc_
MonitorElement * h5e[12]
MonitorElement * h6lx[12]
MonitorElement * h4ez[12]
edm::InputTag PxlFwdHighSrc_
void TrackerHitAnalyzer::endJob ( void  )
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 314 of file TrackerHitAnalyzer.cc.

References DQMStore::bookProfile(), fDBE, fOutputFile, DQMStore::get(), MonitorElement::getTH2F(), htofeta, htofeta_profile, htofphi, htofphi_profile, htofr, htofr_profile, htofz, htofz_profile, hitfit::return, DQMStore::save(), and DQMStore::setCurrentFolder().

315 {
316  //before check that histos are there....
317 
318  // check if ME still there (and not killed by MEtoEDM for memory saving)
319  if( fDBE )
320  {
321  // check existence of first histo in the list
322  if (! fDBE->get("TrackerHitsV/TrackerHit/tof_eta")) return;
323  }
324  else
325  return;
326 
327  fDBE->setCurrentFolder("TrackerHitsV/TrackerHit/");
328  htofeta_profile = fDBE->bookProfile ("tof_eta_profile",htofeta->getTH2F()->ProfileX());
329  htofphi_profile = fDBE->bookProfile("tof_phi_profile", htofphi->getTH2F()->ProfileX());
330  htofr_profile = fDBE->bookProfile("tof_r_profile",htofr->getTH2F()->ProfileX());
331  htofz_profile = fDBE->bookProfile("tof_z_profile", htofz->getTH2F()->ProfileX());
332 
333 
334  if ( fOutputFile.size() != 0 && fDBE ) fDBE->save(fOutputFile);
335 
336  return ;
337 
338 }
MonitorElement * htofeta_profile
MonitorElement * htofr_profile
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
Definition: DQMStore.cc:2118
MonitorElement * htofphi_profile
MonitorElement * htofr
MonitorElement * htofz_profile
MonitorElement * htofeta
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
Definition: DQMStore.cc:1036
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1473
MonitorElement * htofz
MonitorElement * htofphi
TH2F * getTH2F(void) const
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:434

Member Data Documentation

DQMStore* TrackerHitAnalyzer::fDBE
private

Definition at line 86 of file TrackerHitAnalyzer.h.

Referenced by endJob(), and TrackerHitAnalyzer().

std::string TrackerHitAnalyzer::fOutputFile
private

Definition at line 88 of file TrackerHitAnalyzer.h.

Referenced by endJob(), and TrackerHitAnalyzer().

edm::InputTag TrackerHitAnalyzer::G4TrkSrc_
private

Definition at line 79 of file TrackerHitAnalyzer.h.

Referenced by analyze().

MonitorElement* TrackerHitAnalyzer::h1e[12]
private

Definition at line 98 of file TrackerHitAnalyzer.h.

Referenced by analyze(), and TrackerHitAnalyzer().

MonitorElement* TrackerHitAnalyzer::h1ex[12]
private

Definition at line 105 of file TrackerHitAnalyzer.h.

Referenced by analyze(), and TrackerHitAnalyzer().

MonitorElement* TrackerHitAnalyzer::h1ey[12]
private

Definition at line 112 of file TrackerHitAnalyzer.h.

Referenced by analyze(), and TrackerHitAnalyzer().

MonitorElement* TrackerHitAnalyzer::h1ez[12]
private

Definition at line 119 of file TrackerHitAnalyzer.h.

Referenced by analyze(), and TrackerHitAnalyzer().

MonitorElement* TrackerHitAnalyzer::h1lx[12]
private

Definition at line 126 of file TrackerHitAnalyzer.h.

Referenced by analyze(), and TrackerHitAnalyzer().

MonitorElement* TrackerHitAnalyzer::h1ly[12]
private

Definition at line 133 of file TrackerHitAnalyzer.h.

Referenced by analyze(), and TrackerHitAnalyzer().

MonitorElement* TrackerHitAnalyzer::h2e[12]
private

Definition at line 99 of file TrackerHitAnalyzer.h.

Referenced by analyze(), and TrackerHitAnalyzer().

MonitorElement* TrackerHitAnalyzer::h2ex[12]
private

Definition at line 106 of file TrackerHitAnalyzer.h.

Referenced by analyze(), and TrackerHitAnalyzer().

MonitorElement* TrackerHitAnalyzer::h2ey[12]
private

Definition at line 113 of file TrackerHitAnalyzer.h.

Referenced by analyze(), and TrackerHitAnalyzer().

MonitorElement* TrackerHitAnalyzer::h2ez[12]
private

Definition at line 120 of file TrackerHitAnalyzer.h.

Referenced by analyze(), and TrackerHitAnalyzer().

MonitorElement* TrackerHitAnalyzer::h2lx[12]
private

Definition at line 127 of file TrackerHitAnalyzer.h.

Referenced by analyze(), and TrackerHitAnalyzer().

MonitorElement* TrackerHitAnalyzer::h2ly[12]
private

Definition at line 134 of file TrackerHitAnalyzer.h.

Referenced by analyze(), and TrackerHitAnalyzer().

MonitorElement* TrackerHitAnalyzer::h3e[12]
private

Definition at line 100 of file TrackerHitAnalyzer.h.

Referenced by analyze(), and TrackerHitAnalyzer().

MonitorElement* TrackerHitAnalyzer::h3ex[12]
private

Definition at line 107 of file TrackerHitAnalyzer.h.

Referenced by analyze(), and TrackerHitAnalyzer().

MonitorElement* TrackerHitAnalyzer::h3ey[12]
private

Definition at line 114 of file TrackerHitAnalyzer.h.

Referenced by analyze(), and TrackerHitAnalyzer().

MonitorElement* TrackerHitAnalyzer::h3ez[12]
private

Definition at line 121 of file TrackerHitAnalyzer.h.

Referenced by analyze(), and TrackerHitAnalyzer().

MonitorElement* TrackerHitAnalyzer::h3lx[12]
private

Definition at line 128 of file TrackerHitAnalyzer.h.

Referenced by analyze(), and TrackerHitAnalyzer().

MonitorElement* TrackerHitAnalyzer::h3ly[12]
private

Definition at line 135 of file TrackerHitAnalyzer.h.

Referenced by analyze(), and TrackerHitAnalyzer().

MonitorElement* TrackerHitAnalyzer::h4e[12]
private

Definition at line 101 of file TrackerHitAnalyzer.h.

Referenced by analyze(), and TrackerHitAnalyzer().

MonitorElement* TrackerHitAnalyzer::h4ex[12]
private

Definition at line 108 of file TrackerHitAnalyzer.h.

Referenced by analyze(), and TrackerHitAnalyzer().

MonitorElement* TrackerHitAnalyzer::h4ey[12]
private

Definition at line 115 of file TrackerHitAnalyzer.h.

Referenced by analyze(), and TrackerHitAnalyzer().

MonitorElement* TrackerHitAnalyzer::h4ez[12]
private

Definition at line 122 of file TrackerHitAnalyzer.h.

Referenced by analyze(), and TrackerHitAnalyzer().

MonitorElement* TrackerHitAnalyzer::h4lx[12]
private

Definition at line 129 of file TrackerHitAnalyzer.h.

Referenced by analyze(), and TrackerHitAnalyzer().

MonitorElement* TrackerHitAnalyzer::h4ly[12]
private

Definition at line 136 of file TrackerHitAnalyzer.h.

Referenced by analyze(), and TrackerHitAnalyzer().

MonitorElement* TrackerHitAnalyzer::h5e[12]
private

Definition at line 102 of file TrackerHitAnalyzer.h.

Referenced by analyze(), and TrackerHitAnalyzer().

MonitorElement* TrackerHitAnalyzer::h5ex[12]
private

Definition at line 109 of file TrackerHitAnalyzer.h.

Referenced by analyze(), and TrackerHitAnalyzer().

MonitorElement* TrackerHitAnalyzer::h5ey[12]
private

Definition at line 116 of file TrackerHitAnalyzer.h.

Referenced by analyze(), and TrackerHitAnalyzer().

MonitorElement* TrackerHitAnalyzer::h5ez[12]
private

Definition at line 123 of file TrackerHitAnalyzer.h.

Referenced by analyze(), and TrackerHitAnalyzer().

MonitorElement* TrackerHitAnalyzer::h5lx[12]
private

Definition at line 130 of file TrackerHitAnalyzer.h.

Referenced by analyze(), and TrackerHitAnalyzer().

MonitorElement* TrackerHitAnalyzer::h5ly[12]
private

Definition at line 137 of file TrackerHitAnalyzer.h.

Referenced by analyze(), and TrackerHitAnalyzer().

MonitorElement* TrackerHitAnalyzer::h6e[12]
private

Definition at line 103 of file TrackerHitAnalyzer.h.

Referenced by analyze(), and TrackerHitAnalyzer().

MonitorElement* TrackerHitAnalyzer::h6ex[12]
private

Definition at line 110 of file TrackerHitAnalyzer.h.

Referenced by analyze(), and TrackerHitAnalyzer().

MonitorElement* TrackerHitAnalyzer::h6ey[12]
private

Definition at line 117 of file TrackerHitAnalyzer.h.

Referenced by analyze(), and TrackerHitAnalyzer().

MonitorElement* TrackerHitAnalyzer::h6ez[12]
private

Definition at line 124 of file TrackerHitAnalyzer.h.

Referenced by analyze(), and TrackerHitAnalyzer().

MonitorElement* TrackerHitAnalyzer::h6lx[12]
private

Definition at line 131 of file TrackerHitAnalyzer.h.

Referenced by analyze(), and TrackerHitAnalyzer().

MonitorElement* TrackerHitAnalyzer::h6ly[12]
private

Definition at line 138 of file TrackerHitAnalyzer.h.

Referenced by analyze(), and TrackerHitAnalyzer().

MonitorElement* TrackerHitAnalyzer::htofeta
private

Definition at line 90 of file TrackerHitAnalyzer.h.

Referenced by analyze(), endJob(), and TrackerHitAnalyzer().

MonitorElement* TrackerHitAnalyzer::htofeta_profile
private

Definition at line 94 of file TrackerHitAnalyzer.h.

Referenced by endJob().

MonitorElement* TrackerHitAnalyzer::htofphi
private

Definition at line 91 of file TrackerHitAnalyzer.h.

Referenced by analyze(), endJob(), and TrackerHitAnalyzer().

MonitorElement* TrackerHitAnalyzer::htofphi_profile
private

Definition at line 95 of file TrackerHitAnalyzer.h.

Referenced by endJob().

MonitorElement* TrackerHitAnalyzer::htofr
private

Definition at line 92 of file TrackerHitAnalyzer.h.

Referenced by analyze(), endJob(), and TrackerHitAnalyzer().

MonitorElement* TrackerHitAnalyzer::htofr_profile
private

Definition at line 96 of file TrackerHitAnalyzer.h.

Referenced by endJob().

MonitorElement* TrackerHitAnalyzer::htofz
private

Definition at line 93 of file TrackerHitAnalyzer.h.

Referenced by analyze(), endJob(), and TrackerHitAnalyzer().

MonitorElement* TrackerHitAnalyzer::htofz_profile
private

Definition at line 97 of file TrackerHitAnalyzer.h.

Referenced by endJob().

edm::InputTag TrackerHitAnalyzer::PxlBrlHighSrc_
private

Definition at line 76 of file TrackerHitAnalyzer.h.

Referenced by analyze(), and TrackerHitAnalyzer().

edm::InputTag TrackerHitAnalyzer::PxlBrlLowSrc_
private

Definition at line 75 of file TrackerHitAnalyzer.h.

Referenced by analyze(), and TrackerHitAnalyzer().

edm::InputTag TrackerHitAnalyzer::PxlFwdHighSrc_
private

Definition at line 78 of file TrackerHitAnalyzer.h.

Referenced by analyze(), and TrackerHitAnalyzer().

edm::InputTag TrackerHitAnalyzer::PxlFwdLowSrc_
private

Definition at line 77 of file TrackerHitAnalyzer.h.

Referenced by analyze(), and TrackerHitAnalyzer().

edm::InputTag TrackerHitAnalyzer::SiTECHighSrc_
private

Definition at line 74 of file TrackerHitAnalyzer.h.

Referenced by analyze(), and TrackerHitAnalyzer().

edm::InputTag TrackerHitAnalyzer::SiTECLowSrc_
private

Definition at line 73 of file TrackerHitAnalyzer.h.

Referenced by analyze(), and TrackerHitAnalyzer().

edm::InputTag TrackerHitAnalyzer::SiTIBHighSrc_
private

Definition at line 68 of file TrackerHitAnalyzer.h.

Referenced by analyze(), and TrackerHitAnalyzer().

edm::InputTag TrackerHitAnalyzer::SiTIBLowSrc_
private

Definition at line 67 of file TrackerHitAnalyzer.h.

Referenced by analyze(), and TrackerHitAnalyzer().

edm::InputTag TrackerHitAnalyzer::SiTIDHighSrc_
private

Definition at line 72 of file TrackerHitAnalyzer.h.

Referenced by analyze(), and TrackerHitAnalyzer().

edm::InputTag TrackerHitAnalyzer::SiTIDLowSrc_
private

Definition at line 71 of file TrackerHitAnalyzer.h.

Referenced by analyze(), and TrackerHitAnalyzer().

edm::InputTag TrackerHitAnalyzer::SiTOBHighSrc_
private

Definition at line 70 of file TrackerHitAnalyzer.h.

Referenced by analyze(), and TrackerHitAnalyzer().

edm::InputTag TrackerHitAnalyzer::SiTOBLowSrc_
private

Definition at line 69 of file TrackerHitAnalyzer.h.

Referenced by analyze(), and TrackerHitAnalyzer().

bool TrackerHitAnalyzer::verbose_
private

Definition at line 84 of file TrackerHitAnalyzer.h.

Referenced by TrackerHitAnalyzer().