33 #include <CLHEP/Vector/LorentzVector.h> 34 #include "CLHEP/Units/GlobalSystemOfUnits.h" 42 : verbose_( ps.getUntrackedParameter<bool>(
"Verbosity",
false ) )
43 , edmPSimHitContainer_pxlBrlLow_Token_( consumes<
edm::
PSimHitContainer>( ps.getParameter<
edm::InputTag>(
"PxlBrlLowSrc" ) ) )
44 , edmPSimHitContainer_pxlBrlHigh_Token_( consumes<
edm::
PSimHitContainer>( ps.getParameter<
edm::InputTag>(
"PxlBrlHighSrc" ) ) )
45 , edmPSimHitContainer_pxlFwdLow_Token_( consumes<
edm::
PSimHitContainer>( ps.getParameter<
edm::InputTag>(
"PxlFwdLowSrc" ) ) )
46 , edmPSimHitContainer_pxlFwdHigh_Token_( consumes<
edm::
PSimHitContainer>( ps.getParameter<
edm::InputTag>(
"PxlFwdHighSrc" ) ) )
47 , edmPSimHitContainer_siTIBLow_Token_( consumes<
edm::
PSimHitContainer>( ps.getParameter<
edm::InputTag>(
"SiTIBLowSrc" ) ) )
48 , edmPSimHitContainer_siTIBHigh_Token_( consumes<
edm::
PSimHitContainer>( ps.getParameter<
edm::InputTag>(
"SiTIBHighSrc" ) ) )
49 , edmPSimHitContainer_siTOBLow_Token_( consumes<
edm::
PSimHitContainer>( ps.getParameter<
edm::InputTag>(
"SiTOBLowSrc" ) ) )
50 , edmPSimHitContainer_siTOBHigh_Token_( consumes<
edm::
PSimHitContainer>( ps.getParameter<
edm::InputTag>(
"SiTOBHighSrc" ) ) )
51 , edmPSimHitContainer_siTIDLow_Token_( consumes<
edm::
PSimHitContainer>( ps.getParameter<
edm::InputTag>(
"SiTIDLowSrc" ) ) )
52 , edmPSimHitContainer_siTIDHigh_Token_( consumes<
edm::
PSimHitContainer>( ps.getParameter<
edm::InputTag>(
"SiTIDHighSrc" ) ) )
53 , edmPSimHitContainer_siTECLow_Token_( consumes<
edm::
PSimHitContainer>( ps.getParameter<
edm::InputTag>(
"SiTECLowSrc" ) ) )
54 , edmPSimHitContainer_siTECHigh_Token_( consumes<
edm::
PSimHitContainer>( ps.getParameter<
edm::InputTag>(
"SiTECHighSrc" ) ) )
55 , edmSimTrackContainerToken_( consumes<
edm::
SimTrackContainer>( ps.getParameter<
edm::InputTag>(
"G4TrkSrc" ) ) )
59 , fOutputFile( ps.getUntrackedParameter<
std::
string>(
"outputFile",
"TrackerHitHisto.root" ) )
60 ,
pixelOutput ( ps.getParameter<bool>(
"pixelOutput") ) {
67 Char_t hname1[50], htitle1[80];
68 Char_t hname2[50], htitle2[80];
69 Char_t hname3[50], htitle3[80];
70 Char_t hname4[50], htitle4[80];
71 Char_t hname5[50], htitle5[80];
72 Char_t hname6[50], htitle6[80];
94 htofeta = ibooker.
book2D (
"tof_eta",
"Time of flight vs eta", nbin , -3.0 , 3.0,200,-100,100);
95 htofphi = ibooker.
book2D(
"tof_phi",
"Time of flight vs phi", nbin,-180,180,200,-100,100);
96 htofr = ibooker.
book2D(
"tof_r",
"Time of flight vs r", nbin , 0 , 300, 200, -100,100);
97 htofz = ibooker.
book2D(
"tof_z",
"Time of flight vs z", nbin , -280 , 280, 200, -100,100);
100 const float E2NEL = 1.;
102 const char *
Region[] = {
"005",
"051",
"115",
"152",
"225",
"253",
103 "-050",
"-105",
"-151",
"-215",
"-252",
"-325"};
107 for(
int i=0;
i<12;
i++) {
109 sprintf (htitle1,
"Energy loss in TIB %s", Region[
i]);
110 sprintf (htitle2,
"Energy loss in TOB %s", Region[i]);
111 sprintf (htitle3,
"Energy loss in TID %s", Region[i]);
112 sprintf (htitle4,
"Energy loss in TEC %s", Region[i]);
113 if (
pixelOutput ) sprintf (htitle5,
"Energy loss in BPIX %s", Region[i]);
114 if (
pixelOutput ) sprintf (htitle6,
"Energy loss in FPIX %s", Region[i]);
116 sprintf (hname1,
"Eloss_TIB_%i",i+1);
117 sprintf (hname2,
"Eloss_TOB_%i",i+1);
118 sprintf (hname3,
"Eloss_TID_%i",i+1);
119 sprintf (hname4,
"Eloss_TEC_%i",i+1);
120 if (
pixelOutput ) sprintf (hname5,
"Eloss_BPIX_%i",i+1);
121 if (
pixelOutput ) sprintf (hname6,
"Eloss_FPIX_%i",i+1);
124 h1e[
i] = ibooker.
book1D (hname1, htitle1, nbin , 0.0 , 0.001*E2NEL);
126 h2e[
i] = ibooker.
book1D (hname2, htitle2, nbin , 0.0 , 0.001*E2NEL);
128 h3e[
i] = ibooker.
book1D (hname3, htitle3, nbin , 0.0 , 0.001*E2NEL);
130 h4e[
i] = ibooker.
book1D (hname4, htitle4, nbin , 0.0 , 0.001*E2NEL);
133 h5e[
i] = ibooker.
book1D (hname5, htitle5, nbin , 0.0 , 0.001*E2NEL);
135 h6e[
i] = ibooker.
book1D (hname6, htitle6, nbin , 0.0 , 0.001*E2NEL);
141 const float high[] = {0.03, 0.03, 0.02, 0.03, 0.03, 0.03};
142 const float low[] = {-0.03, -0.03, -0.02, -0.03, -0.03, -0.03};
144 for(
int i=0;
i<12;
i++) {
146 sprintf (htitle1,
"Entryx-Exitx in TIB %s", Region[
i]);
147 sprintf (htitle2,
"Entryx-Exitx in TOB %s", Region[i]);
148 sprintf (htitle3,
"Entryx-Exitx in TID %s", Region[i]);
149 sprintf (htitle4,
"Entryx-Exitx in TEC %s", Region[i]);
150 if (
pixelOutput ) sprintf (htitle5,
"Entryx-Exitx in BPIX %s", Region[i]);
151 if (
pixelOutput ) sprintf (htitle6,
"Entryx-Exitx in FPIX %s", Region[i]);
153 sprintf (hname1,
"Entryx-Exitx_TIB_%i",i+1);
154 sprintf (hname2,
"Entryx-Exitx_TOB_%i",i+1);
155 sprintf (hname3,
"Entryx-Exitx_TID_%i",i+1);
156 sprintf (hname4,
"Entryx-Exitx_TEC_%i",i+1);
157 if (
pixelOutput ) sprintf (hname5,
"Entryx-Exitx_BPIX_%i",i+1);
158 if (
pixelOutput ) sprintf (hname6,
"Entryx-Exitx_FPIX_%i",i+1);
161 h1ex[
i] = ibooker.
book1D (hname1, htitle1, nbin , low[0] , high[0]);
163 h2ex[
i] = ibooker.
book1D (hname2, htitle2, nbin , low[1] , high[1]);
165 h3ex[
i] = ibooker.
book1D (hname3, htitle3, nbin , low[2] , high[2]);
167 h4ex[
i] = ibooker.
book1D (hname4, htitle4, nbin , low[3] , high[3]);
170 h5ex[
i] = ibooker.
book1D (hname5, htitle5, nbin , low[4] , high[4]);
172 h6ex[
i] = ibooker.
book1D (hname6, htitle6, nbin , low[5] , high[5]);
177 const float high0[] = {0.05, 0.06, 0.03, 0.03, 0.03, 0.03};
178 const float low0[] = {-0.05, -0.06, -0.03, -0.03, -0.03, -0.03};
180 for(
int i=0;
i<12;
i++) {
182 sprintf (htitle1,
"Entryy-Exity in TIB %s", Region[
i]);
183 sprintf (htitle2,
"Entryy-Exity in TOB %s", Region[i]);
184 sprintf (htitle3,
"Entryy-Exity in TID %s", Region[i]);
185 sprintf (htitle4,
"Entryy-Exity in TEC %s", Region[i]);
186 if (
pixelOutput ) sprintf (htitle5,
"Entryy-Exity in BPIX %s", Region[i]);
187 if (
pixelOutput ) sprintf (htitle6,
"Entryy-Exity in FPIX %s", Region[i]);
189 sprintf (hname1,
"Entryy-Exity_TIB_%i",i+1);
190 sprintf (hname2,
"Entryy-Exity_TOB_%i",i+1);
191 sprintf (hname3,
"Entryy-Exity_TID_%i",i+1);
192 sprintf (hname4,
"Entryy-Exity_TEC_%i",i+1);
193 if (
pixelOutput ) sprintf (hname5,
"Entryy-Exity_BPIX_%i",i+1);
194 if (
pixelOutput ) sprintf (hname6,
"Entryy-Exity_FPIX_%i",i+1);
197 h1ey[
i] = ibooker.
book1D (hname1, htitle1, nbin , low0[0] , high0[0]);
199 h2ey[
i] = ibooker.
book1D (hname2, htitle2, nbin , low0[1] , high0[1]);
201 h3ey[
i] = ibooker.
book1D (hname3, htitle3, nbin , low0[2] , high0[2]);
203 h4ey[
i] = ibooker.
book1D (hname4, htitle4, nbin , low0[3] , high0[3]);
206 h5ey[
i] = ibooker.
book1D (hname5, htitle5, nbin , low0[4] , high0[4]);
208 h6ey[
i] = ibooker.
book1D (hname6, htitle6, nbin , low0[5] , high0[5]);
213 const float high1[] = {0.05, 0.06, 0.05, 0.06, 0.05, 0.05};
214 const float low1[] = {0.,0.,0.,0.,0.,0.};
216 for(
int i=0;
i<12;
i++) {
218 sprintf (htitle1,
"abs(Entryz-Exitz) in TIB %s", Region[
i]);
219 sprintf (htitle2,
"abs(Entryz-Exitz) in TOB %s", Region[i]);
220 sprintf (htitle3,
"abs(Entryz-Exitz) in TID %s", Region[i]);
221 sprintf (htitle4,
"abs(Entryz-Exitz) in TEC %s", Region[i]);
222 if (
pixelOutput ) sprintf (htitle5,
"abs(Entryz-Exitz) in BPIX %s", Region[i]);
223 if (
pixelOutput ) sprintf (htitle6,
"abs(Entryz-Exitz) in FPIX %s", Region[i]);
225 sprintf (hname1,
"Entryz-Exitz_TIB_%i",i+1);
226 sprintf (hname2,
"Entryz-Exitz_TOB_%i",i+1);
227 sprintf (hname3,
"Entryz-Exitz_TID_%i",i+1);
228 sprintf (hname4,
"Entryz-Exitz_TEC_%i",i+1);
229 if (
pixelOutput ) sprintf (hname5,
"Entryz-Exitz_BPIX_%i",i+1);
230 if (
pixelOutput ) sprintf (hname6,
"Entryz-Exitz_FPIX_%i",i+1);
233 h1ez[
i] = ibooker.
book1D (hname1, htitle1, nbin , low1[0] , high1[0]);
235 h2ez[
i] = ibooker.
book1D (hname2, htitle2, nbin , low1[1] , high1[1]);
237 h3ez[
i] = ibooker.
book1D (hname3, htitle3, nbin , low1[2] , high1[2]);
239 h4ez[
i] = ibooker.
book1D (hname4, htitle4, nbin , low1[3] , high1[3]);
242 h5ez[
i] = ibooker.
book1D (hname5, htitle5, nbin , low1[4] , high1[4]);
244 h6ez[
i] = ibooker.
book1D (hname6, htitle6, nbin , low1[5] , high1[5]);
250 const float high2[] = {3.2, 5.0, 5.5, 6.2, 0.85, 0.5};
251 const float low2[] = {-3.2, -5.0, -5.5, -6.2, -0.85, -0.5};
253 for(
int i=0;
i<12;
i++) {
255 sprintf (htitle1,
"Localx in TIB %s", Region[
i]);
256 sprintf (htitle2,
"Localx in TOB %s", Region[i]);
257 sprintf (htitle3,
"Localx in TID %s", Region[i]);
258 sprintf (htitle4,
"Localx in TEC %s", Region[i]);
259 if (
pixelOutput ) sprintf (htitle5,
"Localx in BPIX %s", Region[i]);
260 if (
pixelOutput ) sprintf (htitle6,
"Localx in FPIX %s", Region[i]);
262 sprintf (hname1,
"Localx_TIB_%i",i+1);
263 sprintf (hname2,
"Localx_TOB_%i",i+1);
264 sprintf (hname3,
"Localx_TID_%i",i+1);
265 sprintf (hname4,
"Localx_TEC_%i",i+1);
266 if (
pixelOutput ) sprintf (hname5,
"Localx_BPIX_%i",i+1);
267 if (
pixelOutput ) sprintf (hname6,
"Localx_FPIX_%i",i+1);
270 h1lx[
i] = ibooker.
book1D (hname1, htitle1, nbin , low2[0] , high2[0]);
272 h2lx[
i] = ibooker.
book1D (hname2, htitle2, nbin , low2[1] , high2[1]);
274 h3lx[
i] = ibooker.
book1D (hname3, htitle3, nbin , low2[2] , high2[2]);
276 h4lx[
i] = ibooker.
book1D (hname4, htitle4, nbin , low2[3] , high2[3]);
279 h5lx[
i] = ibooker.
book1D (hname5, htitle5, nbin , low2[4] , high2[4]);
281 h6lx[
i] = ibooker.
book1D (hname6, htitle6, nbin , low2[5] , high2[5]);
287 const float high3[] = {6.0, 10., 5.6, 10.5, 3.4, 0.52};
288 const float low3[] = {-6.0, -10., -5.6, -10.5, -3.4, -0.52};
290 for(
int i=0;
i<12;
i++) {
292 sprintf (htitle1,
"Localy in TIB %s", Region[
i]);
293 sprintf (htitle2,
"Localy in TOB %s", Region[i]);
294 sprintf (htitle3,
"Localy in TID %s", Region[i]);
295 sprintf (htitle4,
"Localy in TEC %s", Region[i]);
296 if (
pixelOutput ) sprintf (htitle5,
"Localy in BPIX %s", Region[i]);
297 if (
pixelOutput ) sprintf (htitle6,
"Localy in FPIX %s", Region[i]);
299 sprintf (hname1,
"Localy_TIB_%i",i+1);
300 sprintf (hname2,
"Localy_TOB_%i",i+1);
301 sprintf (hname3,
"Localy_TID_%i",i+1);
302 sprintf (hname4,
"Localy_TEC_%i",i+1);
303 if (
pixelOutput ) sprintf (hname5,
"Localy_BPIX_%i",i+1);
304 if (
pixelOutput ) sprintf (hname6,
"Localy_FPIX_%i",i+1);
307 h1ly[
i] = ibooker.
book1D (hname1, htitle1, nbin , low3[0] , high3[0]);
309 h2ly[
i] = ibooker.
book1D (hname2, htitle2, nbin , low3[1] , high3[1]);
311 h3ly[
i] = ibooker.
book1D (hname3, htitle3, nbin , low3[2] , high3[2]);
313 h4ly[
i] = ibooker.
book1D (hname4, htitle4, nbin , low3[3] , high3[3]);
316 h5ly[
i] = ibooker.
book1D (hname5, htitle5, nbin , low3[4] , high3[4]);
318 h6ly[
i] = ibooker.
book1D (hname6, htitle6, nbin , low3[5] , high3[5]);
351 edm::PSimHitContainer::const_iterator itHit;
358 if (!PxlBrlLowContainer.
isValid()) {
360 <<
"Unable to find TrackerHitsPixelBarrelLowTof in event!";
366 if (!PxlBrlHighContainer.
isValid()) {
368 <<
"Unable to find TrackerHitsPixelBarrelHighTof in event!";
377 if (!PxlFwdLowContainer.
isValid()) {
379 <<
"Unable to find TrackerHitsPixelEndcapLowTof in event!";
385 if (!PxlFwdHighContainer.
isValid()) {
387 <<
"Unable to find TrackerHitsPixelEndcapHighTof in event!";
396 if (!SiTIBLowContainer.
isValid()) {
398 <<
"Unable to find TrackerHitsTIBLowTof in event!";
405 if (!SiTIBHighContainer.
isValid()) {
407 <<
"Unable to find TrackerHitsTIBHighTof in event!";
416 if (!SiTOBLowContainer.
isValid()) {
418 <<
"Unable to find TrackerHitsTOBLowTof in event!";
425 if (!SiTOBHighContainer.
isValid()) {
427 <<
"Unable to find TrackerHitsTOBHighTof in event!";
437 if (!SiTIDLowContainer.
isValid()) {
439 <<
"Unable to find TrackerHitsTIDLowTof in event!";
446 if (!SiTIDHighContainer.
isValid()) {
448 <<
"Unable to find TrackerHitsTIDHighTof in event!";
457 if (!SiTECLowContainer.
isValid()) {
459 <<
"Unable to find TrackerHitsTECLowTof in event!";
466 if (!SiTECHighContainer.
isValid()) {
468 <<
"Unable to find TrackerHitsTECHighTof in event!";
478 if (!G4TrkContainer.
isValid()) {
480 <<
"Unable to find SimTrack in event!";
492 edm::SimTrackContainer::const_iterator itTrk;
493 for (itTrk = G4TrkContainer->begin(); itTrk != G4TrkContainer->end();
498 const CLHEP::HepLorentzVector& G4Trk = CLHEP::HepLorentzVector(itTrk->momentum().x(),
499 itTrk->momentum().y(),
500 itTrk->momentum().z(),
501 itTrk->momentum().e());
502 p =
sqrt(G4Trk[0]*G4Trk[0]+G4Trk[1]*G4Trk[1]+G4Trk[2]*G4Trk[2]);
505 <<
"TrackerTest::INFO: Primary has p = 0 ";
507 double costheta = G4Trk[2]/
p;
511 if (eta>0.0 && eta<=0.5) ir = 0;
512 if (eta>0.5 && eta<=1.0) ir = 1;
513 if (eta>1.0 && eta<=1.5) ir = 2;
514 if (eta>1.5 && eta<=2.0) ir = 3;
515 if (eta>2.0 && eta<=2.5) ir = 4;
518 if (eta>-0.5 && eta<= 0.0) ir = 6;
519 if (eta>-1.0 && eta<=-0.5) ir = 7;
520 if (eta>-1.5 && eta<=-1.0) ir = 8;
521 if (eta>-2.0 && eta<=-1.5) ir = 9;
522 if (eta>-2.5 && eta<=-2.0) ir = 10;
523 if (eta<=-2.5) ir = 11;
536 for (itHit = PxlBrlLowContainer->begin(); itHit != PxlBrlLowContainer->end(); ++itHit) {
539 GlobalPoint gpos=det->toGlobal(itHit->localPosition());
545 h5e[ir]->
Fill(itHit->energyLoss());
546 h5ex[ir]->
Fill(itHit->entryPoint().x()-itHit->exitPoint().x());
547 h5ey[ir]->
Fill(itHit->entryPoint().y()-itHit->exitPoint().y());
548 h5ez[ir]->
Fill(std::fabs(itHit->entryPoint().z()-itHit->exitPoint().z()));
549 h5lx[ir]->
Fill(itHit->localPosition().x());
550 h5ly[ir]->
Fill(itHit->localPosition().y());
552 for (itHit = PxlBrlHighContainer->begin(); itHit != PxlBrlHighContainer->end(); ++itHit) {
555 GlobalPoint gpos=det->toGlobal(itHit->localPosition());
562 h5e[ir]->
Fill(itHit->energyLoss());
563 h5ex[ir]->
Fill(itHit->entryPoint().x()-itHit->exitPoint().x());
564 h5ey[ir]->
Fill(itHit->entryPoint().y()-itHit->exitPoint().y());
565 h5ez[ir]->
Fill(std::fabs(itHit->entryPoint().z()-itHit->exitPoint().z()));
566 h5lx[ir]->
Fill(itHit->localPosition().x());
567 h5ly[ir]->
Fill(itHit->localPosition().y());
569 for (itHit = PxlFwdLowContainer->begin(); itHit != PxlFwdLowContainer->end(); ++itHit) {
572 GlobalPoint gpos=det->toGlobal(itHit->localPosition());
579 h6e[ir]->
Fill(itHit->energyLoss());
580 h6ex[ir]->
Fill(itHit->entryPoint().x()-itHit->exitPoint().x());
581 h6ey[ir]->
Fill(itHit->entryPoint().y()-itHit->exitPoint().y());
582 h6ez[ir]->
Fill(std::fabs(itHit->entryPoint().z()-itHit->exitPoint().z()));
583 h6lx[ir]->
Fill(itHit->localPosition().x());
584 h6ly[ir]->
Fill(itHit->localPosition().y());
586 for (itHit = PxlFwdHighContainer->begin(); itHit != PxlFwdHighContainer->end(); ++itHit) {
589 GlobalPoint gpos=det->toGlobal(itHit->localPosition());
596 h6e[ir]->
Fill(itHit->energyLoss());
597 h6ex[ir]->
Fill(itHit->entryPoint().x()-itHit->exitPoint().x());
598 h6ey[ir]->
Fill(itHit->entryPoint().y()-itHit->exitPoint().y());
599 h6ez[ir]->
Fill(std::fabs(itHit->entryPoint().z()-itHit->exitPoint().z()));
600 h6lx[ir]->
Fill(itHit->localPosition().x());
601 h6ly[ir]->
Fill(itHit->localPosition().y());
607 for (itHit = SiTIBLowContainer->begin(); itHit != SiTIBLowContainer->end(); ++itHit) {
610 GlobalPoint gpos=det->toGlobal(itHit->localPosition());
617 h1e[ir]->
Fill(itHit->energyLoss());
618 h1ex[ir]->
Fill(itHit->entryPoint().x()-itHit->exitPoint().x());
619 h1ey[ir]->
Fill(itHit->entryPoint().y()-itHit->exitPoint().y());
620 h1ez[ir]->
Fill(std::fabs(itHit->entryPoint().z()-itHit->exitPoint().z()));
621 h1lx[ir]->
Fill(itHit->localPosition().x());
622 h1ly[ir]->
Fill(itHit->localPosition().y());
624 for (itHit = SiTIBHighContainer->begin(); itHit != SiTIBHighContainer->end(); ++itHit) {
627 GlobalPoint gpos=det->toGlobal(itHit->localPosition());
634 h1e[ir]->
Fill(itHit->energyLoss());
635 h1ex[ir]->
Fill(itHit->entryPoint().x()-itHit->exitPoint().x());
636 h1ey[ir]->
Fill(itHit->entryPoint().y()-itHit->exitPoint().y());
637 h1ez[ir]->
Fill(std::fabs(itHit->entryPoint().z()-itHit->exitPoint().z()));
638 h1lx[ir]->
Fill(itHit->localPosition().x());
639 h1ly[ir]->
Fill(itHit->localPosition().y());
644 for (itHit = SiTOBLowContainer->begin(); itHit != SiTOBLowContainer->end(); ++itHit) {
647 GlobalPoint gpos=det->toGlobal(itHit->localPosition());
654 h2e[ir]->
Fill(itHit->energyLoss());
655 h2ex[ir]->
Fill(itHit->entryPoint().x()-itHit->exitPoint().x());
656 h2ey[ir]->
Fill(itHit->entryPoint().y()-itHit->exitPoint().y());
657 h2ez[ir]->
Fill(std::fabs(itHit->entryPoint().z()-itHit->exitPoint().z()));
658 h2lx[ir]->
Fill(itHit->localPosition().x());
659 h2ly[ir]->
Fill(itHit->localPosition().y());
661 for (itHit = SiTOBHighContainer->begin(); itHit != SiTOBHighContainer->end(); ++itHit) {
664 GlobalPoint gpos=det->toGlobal(itHit->localPosition());
670 h2e[ir]->
Fill(itHit->energyLoss());
671 h2ex[ir]->
Fill(itHit->entryPoint().x()-itHit->exitPoint().x());
672 h2ey[ir]->
Fill(itHit->entryPoint().y()-itHit->exitPoint().y());
673 h2ez[ir]->
Fill(std::fabs(itHit->entryPoint().z()-itHit->exitPoint().z()));
674 h2lx[ir]->
Fill(itHit->localPosition().x());
675 h2ly[ir]->
Fill(itHit->localPosition().y());
680 for (itHit = SiTIDLowContainer->begin(); itHit != SiTIDLowContainer->end(); ++itHit) {
683 GlobalPoint gpos=det->toGlobal(itHit->localPosition());
689 h3e[ir]->
Fill(itHit->energyLoss());
690 h3ex[ir]->
Fill(itHit->entryPoint().x()-itHit->exitPoint().x());
691 h3ey[ir]->
Fill(itHit->entryPoint().y()-itHit->exitPoint().y());
692 h3ez[ir]->
Fill(std::fabs(itHit->entryPoint().z()-itHit->exitPoint().z()));
693 h3lx[ir]->
Fill(itHit->localPosition().x());
694 h3ly[ir]->
Fill(itHit->localPosition().y());
696 for (itHit = SiTIDHighContainer->begin(); itHit != SiTIDHighContainer->end(); ++itHit) {
699 GlobalPoint gpos=det->toGlobal(itHit->localPosition());
705 h3e[ir]->
Fill(itHit->energyLoss());
706 h3ex[ir]->
Fill(itHit->entryPoint().x()-itHit->exitPoint().x());
707 h3ey[ir]->
Fill(itHit->entryPoint().y()-itHit->exitPoint().y());
708 h3ez[ir]->
Fill(std::fabs(itHit->entryPoint().z()-itHit->exitPoint().z()));
709 h3lx[ir]->
Fill(itHit->localPosition().x());
710 h3ly[ir]->
Fill(itHit->localPosition().y());
715 for (itHit = SiTECLowContainer->begin(); itHit != SiTECLowContainer->end(); ++itHit) {
718 GlobalPoint gpos=det->toGlobal(itHit->localPosition());
724 h4e[ir]->
Fill(itHit->energyLoss());
725 h4ex[ir]->
Fill(itHit->entryPoint().x()-itHit->exitPoint().x());
726 h4ey[ir]->
Fill(itHit->entryPoint().y()-itHit->exitPoint().y());
727 h4ez[ir]->
Fill(std::fabs(itHit->entryPoint().z()-itHit->exitPoint().z()));
728 h4lx[ir]->
Fill(itHit->localPosition().x());
729 h4ly[ir]->
Fill(itHit->localPosition().y());
731 for (itHit = SiTECHighContainer->begin(); itHit != SiTECHighContainer->end(); ++itHit) {
734 GlobalPoint gpos=det->toGlobal(itHit->localPosition());
740 h4e[ir]->
Fill(itHit->energyLoss());
741 h4ex[ir]->
Fill(itHit->entryPoint().x()-itHit->exitPoint().x());
742 h4ey[ir]->
Fill(itHit->entryPoint().y()-itHit->exitPoint().y());
743 h4ez[ir]->
Fill(std::fabs(itHit->entryPoint().z()-itHit->exitPoint().z()));
744 h4lx[ir]->
Fill(itHit->localPosition().x());
745 h4ly[ir]->
Fill(itHit->localPosition().y());
void bookHistograms(DQMStore::IBooker &ibooker, const edm::Run &run, const edm::EventSetup &es)
EventNumber_t event() const
MonitorElement * h2lx[12]
MonitorElement * h1lx[12]
MonitorElement * h6ex[12]
void analyze(const edm::Event &e, const edm::EventSetup &c)
Analyze.
MonitorElement * h1ey[12]
edm::EDGetTokenT< edm::PSimHitContainer > edmPSimHitContainer_siTECLow_Token_
MonitorElement * h3ly[12]
MonitorElement * h5ez[12]
MonitorElement * h4ex[12]
edm::EDGetTokenT< edm::SimTrackContainer > edmSimTrackContainerToken_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
MonitorElement * h1ez[12]
MonitorElement * h3ez[12]
edm::EDGetTokenT< edm::PSimHitContainer > edmPSimHitContainer_pxlBrlLow_Token_
Geom::Phi< T > phi() const
Geom::Theta< T > theta() const
MonitorElement * h5ey[12]
MonitorElement * h3lx[12]
edm::EDGetTokenT< edm::PSimHitContainer > edmPSimHitContainer_siTOBLow_Token_
edm::EDGetTokenT< edm::PSimHitContainer > edmPSimHitContainer_pxlFwdLow_Token_
MonitorElement * h6ly[12]
MonitorElement * h5ex[12]
MonitorElement * h5ly[12]
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
edm::EDGetTokenT< edm::PSimHitContainer > edmPSimHitContainer_siTIBLow_Token_
edm::EDGetTokenT< edm::PSimHitContainer > edmPSimHitContainer_siTOBHigh_Token_
MonitorElement * h1ex[12]
MonitorElement * book1D(Args &&...args)
MonitorElement * h6ey[12]
Tan< T >::type tan(const T &t)
MonitorElement * h4lx[12]
~TrackerHitAnalyzer()
Destructor.
void setVerbose(unsigned level)
MonitorElement * h2ex[12]
MonitorElement * h6ez[12]
edm::EDGetTokenT< edm::PSimHitContainer > edmPSimHitContainer_siTIDLow_Token_
MonitorElement * h2ez[12]
void setCurrentFolder(const std::string &fullpath)
edm::EDGetTokenT< edm::PSimHitContainer > edmPSimHitContainer_pxlBrlHigh_Token_
MonitorElement * h5lx[12]
MonitorElement * book2D(Args &&...args)
MonitorElement * h4ey[12]
MonitorElement * h1ly[12]
MonitorElement * h4ly[12]
return(e1-e2)*(e1-e2)+dp *dp
MonitorElement * h3ex[12]
MonitorElement * h3ey[12]
MonitorElement * h2ey[12]
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", const uint32_t run=0, const uint32_t lumi=0, SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE", const bool resetMEsAfterWriting=false)
MonitorElement * h2ly[12]
edm::EDGetTokenT< edm::PSimHitContainer > edmPSimHitContainer_siTIBHigh_Token_
std::vector< PSimHit > PSimHitContainer
void showDirStructure(void) const
edm::EDGetTokenT< edm::PSimHitContainer > edmPSimHitContainer_pxlFwdHigh_Token_
TrackerHitAnalyzer(const edm::ParameterSet &ps)
Constructor.
edm::EDGetTokenT< edm::PSimHitContainer > edmPSimHitContainer_siTECHigh_Token_
std::vector< SimTrack > SimTrackContainer
edm::EDGetTokenT< edm::PSimHitContainer > edmPSimHitContainer_siTIDHigh_Token_
MonitorElement * h6lx[12]
MonitorElement * h4ez[12]