11 #include <TDirectory.h> 25 LogTrace(
"TestHits") << iConfig << std::endl;
33 theGToken = esConsumes<edm::Transition::BeginRun>();
34 theMFToken = esConsumes<edm::Transition::BeginRun>();
52 file =
new TFile(
"testhits.root",
"recreate");
53 for (
int i = 0;
i != 6;
i++)
54 for (
int j = 0;
j != 9;
j++) {
68 title <<
"PullGP_X_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts";
71 title <<
"PullGP_Y_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts";
74 title <<
"PullGP_Z_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts";
77 title <<
"Chi2Increment_" <<
i + 1 <<
"-" <<
j + 1;
81 title <<
"PullGM_X_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts";
84 title <<
"PullGM_Y_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts";
87 title <<
"PullGM_Z_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts";
91 title <<
"PullGP_X_" <<
i + 1 <<
"-" <<
j + 1 <<
"_tr";
94 title <<
"PullGP_Y_" <<
i + 1 <<
"-" <<
j + 1 <<
"_tr";
97 title <<
"PullGP_Z_" <<
i + 1 <<
"-" <<
j + 1 <<
"_tr";
101 title <<
"PullGP_X_" <<
i + 1 <<
"-" <<
j + 1 <<
"_rs";
104 title <<
"PullGP_Y_" <<
i + 1 <<
"-" <<
j + 1 <<
"_rs";
107 title <<
"PullGP_Z_" <<
i + 1 <<
"-" <<
j + 1 <<
"_rs";
110 if (((
i == 2 ||
i == 4) && (
j == 0 ||
j == 1)) || (
i == 3 ||
i == 5)) {
113 title <<
"PullGP_X_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts_mono";
116 title <<
"PullGP_Y_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts_mono";
119 title <<
"PullGP_Z_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts_mono";
123 title <<
"PullGM_X_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts_mono";
126 title <<
"PullGM_Y_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts_mono";
129 title <<
"PullGM_Z_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts_mono";
133 title <<
"PullGP_X_" <<
i + 1 <<
"-" <<
j + 1 <<
"_tr_mono";
136 title <<
"PullGP_Y_" <<
i + 1 <<
"-" <<
j + 1 <<
"_tr_mono";
139 title <<
"PullGP_Z_" <<
i + 1 <<
"-" <<
j + 1 <<
"_tr_mono";
143 title <<
"PullGP_X_" <<
i + 1 <<
"-" <<
j + 1 <<
"_rs_mono";
146 title <<
"PullGP_Y_" <<
i + 1 <<
"-" <<
j + 1 <<
"_rs_mono";
149 title <<
"PullGP_Z_" <<
i + 1 <<
"-" <<
j + 1 <<
"_rs_mono";
154 title <<
"PullGP_X_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts_stereo";
157 title <<
"PullGP_Y_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts_stereo";
160 title <<
"PullGP_Z_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts_stereo";
164 title <<
"PullGM_X_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts_stereo";
167 title <<
"PullGM_Y_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts_stereo";
170 title <<
"PullGM_Z_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts_stereo";
174 title <<
"PullGP_X_" <<
i + 1 <<
"-" <<
j + 1 <<
"_tr_stereo";
177 title <<
"PullGP_Y_" <<
i + 1 <<
"-" <<
j + 1 <<
"_tr_stereo";
180 title <<
"PullGP_Z_" <<
i + 1 <<
"-" <<
j + 1 <<
"_tr_stereo";
184 title <<
"PullGP_X_" <<
i + 1 <<
"-" <<
j + 1 <<
"_rs_stereo";
187 title <<
"PullGP_Y_" <<
i + 1 <<
"-" <<
j + 1 <<
"_rs_stereo";
190 title <<
"PullGP_Z_" <<
i + 1 <<
"-" <<
j + 1 <<
"_rs_stereo";
194 hTotChi2Increment =
new TH1F(
"TotChi2Increment",
"TotChi2Increment", 1000, 0, 100);
195 hProcess_vs_Chi2 =
new TH2F(
"Process_vs_Chi2",
"Process_vs_Chi2", 1000, 0, 100, 17, -0.5, 16.5);
196 hClsize_vs_Chi2 =
new TH2F(
"Clsize_vs_Chi2",
"Clsize_vs_Chi2", 1000, 0, 100, 17, -0.5, 16.5);
203 LogTrace(
"TestHits") <<
"\nnew event";
211 LogTrace(
"TestHits") <<
"\n*****************new candidate*****************" << std::endl;
222 if (theTSOS.globalMomentum().eta() >
maxeta || theTSOS.globalMomentum().eta() <
mineta)
236 std::vector<TrajectoryMeasurement> vtm =
result[0].measurements();
239 TSOS lastState = theTSOS;
240 for (std::vector<TrajectoryMeasurement>::iterator tm = vtm.begin(); tm != vtm.end(); tm++) {
242 if ((rhit)->
isValid() == 0 && rhit->det() !=
nullptr)
244 LogTrace(
"TestHits") <<
"*****************new hit*****************";
246 int subdetId = rhit->det()->geographicalId().subdetId();
247 DetId id = rhit->
det()->geographicalId();
248 int layerId = tTopo->
layer(
id);
249 LogTrace(
"TestHits") <<
"subdetId=" << subdetId <<
" layerId=" << layerId;
251 double delta = 99999;
254 std::vector<PSimHit> assSimHits =
hitAssociator.associateHit(*(rhit->hit()));
255 if (assSimHits.empty())
258 for (std::vector<PSimHit>::const_iterator
m = assSimHits.begin();
m < assSimHits.end();
m++) {
259 if ((
m->localPosition() - rhitLPv).
mag() <
delta) {
261 delta = (
m->localPosition() - rhitLPv).
mag();
265 TSOS currentState = tm->forwardPredictedState();
266 if (tm->backwardPredictedState().isValid())
267 currentState =
combiner(tm->backwardPredictedState(), tm->forwardPredictedState());
268 TSOS updatedState = tm->updatedState();
269 tchi2 += tm->estimate();
272 double chi2increment = tm->estimate();
273 LogTrace(
"TestHits") <<
"tm->estimate()=" << tm->estimate();
275 title <<
"Chi2Increment_" << subdetId <<
"-" << layerId;
279 if (dynamic_cast<const SiPixelRecHit*>(rhit->hit()))
281 if (dynamic_cast<const SiStripRecHit2D*>(rhit->hit()))
285 const Surface* surf = &((rhit)->det()->surface());
288 if (dynamic_cast<const SiStripMatchedRecHit2D*>((rhit)->
hit())) {
289 double rechitmatchedx = rhit->localPosition().
x();
290 double rechitmatchedy = rhit->localPosition().y();
291 double mindist = 999999;
293 std::pair<LocalPoint, LocalVector> closestPair;
295 const BoundPlane& plane = (rhit)->det()->surface();
296 for (std::vector<PSimHit>::const_iterator
m = assSimHits.begin();
m < assSimHits.end();
m++) {
298 std::pair<LocalPoint, LocalVector> hitPair =
projectHit((*
m), stripDet, plane);
299 distx = fabs(rechitmatchedx - hitPair.first.x());
300 disty = fabs(rechitmatchedy - hitPair.first.y());
301 double dist = distx * distx + disty * disty;
302 if (
sqrt(dist) < mindist) {
304 closestPair = hitPair;
307 shitLPos = closestPair.first;
308 shitLMom = closestPair.second;
322 GlobalError rhitGPEr = (rhit)->globalPositionError();
324 double pullGPX_rs = (rhitGPos.
x() - shitGPos.
x()) /
sqrt(rhitGPEr.
cxx());
325 double pullGPY_rs = (rhitGPos.
y() - shitGPos.
y()) /
sqrt(rhitGPEr.
cyy());
326 double pullGPZ_rs = (rhitGPos.
z() - shitGPos.
z()) /
sqrt(rhitGPEr.
czz());
331 LogTrace(
"TestHits") <<
"rs" << std::endl;
332 LogVerbatim(
"TestHits") <<
"assSimHits.size()=" << assSimHits.size();
333 LogVerbatim(
"TestHits") <<
"tsos globalPos =" << tsosGPos;
334 LogVerbatim(
"TestHits") <<
"sim hit globalPos=" << shitGPos;
335 LogVerbatim(
"TestHits") <<
"rec hit globalPos=" << rhitGPos;
336 LogVerbatim(
"TestHits") <<
"geographicalId =" << rhit->det()->geographicalId().rawId();
340 title <<
"PullGP_X_" << subdetId <<
"-" << layerId <<
"_rs";
343 title <<
"PullGP_Y_" << subdetId <<
"-" << layerId <<
"_rs";
346 title <<
"PullGP_Z_" << subdetId <<
"-" << layerId <<
"_rs";
349 double pullGPX_tr = (tsosGPos.
x() - rhitGPos.
x()) /
sqrt(tsosGPEr.
cxx() + rhitGPEr.
cxx());
350 double pullGPY_tr = (tsosGPos.
y() - rhitGPos.
y()) /
sqrt(tsosGPEr.
cyy() + rhitGPEr.
cyy());
351 double pullGPZ_tr = (tsosGPos.
z() - rhitGPos.
z()) /
sqrt(tsosGPEr.
czz() + rhitGPEr.
czz());
356 LogTrace(
"TestHits") <<
"tr" << std::endl;
359 title <<
"PullGP_X_" << subdetId <<
"-" << layerId <<
"_tr";
362 title <<
"PullGP_Y_" << subdetId <<
"-" << layerId <<
"_tr";
365 title <<
"PullGP_Z_" << subdetId <<
"-" << layerId <<
"_tr";
368 double pullGPX_ts = (tsosGPos.
x() - shitGPos.
x()) /
sqrt(tsosGPEr.
cxx());
369 double pullGPY_ts = (tsosGPos.
y() - shitGPos.
y()) /
sqrt(tsosGPEr.
cyy());
370 double pullGPZ_ts = (tsosGPos.
z() - shitGPos.
z()) /
sqrt(tsosGPEr.
czz());
375 LogTrace(
"TestHits") <<
"ts1" << std::endl;
378 title <<
"PullGP_X_" << subdetId <<
"-" << layerId <<
"_ts";
381 title <<
"PullGP_Y_" << subdetId <<
"-" << layerId <<
"_ts";
384 title <<
"PullGP_Z_" << subdetId <<
"-" << layerId <<
"_ts";
387 double pullGMX_ts = (tsosGMom.
x() - shitGMom.
x()) /
sqrt(tsosGMEr.
cxx());
388 double pullGMY_ts = (tsosGMom.
y() - shitGMom.
y()) /
sqrt(tsosGMEr.
cyy());
389 double pullGMZ_ts = (tsosGMom.
z() - shitGMom.
z()) /
sqrt(tsosGMEr.
czz());
394 LogTrace(
"TestHits") <<
"ts2" << std::endl;
397 title <<
"PullGM_X_" << subdetId <<
"-" << layerId <<
"_ts";
400 title <<
"PullGM_Y_" << subdetId <<
"-" << layerId <<
"_ts";
403 title <<
"PullGM_Z_" << subdetId <<
"-" << layerId <<
"_ts";
406 if (dynamic_cast<const SiStripMatchedRecHit2D*>((rhit)->
hit())) {
408 LogTrace(
"TestHits") <<
"MONO HIT" << std::endl;
411 if (tMonoHit ==
nullptr)
413 vector<PSimHit> assMonoSimHits =
hitAssociator.associateHit(*tMonoHit->hit());
414 if (assMonoSimHits.empty())
416 const PSimHit sMonoHit = *(assSimHits.begin());
417 const Surface* monoSurf = &(tMonoHit->det()->surface());
418 if (monoSurf ==
nullptr)
434 GlobalPoint monoRhitGPos = tMonoHit->globalPosition();
435 GlobalError monoRhitGPEr = tMonoHit->globalPositionError();
437 double pullGPX_rs_mono = (monoRhitGPos.
x() - monoShitGPos.
x()) /
sqrt(monoRhitGPEr.
cxx());
438 double pullGPY_rs_mono = (monoRhitGPos.
y() - monoShitGPos.
y()) /
sqrt(monoRhitGPEr.
cyy());
439 double pullGPZ_rs_mono = (monoRhitGPos.
z() - monoShitGPos.
z()) /
sqrt(monoRhitGPEr.
czz());
445 title <<
"PullGP_X_" << subdetId <<
"-" << layerId <<
"_rs_mono";
448 title <<
"PullGP_Y_" << subdetId <<
"-" << layerId <<
"_rs_mono";
451 title <<
"PullGP_Z_" << subdetId <<
"-" << layerId <<
"_rs_mono";
454 double pullGPX_tr_mono = (monoTsosGPos.
x() - monoRhitGPos.
x()) /
sqrt(monoTsosGPEr.
cxx() + monoRhitGPEr.
cxx());
455 double pullGPY_tr_mono = (monoTsosGPos.
y() - monoRhitGPos.
y()) /
sqrt(monoTsosGPEr.
cyy() + monoRhitGPEr.
cyy());
456 double pullGPZ_tr_mono = (monoTsosGPos.
z() - monoRhitGPos.
z()) /
sqrt(monoTsosGPEr.
czz() + monoRhitGPEr.
czz());
462 title <<
"PullGP_X_" << subdetId <<
"-" << layerId <<
"_tr_mono";
465 title <<
"PullGP_Y_" << subdetId <<
"-" << layerId <<
"_tr_mono";
468 title <<
"PullGP_Z_" << subdetId <<
"-" << layerId <<
"_tr_mono";
471 double pullGPX_ts_mono = (monoTsosGPos.
x() - monoShitGPos.
x()) /
sqrt(monoTsosGPEr.
cxx());
472 double pullGPY_ts_mono = (monoTsosGPos.
y() - monoShitGPos.
y()) /
sqrt(monoTsosGPEr.
cyy());
473 double pullGPZ_ts_mono = (monoTsosGPos.
z() - monoShitGPos.
z()) /
sqrt(monoTsosGPEr.
czz());
479 title <<
"PullGP_X_" << subdetId <<
"-" << layerId <<
"_ts_mono";
482 title <<
"PullGP_Y_" << subdetId <<
"-" << layerId <<
"_ts_mono";
485 title <<
"PullGP_Z_" << subdetId <<
"-" << layerId <<
"_ts_mono";
488 double pullGMX_ts_mono = (monoTsosGMom.
x() - monoShitGMom.
x()) /
sqrt(monoTsosGMEr.
cxx());
489 double pullGMY_ts_mono = (monoTsosGMom.
y() - monoShitGMom.
y()) /
sqrt(monoTsosGMEr.
cyy());
490 double pullGMZ_ts_mono = (monoTsosGMom.
z() - monoShitGMom.
z()) /
sqrt(monoTsosGMEr.
czz());
496 title <<
"PullGM_X_" << subdetId <<
"-" << layerId <<
"_ts_mono";
499 title <<
"PullGM_Y_" << subdetId <<
"-" << layerId <<
"_ts_mono";
502 title <<
"PullGM_Z_" << subdetId <<
"-" << layerId <<
"_ts_mono";
506 LogTrace(
"TestHits") <<
"STEREO HIT" << std::endl;
509 if (tStereoHit ==
nullptr)
511 vector<PSimHit> assStereoSimHits =
hitAssociator.associateHit(*tStereoHit->hit());
512 if (assStereoSimHits.empty())
514 const PSimHit sStereoHit = *(assSimHits.begin());
515 const Surface* stereoSurf = &(tStereoHit->det()->surface());
516 if (stereoSurf ==
nullptr)
519 if (stereoState.
isValid() == 0)
532 GlobalPoint stereoRhitGPos = tStereoHit->globalPosition();
533 GlobalError stereoRhitGPEr = tStereoHit->globalPositionError();
535 double pullGPX_rs_stereo = (stereoRhitGPos.
x() - stereoShitGPos.
x()) /
sqrt(stereoRhitGPEr.
cxx());
536 double pullGPY_rs_stereo = (stereoRhitGPos.
y() - stereoShitGPos.
y()) /
sqrt(stereoRhitGPEr.
cyy());
537 double pullGPZ_rs_stereo = (stereoRhitGPos.
z() - stereoShitGPos.
z()) /
sqrt(stereoRhitGPEr.
czz());
543 title <<
"PullGP_X_" << subdetId <<
"-" << layerId <<
"_rs_stereo";
546 title <<
"PullGP_Y_" << subdetId <<
"-" << layerId <<
"_rs_stereo";
549 title <<
"PullGP_Z_" << subdetId <<
"-" << layerId <<
"_rs_stereo";
552 double pullGPX_tr_stereo =
553 (stereoTsosGPos.
x() - stereoRhitGPos.
x()) /
sqrt(stereoTsosGPEr.
cxx() + stereoRhitGPEr.
cxx());
554 double pullGPY_tr_stereo =
555 (stereoTsosGPos.
y() - stereoRhitGPos.
y()) /
sqrt(stereoTsosGPEr.
cyy() + stereoRhitGPEr.
cyy());
556 double pullGPZ_tr_stereo =
557 (stereoTsosGPos.
z() - stereoRhitGPos.
z()) /
sqrt(stereoTsosGPEr.
czz() + stereoRhitGPEr.
czz());
563 title <<
"PullGP_X_" << subdetId <<
"-" << layerId <<
"_tr_stereo";
566 title <<
"PullGP_Y_" << subdetId <<
"-" << layerId <<
"_tr_stereo";
569 title <<
"PullGP_Z_" << subdetId <<
"-" << layerId <<
"_tr_stereo";
572 double pullGPX_ts_stereo = (stereoTsosGPos.
x() - stereoShitGPos.
x()) /
sqrt(stereoTsosGPEr.
cxx());
573 double pullGPY_ts_stereo = (stereoTsosGPos.
y() - stereoShitGPos.
y()) /
sqrt(stereoTsosGPEr.
cyy());
574 double pullGPZ_ts_stereo = (stereoTsosGPos.
z() - stereoShitGPos.
z()) /
sqrt(stereoTsosGPEr.
czz());
580 title <<
"PullGP_X_" << subdetId <<
"-" << layerId <<
"_ts_stereo";
583 title <<
"PullGP_Y_" << subdetId <<
"-" << layerId <<
"_ts_stereo";
586 title <<
"PullGP_Z_" << subdetId <<
"-" << layerId <<
"_ts_stereo";
589 double pullGMX_ts_stereo = (stereoTsosGMom.
x() - stereoShitGMom.
x()) /
sqrt(stereoTsosGMEr.
cxx());
590 double pullGMY_ts_stereo = (stereoTsosGMom.
y() - stereoShitGMom.
y()) /
sqrt(stereoTsosGMEr.
cyy());
591 double pullGMZ_ts_stereo = (stereoTsosGMom.
z() - stereoShitGMom.
z()) /
sqrt(stereoTsosGMEr.
czz());
597 title <<
"PullGM_X_" << subdetId <<
"-" << layerId <<
"_ts_stereo";
600 title <<
"PullGM_Y_" << subdetId <<
"-" << layerId <<
"_ts_stereo";
603 title <<
"PullGM_Z_" << subdetId <<
"-" << layerId <<
"_ts_stereo";
606 lastState = updatedState;
608 LogTrace(
"TestHits") <<
"traj chi2=" << tchi2;
611 LogTrace(
"TestHits") <<
"end of event" << std::endl;
956 TDirectory* chi2i =
file->mkdir(
"Chi2_Increment");
958 TDirectory* gp_ts =
file->mkdir(
"GP_TSOS-SimHit");
959 TDirectory* gm_ts =
file->mkdir(
"GM_TSOS-SimHit");
960 TDirectory* gp_tr =
file->mkdir(
"GP_TSOS-RecHit");
961 TDirectory* gp_rs =
file->mkdir(
"GP_RecHit-SimHit");
963 TDirectory* gp_tsx = gp_ts->mkdir(
"X");
964 TDirectory* gp_tsy = gp_ts->mkdir(
"Y");
965 TDirectory* gp_tsz = gp_ts->mkdir(
"Z");
966 TDirectory* gm_tsx = gm_ts->mkdir(
"X");
967 TDirectory* gm_tsy = gm_ts->mkdir(
"Y");
968 TDirectory* gm_tsz = gm_ts->mkdir(
"Z");
969 TDirectory* gp_trx = gp_tr->mkdir(
"X");
970 TDirectory* gp_try = gp_tr->mkdir(
"Y");
971 TDirectory* gp_trz = gp_tr->mkdir(
"Z");
972 TDirectory* gp_rsx = gp_rs->mkdir(
"X");
973 TDirectory* gp_rsy = gp_rs->mkdir(
"Y");
974 TDirectory* gp_rsz = gp_rs->mkdir(
"Z");
976 TDirectory* gp_tsx_mono = gp_ts->mkdir(
"MONOX");
977 TDirectory* gp_tsy_mono = gp_ts->mkdir(
"MONOY");
978 TDirectory* gp_tsz_mono = gp_ts->mkdir(
"MONOZ");
979 TDirectory* gm_tsx_mono = gm_ts->mkdir(
"MONOX");
980 TDirectory* gm_tsy_mono = gm_ts->mkdir(
"MONOY");
981 TDirectory* gm_tsz_mono = gm_ts->mkdir(
"MONOZ");
982 TDirectory* gp_trx_mono = gp_tr->mkdir(
"MONOX");
983 TDirectory* gp_try_mono = gp_tr->mkdir(
"MONOY");
984 TDirectory* gp_trz_mono = gp_tr->mkdir(
"MONOZ");
985 TDirectory* gp_rsx_mono = gp_rs->mkdir(
"MONOX");
986 TDirectory* gp_rsy_mono = gp_rs->mkdir(
"MONOY");
987 TDirectory* gp_rsz_mono = gp_rs->mkdir(
"MONOZ");
989 TDirectory* gp_tsx_stereo = gp_ts->mkdir(
"STEREOX");
990 TDirectory* gp_tsy_stereo = gp_ts->mkdir(
"STEREOY");
991 TDirectory* gp_tsz_stereo = gp_ts->mkdir(
"STEREOZ");
992 TDirectory* gm_tsx_stereo = gm_ts->mkdir(
"STEREOX");
993 TDirectory* gm_tsy_stereo = gm_ts->mkdir(
"STEREOY");
994 TDirectory* gm_tsz_stereo = gm_ts->mkdir(
"STEREOZ");
995 TDirectory* gp_trx_stereo = gp_tr->mkdir(
"STEREOX");
996 TDirectory* gp_try_stereo = gp_tr->mkdir(
"STEREOY");
997 TDirectory* gp_trz_stereo = gp_tr->mkdir(
"STEREOZ");
998 TDirectory* gp_rsx_stereo = gp_rs->mkdir(
"STEREOX");
999 TDirectory* gp_rsy_stereo = gp_rs->mkdir(
"STEREOY");
1000 TDirectory* gp_rsz_stereo = gp_rs->mkdir(
"STEREOZ");
1006 for (
int i = 0;
i != 6;
i++)
1007 for (
int j = 0;
j != 9;
j++) {
1008 if (
i == 0 &&
j > 2)
1010 if (
i == 1 &&
j > 1)
1012 if (
i == 2 &&
j > 3)
1014 if (
i == 3 &&
j > 2)
1016 if (
i == 4 &&
j > 5)
1018 if (
i == 5 &&
j > 8)
1022 title <<
"Chi2Increment_" <<
i + 1 <<
"-" <<
j + 1;
1028 title <<
"PullGP_X_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts";
1032 title <<
"PullGP_Y_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts";
1036 title <<
"PullGP_Z_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts";
1042 title <<
"PullGM_X_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts";
1046 title <<
"PullGM_Y_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts";
1050 title <<
"PullGM_Z_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts";
1056 title <<
"PullGP_X_" <<
i + 1 <<
"-" <<
j + 1 <<
"_tr";
1060 title <<
"PullGP_Y_" <<
i + 1 <<
"-" <<
j + 1 <<
"_tr";
1064 title <<
"PullGP_Z_" <<
i + 1 <<
"-" <<
j + 1 <<
"_tr";
1070 title <<
"PullGP_X_" <<
i + 1 <<
"-" <<
j + 1 <<
"_rs";
1074 title <<
"PullGP_Y_" <<
i + 1 <<
"-" <<
j + 1 <<
"_rs";
1078 title <<
"PullGP_Z_" <<
i + 1 <<
"-" <<
j + 1 <<
"_rs";
1081 if (((
i == 2 ||
i == 4) && (
j == 0 ||
j == 1)) || (
i == 3 ||
i == 5)) {
1086 title <<
"PullGP_X_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts_mono";
1090 title <<
"PullGP_Y_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts_mono";
1094 title <<
"PullGP_Z_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts_mono";
1100 title <<
"PullGM_X_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts_mono";
1104 title <<
"PullGM_Y_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts_mono";
1108 title <<
"PullGM_Z_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts_mono";
1114 title <<
"PullGP_X_" <<
i + 1 <<
"-" <<
j + 1 <<
"_tr_mono";
1118 title <<
"PullGP_Y_" <<
i + 1 <<
"-" <<
j + 1 <<
"_tr_mono";
1122 title <<
"PullGP_Z_" <<
i + 1 <<
"-" <<
j + 1 <<
"_tr_mono";
1128 title <<
"PullGP_X_" <<
i + 1 <<
"-" <<
j + 1 <<
"_rs_mono";
1132 title <<
"PullGP_Y_" <<
i + 1 <<
"-" <<
j + 1 <<
"_rs_mono";
1136 title <<
"PullGP_Z_" <<
i + 1 <<
"-" <<
j + 1 <<
"_rs_mono";
1141 gp_tsx_stereo->cd();
1143 title <<
"PullGP_X_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts_stereo";
1145 gp_tsy_stereo->cd();
1147 title <<
"PullGP_Y_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts_stereo";
1149 gp_tsz_stereo->cd();
1151 title <<
"PullGP_Z_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts_stereo";
1155 gm_tsx_stereo->cd();
1157 title <<
"PullGM_X_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts_stereo";
1159 gm_tsy_stereo->cd();
1161 title <<
"PullGM_Y_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts_stereo";
1163 gm_tsz_stereo->cd();
1165 title <<
"PullGM_Z_" <<
i + 1 <<
"-" <<
j + 1 <<
"_ts_stereo";
1169 gp_trx_stereo->cd();
1171 title <<
"PullGP_X_" <<
i + 1 <<
"-" <<
j + 1 <<
"_tr_stereo";
1173 gp_try_stereo->cd();
1175 title <<
"PullGP_Y_" <<
i + 1 <<
"-" <<
j + 1 <<
"_tr_stereo";
1177 gp_trz_stereo->cd();
1179 title <<
"PullGP_Z_" <<
i + 1 <<
"-" <<
j + 1 <<
"_tr_stereo";
1183 gp_rsx_stereo->cd();
1185 title <<
"PullGP_X_" <<
i + 1 <<
"-" <<
j + 1 <<
"_rs_stereo";
1187 gp_rsy_stereo->cd();
1189 title <<
"PullGP_Y_" <<
i + 1 <<
"-" <<
j + 1 <<
"_rs_stereo";
1191 gp_rsz_stereo->cd();
1193 title <<
"PullGP_Z_" <<
i + 1 <<
"-" <<
j + 1 <<
"_rs_stereo";
1208 LocalPoint localHit = plane.toLocal(globalpos);
1225 return std::pair<LocalPoint, LocalVector>(projectedPos, localStripDir);
edm::Handle< TrackCandidateCollection > theTCCollection
Log< level::Info, true > LogVerbatim
std::map< std::string, TH1F * > hPullGP_Y_tr_mono
std::map< std::string, TH1F * > hPullGM_Z_ts_stereo
std::map< std::string, TH1F * > hPullGM_X_ts_mono
std::map< std::string, TH1F * > hPullGP_X_tr
std::pair< LocalPoint, LocalVector > projectHit(const PSimHit &, const StripGeomDetUnit *, const BoundPlane &)
T getParameter(std::string const &) const
std::map< std::string, TH1F * > hPullGP_X_ts
std::map< std::string, TH1F * > hPullGM_Z_ts
std::map< std::string, TH1F * > hPullGP_X_rs_mono
std::map< std::string, TH1F * > hPullGP_Z_tr
std::map< std::string, TH1F * > hPullGM_X_ts_stereo
const bool isValid(const Frame &aFrame, const FrameQuality &aQuality, const uint16_t aExpectedPos)
virtual float stripAngle(float strip) const =0
std::map< std::string, TH1F * > hPullGP_Z_tr_mono
edm::ESHandle< TransientTrackingRecHitBuilder > theBuilder
std::map< std::string, TH1F * > hPullGM_Z_ts_mono
std::map< std::string, TH1F * > hPullGP_Y_rs_stereo
#define DEFINE_FWK_MODULE(type)
Sin< T >::type sin(const T &t)
edm::ESGetToken< TrajectoryFitter, TrajectoryFitter::Record > fitToken
std::map< std::string, TH1F * > hPullGP_Z_rs
std::map< std::string, TH1F * > hPullGP_Z_rs_stereo
std::vector< ConstRecHitPointer > RecHitContainer
void beginRun(edm::Run const &run, const edm::EventSetup &) override
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > theMFToken
std::map< std::string, TH1F * > hPullGP_X_tr_mono
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken
TrackerHitAssociator::Config trackerHitAssociatorConfig_
std::map< std::string, TH1F * > hPullGP_Y_rs_mono
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
constexpr Detector det() const
get the detector field from this detid
edm::ESHandle< Propagator > thePropagator
edm::ESGetToken< Propagator, TrackingComponentsRecord > thePropagatorToken
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 * > hPullGP_Y_tr
edm::ESGetToken< TransientTrackingRecHitBuilder, TransientRecHitRecord > theBuilderToken
std::map< std::string, TH1F * > hPullGP_X_rs
std::map< std::string, TH1F * > hPullGP_X_rs_stereo
T const * product() const
std::map< std::string, TH1F * > hPullGP_X_tr_stereo
GlobalPoint globalPosition() const
std::map< std::string, TH1F * > hPullGP_X_ts_stereo
std::string propagatorName
std::shared_ptr< TrackingRecHit const > ConstRecHitPointer
const GlobalError position() const
Position error submatrix.
std::map< std::string, TH1F * > hPullGP_Y_ts
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_ts_mono
virtual const StripTopology & specificTopology() const
Returns a reference to the strip proxy topology.
TransientTrackingRecHit::ConstRecHitPointer CTTRHp
std::map< std::string, TH1F * > hPullGP_Z_ts_mono
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
const TrackerGeomDet * idToDet(DetId) const override
edm::ESHandle< TrackerGeometry > theG
std::map< std::string, TH1F * > hPullGP_Z_ts
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
TrajectoryStateOnSurface TSOS
std::map< std::string, TH1F * > hPullGM_Y_ts_stereo
std::map< std::string, TH1F * > hPullGP_Y_tr_stereo
const Plane & surface() const
The nominal surface of the GeomDet.
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
const PositionType & position() const
edm::EDGetTokenT< TrackCandidateCollection > theTCCollectionToken
TransientTrackingRecHit::ConstRecHitPointer CTTRHp
Local3DPoint localPosition() const
std::map< std::string, TH1F * > hPullGP_Z_rs_mono
std::map< std::string, TH1F * > hPullGM_Y_ts
GlobalVector globalMomentum() const
edm::ESHandle< MagneticField > theMF
std::map< std::string, TH1F * > hChi2Increment
std::map< std::string, TH1F * > hPullGM_X_ts
std::map< std::string, TH1F * > hPullGP_Y_rs
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > theGToken
std::map< std::string, TH1F * > hPullGM_Y_ts_mono
void analyze(const edm::Event &, const edm::EventSetup &) override
const AlgebraicSymMatrix66 & matrix() const
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > AlgebraicSymMatrix33
TrajectorySeed const & seed() const
std::map< std::string, TH1F * > hPullGP_Y_ts_stereo
std::map< std::string, TH1F * > hPullGP_Z_ts_stereo
TestHits(const edm::ParameterSet &)
edm::Range< RecHitContainer::const_iterator > recHits() const
LocalVector momentumAtEntry() const
The momentum of the track that produced the hit, at entry point.
std::map< std::string, TH1F * > hPullGP_X_ts_mono
std::map< std::string, TH1F * > hPullGP_Z_tr_stereo