11 #include <TDirectory.h>
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++){
228 std::vector<Trajectory>
result =
fit->fit(theTC->
seed(), hits, theTSOS);
229 if (result.size()==0)
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()!=0)
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;
249 if (assSimHits.size()==0)
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());
261 TSOS updatedState = tm->updatedState();
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()))
275 hClsize_vs_Chi2->Fill( chi2increment, ((
const SiStripRecHit2D*)(rhit->hit()))->cluster()->amplitudes().size() );
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;
402 auto m =
dynamic_cast<const SiStripMatchedRecHit2D*
>((rhit)->
hit())->monoHit();
404 if (tMonoHit==0)
continue;
406 if (assMonoSimHits.size()==0)
continue;
407 const PSimHit sMonoHit = *(assSimHits.begin());
408 const Surface * monoSurf = &( tMonoHit->det()->surface() );
409 if (monoSurf==0)
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;
496 auto s =
dynamic_cast<const SiStripMatchedRecHit2D*
>((rhit)->
hit())->stereoHit();
499 if (tStereoHit==0)
continue;
501 if (assStereoSimHits.size()==0)
continue;
502 const PSimHit sStereoHit = *(assSimHits.begin());
503 const Surface * stereoSurf = &( tStereoHit->det()->surface() );
504 if (stereoSurf==0)
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";
589 lastState = updatedState;
591 LogTrace(
"TestHits") <<
"traj chi2=" << tchi2 ;
592 LogTrace(
"TestHits") <<
"track chi2=" << result[0].chiSquared() ;
595 LogTrace(
"TestHits") <<
"end of event" << std::endl;
941 TDirectory * chi2i =
file->mkdir(
"Chi2_Increment");
943 TDirectory * gp_ts =
file->mkdir(
"GP_TSOS-SimHit");
944 TDirectory * gm_ts =
file->mkdir(
"GM_TSOS-SimHit");
945 TDirectory * gp_tr =
file->mkdir(
"GP_TSOS-RecHit");
946 TDirectory * gp_rs =
file->mkdir(
"GP_RecHit-SimHit");
948 TDirectory * gp_tsx = gp_ts->mkdir(
"X");
949 TDirectory * gp_tsy = gp_ts->mkdir(
"Y");
950 TDirectory * gp_tsz = gp_ts->mkdir(
"Z");
951 TDirectory * gm_tsx = gm_ts->mkdir(
"X");
952 TDirectory * gm_tsy = gm_ts->mkdir(
"Y");
953 TDirectory * gm_tsz = gm_ts->mkdir(
"Z");
954 TDirectory * gp_trx = gp_tr->mkdir(
"X");
955 TDirectory * gp_try = gp_tr->mkdir(
"Y");
956 TDirectory * gp_trz = gp_tr->mkdir(
"Z");
957 TDirectory * gp_rsx = gp_rs->mkdir(
"X");
958 TDirectory * gp_rsy = gp_rs->mkdir(
"Y");
959 TDirectory * gp_rsz = gp_rs->mkdir(
"Z");
961 TDirectory * gp_tsx_mono = gp_ts->mkdir(
"MONOX");
962 TDirectory * gp_tsy_mono = gp_ts->mkdir(
"MONOY");
963 TDirectory * gp_tsz_mono = gp_ts->mkdir(
"MONOZ");
964 TDirectory * gm_tsx_mono = gm_ts->mkdir(
"MONOX");
965 TDirectory * gm_tsy_mono = gm_ts->mkdir(
"MONOY");
966 TDirectory * gm_tsz_mono = gm_ts->mkdir(
"MONOZ");
967 TDirectory * gp_trx_mono = gp_tr->mkdir(
"MONOX");
968 TDirectory * gp_try_mono = gp_tr->mkdir(
"MONOY");
969 TDirectory * gp_trz_mono = gp_tr->mkdir(
"MONOZ");
970 TDirectory * gp_rsx_mono = gp_rs->mkdir(
"MONOX");
971 TDirectory * gp_rsy_mono = gp_rs->mkdir(
"MONOY");
972 TDirectory * gp_rsz_mono = gp_rs->mkdir(
"MONOZ");
974 TDirectory * gp_tsx_stereo = gp_ts->mkdir(
"STEREOX");
975 TDirectory * gp_tsy_stereo = gp_ts->mkdir(
"STEREOY");
976 TDirectory * gp_tsz_stereo = gp_ts->mkdir(
"STEREOZ");
977 TDirectory * gm_tsx_stereo = gm_ts->mkdir(
"STEREOX");
978 TDirectory * gm_tsy_stereo = gm_ts->mkdir(
"STEREOY");
979 TDirectory * gm_tsz_stereo = gm_ts->mkdir(
"STEREOZ");
980 TDirectory * gp_trx_stereo = gp_tr->mkdir(
"STEREOX");
981 TDirectory * gp_try_stereo = gp_tr->mkdir(
"STEREOY");
982 TDirectory * gp_trz_stereo = gp_tr->mkdir(
"STEREOZ");
983 TDirectory * gp_rsx_stereo = gp_rs->mkdir(
"STEREOX");
984 TDirectory * gp_rsy_stereo = gp_rs->mkdir(
"STEREOY");
985 TDirectory * gp_rsz_stereo = gp_rs->mkdir(
"STEREOZ");
991 for (
int i=0;
i!=6;
i++)
992 for (
int j=0;
j!=9;
j++){
993 if (
i==0 &&
j>2)
break;
994 if (
i==1 &&
j>1)
break;
995 if (
i==2 &&
j>3)
break;
996 if (
i==3 &&
j>2)
break;
997 if (
i==4 &&
j>5)
break;
998 if (
i==5 &&
j>8)
break;
1001 title <<
"Chi2Increment_" <<
i+1 <<
"-" <<
j+1;
1007 title <<
"PullGP_X_" <<
i+1 <<
"-" << j+1 <<
"_ts";
1011 title <<
"PullGP_Y_" <<
i+1 <<
"-" << j+1 <<
"_ts";
1015 title <<
"PullGP_Z_" <<
i+1 <<
"-" << j+1 <<
"_ts";
1021 title <<
"PullGM_X_" <<
i+1 <<
"-" << j+1 <<
"_ts";
1025 title <<
"PullGM_Y_" <<
i+1 <<
"-" << j+1 <<
"_ts";
1029 title <<
"PullGM_Z_" <<
i+1 <<
"-" << j+1 <<
"_ts";
1035 title <<
"PullGP_X_" <<
i+1 <<
"-" << j+1 <<
"_tr";
1039 title <<
"PullGP_Y_" <<
i+1 <<
"-" << j+1 <<
"_tr";
1043 title <<
"PullGP_Z_" <<
i+1 <<
"-" << j+1 <<
"_tr";
1049 title <<
"PullGP_X_" <<
i+1 <<
"-" << j+1 <<
"_rs";
1053 title <<
"PullGP_Y_" <<
i+1 <<
"-" << j+1 <<
"_rs";
1057 title <<
"PullGP_Z_" <<
i+1 <<
"-" << j+1 <<
"_rs";
1060 if ( ((
i==2||
i==4)&&(j==0||j==1)) || (
i==3||
i==5) ){
1065 title <<
"PullGP_X_" <<
i+1 <<
"-" << j+1 <<
"_ts_mono";
1069 title <<
"PullGP_Y_" <<
i+1 <<
"-" << j+1 <<
"_ts_mono";
1073 title <<
"PullGP_Z_" <<
i+1 <<
"-" << j+1 <<
"_ts_mono";
1079 title <<
"PullGM_X_" <<
i+1 <<
"-" << j+1 <<
"_ts_mono";
1083 title <<
"PullGM_Y_" <<
i+1 <<
"-" << j+1 <<
"_ts_mono";
1087 title <<
"PullGM_Z_" <<
i+1 <<
"-" << j+1 <<
"_ts_mono";
1093 title <<
"PullGP_X_" <<
i+1 <<
"-" << j+1 <<
"_tr_mono";
1097 title <<
"PullGP_Y_" <<
i+1 <<
"-" << j+1 <<
"_tr_mono";
1101 title <<
"PullGP_Z_" <<
i+1 <<
"-" << j+1 <<
"_tr_mono";
1107 title <<
"PullGP_X_" <<
i+1 <<
"-" << j+1 <<
"_rs_mono";
1111 title <<
"PullGP_Y_" <<
i+1 <<
"-" << j+1 <<
"_rs_mono";
1115 title <<
"PullGP_Z_" <<
i+1 <<
"-" << j+1 <<
"_rs_mono";
1120 gp_tsx_stereo->cd();
1122 title <<
"PullGP_X_" <<
i+1 <<
"-" << j+1 <<
"_ts_stereo";
1124 gp_tsy_stereo->cd();
1126 title <<
"PullGP_Y_" <<
i+1 <<
"-" << j+1 <<
"_ts_stereo";
1128 gp_tsz_stereo->cd();
1130 title <<
"PullGP_Z_" <<
i+1 <<
"-" << j+1 <<
"_ts_stereo";
1134 gm_tsx_stereo->cd();
1136 title <<
"PullGM_X_" <<
i+1 <<
"-" << j+1 <<
"_ts_stereo";
1138 gm_tsy_stereo->cd();
1140 title <<
"PullGM_Y_" <<
i+1 <<
"-" << j+1 <<
"_ts_stereo";
1142 gm_tsz_stereo->cd();
1144 title <<
"PullGM_Z_" <<
i+1 <<
"-" << j+1 <<
"_ts_stereo";
1148 gp_trx_stereo->cd();
1150 title <<
"PullGP_X_" <<
i+1 <<
"-" << j+1 <<
"_tr_stereo";
1152 gp_try_stereo->cd();
1154 title <<
"PullGP_Y_" <<
i+1 <<
"-" << j+1 <<
"_tr_stereo";
1156 gp_trz_stereo->cd();
1158 title <<
"PullGP_Z_" <<
i+1 <<
"-" << j+1 <<
"_tr_stereo";
1162 gp_rsx_stereo->cd();
1164 title <<
"PullGP_X_" <<
i+1 <<
"-" << j+1 <<
"_rs_stereo";
1166 gp_rsy_stereo->cd();
1168 title <<
"PullGP_Y_" <<
i+1 <<
"-" << j+1 <<
"_rs_stereo";
1170 gp_rsz_stereo->cd();
1172 title <<
"PullGP_Z_" <<
i+1 <<
"-" << j+1 <<
"_rs_stereo";
1182 std::pair<LocalPoint,LocalVector>
1187 LocalPoint localHit = plane.toLocal(globalpos);
1194 float scale = -localHit.
z() / dir.
z();
1204 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 &)
virtual void beginRun(edm::Run &run, const edm::EventSetup &)
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
virtual float stripAngle(float strip) const =0
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())
#define DEFINE_FWK_MODULE(type)
std::map< std::string, TH1F * > hPullGM_X_ts_mono
Sin< T >::type sin(const T &t)
TrajectorySeed const & seed() const
const CartesianTrajectoryError cartesianError() const
std::vector< ConstRecHitPointer > RecHitContainer
GlobalPoint globalPosition() const
std::map< std::string, TH1F * > hPullGP_Y_ts
std::map< std::string, TH1F * > hChi2Increment
std::pair< const_iterator, const_iterator > range
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
virtual float strip(const LocalPoint &) const =0
std::map< std::string, TH1F * > hPullGP_Z_rs_stereo
PTrajectoryStateOnDet const & trajectoryStateOnDet() const
TrackerHitAssociator * hitAssociator
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > AlgebraicSymMatrix33
std::map< std::string, TH1F * > hPullGP_Y_tr
Local3DPoint localPosition() const
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
const AlgebraicSymMatrix66 & matrix() const
edm::ESHandle< TrackerGeometry > theG
edm::ESHandle< TrajectoryFitter > fit
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.
virtual void analyze(const edm::Event &, const edm::EventSetup &)
T const * product() const
std::map< std::string, TH1F * > hPullGP_Z_tr
std::map< std::string, TH1F * > hPullGP_Y_ts_mono
unsigned short processType() const
std::map< std::string, TH1F * > hPullGM_Y_ts_stereo
edm::ESHandle< MagneticField > theMF
const edm::ParameterSet conf_
std::map< std::string, TH1F * > hPullGP_X_tr_mono
GlobalVector globalMomentum() const
std::map< std::string, TH1F * > hPullGM_X_ts
std::map< std::string, TH1F * > hPullGP_X_ts
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
Detector det() const
get the detector field from this detid
const PositionType & position() 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
std::map< std::string, TH1F * > hPullGP_Z_ts_stereo
std::map< std::string, TH1F * > hPullGP_X_rs