11 #include <TDirectory.h> 24 LogTrace(
"TestSmoothHits") << iConfig << std::endl;
33 theGToken = esConsumes<edm::Transition::BeginRun>();
34 theMFToken = esConsumes<edm::Transition::BeginRun>();
54 file =
new TFile(
"testSmoothHits.root",
"recreate");
55 for (
int i = 0;
i != 6;
i++)
56 for (
int j = 0;
j != 9;
j++) {
70 title <<
"PullGP_X_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts";
73 title <<
"PullGP_Y_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts";
76 title <<
"PullGP_Z_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts";
79 title <<
"Chi2Increment_" <<
i + 1 <<
"-" <<
j + 1;
83 title <<
"PullGM_X_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts";
86 title <<
"PullGM_Y_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts";
89 title <<
"PullGM_Z_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts";
93 title <<
"PullGP_X_" <<
i + 1 <<
"-" <<
j + 1 <<
"_tr";
96 title <<
"PullGP_Y_" <<
i + 1 <<
"-" <<
j + 1 <<
"_tr";
99 title <<
"PullGP_Z_" <<
i + 1 <<
"-" <<
j + 1 <<
"_tr";
103 title <<
"PullGP_X_" <<
i + 1 <<
"-" <<
j + 1 <<
"_rs";
106 title <<
"PullGP_Y_" <<
i + 1 <<
"-" <<
j + 1 <<
"_rs";
109 title <<
"PullGP_Z_" <<
i + 1 <<
"-" <<
j + 1 <<
"_rs";
112 if (((
i == 2 ||
i == 4) && (
j == 0 ||
j == 1)) || (
i == 3 ||
i == 5)) {
115 title <<
"PullGP_X_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts_mono";
118 title <<
"PullGP_Y_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts_mono";
121 title <<
"PullGP_Z_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts_mono";
125 title <<
"PullGM_X_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts_mono";
128 title <<
"PullGM_Y_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts_mono";
131 title <<
"PullGM_Z_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts_mono";
135 title <<
"PullGP_X_" <<
i + 1 <<
"-" <<
j + 1 <<
"_tr_mono";
138 title <<
"PullGP_Y_" <<
i + 1 <<
"-" <<
j + 1 <<
"_tr_mono";
141 title <<
"PullGP_Z_" <<
i + 1 <<
"-" <<
j + 1 <<
"_tr_mono";
145 title <<
"PullGP_X_" <<
i + 1 <<
"-" <<
j + 1 <<
"_rs_mono";
148 title <<
"PullGP_Y_" <<
i + 1 <<
"-" <<
j + 1 <<
"_rs_mono";
151 title <<
"PullGP_Z_" <<
i + 1 <<
"-" <<
j + 1 <<
"_rs_mono";
156 title <<
"PullGP_X_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts_stereo";
159 title <<
"PullGP_Y_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts_stereo";
162 title <<
"PullGP_Z_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts_stereo";
166 title <<
"PullGM_X_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts_stereo";
169 title <<
"PullGM_Y_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts_stereo";
172 title <<
"PullGM_Z_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts_stereo";
176 title <<
"PullGP_X_" <<
i + 1 <<
"-" <<
j + 1 <<
"_tr_stereo";
179 title <<
"PullGP_Y_" <<
i + 1 <<
"-" <<
j + 1 <<
"_tr_stereo";
182 title <<
"PullGP_Z_" <<
i + 1 <<
"-" <<
j + 1 <<
"_tr_stereo";
186 title <<
"PullGP_X_" <<
i + 1 <<
"-" <<
j + 1 <<
"_rs_stereo";
189 title <<
"PullGP_Y_" <<
i + 1 <<
"-" <<
j + 1 <<
"_rs_stereo";
192 title <<
"PullGP_Z_" <<
i + 1 <<
"-" <<
j + 1 <<
"_rs_stereo";
196 hTotChi2Increment =
new TH1F(
"TotChi2Increment",
"TotChi2Increment", 1000, 0, 100);
197 hChi2_vs_Process =
new TH2F(
"Chi2_vs_Process",
"Chi2_vs_Process", 1000, 0, 100, 17, -0.5, 16.5);
198 hChi2_vs_clsize =
new TH2F(
"Chi2_vs_clsize",
"Chi2_vs_clsize", 1000, 0, 100, 17, -0.5, 16.5);
205 LogTrace(
"TestSmoothHits") <<
"new event" << std::endl;
213 LogTrace(
"TestSmoothHits") <<
"new candidate" << std::endl;
224 if (theTSOS.globalMomentum().eta() >
maxeta || theTSOS.globalMomentum().eta() <
mineta)
235 std::vector<Trajectory> fitted =
fit->fit(theTC->
seed(),
hits, theTSOS);
237 std::vector<Trajectory>
result;
238 for (std::vector<Trajectory>::iterator
it = fitted.begin();
it != fitted.end();
it++) {
240 result.insert(
result.end(), smoothed.begin(), smoothed.end());
244 std::vector<TrajectoryMeasurement> vtm =
result[0].measurements();
246 TSOS lastState = theTSOS;
247 for (std::vector<TrajectoryMeasurement>::iterator tm = vtm.begin(); tm != vtm.end(); tm++) {
249 if ((rhit)->
isValid() == 0 && rhit->det() !=
nullptr)
251 LogTrace(
"TestSmoothHits") <<
"new hit";
253 int subdetId = rhit->det()->geographicalId().subdetId();
254 DetId id = rhit->
det()->geographicalId();
255 int layerId = tTopo->
layer(
id);
256 LogTrace(
"TestSmoothHits") <<
"subdetId=" << subdetId <<
" layerId=" << layerId;
258 double delta = 99999;
261 std::vector<PSimHit> assSimHits =
hitAssociator.associateHit(*(rhit->hit()));
262 if (assSimHits.empty())
265 for (std::vector<PSimHit>::const_iterator
m = assSimHits.begin();
m < assSimHits.end();
m++) {
266 if ((
m->localPosition() - rhitLPv).
mag() <
delta) {
268 delta = (
m->localPosition() - rhitLPv).
mag();
272 TSOS currentState =
combiner(tm->backwardPredictedState(), tm->forwardPredictedState());
273 TSOS updatedState = tm->updatedState();
276 double chi2increment = tm->estimate();
277 LogTrace(
"TestSmoothHits") <<
"tm->estimate()=" << tm->estimate();
279 title <<
"Chi2Increment_" << subdetId <<
"-" << layerId;
283 if (dynamic_cast<const SiPixelRecHit*>(rhit->hit()))
285 if (dynamic_cast<const SiStripRecHit2D*>(rhit->hit()))
289 const Surface* surf = &((rhit)->det()->surface());
292 if (dynamic_cast<const SiStripMatchedRecHit2D*>(rhit->hit())) {
293 double rechitmatchedx = rhit->localPosition().
x();
294 double rechitmatchedy = rhit->localPosition().y();
295 double mindist = 999999;
297 std::pair<LocalPoint, LocalVector> closestPair;
299 const BoundPlane& plane = (rhit)->det()->surface();
300 for (std::vector<PSimHit>::const_iterator
m = assSimHits.begin();
m < assSimHits.end();
m++) {
302 std::pair<LocalPoint, LocalVector> hitPair =
projectHit((*
m), stripDet, plane);
303 distx = fabs(rechitmatchedx - hitPair.first.x());
304 disty = fabs(rechitmatchedy - hitPair.first.y());
305 double dist = distx * distx + disty * disty;
306 if (
sqrt(dist) < mindist) {
308 closestPair = hitPair;
311 shitLPos = closestPair.first;
312 shitLMom = closestPair.second;
366 GlobalError rhitGPEr = (rhit)->globalPositionError();
368 double pullGPX_rs = (rhitGPos.
x() - shitGPos.
x()) /
sqrt(rhitGPEr.
cxx());
369 double pullGPY_rs = (rhitGPos.
y() - shitGPos.
y()) /
sqrt(rhitGPEr.
cyy());
370 double pullGPZ_rs = (rhitGPos.
z() - shitGPos.
z()) /
sqrt(rhitGPEr.
czz());
375 LogTrace(
"TestSmoothHits") <<
"rs" << std::endl;
378 title <<
"PullGP_X_" << subdetId <<
"-" << layerId <<
"_rs";
381 title <<
"PullGP_Y_" << subdetId <<
"-" << layerId <<
"_rs";
384 title <<
"PullGP_Z_" << subdetId <<
"-" << layerId <<
"_rs";
387 double pullGPX_tr = (tsosGPos.
x() - rhitGPos.
x()) /
sqrt(tsosGPEr.
cxx() + rhitGPEr.
cxx());
388 double pullGPY_tr = (tsosGPos.
y() - rhitGPos.
y()) /
sqrt(tsosGPEr.
cyy() + rhitGPEr.
cyy());
389 double pullGPZ_tr = (tsosGPos.
z() - rhitGPos.
z()) /
sqrt(tsosGPEr.
czz() + rhitGPEr.
czz());
394 LogTrace(
"TestSmoothHits") <<
"tr" << std::endl;
397 title <<
"PullGP_X_" << subdetId <<
"-" << layerId <<
"_tr";
400 title <<
"PullGP_Y_" << subdetId <<
"-" << layerId <<
"_tr";
403 title <<
"PullGP_Z_" << subdetId <<
"-" << layerId <<
"_tr";
406 double pullGPX_ts = (tsosGPos.
x() - shitGPos.
x()) /
sqrt(tsosGPEr.
cxx());
407 double pullGPY_ts = (tsosGPos.
y() - shitGPos.
y()) /
sqrt(tsosGPEr.
cyy());
408 double pullGPZ_ts = (tsosGPos.
z() - shitGPos.
z()) /
sqrt(tsosGPEr.
czz());
413 LogTrace(
"TestSmoothHits") <<
"ts1" << std::endl;
416 title <<
"PullGP_X_" << subdetId <<
"-" << layerId <<
"_ts";
419 title <<
"PullGP_Y_" << subdetId <<
"-" << layerId <<
"_ts";
422 title <<
"PullGP_Z_" << subdetId <<
"-" << layerId <<
"_ts";
425 double pullGMX_ts = (tsosGMom.
x() - shitGMom.
x()) /
sqrt(tsosGMEr.
cxx());
426 double pullGMY_ts = (tsosGMom.
y() - shitGMom.
y()) /
sqrt(tsosGMEr.
cyy());
427 double pullGMZ_ts = (tsosGMom.
z() - shitGMom.
z()) /
sqrt(tsosGMEr.
czz());
432 LogTrace(
"TestSmoothHits") <<
"ts2" << std::endl;
435 title <<
"PullGM_X_" << subdetId <<
"-" << layerId <<
"_ts";
438 title <<
"PullGM_Y_" << subdetId <<
"-" << layerId <<
"_ts";
441 title <<
"PullGM_Z_" << subdetId <<
"-" << layerId <<
"_ts";
444 if (dynamic_cast<const SiStripMatchedRecHit2D*>((rhit)->
hit())) {
446 LogTrace(
"TestSmoothHits") <<
"MONO HIT" << std::endl;
449 if (tMonoHit ==
nullptr)
451 vector<PSimHit> assMonoSimHits =
hitAssociator.associateHit(*tMonoHit->hit());
452 if (assMonoSimHits.empty())
454 const PSimHit sMonoHit = *(assSimHits.begin());
455 const Surface* monoSurf = &(tMonoHit->det()->surface());
456 if (monoSurf ==
nullptr)
472 GlobalPoint monoRhitGPos = tMonoHit->globalPosition();
473 GlobalError monoRhitGPEr = tMonoHit->globalPositionError();
475 double pullGPX_rs_mono = (monoRhitGPos.
x() - monoShitGPos.
x()) /
sqrt(monoRhitGPEr.
cxx());
476 double pullGPY_rs_mono = (monoRhitGPos.
y() - monoShitGPos.
y()) /
sqrt(monoRhitGPEr.
cyy());
477 double pullGPZ_rs_mono = (monoRhitGPos.
z() - monoShitGPos.
z()) /
sqrt(monoRhitGPEr.
czz());
483 title <<
"PullGP_X_" << subdetId <<
"-" << layerId <<
"_rs_mono";
486 title <<
"PullGP_Y_" << subdetId <<
"-" << layerId <<
"_rs_mono";
489 title <<
"PullGP_Z_" << subdetId <<
"-" << layerId <<
"_rs_mono";
492 double pullGPX_tr_mono = (monoTsosGPos.
x() - monoRhitGPos.
x()) /
sqrt(monoTsosGPEr.
cxx() + monoRhitGPEr.
cxx());
493 double pullGPY_tr_mono = (monoTsosGPos.
y() - monoRhitGPos.
y()) /
sqrt(monoTsosGPEr.
cyy() + monoRhitGPEr.
cyy());
494 double pullGPZ_tr_mono = (monoTsosGPos.
z() - monoRhitGPos.
z()) /
sqrt(monoTsosGPEr.
czz() + monoRhitGPEr.
czz());
500 title <<
"PullGP_X_" << subdetId <<
"-" << layerId <<
"_tr_mono";
503 title <<
"PullGP_Y_" << subdetId <<
"-" << layerId <<
"_tr_mono";
506 title <<
"PullGP_Z_" << subdetId <<
"-" << layerId <<
"_tr_mono";
509 double pullGPX_ts_mono = (monoTsosGPos.
x() - monoShitGPos.
x()) /
sqrt(monoTsosGPEr.
cxx());
510 double pullGPY_ts_mono = (monoTsosGPos.
y() - monoShitGPos.
y()) /
sqrt(monoTsosGPEr.
cyy());
511 double pullGPZ_ts_mono = (monoTsosGPos.
z() - monoShitGPos.
z()) /
sqrt(monoTsosGPEr.
czz());
517 title <<
"PullGP_X_" << subdetId <<
"-" << layerId <<
"_ts_mono";
520 title <<
"PullGP_Y_" << subdetId <<
"-" << layerId <<
"_ts_mono";
523 title <<
"PullGP_Z_" << subdetId <<
"-" << layerId <<
"_ts_mono";
526 double pullGMX_ts_mono = (monoTsosGMom.
x() - monoShitGMom.
x()) /
sqrt(monoTsosGMEr.
cxx());
527 double pullGMY_ts_mono = (monoTsosGMom.
y() - monoShitGMom.
y()) /
sqrt(monoTsosGMEr.
cyy());
528 double pullGMZ_ts_mono = (monoTsosGMom.
z() - monoShitGMom.
z()) /
sqrt(monoTsosGMEr.
czz());
534 title <<
"PullGM_X_" << subdetId <<
"-" << layerId <<
"_ts_mono";
537 title <<
"PullGM_Y_" << subdetId <<
"-" << layerId <<
"_ts_mono";
540 title <<
"PullGM_Z_" << subdetId <<
"-" << layerId <<
"_ts_mono";
544 LogTrace(
"TestSmoothHits") <<
"STEREO HIT" << std::endl;
547 if (tStereoHit ==
nullptr)
549 vector<PSimHit> assStereoSimHits =
hitAssociator.associateHit(*tStereoHit->hit());
550 if (assStereoSimHits.empty())
552 const PSimHit sStereoHit = *(assSimHits.begin());
553 const Surface* stereoSurf = &(tStereoHit->det()->surface());
554 if (stereoSurf ==
nullptr)
557 if (stereoState.
isValid() == 0)
570 GlobalPoint stereoRhitGPos = tStereoHit->globalPosition();
571 GlobalError stereoRhitGPEr = tStereoHit->globalPositionError();
573 double pullGPX_rs_stereo = (stereoRhitGPos.
x() - stereoShitGPos.
x()) /
sqrt(stereoRhitGPEr.
cxx());
574 double pullGPY_rs_stereo = (stereoRhitGPos.
y() - stereoShitGPos.
y()) /
sqrt(stereoRhitGPEr.
cyy());
575 double pullGPZ_rs_stereo = (stereoRhitGPos.
z() - stereoShitGPos.
z()) /
sqrt(stereoRhitGPEr.
czz());
581 title <<
"PullGP_X_" << subdetId <<
"-" << layerId <<
"_rs_stereo";
584 title <<
"PullGP_Y_" << subdetId <<
"-" << layerId <<
"_rs_stereo";
587 title <<
"PullGP_Z_" << subdetId <<
"-" << layerId <<
"_rs_stereo";
590 double pullGPX_tr_stereo =
591 (stereoTsosGPos.
x() - stereoRhitGPos.
x()) /
sqrt(stereoTsosGPEr.
cxx() + stereoRhitGPEr.
cxx());
592 double pullGPY_tr_stereo =
593 (stereoTsosGPos.
y() - stereoRhitGPos.
y()) /
sqrt(stereoTsosGPEr.
cyy() + stereoRhitGPEr.
cyy());
594 double pullGPZ_tr_stereo =
595 (stereoTsosGPos.
z() - stereoRhitGPos.
z()) /
sqrt(stereoTsosGPEr.
czz() + stereoRhitGPEr.
czz());
601 title <<
"PullGP_X_" << subdetId <<
"-" << layerId <<
"_tr_stereo";
604 title <<
"PullGP_Y_" << subdetId <<
"-" << layerId <<
"_tr_stereo";
607 title <<
"PullGP_Z_" << subdetId <<
"-" << layerId <<
"_tr_stereo";
610 double pullGPX_ts_stereo = (stereoTsosGPos.
x() - stereoShitGPos.
x()) /
sqrt(stereoTsosGPEr.
cxx());
611 double pullGPY_ts_stereo = (stereoTsosGPos.
y() - stereoShitGPos.
y()) /
sqrt(stereoTsosGPEr.
cyy());
612 double pullGPZ_ts_stereo = (stereoTsosGPos.
z() - stereoShitGPos.
z()) /
sqrt(stereoTsosGPEr.
czz());
618 title <<
"PullGP_X_" << subdetId <<
"-" << layerId <<
"_ts_stereo";
621 title <<
"PullGP_Y_" << subdetId <<
"-" << layerId <<
"_ts_stereo";
624 title <<
"PullGP_Z_" << subdetId <<
"-" << layerId <<
"_ts_stereo";
627 double pullGMX_ts_stereo = (stereoTsosGMom.
x() - stereoShitGMom.
x()) /
sqrt(stereoTsosGMEr.
cxx());
628 double pullGMY_ts_stereo = (stereoTsosGMom.
y() - stereoShitGMom.
y()) /
sqrt(stereoTsosGMEr.
cyy());
629 double pullGMZ_ts_stereo = (stereoTsosGMom.
z() - stereoShitGMom.
z()) /
sqrt(stereoTsosGMEr.
czz());
635 title <<
"PullGM_X_" << subdetId <<
"-" << layerId <<
"_ts_stereo";
638 title <<
"PullGM_Y_" << subdetId <<
"-" << layerId <<
"_ts_stereo";
641 title <<
"PullGM_Z_" << subdetId <<
"-" << layerId <<
"_ts_stereo";
644 lastState = updatedState;
648 LogTrace(
"TestSmoothHits") <<
"end of event" << std::endl;
653 TDirectory* chi2i =
file->mkdir(
"Chi2_Increment");
655 TDirectory* gp_ts =
file->mkdir(
"GP_TSOS-SimHit");
656 TDirectory* gm_ts =
file->mkdir(
"GM_TSOS-SimHit");
657 TDirectory* gp_tr =
file->mkdir(
"GP_TSOS-RecHit");
658 TDirectory* gp_rs =
file->mkdir(
"GP_RecHit-SimHit");
660 TDirectory* gp_tsx = gp_ts->mkdir(
"X");
661 TDirectory* gp_tsy = gp_ts->mkdir(
"Y");
662 TDirectory* gp_tsz = gp_ts->mkdir(
"Z");
663 TDirectory* gm_tsx = gm_ts->mkdir(
"X");
664 TDirectory* gm_tsy = gm_ts->mkdir(
"Y");
665 TDirectory* gm_tsz = gm_ts->mkdir(
"Z");
666 TDirectory* gp_trx = gp_tr->mkdir(
"X");
667 TDirectory* gp_try = gp_tr->mkdir(
"Y");
668 TDirectory* gp_trz = gp_tr->mkdir(
"Z");
669 TDirectory* gp_rsx = gp_rs->mkdir(
"X");
670 TDirectory* gp_rsy = gp_rs->mkdir(
"Y");
671 TDirectory* gp_rsz = gp_rs->mkdir(
"Z");
673 TDirectory* gp_tsx_mono = gp_ts->mkdir(
"MONOX");
674 TDirectory* gp_tsy_mono = gp_ts->mkdir(
"MONOY");
675 TDirectory* gp_tsz_mono = gp_ts->mkdir(
"MONOZ");
676 TDirectory* gm_tsx_mono = gm_ts->mkdir(
"MONOX");
677 TDirectory* gm_tsy_mono = gm_ts->mkdir(
"MONOY");
678 TDirectory* gm_tsz_mono = gm_ts->mkdir(
"MONOZ");
679 TDirectory* gp_trx_mono = gp_tr->mkdir(
"MONOX");
680 TDirectory* gp_try_mono = gp_tr->mkdir(
"MONOY");
681 TDirectory* gp_trz_mono = gp_tr->mkdir(
"MONOZ");
682 TDirectory* gp_rsx_mono = gp_rs->mkdir(
"MONOX");
683 TDirectory* gp_rsy_mono = gp_rs->mkdir(
"MONOY");
684 TDirectory* gp_rsz_mono = gp_rs->mkdir(
"MONOZ");
686 TDirectory* gp_tsx_stereo = gp_ts->mkdir(
"STEREOX");
687 TDirectory* gp_tsy_stereo = gp_ts->mkdir(
"STEREOY");
688 TDirectory* gp_tsz_stereo = gp_ts->mkdir(
"STEREOZ");
689 TDirectory* gm_tsx_stereo = gm_ts->mkdir(
"STEREOX");
690 TDirectory* gm_tsy_stereo = gm_ts->mkdir(
"STEREOY");
691 TDirectory* gm_tsz_stereo = gm_ts->mkdir(
"STEREOZ");
692 TDirectory* gp_trx_stereo = gp_tr->mkdir(
"STEREOX");
693 TDirectory* gp_try_stereo = gp_tr->mkdir(
"STEREOY");
694 TDirectory* gp_trz_stereo = gp_tr->mkdir(
"STEREOZ");
695 TDirectory* gp_rsx_stereo = gp_rs->mkdir(
"STEREOX");
696 TDirectory* gp_rsy_stereo = gp_rs->mkdir(
"STEREOY");
697 TDirectory* gp_rsz_stereo = gp_rs->mkdir(
"STEREOZ");
703 for (
int i = 0;
i != 6;
i++)
704 for (
int j = 0;
j != 9;
j++) {
719 title <<
"Chi2Increment_" <<
i + 1 <<
"-" <<
j + 1;
725 title <<
"PullGP_X_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts";
729 title <<
"PullGP_Y_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts";
733 title <<
"PullGP_Z_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts";
739 title <<
"PullGM_X_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts";
743 title <<
"PullGM_Y_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts";
747 title <<
"PullGM_Z_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts";
753 title <<
"PullGP_X_" <<
i + 1 <<
"-" <<
j + 1 <<
"_tr";
757 title <<
"PullGP_Y_" <<
i + 1 <<
"-" <<
j + 1 <<
"_tr";
761 title <<
"PullGP_Z_" <<
i + 1 <<
"-" <<
j + 1 <<
"_tr";
767 title <<
"PullGP_X_" <<
i + 1 <<
"-" <<
j + 1 <<
"_rs";
771 title <<
"PullGP_Y_" <<
i + 1 <<
"-" <<
j + 1 <<
"_rs";
775 title <<
"PullGP_Z_" <<
i + 1 <<
"-" <<
j + 1 <<
"_rs";
778 if (((
i == 2 ||
i == 4) && (
j == 0 ||
j == 1)) || (
i == 3 ||
i == 5)) {
783 title <<
"PullGP_X_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts_mono";
787 title <<
"PullGP_Y_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts_mono";
791 title <<
"PullGP_Z_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts_mono";
797 title <<
"PullGM_X_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts_mono";
801 title <<
"PullGM_Y_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts_mono";
805 title <<
"PullGM_Z_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts_mono";
811 title <<
"PullGP_X_" <<
i + 1 <<
"-" <<
j + 1 <<
"_tr_mono";
815 title <<
"PullGP_Y_" <<
i + 1 <<
"-" <<
j + 1 <<
"_tr_mono";
819 title <<
"PullGP_Z_" <<
i + 1 <<
"-" <<
j + 1 <<
"_tr_mono";
825 title <<
"PullGP_X_" <<
i + 1 <<
"-" <<
j + 1 <<
"_rs_mono";
829 title <<
"PullGP_Y_" <<
i + 1 <<
"-" <<
j + 1 <<
"_rs_mono";
833 title <<
"PullGP_Z_" <<
i + 1 <<
"-" <<
j + 1 <<
"_rs_mono";
840 title <<
"PullGP_X_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts_stereo";
844 title <<
"PullGP_Y_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts_stereo";
848 title <<
"PullGP_Z_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts_stereo";
854 title <<
"PullGM_X_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts_stereo";
858 title <<
"PullGM_Y_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts_stereo";
862 title <<
"PullGM_Z_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts_stereo";
868 title <<
"PullGP_X_" <<
i + 1 <<
"-" <<
j + 1 <<
"_tr_stereo";
872 title <<
"PullGP_Y_" <<
i + 1 <<
"-" <<
j + 1 <<
"_tr_stereo";
876 title <<
"PullGP_Z_" <<
i + 1 <<
"-" <<
j + 1 <<
"_tr_stereo";
882 title <<
"PullGP_X_" <<
i + 1 <<
"-" <<
j + 1 <<
"_rs_stereo";
886 title <<
"PullGP_Y_" <<
i + 1 <<
"-" <<
j + 1 <<
"_rs_stereo";
890 title <<
"PullGP_Z_" <<
i + 1 <<
"-" <<
j + 1 <<
"_rs_stereo";
905 LocalPoint localHit = plane.toLocal(globalpos);
922 return std::pair<LocalPoint, LocalVector>(projectedPos, localStripDir);
T getParameter(std::string const &) const
virtual TrajectoryContainer trajectories(const Trajectory &traj) 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
edm::ESGetToken< TrajectorySmoother, TrajectoryFitter::Record > smoothToken
TestSmoothHits(const edm::ParameterSet &)
std::map< std::string, TH1F * > hPullGP_Z_rs_mono
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
std::map< std::string, TH1F * > hPullGM_X_ts_mono
std::vector< ConstRecHitPointer > RecHitContainer
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
edm::ESGetToken< TransientTrackingRecHitBuilder, TransientRecHitRecord > theBuilderToken
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
std::map< std::string, TH1F * > hPullGP_Z_tr_mono
constexpr Detector det() const
get the detector field from this detid
std::map< std::string, TH1F * > hPullGM_Z_ts_mono
edm::ESHandle< TrajectorySmoother > smooth
const CartesianTrajectoryError cartesianError() const
unsigned int layer(const DetId &id) const
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
virtual float strip(const LocalPoint &) const =0
std::map< std::string, TH1F * > hPullGM_X_ts_stereo
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > theGToken
void beginRun(edm::Run const &run, const edm::EventSetup &) override
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > theMFToken
edm::ESHandle< MagneticField > theMF
TrackerHitAssociator::Config trackerHitAssociatorConfig_
T const * product() const
GlobalPoint globalPosition() const
std::map< std::string, TH1F * > hPullGM_Y_ts_stereo
std::shared_ptr< TrackingRecHit const > ConstRecHitPointer
const GlobalError position() const
Position error submatrix.
std::map< std::string, TH1F * > hPullGP_Z_rs
edm::EDGetTokenT< TrackCandidateCollection > theTCCollectionToken
virtual RecHitPointer build(const TrackingRecHit *p) const =0
build a tracking rechit from an existing rechit
unsigned short processType() const
Cos< T >::type cos(const T &t)
PTrajectoryStateOnDet const & trajectoryStateOnDet() const
std::map< std::string, TH1F * > hPullGP_Y_tr_stereo
std::map< std::string, TH1F * > hPullGP_X_rs_stereo
virtual const StripTopology & specificTopology() const
Returns a reference to the strip proxy topology.
TransientTrackingRecHit::ConstRecHitPointer CTTRHp
#define DEFINE_FWK_MODULE(type)
std::map< std::string, TH1F * > hPullGM_Y_ts_mono
std::map< std::string, TH1F * > hPullGP_Y_ts
edm::ESHandle< TransientTrackingRecHitBuilder > theBuilder
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
const TrackerGeomDet * idToDet(DetId) const override
std::map< std::string, TH1F * > hPullGP_Y_rs_stereo
std::map< std::string, TH1F * > hPullGM_Y_ts
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
std::map< std::string, TH1F * > hPullGP_Y_tr_mono
const Plane & surface() const
The nominal surface of the GeomDet.
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
~TestSmoothHits() override
TrajectoryStateOnSurface TSOS
std::map< std::string, TH1F * > hPullGP_Y_rs
edm::ESHandle< Propagator > thePropagator
Local3DPoint localPosition() const
std::map< std::string, TH1F * > hPullGP_Z_rs_stereo
void analyze(const edm::Event &, const edm::EventSetup &) override
GlobalVector globalMomentum() 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 &)
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
const AlgebraicSymMatrix66 & matrix() const
std::map< std::string, TH1F * > hPullGP_X_tr_stereo
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > AlgebraicSymMatrix33
TrajectorySeed const & seed() 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
edm::Range< RecHitContainer::const_iterator > recHits() const
LocalVector momentumAtEntry() const
The momentum of the track that produced the hit, at entry point.
TransientTrackingRecHit::ConstRecHitPointer CTTRHp
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken
edm::ESGetToken< TrajectoryFitter, TrajectoryFitter::Record > fitToken
edm::ESGetToken< Propagator, TrackingComponentsRecord > thePropagatorToken
std::map< std::string, TH1F * > hPullGP_Z_ts_mono