127 : trackTagsOut_(iConfig.getUntrackedParameter<
edm::
InputTag>(
"tracksOut")),
128 trackTagsOld_(iConfig.getUntrackedParameter<
edm::
InputTag>(
"tracksOld")),
129 tpTags_(iConfig.getUntrackedParameter<
edm::
InputTag>(
"tp")),
130 trackerHitAssociatorConfig_(consumesCollector()),
132 iConfig.getUntrackedParameter<
edm::
InputTag>(
"TrackAssociatorByHitsOld"))),
134 iConfig.getUntrackedParameter<
edm::
InputTag>(
"TrackAssociatorByHitsOut"))),
139 LogTrace(
"TestOutliers") <<
"constructor";
149 LogTrace(
"TestOutliers") <<
"end constructor";
201 LogTrace(
"TestOutliers") <<
"tOld size=" << tracksOld->size() <<
" tOut size=" << tracksOut->size()
202 <<
" aOld size=" << recSimCollOld.
size() <<
" aOut size=" << recSimCollOut.
size();
205 LogTrace(
"TestOutliers") <<
"recSimCollOld.size()=" << recSimCollOld.
size() ;
209 LogTrace(
"TestOutliers") <<
"trackOld->pt()=" << trackOld->pt() <<
" trackOld->numberOfValidHits()=" << trackOld->numberOfValidHits();
210 std::vector<pair<TrackingParticleRef, double> > tpOld;
211 if(recSimCollOld.
find(trackOld) != recSimCollOld.
end()){
212 tpOld = recSimCollOld[trackOld];
213 if (tpOld.size()!=0)
LogTrace(
"TestOutliers") <<
" associated" ;
214 else LogTrace(
"TestOutliers") <<
" NOT associated" ;
215 }
else LogTrace(
"TestOutliers") <<
" NOT associated" ;
217 LogTrace(
"TestOutliers") <<
"recSimCollOut.size()=" << recSimCollOut.
size() ;
221 LogTrace(
"TestOutliers") <<
"trackOut->pt()=" << trackOut->pt() <<
" trackOut->numberOfValidHits()=" << trackOut->numberOfValidHits();
222 std::vector<pair<TrackingParticleRef, double> > tpOut;
223 if(recSimCollOut.
find(trackOut) != recSimCollOut.
end()){
224 tpOut = recSimCollOut[trackOut];
225 if (tpOut.size()!=0)
LogTrace(
"TestOutliers") <<
" associated" ;
226 else LogTrace(
"TestOutliers") <<
" NOT associated" ;
227 }
else LogTrace(
"TestOutliers") <<
" NOT associated" ;
231 LogTrace(
"TestOutliers") <<
"tracksOut->size()=" << tracksOut->size();
232 LogTrace(
"TestOutliers") <<
"tracksOld->size()=" << tracksOld->size();
234 std::vector<unsigned int> outused;
235 for (
unsigned int j = 0;
j < tracksOld->size(); ++
j) {
238 LogTrace(
"TestOutliers") <<
"now track old with id=" <<
j <<
" seed ref=" << trackOld->
seedRef().
get()
239 <<
" pt=" << trackOld->
pt() <<
" eta=" << trackOld->
eta()
241 <<
" tip= " << fabs(trackOld->
dxy(
beamSpot->position()))
242 <<
" lip= " << fabs(trackOld->
dsz(
beamSpot->position()));
257 std::vector<unsigned int> outtest;
258 for (
unsigned int k = 0;
k < tracksOut->size(); ++
k) {
261 outtest.push_back(
k);
266 if (outtest.size() == 1) {
268 LogTrace(
"TestOutliers") <<
"now track out with id=" << outtest[0] <<
" seed ref=" << trackOut->
seedRef().
get()
269 <<
" pt=" << trackOut->
pt();
270 outused.push_back(outtest[0]);
271 }
else if (outtest.size() > 1) {
272 for (
unsigned int p = 0;
p < outtest.size(); ++
p) {
276 if ((*itOut)->isValid()) {
277 bool thishit =
false;
279 if ((*itOld)->isValid()) {
293 LogTrace(
"TestOutliers") <<
"now track out with id=" << outtest[
p]
294 <<
" seed ref=" << trackOut->
seedRef().
get() <<
" pt=" << trackOut->
pt();
295 outused.push_back(outtest[
p]);
300 if (outtest.empty() || trackOut.
get() ==
nullptr) {
301 if (recSimCollOld.
find(trackOld) != recSimCollOld.
end()) {
302 vector<pair<TrackingParticleRef, double> > tpOld;
303 tpOld = recSimCollOld[trackOld];
304 if (!tpOld.empty()) {
305 LogTrace(
"TestOutliers") <<
"no match: old associated and out lost! old has #hits=" 307 if (tpOld.begin()->second > 0.5)
311 LogTrace(
"TestOutliers") <<
"...skip to next old track";
317 <<
" trackOld->seedRef()=" << trackOld->
seedRef().
get();
318 bool oldAssoc = recSimCollOld.
find(trackOld) != recSimCollOld.
end();
319 bool outAssoc = recSimCollOut.
find(trackOut) != recSimCollOut.
end();
320 LogTrace(
"TestOutliers") <<
"outAssoc=" << outAssoc <<
" oldAssoc=" << oldAssoc;
348 std::vector<unsigned int> tpids;
349 std::vector<std::pair<TrackingParticleRef, double> > tpOut;
350 std::vector<pair<TrackingParticleRef, double> > tpOld;
354 tpOut = recSimCollOut[trackOut];
355 if (!tpOut.empty()) {
357 tprOut = tpOut.begin()->first;
358 fracOut = tpOut.begin()->second;
360 tpids.push_back(g4T->trackId());
366 tpOld = recSimCollOld[trackOld];
367 if (!tpOld.empty()) {
368 tprOld = tpOld.begin()->first;
374 tpids.push_back(g4T->trackId());
380 if (tprOut.
get() !=
nullptr || tprOld.
get() !=
nullptr) {
382 tpr = tprOut.
get() !=
nullptr ? tprOut : tprOld;
384 const SimTrack *assocTrack = &(*tpr->g4Track_begin());
397 <<
"Out->pt=" << trackOut->
pt() <<
" Old->pt=" << trackOld->
pt() <<
" tp->pt=" 398 <<
sqrt(tpr->momentum().perp2())
406 double PtPullOut = (trackOut->
pt() -
sqrt(tpr->momentum().perp2())) / trackOut->
ptError();
407 double PtPullOld = (trackOld->
pt() -
sqrt(tpr->momentum().perp2())) / trackOld->
ptError();
413 GlobalPoint(tpr->vertex().x(), tpr->vertex().y(), tpr->vertex().z()),
419 tscpBuilder(ftsAtProduction,
GlobalPoint(0, 0, 0));
424 double qoverpSim = tsAtClosestApproach.
charge() /
p.mag();
425 double lambdaSim =
M_PI / 2 -
p.theta();
426 double phiSim =
p.phi();
427 double dxySim = (-
v.x() *
sin(
p.phi()) +
v.y() *
cos(
p.phi()));
428 double dszSim =
v.z() *
p.perp() /
p.mag() - (
v.x() *
p.x() +
v.y() *
p.y()) /
p.perp() *
p.z() /
p.mag();
429 double d0Sim = -dxySim;
430 double dzSim = dszSim *
p.mag() /
p.perp();
433 double qoverpPullOut = (trackOut->
qoverp() - qoverpSim) / trackOut->
qoverpError();
434 double qoverpPullOld = (trackOld->
qoverp() - qoverpSim) / trackOld->
qoverpError();
435 double lambdaPullOut = (trackOut->
lambda() - lambdaSim) / trackOut->
thetaError();
436 double lambdaPullOld = (trackOld->
lambda() - lambdaSim) / trackOld->
thetaError();
437 double phi0PullOut = (trackOut->
phi() - phiSim) / trackOut->
phiError();
438 double phi0PullOld = (trackOld->
phi() - phiSim) / trackOld->
phiError();
439 double d0PullOut = (trackOut->
d0() - d0Sim) / trackOut->
d0Error();
440 double d0PullOld = (trackOld->
d0() - d0Sim) / trackOld->
d0Error();
441 double dzPullOut = (trackOut->
dz() - dzSim) / trackOut->
dzError();
442 double dzPullOld = (trackOld->
dz() - dzSim) / trackOld->
dzError();
460 if (tprOut.
get() !=
nullptr && tprOld.
get() ==
nullptr) {
461 if (!tpOld.empty() && tpOld.begin()->second <= 0.5) {
472 }
else if (tprOut.
get() ==
nullptr && tprOld.
get() !=
nullptr) {
474 <<
" and fraction=" << tpOld.begin()->second;
475 if (tpOld.begin()->second > 0.5) {
481 if (fabs(PtPullOut) < fabs(PtPullOld))
490 LogTrace(
"TestOutliers") <<
"track old";
492 LogTrace(
"TestOutliers") << (*itOld)->isValid() <<
" " << (*itOld)->geographicalId().rawId();
494 LogTrace(
"TestOutliers") <<
"track out";
496 LogTrace(
"TestOutliers") << (*itOut)->isValid() <<
" " << (*itOut)->geographicalId().rawId();
500 vector<pair<int, trackingRecHit_iterator> > gainedlostoutliers;
504 if ((*itOut)->isValid()) {
506 if ((*itOld)->geographicalId().rawId() == (*itOut)->geographicalId().rawId())
510 gainedlostoutliers.push_back(pair<int, trackingRecHit_iterator>(1, itOut));
511 LogTrace(
"TestOutliers") <<
"broken trajectory during old fit... gained hit " 512 << (*itOut)->geographicalId().rawId();
520 bool outlier =
false;
524 if ((*itOld)->geographicalId().rawId() == (*itOut)->geographicalId().rawId()) {
526 if ((*itOld)->isValid() && !(*itOut)->isValid() &&
527 (*itOld)->geographicalId().rawId() == (*itOut)->geographicalId().rawId()) {
528 LogTrace(
"TestOutliers") << (*itOld)->isValid() <<
" " << (*itOut)->isValid() <<
" " 529 << (*itOld)->geographicalId().rawId() <<
" " 530 << (*itOut)->geographicalId().rawId();
536 gainedlostoutliers.push_back(pair<int, trackingRecHit_iterator>(2, itOld));
540 gainedlostoutliers.push_back(pair<int, trackingRecHit_iterator>(3, itOld));
543 for (
std::vector<pair<int, trackingRecHit_iterator> >::iterator it = gainedlostoutliers.begin();
544 it != gainedlostoutliers.end();
546 LogTrace(
"TestOutliers") <<
"type of processed hit:" << it->first;
550 bool outlier =
false;
553 else if (it->first == 2)
555 else if (it->first == 3)
558 if (outlier || lost || gained) {
561 if (lost && (*itHit)->isValid() ==
false) {
563 LogTrace(
"TestOutliers") <<
"lost invalid";
565 }
else if (gained && (*itHit)->isValid() ==
false) {
567 LogTrace(
"TestOutliers") <<
"gained invalid";
573 std::vector<SimHitIdpr> simTrackIds =
hitAssociator.associateHitId(**itHit);
574 bool goodhit =
false;
575 for (
size_t j = 0;
j < simTrackIds.size();
j++) {
576 for (
size_t jj = 0;
jj < tpids.size();
jj++) {
577 if (simTrackIds[
j].
first == tpids[
jj])
587 if (dynamic_cast<const SiPixelRecHit *>(&**itHit)) {
588 LogTrace(
"TestOutliers") <<
"SiPixelRecHit";
589 clustersize = ((
const SiPixelRecHit *)(&**itHit))->cluster()->size();
591 }
else if (dynamic_cast<const SiStripRecHit2D *>(&**itHit)) {
592 LogTrace(
"TestOutliers") <<
"SiStripRecHit2D";
593 clustersize = ((
const SiStripRecHit2D *)(&**itHit))->cluster()->amplitudes().size();
595 }
else if (dynamic_cast<const SiStripMatchedRecHit2D *>(&**itHit)) {
596 LogTrace(
"TestOutliers") <<
"SiStripMatchedRecHit2D";
599 if (clsize1 > clsize2)
600 clustersize = clsize1;
602 clustersize = clsize2;
604 }
else if (dynamic_cast<const ProjectedSiStripRecHit2D *>(&**itHit)) {
605 LogTrace(
"TestOutliers") <<
"ProjectedSiStripRecHit2D";
612 int subdetId = (*itHit)->geographicalId().subdetId();
613 DetId id = (*itHit)->geographicalId();
614 int layerId = tTopo->
layer(
id);
615 layerval = subdetId * 10 + layerId;
633 double energyLoss_ = 0.;
634 unsigned int monoId = 0;
635 std::vector<double> energyLossM;
636 std::vector<double> energyLossS;
637 std::vector<PSimHit> assSimHits =
hitAssociator.associateHit(**itHit);
638 if (assSimHits.empty())
641 std::vector<unsigned int> trackIds;
645 for (std::vector<PSimHit>::const_iterator
m = assSimHits.begin();
m < assSimHits.end();
m++) {
648 unsigned int tId =
m->trackId();
649 if (
find(trackIds.begin(), trackIds.end(), tId) == trackIds.end())
650 trackIds.push_back(tId);
651 LogTrace(
"TestOutliers") <<
"id=" << tId;
652 if (
m->energyLoss() > energyLoss_) {
654 energyLoss_ =
m->energyLoss();
656 if (hittypeval == 3) {
658 monoId =
m->detUnitId();
659 if (monoId ==
m->detUnitId()) {
660 energyLossM.push_back(
m->energyLoss());
662 energyLossS.push_back(
m->energyLoss());
666 energyLossM.push_back(
m->energyLoss());
669 unsigned int nIds = trackIds.size();
673 posxy->Fill(fabs(gpos.
x()), fabs(gpos.
y()));
674 poszr->Fill(fabs(gpos.
z()),
sqrt(gpos.
x() * gpos.
x() + gpos.
y() * gpos.
y()));
681 bool ioniOnly =
true;
682 unsigned int idc = 0;
683 for (
size_t jj = 0;
jj < tpids.size();
jj++) {
684 idc +=
std::count(trackIds.begin(), trackIds.end(), tpids[
jj]);
686 if (idc == trackIds.size()) {
689 for (std::vector<PSimHit>::const_iterator
m = assSimHits.begin() + 1;
m < assSimHits.end();
m++) {
690 if ((
m->processType() != 7 &&
m->processType() != 8 &&
m->processType() != 9) &&
691 abs(
m->particleType()) != 11) {
696 if (ioniOnly && !shared) {
697 LogTrace(
"TestOutliers") <<
"delta";
703 if (clustersize >= 4) {
711 if (hittypeval == 1 && clustersize >= 4)
713 if (hittypeval == 1 && clustersize < 4)
715 if (hittypeval == 2 && clustersize >= 4)
717 if (hittypeval == 2 && clustersize < 4)
719 if (hittypeval == 3 && clustersize >= 4)
721 if (hittypeval == 3 && clustersize < 4)
723 if (hittypeval == 4 && clustersize >= 4)
725 if (hittypeval == 4 && clustersize < 4)
748 if (hittypeval != 3) {
749 if (energyLossM.size() > 1) {
750 sort(energyLossM.begin(), energyLossM.end(), greater<double>());
755 if (energyLossM.size() > 1 && energyLossS.size() <= 1) {
756 sort(energyLossM.begin(), energyLossM.end(), greater<double>());
758 }
else if (energyLossS.size() > 1 && energyLossM.size() <= 1) {
759 sort(energyLossS.begin(), energyLossS.end(), greater<double>());
761 }
else if (energyLossS.size() > 1 && energyLossM.size() > 1) {
762 sort(energyLossM.begin(), energyLossM.end(), greater<double>());
763 sort(energyLossS.begin(), energyLossS.end(), greater<double>());
764 energyLossM[1] / energyLossM[0] > energyLossS[1] / energyLossS[0]
770 LogTrace(
"TestOutliers") <<
"before merged";
773 LogTrace(
"TestOutliers") <<
"assSimHits.size()=" << assSimHits.size();
774 if ((assSimHits.size() > 1 &&
tmp ==
nullptr) || (assSimHits.size() > 2 &&
tmp !=
nullptr)) {
781 for (std::vector<PSimHit>::const_iterator
m = assSimHits.begin();
m < assSimHits.end();
m++) {
782 unsigned int tId =
m->trackId();
783 LogTrace(
"TestOutliers") <<
"component with id=" << tId <<
" eLoss=" <<
m->energyLoss()
784 <<
" proc=" <<
m->processType() <<
" part=" <<
m->particleType();
785 if (
find(tpids.begin(), tpids.end(), tId) == tpids.end())
787 if (
m->processType() == 2) {
791 .
transform((*itHit)->localPositionError(),
792 theG->
idToDet((*itHit)->geographicalId())->surface())
798 ROOT::Math::SVector<double, 3>
delta;
805 LogTrace(
"TestOutliers") <<
"hit pull=" << mpull;
809 LogTrace(
"TestOutliers") <<
"end merged";
819 if ((hittypeval != 3 && assSimHits.size() < 2) || (hittypeval == 3 && assSimHits.size() < 3)) {
828 LogTrace(
"TestOutliers") <<
"out good";
831 LogTrace(
"TestOutliers") <<
"lost good";
834 LogTrace(
"TestOutliers") <<
"gained good";
841 if (ioniOnly && !shared) {
847 }
else if (!ioniOnly && !shared) {
860 LogTrace(
"TestOutliers") <<
"out merged, ioniOnly=" << ioniOnly <<
" shared=" << shared;
862 if (ioniOnly && !shared)
864 else if (!ioniOnly && !shared)
868 LogTrace(
"TestOutliers") <<
"lost merged, ioniOnly=" << ioniOnly <<
" shared=" << shared;
870 if (ioniOnly && !shared)
872 else if (!ioniOnly && !shared)
876 LogTrace(
"TestOutliers") <<
"gained merged, ioniOnly=" << ioniOnly <<
" shared=" << shared;
878 LogTrace(
"TestOutliers") <<
"merged, ioniOnly=" << ioniOnly <<
" shared=" << shared;
894 LogTrace(
"TestOutliers") <<
"out bad";
897 LogTrace(
"TestOutliers") <<
"lost bad";
900 LogTrace(
"TestOutliers") <<
"gained bad";
912 <<
"Out->pt=" << trackOut->
pt() <<
" Old->pt=" << trackOld->
pt() <<
" tp->pt=" 913 <<
sqrt(tpr->momentum().perp2())
919 LogTrace(
"TestOutliers") <<
"track with gained hits";
925 LogTrace(
"TestOutliers") <<
"end track old #" <<
j;
928 for (
unsigned int k = 0;
k < tracksOut->size(); ++
k) {
929 if (
find(outused.begin(), outused.end(),
k) == outused.end()) {
931 bool outAssoc = recSimCollOut.
find(trackOut) != recSimCollOut.
end();
942 const bool oldAddDir = TH1::AddDirectoryStatus();
943 TH1::AddDirectory(
true);
944 file =
new TFile(
out.c_str(),
"recreate");
945 histoPtOut =
new TH1F(
"histoPtOut",
"histoPtOut", 100, -10, 10);
946 histoPtOld =
new TH1F(
"histoPtOld",
"histoPtOld", 100, -10, 10);
947 histoQoverpOut =
new TH1F(
"histoQoverpOut",
"histoQoverpOut", 250, -25, 25);
948 histoQoverpOld =
new TH1F(
"histoQoverpOld",
"histoQoverpOld", 250, -25, 25);
949 histoPhiOut =
new TH1F(
"histoPhiOut",
"histoPhiOut", 250, -25, 25);
950 histoPhiOld =
new TH1F(
"histoPhiOld",
"histoPhiOld", 250, -25, 25);
951 histoD0Out =
new TH1F(
"histoD0Out",
"histoD0Out", 250, -25, 25);
952 histoD0Old =
new TH1F(
"histoD0Old",
"histoD0Old", 250, -25, 25);
953 histoDzOut =
new TH1F(
"histoDzOut",
"histoDzOut", 250, -25, 25);
954 histoDzOld =
new TH1F(
"histoDzOld",
"histoDzOld", 250, -25, 25);
955 histoLambdaOut =
new TH1F(
"histoLambdaOut",
"histoLambdaOut", 250, -25, 25);
956 histoLambdaOld =
new TH1F(
"histoLambdaOld",
"histoLambdaOld", 250, -25, 25);
957 deltahits =
new TH1F(
"deltahits",
"deltahits", 80, -40, 40);
958 deltahitsOK =
new TH1F(
"deltahitsOK",
"deltahitsOK", 20, 0, 20);
959 deltahitsNO =
new TH1F(
"deltahitsNO",
"deltahitsNO", 20, 0, 20);
960 okcutsOut =
new TH1F(
"okcutsOut",
"okcutsOut", 2, -0.5, 1.5);
961 okcutsOld =
new TH1F(
"okcutsOld",
"okcutsOld", 2, -0.5, 1.5);
962 tracks =
new TH1F(
"tracks_",
"tracks_", 2, -0.5, 1.5);
963 goodbadhits =
new TH1F(
"goodbadhits",
"goodbadhits", 2, -0.5, 1.5);
964 process =
new TH1F(
"process",
"process", 20, -0.5, 19.5);
965 goodcluster =
new TH1F(
"goodcluster",
"goodcluster", 40, -0.5, 39.5);
966 goodprocess =
new TH1F(
"goodprocess",
"goodprocess", 20, -0.5, 19.5);
967 badcluster =
new TH1F(
"badcluster",
"badcluster", 40, -0.5, 39.5);
968 badprocess =
new TH1F(
"badprocess",
"badprocess", 20, -0.5, 19.5);
969 goodhittype =
new TH1F(
"goodhittype",
"goodhittype", 5, -0.5, 4.5);
970 goodlayer =
new TH1F(
"goodlayer",
"goodlayer", 70, -0.5, 69.5);
971 goodhittype_clgteq4 =
new TH1F(
"goodhittype_clgteq4",
"goodhittype_clgteq4", 5, -0.5, 4.5);
972 goodlayer_clgteq4 =
new TH1F(
"goodlayer_clgteq4",
"goodlayer_clgteq4", 70, -0.5, 69.5);
973 goodhittype_cllt4 =
new TH1F(
"goodhittype_cllt4",
"goodhittype_cllt4", 5, -0.5, 4.5);
974 goodlayer_cllt4 =
new TH1F(
"goodlayer_cllt4",
"goodlayer_cllt4", 70, -0.5, 69.5);
975 badhittype =
new TH1F(
"badhittype",
"badhittype", 5, -0.5, 4.5);
976 badlayer =
new TH1F(
"badlayer",
"badlayer", 70, -0.5, 69.5);
977 posxy =
new TH2F(
"posxy",
"posxy", 1200, 0, 120, 1200, 0, 120);
978 poszr =
new TH2F(
"poszr",
"poszr", 3000, 0, 300, 1200, 0, 120);
987 goodpix_clustersize =
new TH1F(
"goodpix_clustersize",
"goodpix_clustersize", 40, -0.5, 39.5);
988 goodst1_clustersize =
new TH1F(
"goodst1_clustersize",
"goodst1_clustersize", 40, -0.5, 39.5);
989 goodst2_clustersize =
new TH1F(
"goodst2_clustersize",
"goodst2_clustersize", 40, -0.5, 39.5);
990 goodprj_clustersize =
new TH1F(
"goodprj_clustersize",
"goodprj_clustersize", 40, -0.5, 39.5);
991 goodpix_simvecsize =
new TH1F(
"goodpix_simvecsize",
"goodpix_simvecsize", 40, -0.5, 39.5);
992 goodst1_simvecsize =
new TH1F(
"goodst1_simvecsize",
"goodst1_simvecsize", 40, -0.5, 39.5);
993 goodst2_simvecsize =
new TH1F(
"goodst2_simvecsize",
"goodst2_simvecsize", 40, -0.5, 39.5);
994 goodprj_simvecsize =
new TH1F(
"goodprj_simvecsize",
"goodprj_simvecsize", 40, -0.5, 39.5);
998 goodlayer_simvecbig =
new TH1F(
"goodlayer_simvecbig",
"goodlayer_simvecbig", 70, -0.5, 69.5);
999 goodbadmerged =
new TH1F(
"goodbadmerged",
"goodbadmerged", 5, 0.5, 5.5);
1000 goodbadmergedLost =
new TH1F(
"goodbadmergedLost",
"goodbadmergedLost", 5, 0.5, 5.5);
1001 goodbadmergedGained =
new TH1F(
"goodbadmergedGained",
"goodbadmergedGained", 5, 0.5, 5.5);
1002 energyLoss =
new TH1F(
"energyLoss",
"energyLoss", 1000, 0, 0.1);
1003 energyLossMax =
new TH1F(
"energyLossMax",
"energyLossMax", 1000, 0, 0.1);
1004 energyLossRatio =
new TH1F(
"energyLossRatio",
"energyLossRatio", 100, 0, 1);
1005 nOfTrackIds =
new TH1F(
"nOfTrackIds",
"nOfTrackIds", 10, 0, 10);
1006 mergedPull =
new TH1F(
"mergedPull",
"mergedPull", 100, 0, 10);
1007 mergedlayer =
new TH1F(
"mergedlayer",
"mergedlayer", 70, -0.5, 69.5);
1008 mergedhittype =
new TH1F(
"mergedhittype",
"mergedhittype", 5, -0.5, 4.5);
1009 mergedcluster =
new TH1F(
"mergedcluster",
"mergedcluster", 40, -0.5, 39.5);
1011 deltahitsAssocLost =
new TH1F(
"deltahitsAssocLost",
"deltahitsAssocLost", 80, -40, 40);
1012 hitsPerTrackLost =
new TH1F(
"hitsPerTrackLost",
"hitsPerTrackLost", 40, -0.5, 39.5);
1014 hitsPerTrackGained =
new TH1F(
"hitsPerTrackGained",
"hitsPerTrackGained", 40, -0.5, 39.5);
1016 sizeOut =
new TH1F(
"sizeOut",
"sizeOut", 900, -0.5, 899.5);
1017 sizeOld =
new TH1F(
"sizeOld",
"sizeOld", 900, -0.5, 899.5);
1018 sizeOutT =
new TH1F(
"sizeOutT",
"sizeOutT", 900, -0.5, 899.5);
1019 sizeOldT =
new TH1F(
"sizeOldT",
"sizeOldT", 900, -0.5, 899.5);
1020 countOutA =
new TH1F(
"countOutA",
"countOutA", 2, 0, 2);
1021 countOutT =
new TH1F(
"countOutT",
"countOutT", 2, 0, 2);
1022 countOldT =
new TH1F(
"countOldT",
"countOldT", 2, 0, 2);
1023 gainedhits =
new TH1F(
"gainedhits",
"gainedhits", 2, 0, 2);
1024 gainedhits2 =
new TH1F(
"gainedhits2",
"gainedhits2", 30, -0.5, 29.5);
1025 probXgood =
new TH1F(
"probXgood",
"probXgood", 110, 0, 1.1);
1026 probXbad =
new TH1F(
"probXbad",
"probXbad", 110, 0, 1.1);
1027 probXdelta =
new TH1F(
"probXdelta",
"probXdelta", 110, 0, 1.1);
1028 probXshared =
new TH1F(
"probXshared",
"probXshared", 110, 0, 1.1);
1029 probXnoshare =
new TH1F(
"probXnoshare",
"probXnoshare", 110, 0, 1.1);
1030 probYgood =
new TH1F(
"probYgood",
"probYgood", 110, 0, 1.1);
1031 probYbad =
new TH1F(
"probYbad",
"probYbad", 110, 0, 1.1);
1032 probYdelta =
new TH1F(
"probYdelta",
"probYdelta", 110, 0, 1.1);
1033 probYshared =
new TH1F(
"probYshared",
"probYshared", 110, 0, 1.1);
1034 probYnoshare =
new TH1F(
"probYnoshare",
"probYnoshare", 110, 0, 1.1);
1035 TH1::AddDirectory(oldAddDir);
1039 LogTrace(
"TestOutliers") <<
"TestOutliers::endJob";
1041 LogTrace(
"TestOutliers") <<
"outfile written";
1043 LogTrace(
"TestOutliers") <<
"oufile closed";
1044 LogTrace(
"TestOutliers") <<
"exiting TestOutliers::endJob";
double qoverp() const
q / p
TH1F * hitsPerTrackGained
edm::EDGetTokenT< reco::TrackToTrackingParticleAssociator > theAssociatorOutToken
double lambda() const
Lambda angle.
TH1F * goodprj_clustersize
reco::RecoToSimCollection associateRecoToSim(const edm::Handle< edm::View< reco::Track >> &tCH, const edm::Handle< TrackingParticleCollection > &tPCH) const
double qoverpError() const
error on signed transverse curvature
TH1F * goodpixlt4_simvecsize
double ptError() const
error on Pt (set to 1000 TeV if charge==0 for safety)
unsigned short numberOfValidHits() const
number of valid hits found
float probabilityX() const
TH1F * hitsPerTrackAssocLost
TH1F * goodst1_simvecsize
TH1F * goodst2lt4_simvecsize
TH1F * goodst1gteq4_simvecsize
TH1F * goodprj_simvecsize
Sin< T >::type sin(const T &t)
T const * product() const
Global3DPoint GlobalPoint
std::vector< Track > TrackCollection
collection of Tracks
double thetaError() const
error on theta
void endRun(edm::Run const &run, const edm::EventSetup &) override
const edm::RefToBase< TrajectorySeed > & seedRef() const
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > theGToken
TH1F * hitsPerTrackAssocGained
const math::XYZTLorentzVectorD & momentum() const
const_iterator find(const key_type &k) const
find element with specified reference key
TH1F * goodst2_simvecsize
unsigned int layer(const DetId &id) const
edm::EDGetTokenT< reco::TrackToTrackingParticleAssociator > theAssociatorOldToken
double dsz() const
dsz parameter (THIS IS NOT the SZ impact parameter to (0,0,0) if refPoint is far from (0...
const_iterator end() const
last iterator over the map (read only)
GlobalPoint position() const
size_type size() const
map size
double pt() const
track transverse momentum
TH1F * goodhittype_simvecsmall
int charge() const
track electric charge
double dz() const
dz parameter (= dsz/cos(lambda)). This is the track z0 w.r.t (0,0,0) only if the refPoint is close to...
T const * product() const
TH1F * goodpix_clustersize
TH1F * goodprjgteq4_simvecsize
TH1F * goodst1_clustersize
TH1F * goodpixgteq4_simvecsize
double dzError() const
error on dz
TH1F * goodprjlt4_simvecsize
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > theTopoToken
unsigned short processType() const
TH1F * goodpix_simvecsize
Cos< T >::type cos(const T &t)
GlobalVector momentum() const
Abs< T >::type abs(const T &t)
TH1F * goodlayer_simvecsmall
TH1F * goodhittype_simvecbig
trackingRecHit_iterator recHitsEnd() const
Iterator to last hit on the track.
double phi() const
azimuthal angle of momentum vector
#define DEFINE_FWK_MODULE(type)
TestOutliers(const edm::ParameterSet &)
edm::InputTag trackTagsOut_
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
trackingRecHit_iterator recHitsBegin() const
Iterator to first hit on the track.
const TrackerGeomDet * idToDet(DetId) const override
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
std::vector< SimTrack >::const_iterator g4t_iterator
double eta() const
pseudorapidity of momentum vector
TH1F * goodst1lt4_simvecsize
TH1F * goodhittype_clgteq4
double d0() const
dxy parameter in perigee convention (d0 = -dxy)
TH1F * deltahitsAssocGained
void beginRun(edm::Run const &run, const edm::EventSetup &) override
double normalizedChi2() const
chi-squared divided by n.d.o.f. (or chi-squared * 1e6 if n.d.o.f. is zero)
const FreeTrajectoryState & theState() const
TH1F * goodst2_clustersize
float probabilityY() const
TrackerHitAssociator::Config trackerHitAssociatorConfig_
TH1F * goodst2gteq4_simvecsize
edm::ESHandle< TrackerGeometry > theG
T const * get() const
Returns C++ pointer to the item.
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > AlgebraicSymMatrix33
void analyze(const edm::Event &, const edm::EventSetup &) override
TH1F * deltahitsAssocLost
TH1F * goodlayer_simvecbig
edm::InputTag trackTagsOld_
TrackCharge charge() const
double d0Error() const
error on d0
double phiError() const
error on phi
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > theMFToken
value_type const * get() const
Global3DVector GlobalVector
TH1F * goodbadmergedGained
double dxy() const
dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close t...