31 #include <unordered_set>
45 bool trackSelected(
unsigned char mask,
unsigned char qual) {
46 return mask & 1<<qual;
53 parametersDefinerIsCosmic_(parametersDefiner ==
"CosmicParametersDefinerForTP"),
54 calculateDrSingleCollection_(pset.getUntrackedParameter<bool>(
"calculateDrSingleCollection")),
55 doPlotsOnlyForTruePV_(pset.getUntrackedParameter<bool>(
"doPlotsOnlyForTruePV")),
56 doSummaryPlots_(pset.getUntrackedParameter<bool>(
"doSummaryPlots")),
57 doSimPlots_(pset.getUntrackedParameter<bool>(
"doSimPlots")),
58 doSimTrackPlots_(pset.getUntrackedParameter<bool>(
"doSimTrackPlots")),
59 doRecoTrackPlots_(pset.getUntrackedParameter<bool>(
"doRecoTrackPlots")),
60 dodEdxPlots_(pset.getUntrackedParameter<bool>(
"dodEdxPlots")),
61 doPVAssociationPlots_(pset.getUntrackedParameter<bool>(
"doPVAssociationPlots")),
62 doSeedPlots_(pset.getUntrackedParameter<bool>(
"doSeedPlots")),
63 doMVAPlots_(pset.getUntrackedParameter<bool>(
"doMVAPlots")),
64 simPVMaxZ_(pset.getUntrackedParameter<double>(
"simPVMaxZ"))
90 for(
size_t iIter=0; iIter<
labelToken.size(); ++iIter) {
93 if(mvaPSet.exists(labels.
module)) {
96 return std::make_tuple(consumes<MVACollection>(
edm::InputTag(tag,
"MVAValues")),
97 consumes<QualityMaskCollection>(
edm::InputTag(tag,
"QualityMasks")));
104 pset.getParameter<
double>(
"minRapidityTP"),
105 pset.getParameter<
double>(
"maxRapidityTP"),
106 pset.getParameter<
double>(
"tipTP"),
107 pset.getParameter<
double>(
"lipTP"),
108 pset.getParameter<
int>(
"minHitTP"),
109 pset.getParameter<
bool>(
"signalOnlyTP"),
110 pset.getParameter<
bool>(
"intimeOnlyTP"),
111 pset.getParameter<
bool>(
"chargedOnlyTP"),
112 pset.getParameter<
bool>(
"stableOnlyTP"),
113 pset.getParameter<std::vector<int> >(
"pdgIdTP"));
116 pset.getParameter<
double>(
"minRapidityTP"),
117 pset.getParameter<
double>(
"maxRapidityTP"),
118 pset.getParameter<
double>(
"tipTP"),
119 pset.getParameter<
double>(
"lipTP"),
120 pset.getParameter<
int>(
"minHitTP"),
121 pset.getParameter<
bool>(
"chargedOnlyTP"),
122 pset.getParameter<std::vector<int> >(
"pdgIdTP"));
127 psetVsPhi.getParameter<
double>(
"minRapidity"),
128 psetVsPhi.getParameter<
double>(
"maxRapidity"),
129 psetVsPhi.getParameter<
double>(
"tip"),
130 psetVsPhi.getParameter<
double>(
"lip"),
131 psetVsPhi.getParameter<
int>(
"minHit"),
132 psetVsPhi.getParameter<
bool>(
"signalOnly"),
133 psetVsPhi.getParameter<
bool>(
"intimeOnly"),
134 psetVsPhi.getParameter<
bool>(
"chargedOnly"),
135 psetVsPhi.getParameter<
bool>(
"stableOnly"),
136 psetVsPhi.getParameter<std::vector<int> >(
"pdgId"));
139 psetVsPhi.getParameter<
double>(
"minRapidity"),
140 psetVsPhi.getParameter<
double>(
"maxRapidity"),
141 psetVsPhi.getParameter<
double>(
"tip"),
142 psetVsPhi.getParameter<
double>(
"lip"),
143 psetVsPhi.getParameter<
int>(
"minHit"),
144 psetVsPhi.getParameter<
bool>(
"signalOnly"),
145 psetVsPhi.getParameter<
bool>(
"intimeOnly"),
146 psetVsPhi.getParameter<
bool>(
"chargedOnly"),
147 psetVsPhi.getParameter<
bool>(
"stableOnly"),
148 psetVsPhi.getParameter<std::vector<int> >(
"pdgId"));
150 useGsf =
pset.getParameter<
bool>(
"useGsf");
152 _simHitTpMapTag = mayConsume<SimHitTPAssociationProducer::SimHitTPAssociationList>(
pset.getParameter<
edm::InputTag>(
"simHitTpMapTag"));
154 if(calculateDrSingleCollection_) {
155 labelTokenForDrCalculation = consumes<edm::View<reco::Track> >(
pset.getParameter<
edm::InputTag>(
"trackCollectionForDrCalculation"));
159 for (
auto const&
src: associators) {
160 associatorTokens.push_back(consumes<reco::TrackToTrackingParticleAssociator>(
src));
163 for (
auto const&
src: associators) {
164 associatormapStRs.push_back(consumes<reco::SimToRecoCollection>(
src));
165 associatormapRtSs.push_back(consumes<reco::RecoToSimCollection>(
src));
176 const auto minColl = -0.5;
177 const auto maxColl =
label.size()-0.5;
178 const auto nintColl =
label.size();
181 TH1 *
h =
me->getTH1();
182 for(
size_t i=0;
i<
label.size(); ++
i) {
183 h->GetXaxis()->SetBinLabel(
i+1,
label[
i].
label().c_str());
199 for (
unsigned int ww=0;ww<associators.size();ww++){
206 h_assoc_coll.push_back(binLabels( ibook.
book1D(
"num_assoc(simToReco)_coll",
"N of associated (simToReco) tracks vs track collection", nintColl, minColl, maxColl) ));
207 h_simul_coll.push_back(binLabels( ibook.
book1D(
"num_simul_coll",
"N of simulated tracks vs track collection", nintColl, minColl, maxColl) ));
209 h_assoc_coll_allPt.push_back(binLabels( ibook.
book1D(
"num_assoc(simToReco)_coll_allPt",
"N of associated (simToReco) tracks vs track collection", nintColl, minColl, maxColl) ));
210 h_simul_coll_allPt.push_back(binLabels( ibook.
book1D(
"num_simul_coll_allPt",
"N of simulated tracks vs track collection", nintColl, minColl, maxColl) ));
214 h_reco_coll.push_back(binLabels( ibook.
book1D(
"num_reco_coll",
"N of reco track vs track collection", nintColl, minColl, maxColl) ));
215 h_assoc2_coll.push_back(binLabels( ibook.
book1D(
"num_assoc(recoToSim)_coll",
"N of associated (recoToSim) tracks vs track collection", nintColl, minColl, maxColl) ));
216 h_looper_coll.push_back(binLabels( ibook.
book1D(
"num_duplicate_coll",
"N of associated (recoToSim) looper tracks vs track collection", nintColl, minColl, maxColl) ));
217 h_pileup_coll.push_back(binLabels( ibook.
book1D(
"num_pileup_coll",
"N of associated (recoToSim) pileup tracks vs track collection", nintColl, minColl, maxColl) ));
221 for (
unsigned int www=0;www<
label.size();www++){
228 dirName+=algo.
label()+
"_";
231 if (dirName.find(
"Tracks")<dirName.length()){
232 dirName.replace(dirName.find(
"Tracks"),6,
"");
234 string assoc= associators[ww].label();
235 if (assoc.find(
"Track")<assoc.length()){
236 assoc.replace(assoc.find(
"Track"),5,
"");
273 if(eff.
id() != fake.
id()) {
274 throw cms::Exception(
"Configuration") <<
"Efficiency and fake TrackingParticle (refs) point to different collections (eff " << eff.
id() <<
" fake " << fake.
id() <<
"). This is not supported. Efficiency TP set must be the same or a subset of the fake TP set.";
278 std::unordered_set<reco::RecoToSimCollection::index_type> fakeKeys;
279 for(
const auto& ref: fake) {
280 fakeKeys.insert(ref.key());
283 for(
const auto& ref: eff) {
284 if(fakeKeys.find(ref.key()) == fakeKeys.end()) {
285 throw cms::Exception(
"Configuration") <<
"Efficiency TrackingParticle " << ref.key() <<
" is not found from the set of fake TPs. This is not supported. The efficiency TP set must be the same or a subset of the fake TP set.";
292 using namespace reco;
294 LogDebug(
"TrackValidator") <<
"\n====================================================" <<
"\n"
295 <<
"Analyzing new event" <<
"\n"
296 <<
"====================================================\n" <<
"\n";
302 auto parametersDefinerTP = parametersDefinerTPHandle->clone();
320 if(!tp_effic_refvector) {
322 for(
size_t i=0,
size=TPCollectionHeff->size();
i<
size; ++
i) {
325 tmpTPeffPtr = &tmpTPeff;
329 tmpTPeffPtr = TPCollectionHeffRefVector.product();
334 for(
size_t i=0,
size=TPCollectionHfake->size();
i<
size; ++
i) {
337 tmpTPfakePtr = &tmpTPfake;
342 tmpTPfakePtr = TPCollectionHfakeRefVector.
product();
348 ensureEffIsSubsetOfFake(tPCeff, tPCfake);
354 parametersDefinerTP->initEvent(simHitsTPAssoc);
365 for(
size_t i=0;
i<tv.size(); ++
i) {
369 theSimPVPosition = &(simV.
position());
374 if(!theSimPVPosition)
return;
386 auto v_r2s = hvassociator->associateRecoToSim(hvertex, htv);
387 auto pvPtr = hvertex->refAt(0);
388 if(!(pvPtr->isFake() || pvPtr->ndof() < 0)) {
389 auto pvFound = v_r2s.find(pvPtr);
390 if(pvFound != v_r2s.end()) {
391 bool matchedToSimPV =
false;
392 for(
const auto& vertexRefQuality: pvFound->val) {
395 matchedToSimPV =
true;
401 thePVposition = &(pvPtr->position());
415 event.getByToken(
bsSrc,recoBeamSpotHandle);
422 for (
unsigned int puinfo_ite=0;puinfo_ite<(*puinfoH).size();++puinfo_ite){
423 if ((*puinfoH)[puinfo_ite].getBunchCrossing()==0){
424 puinfo=(*puinfoH)[puinfo_ite];
438 const auto& nLayers_tPCeff = *tpNLayersH;
441 const auto& nPixelLayers_tPCeff = *tpNLayersH;
444 const auto& nStripMonoAndStereoLayers_tPCeff = *tpNLayersH;
464 std::vector<size_t> selected_tPCeff;
465 std::vector<std::tuple<TrackingParticle::Vector, TrackingParticle::Point>> momVert_tPCeff;
466 selected_tPCeff.reserve(tPCeff.size());
467 momVert_tPCeff.reserve(tPCeff.size());
470 for(
size_t j=0;
j<tPCeff.size(); ++
j) {
476 histoProducerAlgo_->fill_generic_simTrack_histos(momentum, vertex, tpr->eventId().bunchCrossing());
478 if(tpr->eventId().bunchCrossing() == 0)
482 selected_tPCeff.push_back(
j);
483 momVert_tPCeff.emplace_back(momentum, vertex);
489 for(
auto const& tpr: tPCeff) {
503 selected_tPCeff.push_back(j);
506 momVert_tPCeff.emplace_back(momentum, vertex);
516 float dR_tPCeff[tPCeff.size()];
518 float etaL[tPCeff.size()], phiL[tPCeff.size()];
519 for(
size_t iTP: selected_tPCeff) {
521 auto const& tp2 = *(tPCeff[iTP]);
522 auto &&
p = tp2.momentum();
523 etaL[iTP] = etaFromXYZ(
p.x(),
p.y(),
p.z());
524 phiL[iTP] = atan2f(
p.y(),
p.x());
527 for (
auto const & tpr : tPCeff) {
528 auto const& tp = *tpr;
531 auto &&
p = tp.momentum();
532 float eta = etaFromXYZ(
p.x(),
p.y(),
p.z());
533 float phi = atan2f(
p.y(),
p.x());
534 for(
size_t iTP: selected_tPCeff) {
536 if (
i==iTP) {
continue;}
538 if (dR_tmp<dR) dR=dR_tmp;
553 std::vector<const edm::ValueMap<reco::DeDxData> *> v_dEdx;
559 v_dEdx.push_back(dEdx1Handle.
product());
560 v_dEdx.push_back(dEdx2Handle.
product());
563 std::vector<const MVACollection *> mvaCollections;
564 std::vector<const QualityMaskCollection *> qualityMaskCollections;
565 std::vector<float> mvaValues;
568 for (
unsigned int ww=0;ww<associators.size();ww++){
569 for (
unsigned int www=0;www<
label.size();www++,
w++){
583 LogTrace(
"TrackValidator") <<
"Analyzing "
584 <<
label[www] <<
" with "
585 << associators[ww] <<
"\n";
597 LogTrace(
"TrackValidator") <<
"Calling associateRecoToSim method" <<
"\n";
598 recSimCollL =
std::move(theAssociator->associateRecoToSim(trackRefs, tPCfake));
599 recSimCollP = &recSimCollL;
600 LogTrace(
"TrackValidator") <<
"Calling associateSimToReco method" <<
"\n";
607 simRecCollL =
std::move(theAssociator->associateSimToReco(trackRefs, tPCfake));
608 simRecCollP = &simRecCollL;
613 simRecCollP = simtorecoCollectionH.
product();
619 simRecCollP = &simRecCollL;
623 recSimCollP = recotosimCollectionH.
product();
629 recSimCollP = &recSimCollL;
640 event.getByToken(std::get<0>(tokenTpl), hmva);
641 event.getByToken(std::get<1>(tokenTpl), hqual);
643 mvaCollections.push_back(hmva.
product());
644 qualityMaskCollections.push_back(hqual.
product());
645 if(mvaCollections.back()->size() != trackCollection.
size()) {
646 throw cms::Exception(
"Configuration") <<
"Inconsistency in track collection and MVA sizes. Track collection " << www <<
" has " << trackCollection.
size() <<
" tracks, whereas the MVA " << (mvaCollections.size()-1) <<
" for it has " << mvaCollections.back()->size() <<
" entries. Double-check your configuration.";
648 if(qualityMaskCollections.back()->size() != trackCollection.
size()) {
649 throw cms::Exception(
"Configuration") <<
"Inconsistency in track collection and quality mask sizes. Track collection " << www <<
" has " << trackCollection.
size() <<
" tracks, whereas the quality mask " << (qualityMaskCollections.size()-1) <<
" for it has " << qualityMaskCollections.back()->size() <<
" entries. Double-check your configuration.";
660 LogTrace(
"TrackValidator") <<
"\n# of TrackingParticles: " << tPCeff.size() <<
"\n";
667 for(
size_t i=0;
i<selected_tPCeff.size(); ++
i) {
668 size_t iTP = selected_tPCeff[
i];
672 auto const& momVert = momVert_tPCeff[
i];
680 double dR=dR_tPCeff[iTP];
691 dxySim = (-vertex.x()*
sin(momentum.phi())+vertex.y()*
cos(momentum.phi()));
692 dzSim = vertex.z() - (vertex.x()*momentum.x()+vertex.y()*momentum.y())/
sqrt(momentum.perp2())
693 * momentum.z()/
sqrt(momentum.perp2());
695 if(theSimPVPosition) {
697 dxyPVSim = -(vertex.x()-theSimPVPosition->x())*
sin(momentum.phi()) + (vertex.y()-theSimPVPosition->y())*
cos(momentum.phi());
698 dzPVSim = vertex.z()-theSimPVPosition->z() - ( (vertex.x()-theSimPVPosition->x()) + (vertex.y()-theSimPVPosition->y()) )/
sqrt(momentum.perp2()) * momentum.z()/
sqrt(momentum.perp2());
704 momentumTP = std::get<TrackingParticle::Vector>(momVert);
705 vertexTP = std::get<TrackingParticle::Point>(momVert);
706 dxySim = (-vertexTP.x()*
sin(momentumTP.phi())+vertexTP.y()*
cos(momentumTP.phi()));
707 dzSim = vertexTP.z() - (vertexTP.x()*momentumTP.x()+vertexTP.y()*momentumTP.y())/
sqrt(momentumTP.perp2())
708 * momentumTP.z()/
sqrt(momentumTP.perp2());
731 unsigned int selectsLoose = mvaCollections.size();
732 unsigned int selectsHP = mvaCollections.size();
733 if(simRecColl.
find(tpr) != simRecColl.
end()){
734 auto const & rt = simRecColl[tpr];
738 matchedTrackPointer = rt.begin()->first.get();
739 LogTrace(
"TrackValidator") <<
"TrackingParticle #" << st
740 <<
" with pt=" <<
sqrt(momentumTP.perp2())
741 <<
" associated with quality:" << rt.begin()->second <<
"\n";
750 for(
size_t imva=0; imva<mvaCollections.size(); ++imva) {
751 const auto&
mva = *(mvaCollections[imva]);
752 const auto& qual = *(qualityMaskCollections[imva]);
754 auto iMatch = rt.begin();
755 float maxMva =
mva[iMatch->first.key()];
756 for(; iMatch!=rt.end(); ++iMatch) {
757 auto itrk = iMatch->first.key();
765 mvaValues.push_back(maxMva);
771 <<
"TrackingParticle #" << st
772 <<
" with pt,eta,phi: "
773 <<
sqrt(momentumTP.perp2()) <<
" , "
774 << momentumTP.eta() <<
" , "
775 << momentumTP.phi() <<
" , "
776 <<
" NOT associated to any reco::Track" <<
"\n";
783 int nSimLayers = nLayers_tPCeff[tpr];
784 int nSimPixelLayers = nPixelLayers_tPCeff[tpr];
785 int nSimStripMonoAndStereoLayers = nStripMonoAndStereoLayers_tPCeff[tpr];
786 histoProducerAlgo_->fill_recoAssociated_simTrack_histos(
w,tp,momentumTP,vertexTP,dxySim,dzSim,dxyPVSim,dzPVSim,nSimHits,nSimLayers,nSimPixelLayers,nSimStripMonoAndStereoLayers,matchedTrackPointer,puinfo.getPU_NumInteractions(),
dR, thePVposition, theSimPVPosition, mvaValues, selectsLoose, selectsHP);
789 if(matchedTrackPointer)
794 if (matchedTrackPointer) {
800 if (matchedTrackPointer) {
817 LogTrace(
"TrackValidator") <<
"\n# of reco::Tracks with "
818 <<
label[www].process()<<
":"
819 <<
label[www].label()<<
":"
820 <<
label[www].instance()
821 <<
": " << trackCollection.
size() <<
"\n";
826 int seed_fit_failed = 0;
831 trackCollectionDr = trackCollectionForDrCalculation.product();
833 float dR_trk[trackCollection.
size()];
835 float etaL[trackCollectionDr->
size()];
836 float phiL[trackCollectionDr->
size()];
837 bool validL[trackCollectionDr->
size()];
838 for (
auto const & track2 : *trackCollectionDr) {
839 auto &&
p = track2.momentum();
840 etaL[
i] = etaFromXYZ(
p.x(),
p.y(),
p.z());
841 phiL[
i] = atan2f(
p.y(),
p.x());
846 auto const & track = trackCollection[
i];
849 auto &&
p = track.momentum();
850 float eta = etaFromXYZ(
p.x(),
p.y(),
p.z());
851 float phi = atan2f(
p.y(),
p.x());
853 if(!validL[
j])
continue;
862 auto track = trackCollection.
refAt(i);
866 bool isSigSimMatched(
false);
867 bool isSimMatched(
false);
868 bool isChargeMatched(
true);
869 int numAssocRecoTracks = 0;
871 double sharedFraction = 0.;
873 auto tpFound = recSimColl.
find(track);
874 isSimMatched = tpFound != recSimColl.
end();
876 const auto& tp = tpFound->val;
877 nSimHits = tp[0].first->numberOfTrackerHits();
878 sharedFraction = tp[0].second;
879 if (tp[0].
first->charge() != track->charge()) isChargeMatched =
false;
880 if(simRecColl.
find(tp[0].first) != simRecColl.
end()) numAssocRecoTracks = simRecColl[tp[0].
first].
size();
882 for (
unsigned int tp_ite=0;tp_ite<tp.size();++tp_ite){
885 isSigSimMatched =
true;
890 LogTrace(
"TrackValidator") <<
"reco::Track #" << rT <<
" with pt=" << track->pt()
891 <<
" associated with quality:" << tp.begin()->second <<
"\n";
893 LogTrace(
"TrackValidator") <<
"reco::Track #" << rT <<
" with pt=" << track->pt()
894 <<
" NOT associated to any TrackingParticle" <<
"\n";
900 unsigned int selectsLoose = mvaCollections.size();
901 unsigned int selectsHP = mvaCollections.size();
903 for(
size_t imva=0; imva<mvaCollections.size(); ++imva) {
904 const auto&
mva = *(mvaCollections[imva]);
905 const auto& qual = *(qualityMaskCollections[imva]);
906 mvaValues.push_back(
mva[i]);
916 histoProducerAlgo_->fill_generic_recoTrack_histos(
w,*track, ttopo, bs.position(), thePVposition, theSimPVPosition, isSimMatched,isSigSimMatched, isChargeMatched, numAssocRecoTracks, puinfo.getPU_NumInteractions(), nSimHits, sharedFraction,
dR, mvaValues, selectsLoose, selectsHP);
923 if(numAssocRecoTracks>1) {
926 if(!isSigSimMatched) {
937 if (!isSimMatched)
continue;
961 int chargeTP = tpr->charge();
964 *track,bs.position());
972 mvaCollections.clear();
973 qualityMaskCollections.clear();
982 LogTrace(
"TrackValidator") <<
"Total Simulated: " << st <<
"\n"
983 <<
"Total Associated (simToReco): " << ats <<
"\n"
984 <<
"Total Reconstructed: " << rT <<
"\n"
985 <<
"Total Associated (recoToSim): " << at <<
"\n"
986 <<
"Total Fakes: " << rT-at <<
"\n";
T getParameter(std::string const &) const
edm::EDGetTokenT< edm::ValueMap< reco::DeDxData > > m_dEdx1Tag
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< SimHitTPAssociationProducer::SimHitTPAssociationList > _simHitTpMapTag
int event() const
get the contents of the subdetector field (should be protected?)
std::vector< MonitorElement * > h_reco_coll
bool trackFromSeedFitFailed(const reco::Track &track)
bool ignoremissingtkcollection_
std::vector< edm::EDGetTokenT< reco::SimToRecoCollection > > associatormapStRs
edm::EDGetTokenT< std::vector< PileupSummaryInfo > > label_pileupinfo
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
CosmicTrackingParticleSelector cosmictpSelector
Vector momentum() const
spatial momentum vector
const_iterator end() const
last iterator over the map (read only)
edm::EDGetTokenT< TrackingParticleCollection > label_tp_effic
std::vector< MonitorElement * > h_simul_coll
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< TrackingParticleRefVector > label_tp_fake_refvector
edm::Ref< GenParticleCollection > GenParticleRef
persistent reference to a GenParticle
Sin< T >::type sin(const T &t)
const_iterator find(const key_type &k) const
find element with specified reference key
std::vector< std::vector< std::tuple< edm::EDGetTokenT< MVACollection >, edm::EDGetTokenT< QualityMaskCollection > > > > mvaQualityCollectionTokens_
edm::EDGetTokenT< TrackingParticleRefVector > label_tp_effic_refvector
void analyze(const edm::Event &, const edm::EventSetup &) override
Method called once per event.
edm::EDGetTokenT< edm::ValueMap< unsigned int > > tpNStripStereoLayersToken_
edm::EDGetTokenT< edm::ValueMap< unsigned int > > tpNLayersToken_
edm::EDGetTokenT< TrackingVertexCollection > label_tv
T_AssociationMap associationMapFilterValues(const T_AssociationMap &map, const T_RefVector &valueRefs)
TrackingParticleSelector dRtpSelector
TrackingParticleSelector dRtpSelectorNoPtCut
auto vector_transform(std::vector< InputType > const &input, Function predicate) -> std::vector< typename std::remove_cv< typename std::remove_reference< decltype(predicate(input.front()))>::type >::type >
std::vector< edm::EDGetTokenT< reco::TrackToTrackingParticleAssociator > > associatorTokens
bool empty() const
Is the RefVector empty.
const bool doPlotsOnlyForTruePV_
edm::EDGetTokenT< reco::BeamSpot > bsSrc
RefToBase< value_type > refAt(size_type i) const
math::XYZPointD Point
point in the space
std::vector< MonitorElement * > h_looper_coll
edm::EDGetTokenT< edm::ValueMap< unsigned int > > tpNPixelLayersToken_
math::XYZTLorentzVectorD LorentzVector
std::vector< MonitorElement * > h_pileup_coll
SingleObjectSelector< TrackingParticleCollection,::TrackingParticleSelector > TrackingParticleSelector
std::vector< MonitorElement * > h_assoc_coll
std::vector< edm::InputTag > label
ProductID id() const
Accessor for product ID.
std::vector< edm::EDGetTokenT< reco::RecoToSimCollection > > associatormapRtSs
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
int bunchCrossing() const
get the detector field from this detid
TrackingParticleSelector tpSelector
Cos< T >::type cos(const T &t)
MonitorElement * book1D(Args &&...args)
Abs< T >::type abs(const T &t)
edm::EDGetTokenT< edm::View< reco::Track > > labelTokenForDrCalculation
math::XYZPoint Point
point in the space
void initEvent(edm::Handle< SimHitTPAssociationProducer::SimHitTPAssociationList > simHitsTPAssocToSet) const
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
MultiTrackValidator(const edm::ParameterSet &pset)
Constructor.
ObjectSelector< CosmicTrackingParticleSelector > CosmicTrackingParticleSelector
std::unique_ptr< MTVHistoProducerAlgoForTracker > histoProducerAlgo_
const bool doSummaryPlots_
std::string parametersDefiner
std::vector< MonitorElement * > h_assoc_coll_allPt
void setCurrentFolder(const std::string &fullpath)
T const * product() const
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Method called to book the DQM histograms.
edm::EDGetTokenT< reco::VertexToTrackingVertexAssociator > vertexAssociatorToken_
std::vector< TrackingVertex > TrackingVertexCollection
T1 deltaR2(T1 eta1, T2 phi1, T3 eta2, T4 phi2)
void labelsForToken(EDGetToken iToken, Labels &oLabels) const
const bool doPVAssociationPlots_
EncodedEventId eventId() const
Signal source, crossing number.
Point vertex() const
Parent vertex position.
edm::EDGetTokenT< edm::View< reco::Vertex > > recoVertexToken_
const EncodedEventId & eventId() const
const bool calculateDrSingleCollection_
std::vector< MonitorElement * > h_simul_coll_allPt
void push_back(const RefToBase< T > &)
std::vector< MonitorElement * > h_assoc2_coll
Monte Carlo truth information used for tracking validation.
bool isUninitialized() const
int numberOfTrackerHits() const
The number of hits in the tracker. Hits on overlaps in the same layer count separately.
std::vector< edm::EDGetTokenT< edm::View< reco::Track > > > labelToken
math::XYZVectorD Vector
point in the space
edm::EDGetTokenT< TrackingParticleCollection > label_tp_fake
tuple size
Write out results.
edm::Ref< TrackingParticleCollection > TrackingParticleRef
const bool doRecoTrackPlots_
edm::EDGetTokenT< edm::ValueMap< reco::DeDxData > > m_dEdx2Tag
virtual ~MultiTrackValidator()
Destructor.
const LorentzVector & position() const
const bool parametersDefinerIsCosmic_
const bool doSimTrackPlots_