46 bool trackSelected(
unsigned char mask,
unsigned char qual) {
47 return mask & 1<<qual;
57 ignoremissingtkcollection_(pset.getUntrackedParameter<
bool>(
"ignoremissingtrackcollection",
false)),
58 useAssociators_(pset.getParameter<
bool >(
"UseAssociators")),
59 calculateDrSingleCollection_(pset.getUntrackedParameter<
bool>(
"calculateDrSingleCollection")),
60 doPlotsOnlyForTruePV_(pset.getUntrackedParameter<
bool>(
"doPlotsOnlyForTruePV")),
61 doSummaryPlots_(pset.getUntrackedParameter<
bool>(
"doSummaryPlots")),
62 doSimPlots_(pset.getUntrackedParameter<
bool>(
"doSimPlots")),
63 doSimTrackPlots_(pset.getUntrackedParameter<
bool>(
"doSimTrackPlots")),
64 doRecoTrackPlots_(pset.getUntrackedParameter<
bool>(
"doRecoTrackPlots")),
65 dodEdxPlots_(pset.getUntrackedParameter<
bool>(
"dodEdxPlots")),
66 doPVAssociationPlots_(pset.getUntrackedParameter<
bool>(
"doPVAssociationPlots")),
67 doSeedPlots_(pset.getUntrackedParameter<
bool>(
"doSeedPlots")),
68 doMVAPlots_(pset.getUntrackedParameter<
bool>(
"doMVAPlots")),
69 simPVMaxZ_(pset.getUntrackedParameter<double>(
"simPVMaxZ"))
74 if(pset.
getParameter<
bool>(
"label_tp_effic_refvector")) {
78 label_tp_effic = consumes<TrackingParticleCollection>(label_tp_effic_tag);
84 label_tp_fake = consumes<TrackingParticleCollection>(label_tp_fake_tag);
87 for(
const auto&
tag: pset.
getParameter<std::vector<edm::InputTag>>(
"sim")) {
93 for (
auto& itag :
label) {
95 const bool doResol = doResolutionPlotsForLabels.empty() || (
std::find(cbegin(doResolutionPlotsForLabels), cend(doResolutionPlotsForLabels), itag) != cend(doResolutionPlotsForLabels));
100 std::sort(
begin(labelTmp),
end(labelTmp));
105 throw cms::Exception(
"Configuration") <<
"Duplicate InputTag in labels: " <<
l;
137 for(
size_t iIter=0; iIter<
labelToken.size(); ++iIter) {
140 if(mvaPSet.exists(labels.
module)) {
143 return std::make_tuple(consumes<MVACollection>(edm::InputTag(tag,
"MVAValues")),
144 consumes<QualityMaskCollection>(edm::InputTag(tag,
"QualityMasks")));
215 const auto minColl = -0.5;
216 const auto maxColl =
label.size()-0.5;
217 const auto nintColl =
label.size();
220 for(
size_t i=0;
i<
label.size(); ++
i) {
237 for (
unsigned int ww=0;ww<
associators.size();ww++){
244 histograms.
h_assoc_coll.push_back(binLabels( ibook.
book1D(
"num_assoc(simToReco)_coll",
"N of associated (simToReco) tracks vs track collection", nintColl, minColl, maxColl) ));
245 histograms.
h_simul_coll.push_back(binLabels( ibook.
book1D(
"num_simul_coll",
"N of simulated tracks vs track collection", nintColl, minColl, maxColl) ));
248 histograms.
h_reco_coll.push_back(binLabels( ibook.
book1D(
"num_reco_coll",
"N of reco track vs track collection", nintColl, minColl, maxColl) ));
249 histograms.
h_assoc2_coll.push_back(binLabels( ibook.
book1D(
"num_assoc(recoToSim)_coll",
"N of associated (recoToSim) tracks vs track collection", nintColl, minColl, maxColl) ));
250 histograms.
h_looper_coll.push_back(binLabels( ibook.
book1D(
"num_duplicate_coll",
"N of associated (recoToSim) looper tracks vs track collection", nintColl, minColl, maxColl) ));
251 histograms.
h_pileup_coll.push_back(binLabels( ibook.
book1D(
"num_pileup_coll",
"N of associated (recoToSim) pileup tracks vs track collection", nintColl, minColl, maxColl) ));
255 for (
unsigned int www=0;www<
label.size();www++){
262 dirName+=algo.
label()+
"_";
265 if (dirName.find(
"Tracks")<dirName.length()){
266 dirName.replace(dirName.find(
"Tracks"),6,
"");
269 if (assoc.find(
"Track")<assoc.length()){
270 assoc.replace(assoc.find(
"Track"),5,
"");
309 if(eff.
id() != fake.
id()) {
310 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.";
316 for(
const auto& ref: fake) {
317 fakeKeys.
insert(ref.key());
320 for(
const auto& ref: eff) {
321 if(!fakeKeys.
has(ref.key())) {
322 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.";
329 for(
const auto& simV: *htv) {
330 if(simV.eventId().bunchCrossing() != 0)
continue;
331 if(simV.eventId().event() != 0)
continue;
332 return &(simV.position());
345 auto pvPtr = hvertex->refAt(0);
346 if(pvPtr->isFake() || pvPtr->ndof() < 0)
349 auto pvFound = v_r2s.find(pvPtr);
350 if(pvFound == v_r2s.end())
353 for(
const auto& vertexRefQuality: pvFound->val) {
356 return &(pvPtr->position());
368 std::vector<std::tuple<TrackingParticle::Vector, TrackingParticle::Point> >& momVert_tPCeff,
369 std::vector<size_t>& selected_tPCeff)
const {
370 selected_tPCeff.reserve(tPCeff.
size());
371 momVert_tPCeff.reserve(tPCeff.
size());
374 for(
size_t j=0; j<tPCeff.
size(); ++j) {
382 if(tpr->eventId().bunchCrossing() == 0)
386 selected_tPCeff.push_back(j);
387 momVert_tPCeff.emplace_back(momentum, vertex);
393 for(
auto const& tpr: tPCeff) {
407 selected_tPCeff.push_back(j);
410 momVert_tPCeff.emplace_back(momentum, vertex);
422 const std::vector<size_t>& selected_tPCeff,
424 float etaL[tPCeff.
size()], phiL[tPCeff.
size()];
425 size_t n_selTP_dr = 0;
426 for(
size_t iTP: selected_tPCeff) {
428 auto const& tp2 = *(tPCeff[iTP]);
429 auto &&
p = tp2.momentum();
430 etaL[iTP] = etaFromXYZ(
p.x(),
p.y(),
p.z());
431 phiL[iTP] = atan2f(
p.y(),
p.x());
433 for(
size_t iTP1: selected_tPCeff) {
434 auto const& tp = *(tPCeff[iTP1]);
438 float eta = etaL[iTP1];
439 float phi = phiL[iTP1];
440 for(
size_t iTP2: selected_tPCeff) {
442 if (iTP1==iTP2) {
continue;}
443 auto dR_tmp =
reco::deltaR2(eta, phi, etaL[iTP2], phiL[iTP2]);
444 if (dR_tmp<dR) dR=dR_tmp;
454 float etaL[trackCollectionDr.
size()];
455 float phiL[trackCollectionDr.
size()];
456 bool validL[trackCollectionDr.
size()];
457 for (
auto const & track2 : trackCollectionDr) {
458 auto &&
p = track2.momentum();
459 etaL[
i] = etaFromXYZ(
p.x(),
p.y(),
p.z());
460 phiL[
i] = atan2f(
p.y(),
p.x());
465 auto const &
track = trackCollection[
i];
468 auto &&
p =
track.momentum();
469 float eta = etaFromXYZ(
p.x(),
p.y(),
p.z());
470 float phi = atan2f(
p.y(),
p.x());
472 if(!validL[j])
continue;
483 using namespace reco;
485 LogDebug(
"TrackValidator") <<
"\n====================================================" <<
"\n" 486 <<
"Analyzing new event" <<
"\n" 487 <<
"====================================================\n" <<
"\n";
493 auto parametersDefinerTP = parametersDefinerTPHandle->
clone();
511 if(!tp_effic_refvector) {
513 for(
size_t i=0,
size=TPCollectionHeff->size();
i<
size; ++
i) {
516 tmpTPeffPtr = &tmpTPeff;
520 tmpTPeffPtr = TPCollectionHeffRefVector.
product();
525 for(
size_t i=0,
size=TPCollectionHfake->size();
i<
size; ++
i) {
528 tmpTPfakePtr = &tmpTPfake;
533 tmpTPfakePtr = TPCollectionHfakeRefVector.
product();
539 ensureEffIsSubsetOfFake(tPCeff, tPCfake);
545 parametersDefinerTP->initEvent(simHitsTPAssoc);
554 if(!theSimPVPosition)
return;
570 thePVposition =
nullptr;
574 event.getByToken(
bsSrc,recoBeamSpotHandle);
581 for (
unsigned int puinfo_ite=0;puinfo_ite<(*puinfoH).size();++puinfo_ite){
582 if ((*puinfoH)[puinfo_ite].getBunchCrossing()==0){
583 puinfo=(*puinfoH)[puinfo_ite];
591 const auto& nLayers_tPCeff = *tpNLayersH;
594 const auto& nPixelLayers_tPCeff = *tpNLayersH;
597 const auto& nStripMonoAndStereoLayers_tPCeff = *tpNLayersH;
617 std::vector<size_t> selected_tPCeff;
618 std::vector<std::tuple<TrackingParticle::Vector, TrackingParticle::Point>> momVert_tPCeff;
619 tpParametersAndSelection(histograms, tPCeff, *parametersDefinerTP, event, setup, bs, momVert_tPCeff, selected_tPCeff);
623 size_t n_selTP_dr =
tpDR(tPCeff, selected_tPCeff, dR_tPCeff);
633 std::vector<const edm::ValueMap<reco::DeDxData> *> v_dEdx;
639 v_dEdx.push_back(dEdx1Handle.
product());
640 v_dEdx.push_back(dEdx2Handle.
product());
643 std::vector<const MVACollection *> mvaCollections;
644 std::vector<const QualityMaskCollection *> qualityMaskCollections;
645 std::vector<float> mvaValues;
648 for (
unsigned int ww=0;ww<
associators.size();ww++){
656 simRecCollPFull = simtorecoCollectionH.
product();
660 recSimCollP = recotosimCollectionH.
product();
666 recSimCollP = &recSimCollL;
669 for (
unsigned int www=0;www<
label.size();www++, w++){
681 LogTrace(
"TrackValidator") <<
"Analyzing " 682 <<
label[www] <<
" with " 695 LogTrace(
"TrackValidator") <<
"Calling associateRecoToSim method" <<
"\n";
697 recSimCollP = &recSimCollL;
698 LogTrace(
"TrackValidator") <<
"Calling associateSimToReco method" <<
"\n";
706 simRecCollP = &simRecCollL;
714 simRecCollP = &simRecCollL;
725 event.getByToken(std::get<0>(tokenTpl), hmva);
726 event.getByToken(std::get<1>(tokenTpl), hqual);
728 mvaCollections.push_back(hmva.
product());
729 qualityMaskCollections.push_back(hqual.
product());
730 if(mvaCollections.back()->size() != trackCollection.
size()) {
731 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.";
733 if(qualityMaskCollections.back()->size() != trackCollection.
size()) {
734 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.";
745 LogTrace(
"TrackValidator") <<
"\n# of TrackingParticles: " << tPCeff.
size() <<
"\n";
750 for(
size_t i=0;
i<selected_tPCeff.size(); ++
i) {
751 size_t iTP = selected_tPCeff[
i];
755 auto const& momVert = momVert_tPCeff[
i];
763 double dR=dR_tPCeff[iTP];
777 if(theSimPVPosition) {
785 momentumTP = std::get<TrackingParticle::Vector>(momVert);
786 vertexTP = std::get<TrackingParticle::Point>(momVert);
806 const reco::Track *matchedSecondTrackPointer =
nullptr;
807 unsigned int selectsLoose = mvaCollections.size();
808 unsigned int selectsHP = mvaCollections.size();
809 if(simRecColl.
find(tpr) != simRecColl.
end()){
810 auto const & rt = simRecColl[tpr];
814 matchedTrackPointer = rt.begin()->first.get();
816 matchedSecondTrackPointer = (rt.begin()+1)->
first.get();
818 LogTrace(
"TrackValidator") <<
"TrackingParticle #" << st
819 <<
" with pt=" <<
sqrt(momentumTP.perp2())
820 <<
" associated with quality:" << rt.begin()->second <<
"\n";
829 for(
size_t imva=0; imva<mvaCollections.size(); ++imva) {
830 const auto&
mva = *(mvaCollections[imva]);
831 const auto& qual = *(qualityMaskCollections[imva]);
833 auto iMatch = rt.begin();
834 float maxMva =
mva[iMatch->first.key()];
835 for(; iMatch!=rt.end(); ++iMatch) {
836 auto itrk = iMatch->first.key();
844 mvaValues.push_back(maxMva);
850 <<
"TrackingParticle #" << st
851 <<
" with pt,eta,phi: " 852 <<
sqrt(momentumTP.perp2()) <<
" , " 853 << momentumTP.eta() <<
" , " 854 << momentumTP.phi() <<
" , " 855 <<
" NOT associated to any reco::Track" <<
"\n";
862 int nSimLayers = nLayers_tPCeff[tpr];
863 int nSimPixelLayers = nPixelLayers_tPCeff[tpr];
864 int nSimStripMonoAndStereoLayers = nStripMonoAndStereoLayers_tPCeff[tpr];
865 histoProducerAlgo_->fill_recoAssociated_simTrack_histos(histograms.
histoProducerAlgo,w,tp,momentumTP,vertexTP,dxySim,dzSim,dxyPVSim,dzPVSim,nSimHits,nSimLayers,nSimPixelLayers,nSimStripMonoAndStereoLayers,matchedTrackPointer,puinfo.
getPU_NumInteractions(),
dR, thePVposition, theSimPVPosition, bs.
position(), mvaValues, selectsLoose, selectsHP);
868 if(matchedTrackPointer && matchedSecondTrackPointer) {
875 if (matchedTrackPointer) {
891 LogTrace(
"TrackValidator") <<
"\n# of reco::Tracks with " 892 <<
label[www].process()<<
":" 893 <<
label[www].label()<<
":" 894 <<
label[www].instance()
895 <<
": " << trackCollection.
size() <<
"\n";
900 int seed_fit_failed = 0;
901 size_t n_selTrack_dr = 0;
906 trackCollectionDr = trackCollectionForDrCalculation.
product();
909 trackDR(trackCollection, *trackCollectionDr, dR_trk);
917 bool isSigSimMatched(
false);
918 bool isSimMatched(
false);
919 bool isChargeMatched(
true);
920 int numAssocRecoTracks = 0;
922 double sharedFraction = 0.;
925 isSimMatched = tpFound != recSimColl.
end();
927 const auto& tp = tpFound->val;
928 nSimHits = tp[0].first->numberOfTrackerHits();
929 sharedFraction = tp[0].second;
930 if (tp[0].
first->charge() !=
track->charge()) isChargeMatched =
false;
931 if(simRecColl.
find(tp[0].first) != simRecColl.
end()) numAssocRecoTracks = simRecColl[tp[0].
first].
size();
933 for (
unsigned int tp_ite=0;tp_ite<tp.size();++tp_ite){
936 isSigSimMatched =
true;
941 LogTrace(
"TrackValidator") <<
"reco::Track #" << rT <<
" with pt=" <<
track->pt()
942 <<
" associated with quality:" << tp.begin()->second <<
"\n";
944 LogTrace(
"TrackValidator") <<
"reco::Track #" << rT <<
" with pt=" <<
track->pt()
945 <<
" NOT associated to any TrackingParticle" <<
"\n";
951 unsigned int selectsLoose = mvaCollections.size();
952 unsigned int selectsHP = mvaCollections.size();
954 for(
size_t imva=0; imva<mvaCollections.size(); ++imva) {
955 const auto&
mva = *(mvaCollections[imva]);
956 const auto& qual = *(qualityMaskCollections[imva]);
957 mvaValues.push_back(
mva[
i]);
967 histoProducerAlgo_->fill_generic_recoTrack_histos(histograms.
histoProducerAlgo,w,*
track, ttopo, bs.
position(), thePVposition, theSimPVPosition, isSimMatched,isSigSimMatched, isChargeMatched, numAssocRecoTracks, puinfo.
getPU_NumInteractions(), nSimHits, sharedFraction,
dR, mvaValues, selectsLoose, selectsHP);
974 if(numAssocRecoTracks>1) {
977 if(!isSigSimMatched) {
988 if (!isSimMatched)
continue;
1012 int chargeTP = tpr->charge();
1024 mvaCollections.clear();
1025 qualityMaskCollections.clear();
1034 LogTrace(
"TrackValidator") <<
"Collection " << www <<
"\n" 1035 <<
"Total Simulated (selected): " << n_selTP_dr <<
"\n" 1036 <<
"Total Reconstructed (selected): " << n_selTrack_dr <<
"\n" 1037 <<
"Total Reconstructed: " << rT <<
"\n" 1038 <<
"Total Associated (recoToSim): " << at <<
"\n" 1039 <<
"Total Fakes: " << rT-at <<
"\n";
void trackDR(const edm::View< reco::Track > &trackCollection, const edm::View< reco::Track > &trackCollectionDr, DynArray< float > &dR_trk) const
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
std::vector< ConcurrentMonitorElement > h_pileup_coll
edm::EDGetTokenT< SimHitTPAssociationProducer::SimHitTPAssociationList > _simHitTpMapTag
int event() const
get the contents of the subdetector field (should be protected?)
edm::EDGetTokenT< edm::ValueMap< reco::DeDxData > > m_dEdx2Tag
bool trackFromSeedFitFailed(const reco::Track &track)
std::vector< edm::EDGetTokenT< reco::SimToRecoCollection > > associatormapStRs
CosmicTrackingParticleSelector cosmictpSelector
Vector momentum() const
spatial momentum vector
const_iterator end() const
last iterator over the map (read only)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
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_
std::vector< ConcurrentMonitorElement > h_simul_coll
edm::EDGetTokenT< edm::ValueMap< unsigned int > > tpNStripStereoLayersToken_
def replace(string, replacements)
edm::EDGetTokenT< edm::ValueMap< unsigned int > > tpNLayersToken_
def setup(process, global_tag, zero_tesla=False)
T_AssociationMap associationMapFilterValues(const T_AssociationMap &map, const T_RefVector &valueRefs)
TrackingParticleSelector dRtpSelector
trackCollectionForDrCalculation
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 >
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
std::vector< edm::EDGetTokenT< reco::TrackToTrackingParticleAssociator > > associatorTokens
bool empty() const
Is the RefVector empty.
const bool doPlotsOnlyForTruePV_
edm::EDGetTokenT< reco::BeamSpot > bsSrc
const reco::Vertex::Point * getRecoPVPosition(const edm::Event &event, const edm::Handle< TrackingVertexCollection > &htv) const
std::vector< ConcurrentMonitorElement > h_looper_coll
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
void tpParametersAndSelection(const Histograms &histograms, const TrackingParticleRefVector &tPCeff, const ParametersDefinerForTP ¶metersDefinerTP, const edm::Event &event, const edm::EventSetup &setup, const reco::BeamSpot &bs, std::vector< std::tuple< TrackingParticle::Vector, TrackingParticle::Point > > &momVert_tPCeff, std::vector< size_t > &selected_tPCeff) const
std::vector< ConcurrentMonitorElement > h_reco_coll
~MultiTrackValidator() override
Destructor.
RefToBase< value_type > refAt(size_type i) const
math::XYZPointD Point
point in the space
const bool useAssociators_
edm::EDGetTokenT< edm::ValueMap< unsigned int > > tpNPixelLayersToken_
math::XYZTLorentzVectorD LorentzVector
std::vector< edm::InputTag > associators
SingleObjectSelector< TrackingParticleCollection,::TrackingParticleSelector > TrackingParticleSelector
std::vector< edm::EDGetTokenT< edm::View< reco::Track > > > labelToken
bool has(unsigned int index) const
Check if an element (=index) is in the set.
edm::Ref< edm::HepMCProduct, HepMC::GenParticle > GenParticleRef
edm::EDGetTokenT< edm::ValueMap< reco::DeDxData > > m_dEdx1Tag
ProductID id() const
Accessor for product ID.
std::vector< edm::EDGetTokenT< reco::RecoToSimCollection > > associatormapRtSs
auto dz(const T_Vertex &vertex, const T_Momentum &momentum, const T_Point &point)
size_t tpDR(const TrackingParticleRefVector &tPCeff, const std::vector< size_t > &selected_tPCeff, DynArray< float > &dR_tPCeff) const
int bunchCrossing() const
get the detector field from this detid
TrackingParticleSelector tpSelector
std::vector< bool > doResolutionPlots_
Abs< T >::type abs(const T &t)
std::vector< ConcurrentMonitorElement > h_assoc_coll
ConcurrentMonitorElement book1D(Args &&...args)
virtual TrackingParticle::Vector momentum(const edm::Event &iEvent, const edm::EventSetup &iSetup, const Charge ch, const Point &vtx, const LorentzVector &lv) const
edm::EDGetTokenT< edm::View< reco::Track > > labelTokenForDrCalculation
math::XYZPoint Point
point in the space
edm::EDGetTokenT< std::vector< PileupSummaryInfo > > label_pileupinfo
std::vector< edm::InputTag > label
void initEvent(edm::Handle< SimHitTPAssociationProducer::SimHitTPAssociationList > simHitsTPAssocToSet) const
virtual std::unique_ptr< ParametersDefinerForTP > clone() const
MultiTrackValidator(const edm::ParameterSet &pset)
Constructor.
ObjectSelector< CosmicTrackingParticleSelector > CosmicTrackingParticleSelector
edm::EDGetTokenT< TrackingParticleRefVector > label_tp_fake_refvector
std::unique_ptr< MTVHistoProducerAlgoForTracker > histoProducerAlgo_
const bool doSummaryPlots_
void setCurrentFolder(const std::string &fullpath)
T const * product() const
edm::EDGetTokenT< TrackingVertexCollection > label_tv
reco::RecoToSimCollection associateRecoToSim(const edm::Handle< edm::View< reco::Track > > &tCH, const edm::Handle< TrackingParticleCollection > &tPCH) const
compare reco to sim the handle of reco::Track and TrackingParticle collections
edm::EDGetTokenT< reco::VertexToTrackingVertexAssociator > vertexAssociatorToken_
std::unique_ptr< RecoTrackSelectorBase > dRTrackSelector
const bool ignoremissingtkcollection_
MTVHistoProducerAlgoForTrackerHistograms histoProducerAlgo
const int getPU_NumInteractions() const
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_
std::vector< edm::EDGetTokenT< std::vector< PSimHit > > > simHitTokens_
void dqmAnalyze(const edm::Event &, const edm::EventSetup &, const Histograms &) const override
Method called once per event.
const EncodedEventId & eventId() const
const bool calculateDrSingleCollection_
auto dxy(const T_Vertex &vertex, const T_Momentum &momentum, const T_Point &point)
void bookHistograms(DQMStore::ConcurrentBooker &, edm::Run const &, edm::EventSetup const &, Histograms &) const override
Method called to book the DQM histograms.
void push_back(const RefToBase< T > &)
std::string parametersDefiner
void push_back(value_type const &ref)
Add a Ref<C, T> to the RefVector.
size_type size() const
Size of the RefVector.
edm::EDGetTokenT< TrackingParticleCollection > label_tp_fake
Monte Carlo truth information used for tracking validation.
void insert(unsigned int index)
Insert an element (=index) to the set.
bool isUninitialized() const
const Point & position() const
position
#define declareDynArray(T, n, x)
int numberOfTrackerHits() const
The number of hits in the tracker. Hits on overlaps in the same layer count separately.
reco::SimToRecoCollection associateSimToReco(const edm::Handle< edm::View< reco::Track > > &tCH, const edm::Handle< TrackingParticleCollection > &tPCH) const
compare reco to sim the handle of reco::Track and TrackingParticle collections
math::XYZVectorD Vector
point in the space
edm::EDGetTokenT< TrackingParticleRefVector > label_tp_effic_refvector
reco::VertexRecoToSimCollection associateRecoToSim(const edm::Handle< edm::View< reco::Vertex > > &vCH, const edm::Handle< TrackingVertexCollection > &tVCH) const
compare reco to sim the handle of reco::Vertex and TrackingVertex collections
doResolutionPlotsForLabels
do resolution plots only for these labels (or all if empty)
static std::unique_ptr< RecoTrackSelectorBase > makeRecoTrackSelectorFromTPSelectorParameters(const edm::ParameterSet &pset)
void reserve(unsigned int size)
Reserve memory for the set.
std::vector< ConcurrentMonitorElement > h_assoc2_coll
edm::EDGetTokenT< TrackingParticleCollection > label_tp_effic
edm::Ref< TrackingParticleCollection > TrackingParticleRef
const bool doRecoTrackPlots_
virtual TrackingParticle::Point vertex(const edm::Event &iEvent, const edm::EventSetup &iSetup, const Charge ch, const Point &vtx, const LorentzVector &lv) const
const TrackingVertex::LorentzVector * getSimPVPosition(const edm::Handle< TrackingVertexCollection > &htv) const
const bool parametersDefinerIsCosmic_
const bool doSimTrackPlots_