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 TH1 *
h = me->getTH1();
221 for(
size_t i=0;
i<
label.size(); ++
i) {
222 h->GetXaxis()->SetBinLabel(
i+1,
label[
i].
label().c_str());
238 for (
unsigned int ww=0;ww<
associators.size();ww++){
245 h_assoc_coll.push_back(binLabels( ibook.
book1D(
"num_assoc(simToReco)_coll",
"N of associated (simToReco) tracks vs track collection", nintColl, minColl, maxColl) ));
246 h_simul_coll.push_back(binLabels( ibook.
book1D(
"num_simul_coll",
"N of simulated tracks vs track collection", nintColl, minColl, maxColl) ));
249 h_reco_coll.push_back(binLabels( ibook.
book1D(
"num_reco_coll",
"N of reco track vs track collection", nintColl, minColl, maxColl) ));
250 h_assoc2_coll.push_back(binLabels( ibook.
book1D(
"num_assoc(recoToSim)_coll",
"N of associated (recoToSim) tracks vs track collection", nintColl, minColl, maxColl) ));
251 h_looper_coll.push_back(binLabels( ibook.
book1D(
"num_duplicate_coll",
"N of associated (recoToSim) looper tracks vs track collection", nintColl, minColl, maxColl) ));
252 h_pileup_coll.push_back(binLabels( ibook.
book1D(
"num_pileup_coll",
"N of associated (recoToSim) pileup tracks vs track collection", nintColl, minColl, maxColl) ));
256 for (
unsigned int www=0;www<
label.size();www++){
263 dirName+=algo.
label()+
"_";
266 if (dirName.find(
"Tracks")<dirName.length()){
267 dirName.replace(dirName.find(
"Tracks"),6,
"");
270 if (assoc.find(
"Track")<assoc.length()){
271 assoc.replace(assoc.find(
"Track"),5,
"");
310 if(eff.
id() != fake.
id()) {
311 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.";
317 for(
const auto& ref: fake) {
318 fakeKeys.
insert(ref.key());
321 for(
const auto& ref: eff) {
322 if(!fakeKeys.
has(ref.key())) {
323 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.";
330 for(
const auto& simV: *htv) {
331 if(simV.eventId().bunchCrossing() != 0)
continue;
332 if(simV.eventId().event() != 0)
continue;
333 return &(simV.position());
346 auto pvPtr = hvertex->refAt(0);
347 if(pvPtr->isFake() || pvPtr->ndof() < 0)
350 auto pvFound = v_r2s.find(pvPtr);
351 if(pvFound == v_r2s.end())
354 for(
const auto& vertexRefQuality: pvFound->val) {
357 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) {
380 histoProducerAlgo_->fill_generic_simTrack_histos(momentum, vertex, tpr->eventId().bunchCrossing());
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);
556 if(!theSimPVPosition)
return;
572 thePVposition =
nullptr;
576 event.getByToken(
bsSrc,recoBeamSpotHandle);
583 for (
unsigned int puinfo_ite=0;puinfo_ite<(*puinfoH).size();++puinfo_ite){
584 if ((*puinfoH)[puinfo_ite].getBunchCrossing()==0){
585 puinfo=(*puinfoH)[puinfo_ite];
593 const auto& nLayers_tPCeff = *tpNLayersH;
596 const auto& nPixelLayers_tPCeff = *tpNLayersH;
599 const auto& nStripMonoAndStereoLayers_tPCeff = *tpNLayersH;
619 std::vector<size_t> selected_tPCeff;
620 std::vector<std::tuple<TrackingParticle::Vector, TrackingParticle::Point>> momVert_tPCeff;
625 size_t n_selTP_dr =
tpDR(tPCeff, selected_tPCeff, dR_tPCeff);
635 std::vector<const edm::ValueMap<reco::DeDxData> *> v_dEdx;
641 v_dEdx.push_back(dEdx1Handle.
product());
642 v_dEdx.push_back(dEdx2Handle.
product());
645 std::vector<const MVACollection *> mvaCollections;
646 std::vector<const QualityMaskCollection *> qualityMaskCollections;
647 std::vector<float> mvaValues;
650 for (
unsigned int ww=0;ww<
associators.size();ww++){
658 simRecCollPFull = simtorecoCollectionH.
product();
662 recSimCollP = recotosimCollectionH.
product();
668 recSimCollP = &recSimCollL;
671 for (
unsigned int www=0;www<
label.size();www++, w++){
683 LogTrace(
"TrackValidator") <<
"Analyzing " 684 <<
label[www] <<
" with " 697 LogTrace(
"TrackValidator") <<
"Calling associateRecoToSim method" <<
"\n";
699 recSimCollP = &recSimCollL;
700 LogTrace(
"TrackValidator") <<
"Calling associateSimToReco method" <<
"\n";
708 simRecCollP = &simRecCollL;
716 simRecCollP = &simRecCollL;
727 event.getByToken(std::get<0>(tokenTpl), hmva);
728 event.getByToken(std::get<1>(tokenTpl), hqual);
730 mvaCollections.push_back(hmva.
product());
731 qualityMaskCollections.push_back(hqual.
product());
732 if(mvaCollections.back()->size() != trackCollection.
size()) {
733 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.";
735 if(qualityMaskCollections.back()->size() != trackCollection.
size()) {
736 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.";
747 LogTrace(
"TrackValidator") <<
"\n# of TrackingParticles: " << tPCeff.
size() <<
"\n";
752 for(
size_t i=0;
i<selected_tPCeff.size(); ++
i) {
753 size_t iTP = selected_tPCeff[
i];
757 auto const& momVert = momVert_tPCeff[
i];
765 double dR=dR_tPCeff[iTP];
779 if(theSimPVPosition) {
787 momentumTP = std::get<TrackingParticle::Vector>(momVert);
788 vertexTP = std::get<TrackingParticle::Point>(momVert);
808 const reco::Track *matchedSecondTrackPointer =
nullptr;
809 unsigned int selectsLoose = mvaCollections.size();
810 unsigned int selectsHP = mvaCollections.size();
811 if(simRecColl.
find(tpr) != simRecColl.
end()){
812 auto const & rt = simRecColl[tpr];
816 matchedTrackPointer = rt.begin()->first.get();
818 matchedSecondTrackPointer = (rt.begin()+1)->
first.get();
820 LogTrace(
"TrackValidator") <<
"TrackingParticle #" << st
821 <<
" with pt=" <<
sqrt(momentumTP.perp2())
822 <<
" associated with quality:" << rt.begin()->second <<
"\n";
831 for(
size_t imva=0; imva<mvaCollections.size(); ++imva) {
832 const auto& mva = *(mvaCollections[imva]);
833 const auto& qual = *(qualityMaskCollections[imva]);
835 auto iMatch = rt.begin();
836 float maxMva = mva[iMatch->first.key()];
837 for(; iMatch!=rt.end(); ++iMatch) {
838 auto itrk = iMatch->first.key();
839 maxMva =
std::max(maxMva, mva[itrk]);
846 mvaValues.push_back(maxMva);
852 <<
"TrackingParticle #" << st
853 <<
" with pt,eta,phi: " 854 <<
sqrt(momentumTP.perp2()) <<
" , " 855 << momentumTP.eta() <<
" , " 856 << momentumTP.phi() <<
" , " 857 <<
" NOT associated to any reco::Track" <<
"\n";
864 int nSimLayers = nLayers_tPCeff[tpr];
865 int nSimPixelLayers = nPixelLayers_tPCeff[tpr];
866 int nSimStripMonoAndStereoLayers = nStripMonoAndStereoLayers_tPCeff[tpr];
867 histoProducerAlgo_->fill_recoAssociated_simTrack_histos(w,tp,momentumTP,vertexTP,dxySim,dzSim,dxyPVSim,dzPVSim,nSimHits,nSimLayers,nSimPixelLayers,nSimStripMonoAndStereoLayers,matchedTrackPointer,puinfo.
getPU_NumInteractions(),
dR, thePVposition, theSimPVPosition, bs.
position(), mvaValues, selectsLoose, selectsHP);
870 if(matchedTrackPointer && matchedSecondTrackPointer) {
871 histoProducerAlgo_->fill_duplicate_histos(w, *matchedTrackPointer, *matchedSecondTrackPointer);
877 if (matchedTrackPointer) {
893 LogTrace(
"TrackValidator") <<
"\n# of reco::Tracks with " 894 <<
label[www].process()<<
":" 895 <<
label[www].label()<<
":" 896 <<
label[www].instance()
897 <<
": " << trackCollection.
size() <<
"\n";
902 int seed_fit_failed = 0;
903 size_t n_selTrack_dr = 0;
908 trackCollectionDr = trackCollectionForDrCalculation.
product();
911 trackDR(trackCollection, *trackCollectionDr, dR_trk);
919 bool isSigSimMatched(
false);
920 bool isSimMatched(
false);
921 bool isChargeMatched(
true);
922 int numAssocRecoTracks = 0;
924 double sharedFraction = 0.;
927 isSimMatched = tpFound != recSimColl.
end();
929 const auto& tp = tpFound->val;
930 nSimHits = tp[0].first->numberOfTrackerHits();
931 sharedFraction = tp[0].second;
932 if (tp[0].
first->charge() !=
track->charge()) isChargeMatched =
false;
933 if(simRecColl.
find(tp[0].first) != simRecColl.
end()) numAssocRecoTracks = simRecColl[tp[0].
first].
size();
935 for (
unsigned int tp_ite=0;tp_ite<tp.size();++tp_ite){
938 isSigSimMatched =
true;
943 LogTrace(
"TrackValidator") <<
"reco::Track #" << rT <<
" with pt=" <<
track->pt()
944 <<
" associated with quality:" << tp.begin()->second <<
"\n";
946 LogTrace(
"TrackValidator") <<
"reco::Track #" << rT <<
" with pt=" <<
track->pt()
947 <<
" NOT associated to any TrackingParticle" <<
"\n";
953 unsigned int selectsLoose = mvaCollections.size();
954 unsigned int selectsHP = mvaCollections.size();
956 for(
size_t imva=0; imva<mvaCollections.size(); ++imva) {
957 const auto& mva = *(mvaCollections[imva]);
958 const auto& qual = *(qualityMaskCollections[imva]);
959 mvaValues.push_back(mva[
i]);
969 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);
976 if(numAssocRecoTracks>1) {
979 if(!isSigSimMatched) {
990 if (!isSimMatched)
continue;
1014 int chargeTP = tpr->charge();
1016 histoProducerAlgo_->fill_ResoAndPull_recoTrack_histos(w,momentumTP,vertexTP,chargeTP,
1026 mvaCollections.clear();
1027 qualityMaskCollections.clear();
1036 LogTrace(
"TrackValidator") <<
"Collection " << www <<
"\n" 1037 <<
"Total Simulated (selected): " << n_selTP_dr <<
"\n" 1038 <<
"Total Reconstructed (selected): " << n_selTrack_dr <<
"\n" 1039 <<
"Total Reconstructed: " << rT <<
"\n" 1040 <<
"Total Associated (recoToSim): " << at <<
"\n" 1041 <<
"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
edm::EDGetTokenT< SimHitTPAssociationProducer::SimHitTPAssociationList > _simHitTpMapTag
int event() const
get the contents of the subdetector field (should be protected?)
std::vector< MonitorElement * > h_reco_coll
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)
std::vector< MonitorElement * > h_simul_coll
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_
void analyze(const edm::Event &, const edm::EventSetup &) override
Method called once per event.
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
void tpParametersAndSelection(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
static std::unique_ptr< RecoTrackSelectorBase > makeRecoTrackSelectorFromTPSelectorParameters(const edm::ParameterSet &pset, const edm::InputTag &beamSpotTag, edm::ConsumesCollector &iC)
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
RefToBase< value_type > refAt(size_type i) const
math::XYZPointD Point
point in the space
const bool useAssociators_
std::vector< MonitorElement * > h_looper_coll
edm::EDGetTokenT< edm::ValueMap< unsigned int > > tpNPixelLayersToken_
math::XYZTLorentzVectorD LorentzVector
std::vector< edm::InputTag > associators
std::vector< MonitorElement * > h_pileup_coll
SingleObjectSelector< TrackingParticleCollection,::TrackingParticleSelector > TrackingParticleSelector
std::vector< MonitorElement * > h_assoc_coll
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)
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
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
MonitorElement * book1D(Args &&...args)
std::vector< bool > doResolutionPlots_
Abs< T >::type abs(const T &t)
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
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Method called to book the DQM histograms.
edm::EDGetTokenT< reco::VertexToTrackingVertexAssociator > vertexAssociatorToken_
std::unique_ptr< RecoTrackSelectorBase > dRTrackSelector
const bool ignoremissingtkcollection_
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_
const EncodedEventId & eventId() const
const bool calculateDrSingleCollection_
auto dxy(const T_Vertex &vertex, const T_Momentum &momentum, const T_Point &point)
void push_back(const RefToBase< T > &)
std::vector< MonitorElement * > h_assoc2_coll
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)
void reserve(unsigned int size)
Reserve memory for the set.
edm::EDGetTokenT< TrackingParticleCollection > label_tp_effic
edm::Ref< TrackingParticleCollection > TrackingParticleRef
const bool doRecoTrackPlots_
virtual ~MultiTrackValidator()
Destructor.
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_