11 #include <TDirectory.h>
51 file =
new TFile(
"testSmoothHits.root",
"recreate");
52 for (
int i=0;
i!=6;
i++)
53 for (
int j=0;
j!=9;
j++){
54 if (
i==0 &&
j>2)
break;
55 if (
i==1 &&
j>1)
break;
56 if (
i==2 &&
j>3)
break;
57 if (
i==3 &&
j>2)
break;
58 if (
i==4 &&
j>5)
break;
59 if (
i==5 &&
j>8)
break;
61 title <<
"PullGP_X_" <<
i+1 <<
"-" <<
j+1 <<
"_ts";
64 title <<
"PullGP_Y_" <<
i+1 <<
"-" << j+1 <<
"_ts";
67 title <<
"PullGP_Z_" <<
i+1 <<
"-" << j+1 <<
"_ts";
70 title <<
"Chi2Increment_" <<
i+1 <<
"-" << j+1;
74 title <<
"PullGM_X_" <<
i+1 <<
"-" << j+1 <<
"_ts";
77 title <<
"PullGM_Y_" <<
i+1 <<
"-" << j+1 <<
"_ts";
80 title <<
"PullGM_Z_" <<
i+1 <<
"-" << j+1 <<
"_ts";
84 title <<
"PullGP_X_" <<
i+1 <<
"-" << j+1 <<
"_tr";
87 title <<
"PullGP_Y_" <<
i+1 <<
"-" << j+1 <<
"_tr";
90 title <<
"PullGP_Z_" <<
i+1 <<
"-" << j+1 <<
"_tr";
94 title <<
"PullGP_X_" <<
i+1 <<
"-" << j+1 <<
"_rs";
97 title <<
"PullGP_Y_" <<
i+1 <<
"-" << j+1 <<
"_rs";
100 title <<
"PullGP_Z_" <<
i+1 <<
"-" << j+1 <<
"_rs";
103 if ( ((
i==2||
i==4)&&(j==0||j==1)) || (
i==3||
i==5) ){
106 title <<
"PullGP_X_" <<
i+1 <<
"-" << j+1 <<
"_ts_mono";
109 title <<
"PullGP_Y_" <<
i+1 <<
"-" << j+1 <<
"_ts_mono";
112 title <<
"PullGP_Z_" <<
i+1 <<
"-" << j+1 <<
"_ts_mono";
116 title <<
"PullGM_X_" <<
i+1 <<
"-" << j+1 <<
"_ts_mono";
119 title <<
"PullGM_Y_" <<
i+1 <<
"-" << j+1 <<
"_ts_mono";
122 title <<
"PullGM_Z_" <<
i+1 <<
"-" << j+1 <<
"_ts_mono";
126 title <<
"PullGP_X_" <<
i+1 <<
"-" << j+1 <<
"_tr_mono";
129 title <<
"PullGP_Y_" <<
i+1 <<
"-" << j+1 <<
"_tr_mono";
132 title <<
"PullGP_Z_" <<
i+1 <<
"-" << j+1 <<
"_tr_mono";
136 title <<
"PullGP_X_" <<
i+1 <<
"-" << j+1 <<
"_rs_mono";
139 title <<
"PullGP_Y_" <<
i+1 <<
"-" << j+1 <<
"_rs_mono";
142 title <<
"PullGP_Z_" <<
i+1 <<
"-" << j+1 <<
"_rs_mono";
147 title <<
"PullGP_X_" <<
i+1 <<
"-" << j+1 <<
"_ts_stereo";
150 title <<
"PullGP_Y_" <<
i+1 <<
"-" << j+1 <<
"_ts_stereo";
153 title <<
"PullGP_Z_" <<
i+1 <<
"-" << j+1 <<
"_ts_stereo";
157 title <<
"PullGM_X_" <<
i+1 <<
"-" << j+1 <<
"_ts_stereo";
160 title <<
"PullGM_Y_" <<
i+1 <<
"-" << j+1 <<
"_ts_stereo";
163 title <<
"PullGM_Z_" <<
i+1 <<
"-" << j+1 <<
"_ts_stereo";
167 title <<
"PullGP_X_" <<
i+1 <<
"-" << j+1 <<
"_tr_stereo";
170 title <<
"PullGP_Y_" <<
i+1 <<
"-" << j+1 <<
"_tr_stereo";
173 title <<
"PullGP_Z_" <<
i+1 <<
"-" << j+1 <<
"_tr_stereo";
177 title <<
"PullGP_X_" <<
i+1 <<
"-" << j+1 <<
"_rs_stereo";
180 title <<
"PullGP_Y_" <<
i+1 <<
"-" << j+1 <<
"_rs_stereo";
183 title <<
"PullGP_Z_" <<
i+1 <<
"-" << j+1 <<
"_rs_stereo";
188 hChi2_vs_Process =
new TH2F(
"Chi2_vs_Process",
"Chi2_vs_Process",1000,0,100,17,-0.5,16.5);
189 hChi2_vs_clsize =
new TH2F(
"Chi2_vs_clsize",
"Chi2_vs_clsize",1000,0,100,17,-0.5,16.5);
195 LogTrace(
"TestSmoothHits") <<
"new event" << std::endl;
204 LogTrace(
"TestSmoothHits") <<
"new candidate" << std::endl;
217 if (theTSOS.globalMomentum().eta()>
maxeta || theTSOS.globalMomentum().eta()<
mineta)
continue;
223 i!=recHitVec.second;
i++){
228 std::vector<Trajectory> fitted =
fit->fit(theTC->
seed(), hits, theTSOS);
230 std::vector<Trajectory>
result;
231 for(std::vector<Trajectory>::iterator it = fitted.begin(); it != fitted.end(); it++) {
232 std::vector<Trajectory> smoothed =
smooth->trajectories(*it);
233 result.insert(result.end(), smoothed.begin(), smoothed.end());
235 if (result.size()==0)
continue;
236 std::vector<TrajectoryMeasurement> vtm = result[0].measurements();
238 TSOS lastState = theTSOS;
239 for (std::vector<TrajectoryMeasurement>::iterator tm=vtm.begin(); tm!=vtm.end();tm++){
242 if ((rhit)->isValid()==0&&rhit->det()!=0)
continue;
243 LogTrace(
"TestSmoothHits") <<
"new hit" ;
245 int subdetId = rhit->det()->geographicalId().subdetId();
247 DetId id = rhit->det()->geographicalId();
248 if (
id.subdetId()==3) layerId = ((
TIBDetId)(
id)).layer();
249 if (
id.subdetId()==5) layerId = ((
TOBDetId)(
id)).layer();
250 if (
id.subdetId()==1) layerId = ((
PXBDetId)(
id)).layer();
251 if (
id.subdetId()==4) layerId = ((
TIDDetId)(
id)).wheel();
252 if (
id.subdetId()==6) layerId = ((
TECDetId)(
id)).wheel();
253 if (
id.subdetId()==2) layerId = ((
PXFDetId)(
id)).disk();
254 LogTrace(
"TestSmoothHits") <<
"subdetId=" << subdetId <<
" layerId=" << layerId ;
256 double delta = 99999;
260 if (assSimHits.size()==0)
continue;
262 for(std::vector<PSimHit>::const_iterator
m=assSimHits.begin();
m<assSimHits.end();
m++){
263 if ((
m->localPosition()-rhitLPv).
mag()<
delta) {
265 delta = (
m->localPosition()-rhitLPv).
mag();
269 TSOS currentState =
combiner(tm->backwardPredictedState(), tm->forwardPredictedState());
270 TSOS updatedState = tm->updatedState();
273 double chi2increment = tm->estimate();
274 LogTrace(
"TestSmoothHits") <<
"tm->estimate()=" << tm->estimate();
276 title <<
"Chi2Increment_" << subdetId <<
"-" << layerId;
280 if (dynamic_cast<const SiPixelRecHit*>(rhit->hit()))
282 if (dynamic_cast<const SiStripRecHit2D*>(rhit->hit()))
283 hChi2_vs_clsize->Fill( chi2increment, ((
const SiStripRecHit2D*)(rhit->hit()))->cluster()->amplitudes().size() );
286 const Surface * surf = &( (rhit)->det()->surface() );
289 if (dynamic_cast<const SiStripMatchedRecHit2D*>(rhit->hit())) {
290 double rechitmatchedx = rhit->localPosition().x();
291 double rechitmatchedy = rhit->localPosition().y();
292 double mindist = 999999;
294 std::pair<LocalPoint,LocalVector> closestPair;
296 const BoundPlane& plane = (rhit)->det()->surface();
297 for(std::vector<PSimHit>::const_iterator
m=assSimHits.begin();
m<assSimHits.end();
m++) {
299 std::pair<LocalPoint,LocalVector> hitPair =
projectHit((*
m),stripDet,plane);
300 distx = fabs(rechitmatchedx - hitPair.first.x());
301 disty = fabs(rechitmatchedy - hitPair.first.y());
302 double dist = distx*distx+disty*disty;
303 if(
sqrt(dist)<mindist){
305 closestPair = hitPair;
308 shitLPos = closestPair.first;
309 shitLMom = closestPair.second;
363 GlobalError rhitGPEr = (rhit)->globalPositionError();
365 double pullGPX_rs = (rhitGPos.
x()-shitGPos.
x())/
sqrt(rhitGPEr.
cxx());
366 double pullGPY_rs = (rhitGPos.
y()-shitGPos.
y())/
sqrt(rhitGPEr.
cyy());
367 double pullGPZ_rs = (rhitGPos.
z()-shitGPos.
z())/
sqrt(rhitGPEr.
czz());
372 LogTrace(
"TestSmoothHits") <<
"rs" << std::endl;
375 title <<
"PullGP_X_" << subdetId <<
"-" << layerId <<
"_rs";
378 title <<
"PullGP_Y_" << subdetId <<
"-" << layerId <<
"_rs";
381 title <<
"PullGP_Z_" << subdetId <<
"-" << layerId <<
"_rs";
384 double pullGPX_tr = (tsosGPos.
x()-rhitGPos.
x())/
sqrt(tsosGPEr.
cxx()+rhitGPEr.
cxx());
385 double pullGPY_tr = (tsosGPos.
y()-rhitGPos.
y())/
sqrt(tsosGPEr.
cyy()+rhitGPEr.
cyy());
386 double pullGPZ_tr = (tsosGPos.
z()-rhitGPos.
z())/
sqrt(tsosGPEr.
czz()+rhitGPEr.
czz());
391 LogTrace(
"TestSmoothHits") <<
"tr" << std::endl;
394 title <<
"PullGP_X_" << subdetId <<
"-" << layerId <<
"_tr";
397 title <<
"PullGP_Y_" << subdetId <<
"-" << layerId <<
"_tr";
400 title <<
"PullGP_Z_" << subdetId <<
"-" << layerId <<
"_tr";
403 double pullGPX_ts = (tsosGPos.
x()-shitGPos.
x())/
sqrt(tsosGPEr.
cxx());
404 double pullGPY_ts = (tsosGPos.
y()-shitGPos.
y())/
sqrt(tsosGPEr.
cyy());
405 double pullGPZ_ts = (tsosGPos.
z()-shitGPos.
z())/
sqrt(tsosGPEr.
czz());
410 LogTrace(
"TestSmoothHits") <<
"ts1" << std::endl;
413 title <<
"PullGP_X_" << subdetId <<
"-" << layerId <<
"_ts";
416 title <<
"PullGP_Y_" << subdetId <<
"-" << layerId <<
"_ts";
419 title <<
"PullGP_Z_" << subdetId <<
"-" << layerId <<
"_ts";
422 double pullGMX_ts = (tsosGMom.
x()-shitGMom.
x())/
sqrt(tsosGMEr.
cxx());
423 double pullGMY_ts = (tsosGMom.
y()-shitGMom.
y())/
sqrt(tsosGMEr.
cyy());
424 double pullGMZ_ts = (tsosGMom.
z()-shitGMom.
z())/
sqrt(tsosGMEr.
czz());
429 LogTrace(
"TestSmoothHits") <<
"ts2" << std::endl;
432 title <<
"PullGM_X_" << subdetId <<
"-" << layerId <<
"_ts";
435 title <<
"PullGM_Y_" << subdetId <<
"-" << layerId <<
"_ts";
438 title <<
"PullGM_Z_" << subdetId <<
"-" << layerId <<
"_ts";
441 if (dynamic_cast<const SiStripMatchedRecHit2D*>((rhit)->
hit())) {
443 LogTrace(
"TestSmoothHits") <<
"MONO HIT" << std::endl;
444 auto m =
dynamic_cast<const SiStripMatchedRecHit2D*
>((rhit)->
hit())->monoHit();
447 if (tMonoHit==0)
continue;
449 if (assMonoSimHits.size()==0)
continue;
450 const PSimHit sMonoHit = *(assSimHits.begin());
451 const Surface * monoSurf = &( tMonoHit->det()->surface() );
452 if (monoSurf==0)
continue;
454 if (monoState.
isValid()==0)
continue;
466 GlobalPoint monoRhitGPos = tMonoHit->globalPosition();
467 GlobalError monoRhitGPEr = tMonoHit->globalPositionError();
469 double pullGPX_rs_mono = (monoRhitGPos.
x()-monoShitGPos.
x())/
sqrt(monoRhitGPEr.
cxx());
470 double pullGPY_rs_mono = (monoRhitGPos.
y()-monoShitGPos.
y())/
sqrt(monoRhitGPEr.
cyy());
471 double pullGPZ_rs_mono = (monoRhitGPos.
z()-monoShitGPos.
z())/
sqrt(monoRhitGPEr.
czz());
477 title <<
"PullGP_X_" << subdetId <<
"-" << layerId <<
"_rs_mono";
480 title <<
"PullGP_Y_" << subdetId <<
"-" << layerId <<
"_rs_mono";
483 title <<
"PullGP_Z_" << subdetId <<
"-" << layerId <<
"_rs_mono";
486 double pullGPX_tr_mono = (monoTsosGPos.
x()-monoRhitGPos.
x())/
sqrt(monoTsosGPEr.
cxx()+monoRhitGPEr.
cxx());
487 double pullGPY_tr_mono = (monoTsosGPos.
y()-monoRhitGPos.
y())/
sqrt(monoTsosGPEr.
cyy()+monoRhitGPEr.
cyy());
488 double pullGPZ_tr_mono = (monoTsosGPos.
z()-monoRhitGPos.
z())/
sqrt(monoTsosGPEr.
czz()+monoRhitGPEr.
czz());
494 title <<
"PullGP_X_" << subdetId <<
"-" << layerId <<
"_tr_mono";
497 title <<
"PullGP_Y_" << subdetId <<
"-" << layerId <<
"_tr_mono";
500 title <<
"PullGP_Z_" << subdetId <<
"-" << layerId <<
"_tr_mono";
503 double pullGPX_ts_mono = (monoTsosGPos.
x()-monoShitGPos.
x())/
sqrt(monoTsosGPEr.
cxx());
504 double pullGPY_ts_mono = (monoTsosGPos.
y()-monoShitGPos.
y())/
sqrt(monoTsosGPEr.
cyy());
505 double pullGPZ_ts_mono = (monoTsosGPos.
z()-monoShitGPos.
z())/
sqrt(monoTsosGPEr.
czz());
511 title <<
"PullGP_X_" << subdetId <<
"-" << layerId <<
"_ts_mono";
514 title <<
"PullGP_Y_" << subdetId <<
"-" << layerId <<
"_ts_mono";
517 title <<
"PullGP_Z_" << subdetId <<
"-" << layerId <<
"_ts_mono";
520 double pullGMX_ts_mono = (monoTsosGMom.
x()-monoShitGMom.
x())/
sqrt(monoTsosGMEr.
cxx());
521 double pullGMY_ts_mono = (monoTsosGMom.
y()-monoShitGMom.
y())/
sqrt(monoTsosGMEr.
cyy());
522 double pullGMZ_ts_mono = (monoTsosGMom.
z()-monoShitGMom.
z())/
sqrt(monoTsosGMEr.
czz());
528 title <<
"PullGM_X_" << subdetId <<
"-" << layerId <<
"_ts_mono";
531 title <<
"PullGM_Y_" << subdetId <<
"-" << layerId <<
"_ts_mono";
534 title <<
"PullGM_Z_" << subdetId <<
"-" << layerId <<
"_ts_mono";
538 LogTrace(
"TestSmoothHits") <<
"STEREO HIT" << std::endl;
539 auto s =
dynamic_cast<const SiStripMatchedRecHit2D*
>((rhit)->
hit())->stereoHit();
542 if (tStereoHit==0)
continue;
544 if (assStereoSimHits.size()==0)
continue;
545 const PSimHit sStereoHit = *(assSimHits.begin());
546 const Surface * stereoSurf = &( tStereoHit->det()->surface() );
547 if (stereoSurf==0)
continue;
549 if (stereoState.
isValid()==0)
continue;
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 = (stereoTsosGPos.
x()-stereoRhitGPos.
x())/
sqrt(stereoTsosGPEr.
cxx()+stereoRhitGPEr.
cxx());
582 double pullGPY_tr_stereo = (stereoTsosGPos.
y()-stereoRhitGPos.
y())/
sqrt(stereoTsosGPEr.
cyy()+stereoRhitGPEr.
cyy());
583 double pullGPZ_tr_stereo = (stereoTsosGPos.
z()-stereoRhitGPos.
z())/
sqrt(stereoTsosGPEr.
czz()+stereoRhitGPEr.
czz());
589 title <<
"PullGP_X_" << subdetId <<
"-" << layerId <<
"_tr_stereo";
592 title <<
"PullGP_Y_" << subdetId <<
"-" << layerId <<
"_tr_stereo";
595 title <<
"PullGP_Z_" << subdetId <<
"-" << layerId <<
"_tr_stereo";
598 double pullGPX_ts_stereo = (stereoTsosGPos.
x()-stereoShitGPos.
x())/
sqrt(stereoTsosGPEr.
cxx());
599 double pullGPY_ts_stereo = (stereoTsosGPos.
y()-stereoShitGPos.
y())/
sqrt(stereoTsosGPEr.
cyy());
600 double pullGPZ_ts_stereo = (stereoTsosGPos.
z()-stereoShitGPos.
z())/
sqrt(stereoTsosGPEr.
czz());
606 title <<
"PullGP_X_" << subdetId <<
"-" << layerId <<
"_ts_stereo";
609 title <<
"PullGP_Y_" << subdetId <<
"-" << layerId <<
"_ts_stereo";
612 title <<
"PullGP_Z_" << subdetId <<
"-" << layerId <<
"_ts_stereo";
615 double pullGMX_ts_stereo = (stereoTsosGMom.
x()-stereoShitGMom.
x())/
sqrt(stereoTsosGMEr.
cxx());
616 double pullGMY_ts_stereo = (stereoTsosGMom.
y()-stereoShitGMom.
y())/
sqrt(stereoTsosGMEr.
cyy());
617 double pullGMZ_ts_stereo = (stereoTsosGMom.
z()-stereoShitGMom.
z())/
sqrt(stereoTsosGMEr.
czz());
623 title <<
"PullGM_X_" << subdetId <<
"-" << layerId <<
"_ts_stereo";
626 title <<
"PullGM_Y_" << subdetId <<
"-" << layerId <<
"_ts_stereo";
629 title <<
"PullGM_Z_" << subdetId <<
"-" << layerId <<
"_ts_stereo";
632 lastState = updatedState;
637 LogTrace(
"TestSmoothHits") <<
"end of event" << std::endl;
642 TDirectory * chi2i =
file->mkdir(
"Chi2_Increment");
644 TDirectory * gp_ts =
file->mkdir(
"GP_TSOS-SimHit");
645 TDirectory * gm_ts =
file->mkdir(
"GM_TSOS-SimHit");
646 TDirectory * gp_tr =
file->mkdir(
"GP_TSOS-RecHit");
647 TDirectory * gp_rs =
file->mkdir(
"GP_RecHit-SimHit");
649 TDirectory * gp_tsx = gp_ts->mkdir(
"X");
650 TDirectory * gp_tsy = gp_ts->mkdir(
"Y");
651 TDirectory * gp_tsz = gp_ts->mkdir(
"Z");
652 TDirectory * gm_tsx = gm_ts->mkdir(
"X");
653 TDirectory * gm_tsy = gm_ts->mkdir(
"Y");
654 TDirectory * gm_tsz = gm_ts->mkdir(
"Z");
655 TDirectory * gp_trx = gp_tr->mkdir(
"X");
656 TDirectory * gp_try = gp_tr->mkdir(
"Y");
657 TDirectory * gp_trz = gp_tr->mkdir(
"Z");
658 TDirectory * gp_rsx = gp_rs->mkdir(
"X");
659 TDirectory * gp_rsy = gp_rs->mkdir(
"Y");
660 TDirectory * gp_rsz = gp_rs->mkdir(
"Z");
662 TDirectory * gp_tsx_mono = gp_ts->mkdir(
"MONOX");
663 TDirectory * gp_tsy_mono = gp_ts->mkdir(
"MONOY");
664 TDirectory * gp_tsz_mono = gp_ts->mkdir(
"MONOZ");
665 TDirectory * gm_tsx_mono = gm_ts->mkdir(
"MONOX");
666 TDirectory * gm_tsy_mono = gm_ts->mkdir(
"MONOY");
667 TDirectory * gm_tsz_mono = gm_ts->mkdir(
"MONOZ");
668 TDirectory * gp_trx_mono = gp_tr->mkdir(
"MONOX");
669 TDirectory * gp_try_mono = gp_tr->mkdir(
"MONOY");
670 TDirectory * gp_trz_mono = gp_tr->mkdir(
"MONOZ");
671 TDirectory * gp_rsx_mono = gp_rs->mkdir(
"MONOX");
672 TDirectory * gp_rsy_mono = gp_rs->mkdir(
"MONOY");
673 TDirectory * gp_rsz_mono = gp_rs->mkdir(
"MONOZ");
675 TDirectory * gp_tsx_stereo = gp_ts->mkdir(
"STEREOX");
676 TDirectory * gp_tsy_stereo = gp_ts->mkdir(
"STEREOY");
677 TDirectory * gp_tsz_stereo = gp_ts->mkdir(
"STEREOZ");
678 TDirectory * gm_tsx_stereo = gm_ts->mkdir(
"STEREOX");
679 TDirectory * gm_tsy_stereo = gm_ts->mkdir(
"STEREOY");
680 TDirectory * gm_tsz_stereo = gm_ts->mkdir(
"STEREOZ");
681 TDirectory * gp_trx_stereo = gp_tr->mkdir(
"STEREOX");
682 TDirectory * gp_try_stereo = gp_tr->mkdir(
"STEREOY");
683 TDirectory * gp_trz_stereo = gp_tr->mkdir(
"STEREOZ");
684 TDirectory * gp_rsx_stereo = gp_rs->mkdir(
"STEREOX");
685 TDirectory * gp_rsy_stereo = gp_rs->mkdir(
"STEREOY");
686 TDirectory * gp_rsz_stereo = gp_rs->mkdir(
"STEREOZ");
692 for (
int i=0;
i!=6;
i++)
693 for (
int j=0;
j!=9;
j++){
694 if (
i==0 &&
j>2)
break;
695 if (
i==1 &&
j>1)
break;
696 if (
i==2 &&
j>3)
break;
697 if (
i==3 &&
j>2)
break;
698 if (
i==4 &&
j>5)
break;
699 if (
i==5 &&
j>8)
break;
702 title <<
"Chi2Increment_" <<
i+1 <<
"-" <<
j+1;
708 title <<
"PullGP_X_" <<
i+1 <<
"-" << j+1 <<
"_ts";
712 title <<
"PullGP_Y_" <<
i+1 <<
"-" << j+1 <<
"_ts";
716 title <<
"PullGP_Z_" <<
i+1 <<
"-" << j+1 <<
"_ts";
722 title <<
"PullGM_X_" <<
i+1 <<
"-" << j+1 <<
"_ts";
726 title <<
"PullGM_Y_" <<
i+1 <<
"-" << j+1 <<
"_ts";
730 title <<
"PullGM_Z_" <<
i+1 <<
"-" << j+1 <<
"_ts";
736 title <<
"PullGP_X_" <<
i+1 <<
"-" << j+1 <<
"_tr";
740 title <<
"PullGP_Y_" <<
i+1 <<
"-" << j+1 <<
"_tr";
744 title <<
"PullGP_Z_" <<
i+1 <<
"-" << j+1 <<
"_tr";
750 title <<
"PullGP_X_" <<
i+1 <<
"-" << j+1 <<
"_rs";
754 title <<
"PullGP_Y_" <<
i+1 <<
"-" << j+1 <<
"_rs";
758 title <<
"PullGP_Z_" <<
i+1 <<
"-" << j+1 <<
"_rs";
761 if ( ((
i==2||
i==4)&&(j==0||j==1)) || (
i==3||
i==5) ){
766 title <<
"PullGP_X_" <<
i+1 <<
"-" << j+1 <<
"_ts_mono";
770 title <<
"PullGP_Y_" <<
i+1 <<
"-" << j+1 <<
"_ts_mono";
774 title <<
"PullGP_Z_" <<
i+1 <<
"-" << j+1 <<
"_ts_mono";
780 title <<
"PullGM_X_" <<
i+1 <<
"-" << j+1 <<
"_ts_mono";
784 title <<
"PullGM_Y_" <<
i+1 <<
"-" << j+1 <<
"_ts_mono";
788 title <<
"PullGM_Z_" <<
i+1 <<
"-" << j+1 <<
"_ts_mono";
794 title <<
"PullGP_X_" <<
i+1 <<
"-" << j+1 <<
"_tr_mono";
798 title <<
"PullGP_Y_" <<
i+1 <<
"-" << j+1 <<
"_tr_mono";
802 title <<
"PullGP_Z_" <<
i+1 <<
"-" << j+1 <<
"_tr_mono";
808 title <<
"PullGP_X_" <<
i+1 <<
"-" << j+1 <<
"_rs_mono";
812 title <<
"PullGP_Y_" <<
i+1 <<
"-" << j+1 <<
"_rs_mono";
816 title <<
"PullGP_Z_" <<
i+1 <<
"-" << j+1 <<
"_rs_mono";
823 title <<
"PullGP_X_" <<
i+1 <<
"-" << j+1 <<
"_ts_stereo";
827 title <<
"PullGP_Y_" <<
i+1 <<
"-" << j+1 <<
"_ts_stereo";
831 title <<
"PullGP_Z_" <<
i+1 <<
"-" << j+1 <<
"_ts_stereo";
837 title <<
"PullGM_X_" <<
i+1 <<
"-" << j+1 <<
"_ts_stereo";
841 title <<
"PullGM_Y_" <<
i+1 <<
"-" << j+1 <<
"_ts_stereo";
845 title <<
"PullGM_Z_" <<
i+1 <<
"-" << j+1 <<
"_ts_stereo";
851 title <<
"PullGP_X_" <<
i+1 <<
"-" << j+1 <<
"_tr_stereo";
855 title <<
"PullGP_Y_" <<
i+1 <<
"-" << j+1 <<
"_tr_stereo";
859 title <<
"PullGP_Z_" <<
i+1 <<
"-" << j+1 <<
"_tr_stereo";
865 title <<
"PullGP_X_" <<
i+1 <<
"-" << j+1 <<
"_rs_stereo";
869 title <<
"PullGP_Y_" <<
i+1 <<
"-" << j+1 <<
"_rs_stereo";
873 title <<
"PullGP_Z_" <<
i+1 <<
"-" << j+1 <<
"_rs_stereo";
883 std::pair<LocalPoint,LocalVector>
895 float scale = -localHit.
z() / dir.
z();
905 return std::pair<LocalPoint,LocalVector>( projectedPos, localStripDir);
std::map< std::string, TH1F * > hPullGP_Z_rs_stereo
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
T getParameter(std::string const &) const
TrackerHitAssociator * hitAssociator
std::map< std::string, TH1F * > hPullGP_X_ts_mono
std::map< std::string, TH1F * > hPullGM_Y_ts_mono
edm::Handle< TrackCandidateCollection > theTCCollection
virtual float stripAngle(float strip) const =0
TestSmoothHits(const edm::ParameterSet &)
LocalVector momentumAtEntry() const
The momentum of the track that produced the hit, at entry point.
std::map< std::string, TH1F * > hChi2Increment
std::map< std::string, TH1F * > hPullGP_X_rs_mono
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
#define DEFINE_FWK_MODULE(type)
std::string propagatorName
Sin< T >::type sin(const T &t)
TrajectorySeed const & seed() const
std::map< std::string, TH1F * > hPullGM_Z_ts_stereo
const CartesianTrajectoryError cartesianError() const
GlobalPoint globalPosition() const
std::map< std::string, TH1F * > hPullGP_Y_rs
std::map< std::string, TH1F * > hPullGM_X_ts_mono
std::map< std::string, TH1F * > hPullGP_Z_tr
std::map< std::string, TH1F * > hPullGP_X_ts
std::pair< const_iterator, const_iterator > range
std::map< std::string, TH1F * > hPullGP_Y_tr_stereo
std::map< std::string, TH1F * > hPullGP_Z_ts
virtual const StripTopology & specificTopology() const
Returns a reference to the strip proxy topology.
std::map< std::string, TH1F * > hPullGP_X_rs_stereo
std::vector< ConstRecHitPointer > RecHitContainer
edm::ESHandle< TrajectorySmoother > smooth
std::map< std::string, TH1F * > hPullGP_Y_rs_mono
virtual float strip(const LocalPoint &) const =0
std::map< std::string, TH1F * > hPullGM_Y_ts_stereo
edm::ESHandle< TrajectoryFitter > fit
PTrajectoryStateOnDet const & trajectoryStateOnDet() const
std::map< std::string, TH1F * > hPullGP_Z_rs_mono
edm::ESHandle< MagneticField > theMF
std::map< std::string, TH1F * > hPullGP_Y_ts_mono
std::map< std::string, TH1F * > hPullGM_Y_ts
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > AlgebraicSymMatrix33
std::map< std::string, TH1F * > hPullGP_Z_tr_mono
Local3DPoint localPosition() const
LocalPoint toLocal(const GlobalPoint &gp) const
std::map< std::string, TH1F * > hPullGM_Z_ts
Cos< T >::type cos(const T &t)
std::map< std::string, TH1F * > hPullGP_X_tr
const edm::ParameterSet conf_
TransientTrackingRecHit::ConstRecHitPointer CTTRHp
unsigned int detId() const
std::map< std::string, TH1F * > hPullGP_Y_rs_stereo
virtual void analyze(const edm::Event &, const edm::EventSetup &)
edm::ESHandle< TransientTrackingRecHitBuilder > theBuilder
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
virtual void beginRun(edm::Run &run, const edm::EventSetup &)
std::map< std::string, TH1F * > hPullGP_Y_tr_mono
const AlgebraicSymMatrix66 & matrix() const
std::map< std::string, TH1F * > hPullGP_X_ts_stereo
std::map< std::string, TH1F * > hPullGP_Y_ts
LocalVector localDirection() const
Obsolete. Same as momentumAtEntry().unit(), for backward compatibility.
std::map< std::string, TH1F * > hPullGP_Z_ts_stereo
TrajectoryStateOnSurface TSOS
std::map< std::string, TH1F * > hPullGM_Z_ts_mono
const GlobalError position() const
Position error submatrix.
std::map< std::string, TH1F * > hPullGP_X_rs
edm::ESHandle< Propagator > thePropagator
T const * product() const
std::map< std::string, TH1F * > hPullGP_X_tr_stereo
unsigned short processType() const
edm::ESHandle< TrackerGeometry > theG
std::map< std::string, TH1F * > hPullGP_X_tr_mono
std::pair< LocalPoint, LocalVector > projectHit(const PSimHit &, const StripGeomDetUnit *, const BoundPlane &)
GlobalVector globalMomentum() const
const BoundPlane & surface() const
The nominal surface of the GeomDet.
std::vector< PSimHit > associateHit(const TrackingRecHit &thit)
std::map< std::string, TH1F * > hPullGP_Z_tr_stereo
std::map< std::string, TH1F * > hPullGP_Z_rs
std::map< std::string, TH1F * > hPullGP_Y_ts_stereo
std::map< std::string, TH1F * > hPullGP_Z_ts_mono
std::map< std::string, TH1F * > hPullGM_X_ts
std::map< std::string, TH1F * > hPullGM_X_ts_stereo
std::map< std::string, TH1F * > hPullGP_Y_tr