11 #include <TDirectory.h> 25 trackerHitAssociatorConfig_(consumesCollector()) {
26 LogTrace(
"TestHits") << iConfig<< std::endl;
46 file =
new TFile(
"testhits.root",
"recreate");
47 for (
int i=0;
i!=6;
i++)
48 for (
int j=0; j!=9; j++){
49 if (
i==0 && j>2)
break;
50 if (
i==1 && j>1)
break;
51 if (
i==2 && j>3)
break;
52 if (
i==3 && j>2)
break;
53 if (
i==4 && j>5)
break;
54 if (
i==5 && j>8)
break;
56 title <<
"PullGP_X_" <<
i+1 <<
"-" << j+1 <<
"_ts";
59 title <<
"PullGP_Y_" <<
i+1 <<
"-" << j+1 <<
"_ts";
62 title <<
"PullGP_Z_" <<
i+1 <<
"-" << j+1 <<
"_ts";
65 title <<
"Chi2Increment_" <<
i+1 <<
"-" << j+1;
69 title <<
"PullGM_X_" <<
i+1 <<
"-" << j+1 <<
"_ts";
72 title <<
"PullGM_Y_" <<
i+1 <<
"-" << j+1 <<
"_ts";
75 title <<
"PullGM_Z_" <<
i+1 <<
"-" << j+1 <<
"_ts";
79 title <<
"PullGP_X_" <<
i+1 <<
"-" << j+1 <<
"_tr";
82 title <<
"PullGP_Y_" <<
i+1 <<
"-" << j+1 <<
"_tr";
85 title <<
"PullGP_Z_" <<
i+1 <<
"-" << j+1 <<
"_tr";
89 title <<
"PullGP_X_" <<
i+1 <<
"-" << j+1 <<
"_rs";
92 title <<
"PullGP_Y_" <<
i+1 <<
"-" << j+1 <<
"_rs";
95 title <<
"PullGP_Z_" <<
i+1 <<
"-" << j+1 <<
"_rs";
98 if ( ((
i==2||
i==4)&&(j==0||j==1)) || (
i==3||
i==5) ){
101 title <<
"PullGP_X_" <<
i+1 <<
"-" << j+1 <<
"_ts_mono";
104 title <<
"PullGP_Y_" <<
i+1 <<
"-" << j+1 <<
"_ts_mono";
107 title <<
"PullGP_Z_" <<
i+1 <<
"-" << j+1 <<
"_ts_mono";
111 title <<
"PullGM_X_" <<
i+1 <<
"-" << j+1 <<
"_ts_mono";
114 title <<
"PullGM_Y_" <<
i+1 <<
"-" << j+1 <<
"_ts_mono";
117 title <<
"PullGM_Z_" <<
i+1 <<
"-" << j+1 <<
"_ts_mono";
121 title <<
"PullGP_X_" <<
i+1 <<
"-" << j+1 <<
"_tr_mono";
124 title <<
"PullGP_Y_" <<
i+1 <<
"-" << j+1 <<
"_tr_mono";
127 title <<
"PullGP_Z_" <<
i+1 <<
"-" << j+1 <<
"_tr_mono";
131 title <<
"PullGP_X_" <<
i+1 <<
"-" << j+1 <<
"_rs_mono";
134 title <<
"PullGP_Y_" <<
i+1 <<
"-" << j+1 <<
"_rs_mono";
137 title <<
"PullGP_Z_" <<
i+1 <<
"-" << j+1 <<
"_rs_mono";
142 title <<
"PullGP_X_" <<
i+1 <<
"-" << j+1 <<
"_ts_stereo";
145 title <<
"PullGP_Y_" <<
i+1 <<
"-" << j+1 <<
"_ts_stereo";
148 title <<
"PullGP_Z_" <<
i+1 <<
"-" << j+1 <<
"_ts_stereo";
152 title <<
"PullGM_X_" <<
i+1 <<
"-" << j+1 <<
"_ts_stereo";
155 title <<
"PullGM_Y_" <<
i+1 <<
"-" << j+1 <<
"_ts_stereo";
158 title <<
"PullGM_Z_" <<
i+1 <<
"-" << j+1 <<
"_ts_stereo";
162 title <<
"PullGP_X_" <<
i+1 <<
"-" << j+1 <<
"_tr_stereo";
165 title <<
"PullGP_Y_" <<
i+1 <<
"-" << j+1 <<
"_tr_stereo";
168 title <<
"PullGP_Z_" <<
i+1 <<
"-" << j+1 <<
"_tr_stereo";
172 title <<
"PullGP_X_" <<
i+1 <<
"-" << j+1 <<
"_rs_stereo";
175 title <<
"PullGP_Y_" <<
i+1 <<
"-" << j+1 <<
"_rs_stereo";
178 title <<
"PullGP_Z_" <<
i+1 <<
"-" << j+1 <<
"_rs_stereo";
183 hProcess_vs_Chi2 =
new TH2F(
"Process_vs_Chi2",
"Process_vs_Chi2",1000,0,100,17,-0.5,16.5);
184 hClsize_vs_Chi2 =
new TH2F(
"Clsize_vs_Chi2",
"Clsize_vs_Chi2",1000,0,100,17,-0.5,16.5);
195 LogTrace(
"TestHits") <<
"\nnew event";
204 LogTrace(
"TestHits") <<
"\n*****************new candidate*****************" << std::endl;
217 if (theTSOS.globalMomentum().eta()>
maxeta || theTSOS.globalMomentum().eta()<
mineta)
continue;
223 i!=recHitVec.second;
i++){
229 if (result.empty())
continue;
230 std::vector<TrajectoryMeasurement> vtm = result[0].measurements();
233 TSOS lastState = theTSOS;
234 for (std::vector<TrajectoryMeasurement>::iterator tm=vtm.begin(); tm!=vtm.end();tm++){
237 if ((rhit)->isValid()==0&&rhit->det()!=
nullptr)
continue;
238 LogTrace(
"TestHits") <<
"*****************new hit*****************" ;
240 int subdetId = rhit->det()->geographicalId().subdetId();
241 DetId id = rhit->
det()->geographicalId();
242 int layerId = tTopo->
layer(
id);
243 LogTrace(
"TestHits") <<
"subdetId=" << subdetId <<
" layerId=" << layerId ;
245 double delta = 99999;
248 std::vector<PSimHit> assSimHits = hitAssociator.
associateHit(*(rhit->hit()));
249 if (assSimHits.empty())
continue;
251 for(std::vector<PSimHit>::const_iterator
m=assSimHits.begin();
m<assSimHits.end();
m++){
252 if ((
m->localPosition()-rhitLPv).
mag()<
delta) {
254 delta = (
m->localPosition()-rhitLPv).
mag();
258 TSOS currentState = tm->forwardPredictedState();
259 if (tm->backwardPredictedState().isValid())
260 currentState = combiner(tm->backwardPredictedState(), tm->forwardPredictedState());
262 tchi2+=tm->estimate();
265 double chi2increment = tm->estimate();
266 LogTrace(
"TestHits") <<
"tm->estimate()=" << tm->estimate();
268 title <<
"Chi2Increment_" << subdetId <<
"-" << layerId;
272 if (dynamic_cast<const SiPixelRecHit*>(rhit->hit()))
274 if (dynamic_cast<const SiStripRecHit2D*>(rhit->hit()))
278 const Surface * surf = &( (rhit)->det()->surface() );
281 if (dynamic_cast<const SiStripMatchedRecHit2D*>((rhit)->
hit())) {
282 double rechitmatchedx = rhit->localPosition().
x();
283 double rechitmatchedy = rhit->localPosition().y();
284 double mindist = 999999;
286 std::pair<LocalPoint,LocalVector> closestPair;
288 const BoundPlane& plane = (rhit)->det()->surface();
289 for(std::vector<PSimHit>::const_iterator
m=assSimHits.begin();
m<assSimHits.end();
m++) {
291 std::pair<LocalPoint,LocalVector> hitPair =
projectHit((*
m),stripDet,plane);
292 distx = fabs(rechitmatchedx - hitPair.first.x());
293 disty = fabs(rechitmatchedy - hitPair.first.y());
294 double dist = distx*distx+disty*disty;
295 if(
sqrt(dist)<mindist){
297 closestPair = hitPair;
300 shitLPos = closestPair.first;
301 shitLMom = closestPair.second;
315 GlobalError rhitGPEr = (rhit)->globalPositionError();
317 double pullGPX_rs = (rhitGPos.
x()-shitGPos.
x())/
sqrt(rhitGPEr.
cxx());
318 double pullGPY_rs = (rhitGPos.
y()-shitGPos.
y())/
sqrt(rhitGPEr.
cyy());
319 double pullGPZ_rs = (rhitGPos.
z()-shitGPos.
z())/
sqrt(rhitGPEr.
czz());
324 LogTrace(
"TestHits") <<
"rs" << std::endl;
325 LogVerbatim(
"TestHits") <<
"assSimHits.size()=" << assSimHits.size() ;
326 LogVerbatim(
"TestHits") <<
"tsos globalPos =" << tsosGPos ;
327 LogVerbatim(
"TestHits") <<
"sim hit globalPos=" << shitGPos ;
328 LogVerbatim(
"TestHits") <<
"rec hit globalPos=" << rhitGPos ;
329 LogVerbatim(
"TestHits") <<
"geographicalId =" << rhit->det()->geographicalId().rawId() ;
333 title <<
"PullGP_X_" << subdetId <<
"-" << layerId <<
"_rs";
336 title <<
"PullGP_Y_" << subdetId <<
"-" << layerId <<
"_rs";
339 title <<
"PullGP_Z_" << subdetId <<
"-" << layerId <<
"_rs";
342 double pullGPX_tr = (tsosGPos.
x()-rhitGPos.
x())/
sqrt(tsosGPEr.
cxx()+rhitGPEr.
cxx());
343 double pullGPY_tr = (tsosGPos.
y()-rhitGPos.
y())/
sqrt(tsosGPEr.
cyy()+rhitGPEr.
cyy());
344 double pullGPZ_tr = (tsosGPos.
z()-rhitGPos.
z())/
sqrt(tsosGPEr.
czz()+rhitGPEr.
czz());
349 LogTrace(
"TestHits") <<
"tr" << std::endl;
352 title <<
"PullGP_X_" << subdetId <<
"-" << layerId <<
"_tr";
355 title <<
"PullGP_Y_" << subdetId <<
"-" << layerId <<
"_tr";
358 title <<
"PullGP_Z_" << subdetId <<
"-" << layerId <<
"_tr";
361 double pullGPX_ts = (tsosGPos.
x()-shitGPos.
x())/
sqrt(tsosGPEr.
cxx());
362 double pullGPY_ts = (tsosGPos.
y()-shitGPos.
y())/
sqrt(tsosGPEr.
cyy());
363 double pullGPZ_ts = (tsosGPos.
z()-shitGPos.
z())/
sqrt(tsosGPEr.
czz());
368 LogTrace(
"TestHits") <<
"ts1" << std::endl;
371 title <<
"PullGP_X_" << subdetId <<
"-" << layerId <<
"_ts";
374 title <<
"PullGP_Y_" << subdetId <<
"-" << layerId <<
"_ts";
377 title <<
"PullGP_Z_" << subdetId <<
"-" << layerId <<
"_ts";
380 double pullGMX_ts = (tsosGMom.
x()-shitGMom.
x())/
sqrt(tsosGMEr.
cxx());
381 double pullGMY_ts = (tsosGMom.
y()-shitGMom.
y())/
sqrt(tsosGMEr.
cyy());
382 double pullGMZ_ts = (tsosGMom.
z()-shitGMom.
z())/
sqrt(tsosGMEr.
czz());
387 LogTrace(
"TestHits") <<
"ts2" << std::endl;
390 title <<
"PullGM_X_" << subdetId <<
"-" << layerId <<
"_ts";
393 title <<
"PullGM_Y_" << subdetId <<
"-" << layerId <<
"_ts";
396 title <<
"PullGM_Z_" << subdetId <<
"-" << layerId <<
"_ts";
399 if (dynamic_cast<const SiStripMatchedRecHit2D*>((rhit)->
hit())) {
401 LogTrace(
"TestHits") <<
"MONO HIT" << std::endl;
404 if (tMonoHit==
nullptr)
continue;
405 vector<PSimHit> assMonoSimHits = hitAssociator.
associateHit(*tMonoHit->hit());
406 if (assMonoSimHits.empty())
continue;
407 const PSimHit sMonoHit = *(assSimHits.begin());
408 const Surface * monoSurf = &( tMonoHit->det()->surface() );
409 if (monoSurf==
nullptr)
continue;
411 if (monoState.
isValid()==0)
continue;
423 GlobalPoint monoRhitGPos = tMonoHit->globalPosition();
424 GlobalError monoRhitGPEr = tMonoHit->globalPositionError();
426 double pullGPX_rs_mono = (monoRhitGPos.
x()-monoShitGPos.
x())/
sqrt(monoRhitGPEr.
cxx());
427 double pullGPY_rs_mono = (monoRhitGPos.
y()-monoShitGPos.
y())/
sqrt(monoRhitGPEr.
cyy());
428 double pullGPZ_rs_mono = (monoRhitGPos.
z()-monoShitGPos.
z())/
sqrt(monoRhitGPEr.
czz());
434 title <<
"PullGP_X_" << subdetId <<
"-" << layerId <<
"_rs_mono";
437 title <<
"PullGP_Y_" << subdetId <<
"-" << layerId <<
"_rs_mono";
440 title <<
"PullGP_Z_" << subdetId <<
"-" << layerId <<
"_rs_mono";
443 double pullGPX_tr_mono = (monoTsosGPos.
x()-monoRhitGPos.
x())/
sqrt(monoTsosGPEr.
cxx()+monoRhitGPEr.
cxx());
444 double pullGPY_tr_mono = (monoTsosGPos.
y()-monoRhitGPos.
y())/
sqrt(monoTsosGPEr.
cyy()+monoRhitGPEr.
cyy());
445 double pullGPZ_tr_mono = (monoTsosGPos.
z()-monoRhitGPos.
z())/
sqrt(monoTsosGPEr.
czz()+monoRhitGPEr.
czz());
451 title <<
"PullGP_X_" << subdetId <<
"-" << layerId <<
"_tr_mono";
454 title <<
"PullGP_Y_" << subdetId <<
"-" << layerId <<
"_tr_mono";
457 title <<
"PullGP_Z_" << subdetId <<
"-" << layerId <<
"_tr_mono";
460 double pullGPX_ts_mono = (monoTsosGPos.
x()-monoShitGPos.
x())/
sqrt(monoTsosGPEr.
cxx());
461 double pullGPY_ts_mono = (monoTsosGPos.
y()-monoShitGPos.
y())/
sqrt(monoTsosGPEr.
cyy());
462 double pullGPZ_ts_mono = (monoTsosGPos.
z()-monoShitGPos.
z())/
sqrt(monoTsosGPEr.
czz());
468 title <<
"PullGP_X_" << subdetId <<
"-" << layerId <<
"_ts_mono";
471 title <<
"PullGP_Y_" << subdetId <<
"-" << layerId <<
"_ts_mono";
474 title <<
"PullGP_Z_" << subdetId <<
"-" << layerId <<
"_ts_mono";
477 double pullGMX_ts_mono = (monoTsosGMom.
x()-monoShitGMom.
x())/
sqrt(monoTsosGMEr.
cxx());
478 double pullGMY_ts_mono = (monoTsosGMom.
y()-monoShitGMom.
y())/
sqrt(monoTsosGMEr.
cyy());
479 double pullGMZ_ts_mono = (monoTsosGMom.
z()-monoShitGMom.
z())/
sqrt(monoTsosGMEr.
czz());
485 title <<
"PullGM_X_" << subdetId <<
"-" << layerId <<
"_ts_mono";
488 title <<
"PullGM_Y_" << subdetId <<
"-" << layerId <<
"_ts_mono";
491 title <<
"PullGM_Z_" << subdetId <<
"-" << layerId <<
"_ts_mono";
495 LogTrace(
"TestHits") <<
"STEREO HIT" << std::endl;
499 if (tStereoHit==
nullptr)
continue;
500 vector<PSimHit> assStereoSimHits = hitAssociator.
associateHit(*tStereoHit->hit());
501 if (assStereoSimHits.empty())
continue;
502 const PSimHit sStereoHit = *(assSimHits.begin());
503 const Surface * stereoSurf = &( tStereoHit->det()->surface() );
504 if (stereoSurf==
nullptr)
continue;
506 if (stereoState.
isValid()==0)
continue;
518 GlobalPoint stereoRhitGPos = tStereoHit->globalPosition();
519 GlobalError stereoRhitGPEr = tStereoHit->globalPositionError();
521 double pullGPX_rs_stereo = (stereoRhitGPos.
x()-stereoShitGPos.
x())/
sqrt(stereoRhitGPEr.
cxx());
522 double pullGPY_rs_stereo = (stereoRhitGPos.
y()-stereoShitGPos.
y())/
sqrt(stereoRhitGPEr.
cyy());
523 double pullGPZ_rs_stereo = (stereoRhitGPos.
z()-stereoShitGPos.
z())/
sqrt(stereoRhitGPEr.
czz());
529 title <<
"PullGP_X_" << subdetId <<
"-" << layerId <<
"_rs_stereo";
532 title <<
"PullGP_Y_" << subdetId <<
"-" << layerId <<
"_rs_stereo";
535 title <<
"PullGP_Z_" << subdetId <<
"-" << layerId <<
"_rs_stereo";
538 double pullGPX_tr_stereo = (stereoTsosGPos.
x()-stereoRhitGPos.
x())/
sqrt(stereoTsosGPEr.
cxx()+stereoRhitGPEr.
cxx());
539 double pullGPY_tr_stereo = (stereoTsosGPos.
y()-stereoRhitGPos.
y())/
sqrt(stereoTsosGPEr.
cyy()+stereoRhitGPEr.
cyy());
540 double pullGPZ_tr_stereo = (stereoTsosGPos.
z()-stereoRhitGPos.
z())/
sqrt(stereoTsosGPEr.
czz()+stereoRhitGPEr.
czz());
546 title <<
"PullGP_X_" << subdetId <<
"-" << layerId <<
"_tr_stereo";
549 title <<
"PullGP_Y_" << subdetId <<
"-" << layerId <<
"_tr_stereo";
552 title <<
"PullGP_Z_" << subdetId <<
"-" << layerId <<
"_tr_stereo";
555 double pullGPX_ts_stereo = (stereoTsosGPos.
x()-stereoShitGPos.
x())/
sqrt(stereoTsosGPEr.
cxx());
556 double pullGPY_ts_stereo = (stereoTsosGPos.
y()-stereoShitGPos.
y())/
sqrt(stereoTsosGPEr.
cyy());
557 double pullGPZ_ts_stereo = (stereoTsosGPos.
z()-stereoShitGPos.
z())/
sqrt(stereoTsosGPEr.
czz());
563 title <<
"PullGP_X_" << subdetId <<
"-" << layerId <<
"_ts_stereo";
566 title <<
"PullGP_Y_" << subdetId <<
"-" << layerId <<
"_ts_stereo";
569 title <<
"PullGP_Z_" << subdetId <<
"-" << layerId <<
"_ts_stereo";
572 double pullGMX_ts_stereo = (stereoTsosGMom.
x()-stereoShitGMom.
x())/
sqrt(stereoTsosGMEr.
cxx());
573 double pullGMY_ts_stereo = (stereoTsosGMom.
y()-stereoShitGMom.
y())/
sqrt(stereoTsosGMEr.
cyy());
574 double pullGMZ_ts_stereo = (stereoTsosGMom.
z()-stereoShitGMom.
z())/
sqrt(stereoTsosGMEr.
czz());
580 title <<
"PullGM_X_" << subdetId <<
"-" << layerId <<
"_ts_stereo";
583 title <<
"PullGM_Y_" << subdetId <<
"-" << layerId <<
"_ts_stereo";
586 title <<
"PullGM_Z_" << subdetId <<
"-" << layerId <<
"_ts_stereo";
591 LogTrace(
"TestHits") <<
"traj chi2=" << tchi2 ;
592 LogTrace(
"TestHits") <<
"track chi2=" << result[0].chiSquared() ;
594 LogTrace(
"TestHits") <<
"end of event" << std::endl;
939 TDirectory * chi2i =
file->mkdir(
"Chi2_Increment");
941 TDirectory * gp_ts =
file->mkdir(
"GP_TSOS-SimHit");
942 TDirectory * gm_ts =
file->mkdir(
"GM_TSOS-SimHit");
943 TDirectory * gp_tr =
file->mkdir(
"GP_TSOS-RecHit");
944 TDirectory * gp_rs =
file->mkdir(
"GP_RecHit-SimHit");
946 TDirectory * gp_tsx = gp_ts->mkdir(
"X");
947 TDirectory * gp_tsy = gp_ts->mkdir(
"Y");
948 TDirectory * gp_tsz = gp_ts->mkdir(
"Z");
949 TDirectory * gm_tsx = gm_ts->mkdir(
"X");
950 TDirectory * gm_tsy = gm_ts->mkdir(
"Y");
951 TDirectory * gm_tsz = gm_ts->mkdir(
"Z");
952 TDirectory * gp_trx = gp_tr->mkdir(
"X");
953 TDirectory * gp_try = gp_tr->mkdir(
"Y");
954 TDirectory * gp_trz = gp_tr->mkdir(
"Z");
955 TDirectory * gp_rsx = gp_rs->mkdir(
"X");
956 TDirectory * gp_rsy = gp_rs->mkdir(
"Y");
957 TDirectory * gp_rsz = gp_rs->mkdir(
"Z");
959 TDirectory * gp_tsx_mono = gp_ts->mkdir(
"MONOX");
960 TDirectory * gp_tsy_mono = gp_ts->mkdir(
"MONOY");
961 TDirectory * gp_tsz_mono = gp_ts->mkdir(
"MONOZ");
962 TDirectory * gm_tsx_mono = gm_ts->mkdir(
"MONOX");
963 TDirectory * gm_tsy_mono = gm_ts->mkdir(
"MONOY");
964 TDirectory * gm_tsz_mono = gm_ts->mkdir(
"MONOZ");
965 TDirectory * gp_trx_mono = gp_tr->mkdir(
"MONOX");
966 TDirectory * gp_try_mono = gp_tr->mkdir(
"MONOY");
967 TDirectory * gp_trz_mono = gp_tr->mkdir(
"MONOZ");
968 TDirectory * gp_rsx_mono = gp_rs->mkdir(
"MONOX");
969 TDirectory * gp_rsy_mono = gp_rs->mkdir(
"MONOY");
970 TDirectory * gp_rsz_mono = gp_rs->mkdir(
"MONOZ");
972 TDirectory * gp_tsx_stereo = gp_ts->mkdir(
"STEREOX");
973 TDirectory * gp_tsy_stereo = gp_ts->mkdir(
"STEREOY");
974 TDirectory * gp_tsz_stereo = gp_ts->mkdir(
"STEREOZ");
975 TDirectory * gm_tsx_stereo = gm_ts->mkdir(
"STEREOX");
976 TDirectory * gm_tsy_stereo = gm_ts->mkdir(
"STEREOY");
977 TDirectory * gm_tsz_stereo = gm_ts->mkdir(
"STEREOZ");
978 TDirectory * gp_trx_stereo = gp_tr->mkdir(
"STEREOX");
979 TDirectory * gp_try_stereo = gp_tr->mkdir(
"STEREOY");
980 TDirectory * gp_trz_stereo = gp_tr->mkdir(
"STEREOZ");
981 TDirectory * gp_rsx_stereo = gp_rs->mkdir(
"STEREOX");
982 TDirectory * gp_rsy_stereo = gp_rs->mkdir(
"STEREOY");
983 TDirectory * gp_rsz_stereo = gp_rs->mkdir(
"STEREOZ");
989 for (
int i=0;
i!=6;
i++)
990 for (
int j=0; j!=9; j++){
991 if (
i==0 && j>2)
break;
992 if (
i==1 && j>1)
break;
993 if (
i==2 && j>3)
break;
994 if (
i==3 && j>2)
break;
995 if (
i==4 && j>5)
break;
996 if (
i==5 && j>8)
break;
999 title <<
"Chi2Increment_" <<
i+1 <<
"-" << j+1;
1005 title <<
"PullGP_X_" <<
i+1 <<
"-" << j+1 <<
"_ts";
1009 title <<
"PullGP_Y_" <<
i+1 <<
"-" << j+1 <<
"_ts";
1013 title <<
"PullGP_Z_" <<
i+1 <<
"-" << j+1 <<
"_ts";
1019 title <<
"PullGM_X_" <<
i+1 <<
"-" << j+1 <<
"_ts";
1023 title <<
"PullGM_Y_" <<
i+1 <<
"-" << j+1 <<
"_ts";
1027 title <<
"PullGM_Z_" <<
i+1 <<
"-" << j+1 <<
"_ts";
1033 title <<
"PullGP_X_" <<
i+1 <<
"-" << j+1 <<
"_tr";
1037 title <<
"PullGP_Y_" <<
i+1 <<
"-" << j+1 <<
"_tr";
1041 title <<
"PullGP_Z_" <<
i+1 <<
"-" << j+1 <<
"_tr";
1047 title <<
"PullGP_X_" <<
i+1 <<
"-" << j+1 <<
"_rs";
1051 title <<
"PullGP_Y_" <<
i+1 <<
"-" << j+1 <<
"_rs";
1055 title <<
"PullGP_Z_" <<
i+1 <<
"-" << j+1 <<
"_rs";
1058 if ( ((
i==2||
i==4)&&(j==0||j==1)) || (
i==3||
i==5) ){
1063 title <<
"PullGP_X_" <<
i+1 <<
"-" << j+1 <<
"_ts_mono";
1067 title <<
"PullGP_Y_" <<
i+1 <<
"-" << j+1 <<
"_ts_mono";
1071 title <<
"PullGP_Z_" <<
i+1 <<
"-" << j+1 <<
"_ts_mono";
1077 title <<
"PullGM_X_" <<
i+1 <<
"-" << j+1 <<
"_ts_mono";
1081 title <<
"PullGM_Y_" <<
i+1 <<
"-" << j+1 <<
"_ts_mono";
1085 title <<
"PullGM_Z_" <<
i+1 <<
"-" << j+1 <<
"_ts_mono";
1091 title <<
"PullGP_X_" <<
i+1 <<
"-" << j+1 <<
"_tr_mono";
1095 title <<
"PullGP_Y_" <<
i+1 <<
"-" << j+1 <<
"_tr_mono";
1099 title <<
"PullGP_Z_" <<
i+1 <<
"-" << j+1 <<
"_tr_mono";
1105 title <<
"PullGP_X_" <<
i+1 <<
"-" << j+1 <<
"_rs_mono";
1109 title <<
"PullGP_Y_" <<
i+1 <<
"-" << j+1 <<
"_rs_mono";
1113 title <<
"PullGP_Z_" <<
i+1 <<
"-" << j+1 <<
"_rs_mono";
1118 gp_tsx_stereo->cd();
1120 title <<
"PullGP_X_" <<
i+1 <<
"-" << j+1 <<
"_ts_stereo";
1122 gp_tsy_stereo->cd();
1124 title <<
"PullGP_Y_" <<
i+1 <<
"-" << j+1 <<
"_ts_stereo";
1126 gp_tsz_stereo->cd();
1128 title <<
"PullGP_Z_" <<
i+1 <<
"-" << j+1 <<
"_ts_stereo";
1132 gm_tsx_stereo->cd();
1134 title <<
"PullGM_X_" <<
i+1 <<
"-" << j+1 <<
"_ts_stereo";
1136 gm_tsy_stereo->cd();
1138 title <<
"PullGM_Y_" <<
i+1 <<
"-" << j+1 <<
"_ts_stereo";
1140 gm_tsz_stereo->cd();
1142 title <<
"PullGM_Z_" <<
i+1 <<
"-" << j+1 <<
"_ts_stereo";
1146 gp_trx_stereo->cd();
1148 title <<
"PullGP_X_" <<
i+1 <<
"-" << j+1 <<
"_tr_stereo";
1150 gp_try_stereo->cd();
1152 title <<
"PullGP_Y_" <<
i+1 <<
"-" << j+1 <<
"_tr_stereo";
1154 gp_trz_stereo->cd();
1156 title <<
"PullGP_Z_" <<
i+1 <<
"-" << j+1 <<
"_tr_stereo";
1160 gp_rsx_stereo->cd();
1162 title <<
"PullGP_X_" <<
i+1 <<
"-" << j+1 <<
"_rs_stereo";
1164 gp_rsy_stereo->cd();
1166 title <<
"PullGP_Y_" <<
i+1 <<
"-" << j+1 <<
"_rs_stereo";
1168 gp_rsz_stereo->cd();
1170 title <<
"PullGP_Z_" <<
i+1 <<
"-" << j+1 <<
"_rs_stereo";
1180 std::pair<LocalPoint,LocalVector>
1185 LocalPoint localHit = plane.toLocal(globalpos);
1192 float scale = -localHit.
z() / dir.
z();
1202 return std::pair<LocalPoint,LocalVector>( projectedPos, localStripDir);
edm::Handle< TrackCandidateCollection > theTCCollection
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
T getParameter(std::string const &) const
std::pair< LocalPoint, LocalVector > projectHit(const PSimHit &, const StripGeomDetUnit *, const BoundPlane &)
std::map< std::string, TH1F * > hPullGP_Y_tr_mono
std::map< std::string, TH1F * > hPullGP_X_rs_mono
std::map< std::string, TH1F * > hPullGP_Z_tr_stereo
edm::ESHandle< TransientTrackingRecHitBuilder > theBuilder
std::map< std::string, TH1F * > hPullGP_Z_ts_mono
LocalVector momentumAtEntry() const
The momentum of the track that produced the hit, at entry point.
std::map< std::string, TH1F * > hPullGM_X_ts_stereo
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
std::map< std::string, TH1F * > hPullGM_X_ts_mono
Sin< T >::type sin(const T &t)
TrajectorySeed const & seed() const
const CartesianTrajectoryError cartesianError() const
virtual float strip(const LocalPoint &) const =0
std::vector< ConstRecHitPointer > RecHitContainer
void beginRun(edm::Run const &run, const edm::EventSetup &) override
GlobalPoint globalPosition() const
std::map< std::string, TH1F * > hPullGP_Y_ts
std::map< std::string, TH1F * > hChi2Increment
std::pair< const_iterator, const_iterator > range
TrackerHitAssociator::Config trackerHitAssociatorConfig_
std::map< std::string, TH1F * > hPullGP_Y_ts_stereo
std::map< std::string, TH1F * > hPullGP_Z_rs
virtual const StripTopology & specificTopology() const
Returns a reference to the strip proxy topology.
edm::ESHandle< Propagator > thePropagator
const Plane & surface() const
The nominal surface of the GeomDet.
std::map< std::string, TH1F * > hPullGP_Y_rs
std::map< std::string, TH1F * > hPullGP_X_tr_stereo
std::map< std::string, TH1F * > hPullGP_Z_rs_stereo
PTrajectoryStateOnDet const & trajectoryStateOnDet() const
#define DEFINE_FWK_MODULE(type)
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > AlgebraicSymMatrix33
std::map< std::string, TH1F * > hPullGP_Y_tr
Local3DPoint localPosition() const
virtual float stripAngle(float strip) const =0
std::string propagatorName
std::shared_ptr< TrackingRecHit const > ConstRecHitPointer
std::map< std::string, TH1F * > hPullGP_X_rs_stereo
Cos< T >::type cos(const T &t)
std::map< std::string, TH1F * > hPullGP_Y_tr_stereo
TransientTrackingRecHit::ConstRecHitPointer CTTRHp
std::map< std::string, TH1F * > hPullGP_Y_rs_mono
unsigned int detId() const
std::map< std::string, TH1F * > hPullGM_Z_ts
std::map< std::string, TH1F * > hPullGM_Y_ts_mono
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
std::map< std::string, TH1F * > hPullGP_Z_rs_mono
std::map< std::string, TH1F * > hPullGP_X_ts_stereo
std::map< std::string, TH1F * > hPullGP_Y_rs_stereo
virtual RecHitPointer build(const TrackingRecHit *p) const =0
build a tracking rechit from an existing rechit
const AlgebraicSymMatrix66 & matrix() const
edm::ESHandle< TrackerGeometry > theG
LocalVector localDirection() const
Obsolete. Same as momentumAtEntry().unit(), for backward compatibility.
std::map< std::string, TH1F * > hPullGM_Z_ts_stereo
TrajectoryStateOnSurface TSOS
const GlobalError position() const
Position error submatrix.
TransientTrackingRecHit::ConstRecHitPointer CTTRHp
std::map< std::string, TH1F * > hPullGP_Z_tr
std::map< std::string, TH1F * > hPullGP_Y_ts_mono
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
unsigned short processType() const
unsigned int layer(const DetId &id) const
std::map< std::string, TH1F * > hPullGM_Y_ts_stereo
edm::ESHandle< MagneticField > theMF
std::map< std::string, TH1F * > hPullGP_X_tr_mono
GlobalVector globalMomentum() const
std::map< std::string, TH1F * > hPullGM_X_ts
void analyze(const edm::Event &, const edm::EventSetup &) override
std::map< std::string, TH1F * > hPullGP_X_ts
const TrackerGeomDet * idToDet(DetId) const override
std::vector< PSimHit > associateHit(const TrackingRecHit &thit) const
std::map< std::string, TH1F * > hPullGP_Z_ts
TestHits(const edm::ParameterSet &)
std::map< std::string, TH1F * > hPullGP_Z_tr_mono
std::map< std::string, TH1F * > hPullGP_X_ts_mono
const PositionType & position() const
T const * product() const
std::map< std::string, TH1F * > hPullGM_Z_ts_mono
std::map< std::string, TH1F * > hPullGM_Y_ts
std::map< std::string, TH1F * > hPullGP_X_tr
constexpr Detector det() const
get the detector field from this detid
std::map< std::string, TH1F * > hPullGP_Z_ts_stereo
std::map< std::string, TH1F * > hPullGP_X_rs