11 #include <TDirectory.h>
24 LogTrace(
"TestSmoothHits") << iConfig << std::endl;
44 file =
new TFile(
"testSmoothHits.root",
"recreate");
45 for (
int i = 0;
i != 6;
i++)
46 for (
int j = 0;
j != 9;
j++) {
60 title <<
"PullGP_X_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts";
63 title <<
"PullGP_Y_" <<
i + 1 <<
"-" << j + 1 <<
"_ts";
66 title <<
"PullGP_Z_" <<
i + 1 <<
"-" << j + 1 <<
"_ts";
69 title <<
"Chi2Increment_" <<
i + 1 <<
"-" << j + 1;
73 title <<
"PullGM_X_" <<
i + 1 <<
"-" << j + 1 <<
"_ts";
76 title <<
"PullGM_Y_" <<
i + 1 <<
"-" << j + 1 <<
"_ts";
79 title <<
"PullGM_Z_" <<
i + 1 <<
"-" << j + 1 <<
"_ts";
83 title <<
"PullGP_X_" <<
i + 1 <<
"-" << j + 1 <<
"_tr";
86 title <<
"PullGP_Y_" <<
i + 1 <<
"-" << j + 1 <<
"_tr";
89 title <<
"PullGP_Z_" <<
i + 1 <<
"-" << j + 1 <<
"_tr";
93 title <<
"PullGP_X_" <<
i + 1 <<
"-" << j + 1 <<
"_rs";
96 title <<
"PullGP_Y_" <<
i + 1 <<
"-" << j + 1 <<
"_rs";
99 title <<
"PullGP_Z_" <<
i + 1 <<
"-" << j + 1 <<
"_rs";
102 if (((
i == 2 ||
i == 4) && (j == 0 || j == 1)) || (
i == 3 ||
i == 5)) {
105 title <<
"PullGP_X_" <<
i + 1 <<
"-" << j + 1 <<
"_ts_mono";
108 title <<
"PullGP_Y_" <<
i + 1 <<
"-" << j + 1 <<
"_ts_mono";
111 title <<
"PullGP_Z_" <<
i + 1 <<
"-" << j + 1 <<
"_ts_mono";
115 title <<
"PullGM_X_" <<
i + 1 <<
"-" << j + 1 <<
"_ts_mono";
118 title <<
"PullGM_Y_" <<
i + 1 <<
"-" << j + 1 <<
"_ts_mono";
121 title <<
"PullGM_Z_" <<
i + 1 <<
"-" << j + 1 <<
"_ts_mono";
125 title <<
"PullGP_X_" <<
i + 1 <<
"-" << j + 1 <<
"_tr_mono";
128 title <<
"PullGP_Y_" <<
i + 1 <<
"-" << j + 1 <<
"_tr_mono";
131 title <<
"PullGP_Z_" <<
i + 1 <<
"-" << j + 1 <<
"_tr_mono";
135 title <<
"PullGP_X_" <<
i + 1 <<
"-" << j + 1 <<
"_rs_mono";
138 title <<
"PullGP_Y_" <<
i + 1 <<
"-" << j + 1 <<
"_rs_mono";
141 title <<
"PullGP_Z_" <<
i + 1 <<
"-" << j + 1 <<
"_rs_mono";
146 title <<
"PullGP_X_" <<
i + 1 <<
"-" << j + 1 <<
"_ts_stereo";
149 title <<
"PullGP_Y_" <<
i + 1 <<
"-" << j + 1 <<
"_ts_stereo";
152 title <<
"PullGP_Z_" <<
i + 1 <<
"-" << j + 1 <<
"_ts_stereo";
156 title <<
"PullGM_X_" <<
i + 1 <<
"-" << j + 1 <<
"_ts_stereo";
159 title <<
"PullGM_Y_" <<
i + 1 <<
"-" << j + 1 <<
"_ts_stereo";
162 title <<
"PullGM_Z_" <<
i + 1 <<
"-" << j + 1 <<
"_ts_stereo";
166 title <<
"PullGP_X_" <<
i + 1 <<
"-" << j + 1 <<
"_tr_stereo";
169 title <<
"PullGP_Y_" <<
i + 1 <<
"-" << j + 1 <<
"_tr_stereo";
172 title <<
"PullGP_Z_" <<
i + 1 <<
"-" << j + 1 <<
"_tr_stereo";
176 title <<
"PullGP_X_" <<
i + 1 <<
"-" << j + 1 <<
"_rs_stereo";
179 title <<
"PullGP_Y_" <<
i + 1 <<
"-" << j + 1 <<
"_rs_stereo";
182 title <<
"PullGP_Z_" <<
i + 1 <<
"-" << j + 1 <<
"_rs_stereo";
186 hTotChi2Increment =
new TH1F(
"TotChi2Increment",
"TotChi2Increment", 1000, 0, 100);
187 hChi2_vs_Process =
new TH2F(
"Chi2_vs_Process",
"Chi2_vs_Process", 1000, 0, 100, 17, -0.5, 16.5);
188 hChi2_vs_clsize =
new TH2F(
"Chi2_vs_clsize",
"Chi2_vs_clsize", 1000, 0, 100, 17, -0.5, 16.5);
196 LogTrace(
"TestSmoothHits") <<
"new event" << std::endl;
204 LogTrace(
"TestSmoothHits") <<
"new candidate" << std::endl;
215 if (theTSOS.globalMomentum().eta() >
maxeta || theTSOS.globalMomentum().eta() <
mineta)
221 for (
auto const& recHit : theTC->
recHits()) {
226 std::vector<Trajectory> fitted =
fit->fit(theTC->
seed(), hits, theTSOS);
228 std::vector<Trajectory>
result;
229 for (std::vector<Trajectory>::iterator it = fitted.begin(); it != fitted.end(); it++) {
230 std::vector<Trajectory> smoothed =
smooth->trajectories(*it);
231 result.insert(result.end(), smoothed.begin(), smoothed.end());
235 std::vector<TrajectoryMeasurement> vtm = result[0].measurements();
237 TSOS lastState = theTSOS;
238 for (std::vector<TrajectoryMeasurement>::iterator tm = vtm.begin(); tm != vtm.end(); tm++) {
240 if ((rhit)->
isValid() == 0 && rhit->det() !=
nullptr)
242 LogTrace(
"TestSmoothHits") <<
"new hit";
244 int subdetId = rhit->det()->geographicalId().subdetId();
245 DetId id = rhit->
det()->geographicalId();
246 int layerId = tTopo->layer(
id);
247 LogTrace(
"TestSmoothHits") <<
"subdetId=" << subdetId <<
" layerId=" << layerId;
249 double delta = 99999;
252 std::vector<PSimHit> assSimHits = hitAssociator.
associateHit(*(rhit->hit()));
253 if (assSimHits.empty())
256 for (std::vector<PSimHit>::const_iterator
m = assSimHits.begin();
m < assSimHits.end();
m++) {
257 if ((
m->localPosition() - rhitLPv).
mag() <
delta) {
259 delta = (
m->localPosition() - rhitLPv).
mag();
263 TSOS currentState =
combiner(tm->backwardPredictedState(), tm->forwardPredictedState());
264 TSOS updatedState = tm->updatedState();
267 double chi2increment = tm->estimate();
268 LogTrace(
"TestSmoothHits") <<
"tm->estimate()=" << tm->estimate();
270 title <<
"Chi2Increment_" << subdetId <<
"-" << layerId;
274 if (dynamic_cast<const SiPixelRecHit*>(rhit->hit()))
276 if (dynamic_cast<const SiStripRecHit2D*>(rhit->hit()))
280 const Surface* surf = &((rhit)->det()->surface());
283 if (dynamic_cast<const SiStripMatchedRecHit2D*>(rhit->hit())) {
284 double rechitmatchedx = rhit->localPosition().
x();
285 double rechitmatchedy = rhit->localPosition().y();
286 double mindist = 999999;
288 std::pair<LocalPoint, LocalVector> closestPair;
290 const BoundPlane& plane = (rhit)->det()->surface();
291 for (std::vector<PSimHit>::const_iterator
m = assSimHits.begin();
m < assSimHits.end();
m++) {
293 std::pair<LocalPoint, LocalVector> hitPair =
projectHit((*
m), stripDet, plane);
294 distx = fabs(rechitmatchedx - hitPair.first.x());
295 disty = fabs(rechitmatchedy - hitPair.first.y());
296 double dist = distx * distx + disty * disty;
297 if (
sqrt(dist) < mindist) {
299 closestPair = hitPair;
302 shitLPos = closestPair.first;
303 shitLMom = closestPair.second;
357 GlobalError rhitGPEr = (rhit)->globalPositionError();
359 double pullGPX_rs = (rhitGPos.
x() - shitGPos.
x()) /
sqrt(rhitGPEr.
cxx());
360 double pullGPY_rs = (rhitGPos.
y() - shitGPos.
y()) /
sqrt(rhitGPEr.
cyy());
361 double pullGPZ_rs = (rhitGPos.
z() - shitGPos.
z()) /
sqrt(rhitGPEr.
czz());
366 LogTrace(
"TestSmoothHits") <<
"rs" << std::endl;
369 title <<
"PullGP_X_" << subdetId <<
"-" << layerId <<
"_rs";
372 title <<
"PullGP_Y_" << subdetId <<
"-" << layerId <<
"_rs";
375 title <<
"PullGP_Z_" << subdetId <<
"-" << layerId <<
"_rs";
378 double pullGPX_tr = (tsosGPos.
x() - rhitGPos.
x()) /
sqrt(tsosGPEr.
cxx() + rhitGPEr.
cxx());
379 double pullGPY_tr = (tsosGPos.
y() - rhitGPos.
y()) /
sqrt(tsosGPEr.
cyy() + rhitGPEr.
cyy());
380 double pullGPZ_tr = (tsosGPos.
z() - rhitGPos.
z()) /
sqrt(tsosGPEr.
czz() + rhitGPEr.
czz());
385 LogTrace(
"TestSmoothHits") <<
"tr" << std::endl;
388 title <<
"PullGP_X_" << subdetId <<
"-" << layerId <<
"_tr";
391 title <<
"PullGP_Y_" << subdetId <<
"-" << layerId <<
"_tr";
394 title <<
"PullGP_Z_" << subdetId <<
"-" << layerId <<
"_tr";
397 double pullGPX_ts = (tsosGPos.
x() - shitGPos.
x()) /
sqrt(tsosGPEr.
cxx());
398 double pullGPY_ts = (tsosGPos.
y() - shitGPos.
y()) /
sqrt(tsosGPEr.
cyy());
399 double pullGPZ_ts = (tsosGPos.
z() - shitGPos.
z()) /
sqrt(tsosGPEr.
czz());
404 LogTrace(
"TestSmoothHits") <<
"ts1" << std::endl;
407 title <<
"PullGP_X_" << subdetId <<
"-" << layerId <<
"_ts";
410 title <<
"PullGP_Y_" << subdetId <<
"-" << layerId <<
"_ts";
413 title <<
"PullGP_Z_" << subdetId <<
"-" << layerId <<
"_ts";
416 double pullGMX_ts = (tsosGMom.
x() - shitGMom.
x()) /
sqrt(tsosGMEr.
cxx());
417 double pullGMY_ts = (tsosGMom.
y() - shitGMom.
y()) /
sqrt(tsosGMEr.
cyy());
418 double pullGMZ_ts = (tsosGMom.
z() - shitGMom.
z()) /
sqrt(tsosGMEr.
czz());
423 LogTrace(
"TestSmoothHits") <<
"ts2" << std::endl;
426 title <<
"PullGM_X_" << subdetId <<
"-" << layerId <<
"_ts";
429 title <<
"PullGM_Y_" << subdetId <<
"-" << layerId <<
"_ts";
432 title <<
"PullGM_Z_" << subdetId <<
"-" << layerId <<
"_ts";
435 if (dynamic_cast<const SiStripMatchedRecHit2D*>((rhit)->
hit())) {
437 LogTrace(
"TestSmoothHits") <<
"MONO HIT" << std::endl;
440 if (tMonoHit ==
nullptr)
442 vector<PSimHit> assMonoSimHits = hitAssociator.
associateHit(*tMonoHit->hit());
443 if (assMonoSimHits.empty())
445 const PSimHit sMonoHit = *(assSimHits.begin());
446 const Surface* monoSurf = &(tMonoHit->det()->surface());
447 if (monoSurf ==
nullptr)
463 GlobalPoint monoRhitGPos = tMonoHit->globalPosition();
464 GlobalError monoRhitGPEr = tMonoHit->globalPositionError();
466 double pullGPX_rs_mono = (monoRhitGPos.
x() - monoShitGPos.
x()) /
sqrt(monoRhitGPEr.
cxx());
467 double pullGPY_rs_mono = (monoRhitGPos.
y() - monoShitGPos.
y()) /
sqrt(monoRhitGPEr.
cyy());
468 double pullGPZ_rs_mono = (monoRhitGPos.
z() - monoShitGPos.
z()) /
sqrt(monoRhitGPEr.
czz());
474 title <<
"PullGP_X_" << subdetId <<
"-" << layerId <<
"_rs_mono";
477 title <<
"PullGP_Y_" << subdetId <<
"-" << layerId <<
"_rs_mono";
480 title <<
"PullGP_Z_" << subdetId <<
"-" << layerId <<
"_rs_mono";
483 double pullGPX_tr_mono = (monoTsosGPos.
x() - monoRhitGPos.
x()) /
sqrt(monoTsosGPEr.
cxx() + monoRhitGPEr.
cxx());
484 double pullGPY_tr_mono = (monoTsosGPos.
y() - monoRhitGPos.
y()) /
sqrt(monoTsosGPEr.
cyy() + monoRhitGPEr.
cyy());
485 double pullGPZ_tr_mono = (monoTsosGPos.
z() - monoRhitGPos.
z()) /
sqrt(monoTsosGPEr.
czz() + monoRhitGPEr.
czz());
491 title <<
"PullGP_X_" << subdetId <<
"-" << layerId <<
"_tr_mono";
494 title <<
"PullGP_Y_" << subdetId <<
"-" << layerId <<
"_tr_mono";
497 title <<
"PullGP_Z_" << subdetId <<
"-" << layerId <<
"_tr_mono";
500 double pullGPX_ts_mono = (monoTsosGPos.
x() - monoShitGPos.
x()) /
sqrt(monoTsosGPEr.
cxx());
501 double pullGPY_ts_mono = (monoTsosGPos.
y() - monoShitGPos.
y()) /
sqrt(monoTsosGPEr.
cyy());
502 double pullGPZ_ts_mono = (monoTsosGPos.
z() - monoShitGPos.
z()) /
sqrt(monoTsosGPEr.
czz());
508 title <<
"PullGP_X_" << subdetId <<
"-" << layerId <<
"_ts_mono";
511 title <<
"PullGP_Y_" << subdetId <<
"-" << layerId <<
"_ts_mono";
514 title <<
"PullGP_Z_" << subdetId <<
"-" << layerId <<
"_ts_mono";
517 double pullGMX_ts_mono = (monoTsosGMom.
x() - monoShitGMom.
x()) /
sqrt(monoTsosGMEr.
cxx());
518 double pullGMY_ts_mono = (monoTsosGMom.
y() - monoShitGMom.
y()) /
sqrt(monoTsosGMEr.
cyy());
519 double pullGMZ_ts_mono = (monoTsosGMom.
z() - monoShitGMom.
z()) /
sqrt(monoTsosGMEr.
czz());
525 title <<
"PullGM_X_" << subdetId <<
"-" << layerId <<
"_ts_mono";
528 title <<
"PullGM_Y_" << subdetId <<
"-" << layerId <<
"_ts_mono";
531 title <<
"PullGM_Z_" << subdetId <<
"-" << layerId <<
"_ts_mono";
535 LogTrace(
"TestSmoothHits") <<
"STEREO HIT" << std::endl;
538 if (tStereoHit ==
nullptr)
540 vector<PSimHit> assStereoSimHits = hitAssociator.
associateHit(*tStereoHit->hit());
541 if (assStereoSimHits.empty())
543 const PSimHit sStereoHit = *(assSimHits.begin());
544 const Surface* stereoSurf = &(tStereoHit->det()->surface());
545 if (stereoSurf ==
nullptr)
548 if (stereoState.
isValid() == 0)
561 GlobalPoint stereoRhitGPos = tStereoHit->globalPosition();
562 GlobalError stereoRhitGPEr = tStereoHit->globalPositionError();
564 double pullGPX_rs_stereo = (stereoRhitGPos.
x() - stereoShitGPos.
x()) /
sqrt(stereoRhitGPEr.
cxx());
565 double pullGPY_rs_stereo = (stereoRhitGPos.
y() - stereoShitGPos.
y()) /
sqrt(stereoRhitGPEr.
cyy());
566 double pullGPZ_rs_stereo = (stereoRhitGPos.
z() - stereoShitGPos.
z()) /
sqrt(stereoRhitGPEr.
czz());
572 title <<
"PullGP_X_" << subdetId <<
"-" << layerId <<
"_rs_stereo";
575 title <<
"PullGP_Y_" << subdetId <<
"-" << layerId <<
"_rs_stereo";
578 title <<
"PullGP_Z_" << subdetId <<
"-" << layerId <<
"_rs_stereo";
581 double pullGPX_tr_stereo =
582 (stereoTsosGPos.
x() - stereoRhitGPos.
x()) /
sqrt(stereoTsosGPEr.
cxx() + stereoRhitGPEr.
cxx());
583 double pullGPY_tr_stereo =
584 (stereoTsosGPos.
y() - stereoRhitGPos.
y()) /
sqrt(stereoTsosGPEr.
cyy() + stereoRhitGPEr.
cyy());
585 double pullGPZ_tr_stereo =
586 (stereoTsosGPos.
z() - stereoRhitGPos.
z()) /
sqrt(stereoTsosGPEr.
czz() + stereoRhitGPEr.
czz());
592 title <<
"PullGP_X_" << subdetId <<
"-" << layerId <<
"_tr_stereo";
595 title <<
"PullGP_Y_" << subdetId <<
"-" << layerId <<
"_tr_stereo";
598 title <<
"PullGP_Z_" << subdetId <<
"-" << layerId <<
"_tr_stereo";
601 double pullGPX_ts_stereo = (stereoTsosGPos.
x() - stereoShitGPos.
x()) /
sqrt(stereoTsosGPEr.
cxx());
602 double pullGPY_ts_stereo = (stereoTsosGPos.
y() - stereoShitGPos.
y()) /
sqrt(stereoTsosGPEr.
cyy());
603 double pullGPZ_ts_stereo = (stereoTsosGPos.
z() - stereoShitGPos.
z()) /
sqrt(stereoTsosGPEr.
czz());
609 title <<
"PullGP_X_" << subdetId <<
"-" << layerId <<
"_ts_stereo";
612 title <<
"PullGP_Y_" << subdetId <<
"-" << layerId <<
"_ts_stereo";
615 title <<
"PullGP_Z_" << subdetId <<
"-" << layerId <<
"_ts_stereo";
618 double pullGMX_ts_stereo = (stereoTsosGMom.
x() - stereoShitGMom.
x()) /
sqrt(stereoTsosGMEr.
cxx());
619 double pullGMY_ts_stereo = (stereoTsosGMom.
y() - stereoShitGMom.
y()) /
sqrt(stereoTsosGMEr.
cyy());
620 double pullGMZ_ts_stereo = (stereoTsosGMom.
z() - stereoShitGMom.
z()) /
sqrt(stereoTsosGMEr.
czz());
626 title <<
"PullGM_X_" << subdetId <<
"-" << layerId <<
"_ts_stereo";
629 title <<
"PullGM_Y_" << subdetId <<
"-" << layerId <<
"_ts_stereo";
632 title <<
"PullGM_Z_" << subdetId <<
"-" << layerId <<
"_ts_stereo";
635 lastState = updatedState;
639 LogTrace(
"TestSmoothHits") <<
"end of event" << std::endl;
644 TDirectory* chi2i =
file->mkdir(
"Chi2_Increment");
646 TDirectory* gp_ts =
file->mkdir(
"GP_TSOS-SimHit");
647 TDirectory* gm_ts =
file->mkdir(
"GM_TSOS-SimHit");
648 TDirectory* gp_tr =
file->mkdir(
"GP_TSOS-RecHit");
649 TDirectory* gp_rs =
file->mkdir(
"GP_RecHit-SimHit");
651 TDirectory* gp_tsx = gp_ts->mkdir(
"X");
652 TDirectory* gp_tsy = gp_ts->mkdir(
"Y");
653 TDirectory* gp_tsz = gp_ts->mkdir(
"Z");
654 TDirectory* gm_tsx = gm_ts->mkdir(
"X");
655 TDirectory* gm_tsy = gm_ts->mkdir(
"Y");
656 TDirectory* gm_tsz = gm_ts->mkdir(
"Z");
657 TDirectory* gp_trx = gp_tr->mkdir(
"X");
658 TDirectory* gp_try = gp_tr->mkdir(
"Y");
659 TDirectory* gp_trz = gp_tr->mkdir(
"Z");
660 TDirectory* gp_rsx = gp_rs->mkdir(
"X");
661 TDirectory* gp_rsy = gp_rs->mkdir(
"Y");
662 TDirectory* gp_rsz = gp_rs->mkdir(
"Z");
664 TDirectory* gp_tsx_mono = gp_ts->mkdir(
"MONOX");
665 TDirectory* gp_tsy_mono = gp_ts->mkdir(
"MONOY");
666 TDirectory* gp_tsz_mono = gp_ts->mkdir(
"MONOZ");
667 TDirectory* gm_tsx_mono = gm_ts->mkdir(
"MONOX");
668 TDirectory* gm_tsy_mono = gm_ts->mkdir(
"MONOY");
669 TDirectory* gm_tsz_mono = gm_ts->mkdir(
"MONOZ");
670 TDirectory* gp_trx_mono = gp_tr->mkdir(
"MONOX");
671 TDirectory* gp_try_mono = gp_tr->mkdir(
"MONOY");
672 TDirectory* gp_trz_mono = gp_tr->mkdir(
"MONOZ");
673 TDirectory* gp_rsx_mono = gp_rs->mkdir(
"MONOX");
674 TDirectory* gp_rsy_mono = gp_rs->mkdir(
"MONOY");
675 TDirectory* gp_rsz_mono = gp_rs->mkdir(
"MONOZ");
677 TDirectory* gp_tsx_stereo = gp_ts->mkdir(
"STEREOX");
678 TDirectory* gp_tsy_stereo = gp_ts->mkdir(
"STEREOY");
679 TDirectory* gp_tsz_stereo = gp_ts->mkdir(
"STEREOZ");
680 TDirectory* gm_tsx_stereo = gm_ts->mkdir(
"STEREOX");
681 TDirectory* gm_tsy_stereo = gm_ts->mkdir(
"STEREOY");
682 TDirectory* gm_tsz_stereo = gm_ts->mkdir(
"STEREOZ");
683 TDirectory* gp_trx_stereo = gp_tr->mkdir(
"STEREOX");
684 TDirectory* gp_try_stereo = gp_tr->mkdir(
"STEREOY");
685 TDirectory* gp_trz_stereo = gp_tr->mkdir(
"STEREOZ");
686 TDirectory* gp_rsx_stereo = gp_rs->mkdir(
"STEREOX");
687 TDirectory* gp_rsy_stereo = gp_rs->mkdir(
"STEREOY");
688 TDirectory* gp_rsz_stereo = gp_rs->mkdir(
"STEREOZ");
694 for (
int i = 0;
i != 6;
i++)
695 for (
int j = 0;
j != 9;
j++) {
710 title <<
"Chi2Increment_" <<
i + 1 <<
"-" <<
j + 1;
716 title <<
"PullGP_X_" <<
i + 1 <<
"-" << j + 1 <<
"_ts";
720 title <<
"PullGP_Y_" <<
i + 1 <<
"-" << j + 1 <<
"_ts";
724 title <<
"PullGP_Z_" <<
i + 1 <<
"-" << j + 1 <<
"_ts";
730 title <<
"PullGM_X_" <<
i + 1 <<
"-" << j + 1 <<
"_ts";
734 title <<
"PullGM_Y_" <<
i + 1 <<
"-" << j + 1 <<
"_ts";
738 title <<
"PullGM_Z_" <<
i + 1 <<
"-" << j + 1 <<
"_ts";
744 title <<
"PullGP_X_" <<
i + 1 <<
"-" << j + 1 <<
"_tr";
748 title <<
"PullGP_Y_" <<
i + 1 <<
"-" << j + 1 <<
"_tr";
752 title <<
"PullGP_Z_" <<
i + 1 <<
"-" << j + 1 <<
"_tr";
758 title <<
"PullGP_X_" <<
i + 1 <<
"-" << j + 1 <<
"_rs";
762 title <<
"PullGP_Y_" <<
i + 1 <<
"-" << j + 1 <<
"_rs";
766 title <<
"PullGP_Z_" <<
i + 1 <<
"-" << j + 1 <<
"_rs";
769 if (((
i == 2 ||
i == 4) && (j == 0 || j == 1)) || (
i == 3 ||
i == 5)) {
774 title <<
"PullGP_X_" <<
i + 1 <<
"-" << j + 1 <<
"_ts_mono";
778 title <<
"PullGP_Y_" <<
i + 1 <<
"-" << j + 1 <<
"_ts_mono";
782 title <<
"PullGP_Z_" <<
i + 1 <<
"-" << j + 1 <<
"_ts_mono";
788 title <<
"PullGM_X_" <<
i + 1 <<
"-" << j + 1 <<
"_ts_mono";
792 title <<
"PullGM_Y_" <<
i + 1 <<
"-" << j + 1 <<
"_ts_mono";
796 title <<
"PullGM_Z_" <<
i + 1 <<
"-" << j + 1 <<
"_ts_mono";
802 title <<
"PullGP_X_" <<
i + 1 <<
"-" << j + 1 <<
"_tr_mono";
806 title <<
"PullGP_Y_" <<
i + 1 <<
"-" << j + 1 <<
"_tr_mono";
810 title <<
"PullGP_Z_" <<
i + 1 <<
"-" << j + 1 <<
"_tr_mono";
816 title <<
"PullGP_X_" <<
i + 1 <<
"-" << j + 1 <<
"_rs_mono";
820 title <<
"PullGP_Y_" <<
i + 1 <<
"-" << j + 1 <<
"_rs_mono";
824 title <<
"PullGP_Z_" <<
i + 1 <<
"-" << j + 1 <<
"_rs_mono";
831 title <<
"PullGP_X_" <<
i + 1 <<
"-" << j + 1 <<
"_ts_stereo";
835 title <<
"PullGP_Y_" <<
i + 1 <<
"-" << j + 1 <<
"_ts_stereo";
839 title <<
"PullGP_Z_" <<
i + 1 <<
"-" << j + 1 <<
"_ts_stereo";
845 title <<
"PullGM_X_" <<
i + 1 <<
"-" << j + 1 <<
"_ts_stereo";
849 title <<
"PullGM_Y_" <<
i + 1 <<
"-" << j + 1 <<
"_ts_stereo";
853 title <<
"PullGM_Z_" <<
i + 1 <<
"-" << j + 1 <<
"_ts_stereo";
859 title <<
"PullGP_X_" <<
i + 1 <<
"-" << j + 1 <<
"_tr_stereo";
863 title <<
"PullGP_Y_" <<
i + 1 <<
"-" << j + 1 <<
"_tr_stereo";
867 title <<
"PullGP_Z_" <<
i + 1 <<
"-" << j + 1 <<
"_tr_stereo";
873 title <<
"PullGP_X_" <<
i + 1 <<
"-" << j + 1 <<
"_rs_stereo";
877 title <<
"PullGP_Y_" <<
i + 1 <<
"-" << j + 1 <<
"_rs_stereo";
881 title <<
"PullGP_Z_" <<
i + 1 <<
"-" << j + 1 <<
"_rs_stereo";
896 LocalPoint localHit = plane.toLocal(globalpos);
903 float scale = -localHit.
z() / dir.
z();
913 return std::pair<LocalPoint, LocalVector>(projectedPos, localStripDir);
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
edm::Handle< TrackCandidateCollection > theTCCollection
const bool isValid(const Frame &aFrame, const FrameQuality &aQuality, const uint16_t aExpectedPos)
virtual float stripAngle(float strip) const =0
TestSmoothHits(const edm::ParameterSet &)
std::map< std::string, TH1F * > hPullGP_Z_rs_mono
LocalVector momentumAtEntry() const
The momentum of the track that produced the hit, at entry point.
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
#define DEFINE_FWK_MODULE(type)
std::map< std::string, TH1F * > hPullGP_X_ts
std::map< std::string, TH1F * > hPullGP_X_ts_mono
std::map< std::string, TH1F * > hPullGM_Z_ts_stereo
std::string propagatorName
Sin< T >::type sin(const T &t)
std::map< std::string, TH1F * > hPullGP_Y_tr
std::map< std::string, TH1F * > hPullGM_Z_ts
TrajectorySeed const & seed() const
const CartesianTrajectoryError cartesianError() const
std::map< std::string, TH1F * > hPullGM_X_ts_mono
std::vector< ConstRecHitPointer > RecHitContainer
GlobalPoint globalPosition() const
std::map< std::string, TH1F * > hPullGP_Z_tr
std::map< std::string, TH1F * > hPullGP_X_rs_mono
std::map< std::string, TH1F * > hPullGP_X_tr_mono
std::map< std::string, TH1F * > hPullGP_Z_tr_stereo
std::map< std::string, TH1F * > hPullGP_Y_ts_stereo
virtual const StripTopology & specificTopology() const
Returns a reference to the strip proxy topology.
std::map< std::string, TH1F * > hPullGP_Z_tr_mono
const Plane & surface() const
The nominal surface of the GeomDet.
std::map< std::string, TH1F * > hPullGM_Z_ts_mono
edm::ESHandle< TrajectorySmoother > smooth
virtual float strip(const LocalPoint &) const =0
std::map< std::string, TH1F * > hPullGM_X_ts_stereo
edm::ESHandle< TrajectoryFitter > fit
PTrajectoryStateOnDet const & trajectoryStateOnDet() const
void beginRun(edm::Run const &run, const edm::EventSetup &) override
edm::ESHandle< MagneticField > theMF
TrackerHitAssociator::Config trackerHitAssociatorConfig_
std::map< std::string, TH1F * > hPullGM_Y_ts_stereo
Local3DPoint localPosition() const
std::shared_ptr< TrackingRecHit const > ConstRecHitPointer
std::map< std::string, TH1F * > hPullGP_Z_rs
Cos< T >::type cos(const T &t)
edm::Range< RecHitContainer::const_iterator > recHits() const
std::map< std::string, TH1F * > hPullGP_Y_tr_stereo
std::map< std::string, TH1F * > hPullGP_X_rs_stereo
TransientTrackingRecHit::ConstRecHitPointer CTTRHp
unsigned int detId() const
std::map< std::string, TH1F * > hPullGM_Y_ts_mono
std::map< std::string, TH1F * > hPullGP_Y_ts
edm::ESHandle< TransientTrackingRecHitBuilder > theBuilder
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
std::map< std::string, TH1F * > hPullGP_Y_rs_stereo
std::map< std::string, TH1F * > hPullGM_Y_ts
const AlgebraicSymMatrix66 & matrix() const
LocalVector localDirection() const
Obsolete. Same as momentumAtEntry().unit(), for backward compatibility.
TrajectoryStateOnSurface TSOS
std::map< std::string, TH1F * > hPullGP_Y_tr_mono
~TestSmoothHits() override
const GlobalError position() const
Position error submatrix.
std::map< std::string, TH1F * > hPullGP_Y_rs
edm::ESHandle< Propagator > thePropagator
T const * product() const
T getParameter(std::string const &) const
std::map< std::string, TH1F * > hPullGP_Z_rs_stereo
void analyze(const edm::Event &, const edm::EventSetup &) override
unsigned short processType() const
std::map< std::string, TH1F * > hPullGP_Z_ts_stereo
edm::ESHandle< TrackerGeometry > theG
std::pair< LocalPoint, LocalVector > projectHit(const PSimHit &, const StripGeomDetUnit *, const BoundPlane &)
GlobalVector globalMomentum() const
std::map< std::string, TH1F * > hPullGP_Y_rs_mono
std::map< std::string, TH1F * > hPullGP_Y_ts_mono
std::map< std::string, TH1F * > hChi2Increment
std::map< std::string, TH1F * > hPullGP_X_rs
std::map< std::string, TH1F * > hPullGP_X_tr_stereo
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > AlgebraicSymMatrix33
std::vector< PSimHit > associateHit(const TrackingRecHit &thit) const
std::map< std::string, TH1F * > hPullGP_Z_ts
std::map< std::string, TH1F * > hPullGP_X_tr
std::map< std::string, TH1F * > hPullGM_X_ts
std::map< std::string, TH1F * > hPullGP_X_ts_stereo
constexpr Detector det() const
get the detector field from this detid
std::map< std::string, TH1F * > hPullGP_Z_ts_mono