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"))
83 if(pset.
getParameter<
bool>(
"label_tp_effic_refvector")) {
87 label_tp_effic = consumes<TrackingParticleCollection>(label_tp_effic_tag);
93 label_tp_fake = consumes<TrackingParticleCollection>(label_tp_fake_tag);
96 for(
const auto&
tag: pset.
getParameter<std::vector<edm::InputTag>>(
"sim")) {
102 for (
auto& itag :
label) {
104 const bool doResol = doResolutionPlotsForLabels.empty() || (
std::find(cbegin(doResolutionPlotsForLabels), cend(doResolutionPlotsForLabels), itag) != cend(doResolutionPlotsForLabels));
109 std::sort(
begin(labelTmp),
end(labelTmp));
114 throw cms::Exception(
"Configuration") <<
"Duplicate InputTag in labels: " <<
l;
146 for(
size_t iIter=0; iIter<
labelToken.size(); ++iIter) {
149 if(mvaPSet.exists(labels.
module)) {
152 return std::make_tuple(consumes<MVACollection>(edm::InputTag(tag,
"MVAValues")),
153 consumes<QualityMaskCollection>(edm::InputTag(tag,
"QualityMasks")));
228 const auto minColl = -0.5;
229 const auto maxColl =
label.size()-0.5;
230 const auto nintColl =
label.size();
233 for(
size_t i=0;
i<
label.size(); ++
i) {
236 me.disableAlphanumeric();
251 for (
unsigned int ww=0;ww<
associators.size();ww++){
258 histograms.
h_assoc_coll.push_back(binLabels( ibook.
book1D(
"num_assoc(simToReco)_coll",
"N of associated (simToReco) tracks vs track collection", nintColl, minColl, maxColl) ));
259 histograms.
h_simul_coll.push_back(binLabels( ibook.
book1D(
"num_simul_coll",
"N of simulated tracks vs track collection", nintColl, minColl, maxColl) ));
262 histograms.
h_reco_coll.push_back(binLabels( ibook.
book1D(
"num_reco_coll",
"N of reco track vs track collection", nintColl, minColl, maxColl) ));
263 histograms.
h_assoc2_coll.push_back(binLabels( ibook.
book1D(
"num_assoc(recoToSim)_coll",
"N of associated (recoToSim) tracks vs track collection", nintColl, minColl, maxColl) ));
264 histograms.
h_looper_coll.push_back(binLabels( ibook.
book1D(
"num_duplicate_coll",
"N of associated (recoToSim) looper tracks vs track collection", nintColl, minColl, maxColl) ));
265 histograms.
h_pileup_coll.push_back(binLabels( ibook.
book1D(
"num_pileup_coll",
"N of associated (recoToSim) pileup tracks vs track collection", nintColl, minColl, maxColl) ));
269 for (
unsigned int www=0;www<
label.size();www++){
275 if(!algo.
label().empty())
276 dirName+=algo.
label()+
"_";
279 if (dirName.find(
"Tracks")<dirName.length()){
280 dirName.replace(dirName.find(
"Tracks"),6,
"");
283 if (assoc.find(
"Track")<assoc.length()){
284 assoc.replace(assoc.find(
"Track"),5,
"");
323 if(eff.
id() != fake.
id()) {
324 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.";
330 for(
const auto& ref: fake) {
331 fakeKeys.
insert(ref.key());
334 for(
const auto& ref: eff) {
335 if(!fakeKeys.
has(ref.key())) {
336 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.";
343 for(
const auto& simV: *htv) {
344 if(simV.eventId().bunchCrossing() != 0)
continue;
345 if(simV.eventId().event() != 0)
continue;
346 return &(simV.position());
359 auto pvPtr = hvertex->refAt(0);
360 if(pvPtr->isFake() || pvPtr->ndof() < 0)
363 auto pvFound = v_r2s.find(pvPtr);
364 if(pvFound == v_r2s.end())
367 for(
const auto& vertexRefQuality: pvFound->val) {
370 return &(pvPtr->position());
382 std::vector<std::tuple<TrackingParticle::Vector, TrackingParticle::Point> >& momVert_tPCeff,
383 std::vector<size_t>& selected_tPCeff)
const {
384 selected_tPCeff.reserve(tPCeff.
size());
385 momVert_tPCeff.reserve(tPCeff.
size());
388 for(
size_t j=0; j<tPCeff.
size(); ++j) {
396 if(tpr->eventId().bunchCrossing() == 0)
400 selected_tPCeff.push_back(j);
401 momVert_tPCeff.emplace_back(momentum, vertex);
407 for(
auto const& tpr: tPCeff) {
421 selected_tPCeff.push_back(j);
424 momVert_tPCeff.emplace_back(momentum, vertex);
436 const std::vector<size_t>& selected_tPCeff,
440 float etaL[tPCeff.
size()], phiL[tPCeff.
size()];
441 size_t n_selTP_dr = 0;
442 for(
size_t iTP: selected_tPCeff) {
444 auto const& tp2 = *(tPCeff[iTP]);
445 auto &&
p = tp2.momentum();
446 etaL[iTP] = etaFromXYZ(
p.x(),
p.y(),
p.z());
447 phiL[iTP] = atan2f(
p.y(),
p.x());
449 for(
size_t iTP1: selected_tPCeff) {
450 auto const& tp = *(tPCeff[iTP1]);
455 float eta = etaL[iTP1];
456 float phi = phiL[iTP1];
457 for(
size_t iTP2: selected_tPCeff) {
459 if (iTP1==iTP2) {
continue;}
460 auto dR_tmp =
reco::deltaR2(eta, phi, etaL[iTP2], phiL[iTP2]);
461 if (dR_tmp<dR) dR=dR_tmp;
463 if(cores !=
nullptr){
464 for (
unsigned int ji = 0; ji < cores->
size(); ji++) {
466 double jet_eta = jet.
eta();
467 double jet_phi = jet.
phi();
469 if (dR_jet_tmp<dR_jet) dR_jet=dR_jet_tmp;
486 float etaL[trackCollectionDr.
size()];
487 float phiL[trackCollectionDr.
size()];
488 bool validL[trackCollectionDr.
size()];
489 for (
auto const & track2 : trackCollectionDr) {
490 auto &&
p = track2.momentum();
491 etaL[
i] = etaFromXYZ(
p.x(),
p.y(),
p.z());
492 phiL[
i] = atan2f(
p.y(),
p.x());
497 auto const &
track = trackCollection[
i];
501 auto &&
p =
track.momentum();
502 float eta = etaFromXYZ(
p.x(),
p.y(),
p.z());
503 float phi = atan2f(
p.y(),
p.x());
505 if(!validL[j])
continue;
509 if(cores !=
nullptr){
510 for (
unsigned int ji = 0; ji < cores->
size(); ji++) {
512 double jet_eta = jet.
eta();
513 double jet_phi = jet.
phi();
515 if (dR_jet_tmp<dR_jet) dR_jet=dR_jet_tmp;
533 using namespace reco;
535 LogDebug(
"TrackValidator") <<
"\n====================================================" <<
"\n" 536 <<
"Analyzing new event" <<
"\n" 537 <<
"====================================================\n" <<
"\n";
543 auto parametersDefinerTP = parametersDefinerTPHandle->
clone();
561 if(!tp_effic_refvector) {
563 for(
size_t i=0,
size=TPCollectionHeff->size();
i<
size; ++
i) {
566 tmpTPeffPtr = &tmpTPeff;
570 tmpTPeffPtr = TPCollectionHeffRefVector.
product();
575 for(
size_t i=0,
size=TPCollectionHfake->size();
i<
size; ++
i) {
578 tmpTPfakePtr = &tmpTPfake;
583 tmpTPfakePtr = TPCollectionHfakeRefVector.
product();
589 ensureEffIsSubsetOfFake(tPCeff, tPCfake);
595 parametersDefinerTP->initEvent(simHitsTPAssoc);
604 if(!theSimPVPosition)
return;
620 thePVposition =
nullptr;
624 event.getByToken(
bsSrc,recoBeamSpotHandle);
631 for (
unsigned int puinfo_ite=0;puinfo_ite<(*puinfoH).size();++puinfo_ite){
632 if ((*puinfoH)[puinfo_ite].getBunchCrossing()==0){
633 puinfo=(*puinfoH)[puinfo_ite];
641 const auto& nLayers_tPCeff = *tpNLayersH;
644 const auto& nPixelLayers_tPCeff = *tpNLayersH;
647 const auto& nStripMonoAndStereoLayers_tPCeff = *tpNLayersH;
667 std::vector<size_t> selected_tPCeff;
668 std::vector<std::tuple<TrackingParticle::Vector, TrackingParticle::Point>> momVert_tPCeff;
669 tpParametersAndSelection(histograms, tPCeff, *parametersDefinerTP, event, setup, bs, momVert_tPCeff, selected_tPCeff);
678 event.getByToken(
cores_, cores);
683 size_t n_selTP_dr =
tpDR(tPCeff, selected_tPCeff, dR_tPCeff, dR_tPCeff_jet, coresVector);
693 std::vector<const edm::ValueMap<reco::DeDxData> *> v_dEdx;
699 v_dEdx.push_back(dEdx1Handle.
product());
700 v_dEdx.push_back(dEdx2Handle.
product());
703 std::vector<const MVACollection *> mvaCollections;
704 std::vector<const QualityMaskCollection *> qualityMaskCollections;
705 std::vector<float> mvaValues;
708 for (
unsigned int ww=0;ww<
associators.size();ww++){
716 simRecCollPFull = simtorecoCollectionH.
product();
720 recSimCollP = recotosimCollectionH.
product();
726 recSimCollP = &recSimCollL;
729 for (
unsigned int www=0;www<
label.size();www++, w++){
741 LogTrace(
"TrackValidator") <<
"Analyzing " 742 <<
label[www] <<
" with " 755 LogTrace(
"TrackValidator") <<
"Calling associateRecoToSim method" <<
"\n";
757 recSimCollP = &recSimCollL;
758 LogTrace(
"TrackValidator") <<
"Calling associateSimToReco method" <<
"\n";
766 simRecCollP = &simRecCollL;
774 simRecCollP = &simRecCollL;
785 event.getByToken(std::get<0>(tokenTpl), hmva);
786 event.getByToken(std::get<1>(tokenTpl), hqual);
788 mvaCollections.push_back(hmva.
product());
789 qualityMaskCollections.push_back(hqual.
product());
790 if(mvaCollections.back()->size() != trackCollection.
size()) {
791 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.";
793 if(qualityMaskCollections.back()->size() != trackCollection.
size()) {
794 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.";
805 LogTrace(
"TrackValidator") <<
"\n# of TrackingParticles: " << tPCeff.
size() <<
"\n";
810 for(
size_t i=0;
i<selected_tPCeff.size(); ++
i) {
811 size_t iTP = selected_tPCeff[
i];
815 auto const& momVert = momVert_tPCeff[
i];
823 double dR=dR_tPCeff[iTP];
824 double dR_jet=dR_tPCeff_jet[iTP];
838 if(theSimPVPosition) {
846 momentumTP = std::get<TrackingParticle::Vector>(momVert);
847 vertexTP = std::get<TrackingParticle::Point>(momVert);
867 const reco::Track *matchedSecondTrackPointer =
nullptr;
868 unsigned int selectsLoose = mvaCollections.size();
869 unsigned int selectsHP = mvaCollections.size();
870 if(simRecColl.
find(tpr) != simRecColl.
end()){
871 auto const & rt = simRecColl[tpr];
875 matchedTrackPointer = rt.begin()->first.get();
877 matchedSecondTrackPointer = (rt.begin()+1)->
first.get();
879 LogTrace(
"TrackValidator") <<
"TrackingParticle #" << st
880 <<
" with pt=" <<
sqrt(momentumTP.perp2())
881 <<
" associated with quality:" << rt.begin()->second <<
"\n";
890 for(
size_t imva=0; imva<mvaCollections.size(); ++imva) {
891 const auto&
mva = *(mvaCollections[imva]);
892 const auto& qual = *(qualityMaskCollections[imva]);
894 auto iMatch = rt.begin();
895 float maxMva =
mva[iMatch->first.key()];
896 for(; iMatch!=rt.end(); ++iMatch) {
897 auto itrk = iMatch->first.key();
905 mvaValues.push_back(maxMva);
911 <<
"TrackingParticle #" << st
912 <<
" with pt,eta,phi: " 913 <<
sqrt(momentumTP.perp2()) <<
" , " 914 << momentumTP.eta() <<
" , " 915 << momentumTP.phi() <<
" , " 916 <<
" NOT associated to any reco::Track" <<
"\n";
923 int nSimLayers = nLayers_tPCeff[tpr];
924 int nSimPixelLayers = nPixelLayers_tPCeff[tpr];
925 int nSimStripMonoAndStereoLayers = nStripMonoAndStereoLayers_tPCeff[tpr];
926 histoProducerAlgo_->fill_recoAssociated_simTrack_histos(histograms.
histoProducerAlgo,w,tp,momentumTP,vertexTP,dxySim,dzSim,dxyPVSim,dzPVSim,nSimHits,nSimLayers,nSimPixelLayers,nSimStripMonoAndStereoLayers,matchedTrackPointer,puinfo.
getPU_NumInteractions(), dR, dR_jet, thePVposition, theSimPVPosition, bs.
position(), mvaValues, selectsLoose, selectsHP);
929 if(matchedTrackPointer && matchedSecondTrackPointer) {
936 if (matchedTrackPointer) {
952 LogTrace(
"TrackValidator") <<
"\n# of reco::Tracks with " 953 <<
label[www].process()<<
":" 954 <<
label[www].label()<<
":" 955 <<
label[www].instance()
956 <<
": " << trackCollection.
size() <<
"\n";
961 int seed_fit_failed = 0;
962 size_t n_selTrack_dr = 0;
967 trackCollectionDr = trackCollectionForDrCalculation.
product();
971 trackDR(trackCollection, *trackCollectionDr, dR_trk, dR_trk_jet, coresVector);
979 bool isSigSimMatched(
false);
980 bool isSimMatched(
false);
981 bool isChargeMatched(
true);
982 int numAssocRecoTracks = 0;
984 double sharedFraction = 0.;
987 isSimMatched = tpFound != recSimColl.
end();
989 const auto& tp = tpFound->val;
990 nSimHits = tp[0].first->numberOfTrackerHits();
991 sharedFraction = tp[0].second;
992 if (tp[0].
first->charge() !=
track->charge()) isChargeMatched =
false;
993 if(simRecColl.
find(tp[0].first) != simRecColl.
end()) numAssocRecoTracks = simRecColl[tp[0].
first].
size();
995 for (
unsigned int tp_ite=0;tp_ite<tp.size();++tp_ite){
998 isSigSimMatched =
true;
1003 LogTrace(
"TrackValidator") <<
"reco::Track #" << rT <<
" with pt=" <<
track->pt()
1004 <<
" associated with quality:" << tp.begin()->second <<
"\n";
1006 LogTrace(
"TrackValidator") <<
"reco::Track #" << rT <<
" with pt=" <<
track->pt()
1007 <<
" NOT associated to any TrackingParticle" <<
"\n";
1013 unsigned int selectsLoose = mvaCollections.size();
1014 unsigned int selectsHP = mvaCollections.size();
1016 for(
size_t imva=0; imva<mvaCollections.size(); ++imva) {
1017 const auto&
mva = *(mvaCollections[imva]);
1018 const auto& qual = *(qualityMaskCollections[imva]);
1019 mvaValues.push_back(
mva[
i]);
1022 selectsLoose = imva;
1028 double dR=dR_trk[
i];
1029 double dR_jet=dR_trk_jet[
i];
1030 histoProducerAlgo_->fill_generic_recoTrack_histos(histograms.
histoProducerAlgo,w,*
track, ttopo, bs.
position(), thePVposition, theSimPVPosition, isSimMatched,isSigSimMatched, isChargeMatched, numAssocRecoTracks, puinfo.
getPU_NumInteractions(), nSimHits, sharedFraction, dR, dR_jet, mvaValues, selectsLoose, selectsHP);
1037 if(numAssocRecoTracks>1) {
1040 if(!isSigSimMatched) {
1051 if (!isSimMatched)
continue;
1075 int chargeTP = tpr->charge();
1087 mvaCollections.clear();
1088 qualityMaskCollections.clear();
1097 LogTrace(
"TrackValidator") <<
"Collection " << www <<
"\n" 1098 <<
"Total Simulated (selected): " << n_selTP_dr <<
"\n" 1099 <<
"Total Reconstructed (selected): " << n_selTrack_dr <<
"\n" 1100 <<
"Total Reconstructed: " << rT <<
"\n" 1101 <<
"Total Associated (recoToSim): " << at <<
"\n" 1102 <<
"Total Fakes: " << rT-at <<
"\n";
T getParameter(std::string const &) const
reco::SimToRecoCollection associateSimToReco(const edm::Handle< edm::View< reco::Track >> &tCH, const edm::Handle< TrackingParticleCollection > &tPCH) 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
size_t tpDR(const TrackingParticleRefVector &tPCeff, const std::vector< size_t > &selected_tPCeff, DynArray< float > &dR_tPCeff, DynArray< float > &dR_tPCeff_jet, const edm::View< reco::Candidate > *cores) const
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
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
void trackDR(const edm::View< reco::Track > &trackCollection, const edm::View< reco::Track > &trackCollectionDr, DynArray< float > &dR_trk, DynArray< float > &dR_trk_jet, const edm::View< reco::Candidate > *cores) const
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
void setCurrentFolder(std::string const &fullpath)
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)
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.
reco::RecoToSimCollection associateRecoToSim(const edm::Handle< edm::View< reco::Track >> &tCH, const edm::Handle< TrackingParticleCollection > &tPCH) const
ObjectSelector< CosmicTrackingParticleSelector > CosmicTrackingParticleSelector
edm::EDGetTokenT< TrackingParticleRefVector > label_tp_fake_refvector
std::unique_ptr< MTVHistoProducerAlgoForTracker > histoProducerAlgo_
const bool doSummaryPlots_
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
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 >
virtual double eta() const =0
momentum pseudorapidity
T const * product() const
edm::EDGetTokenT< TrackingVertexCollection > label_tv
reco::VertexRecoToSimCollection associateRecoToSim(const edm::Handle< edm::View< reco::Vertex >> &vCH, const edm::Handle< TrackingVertexCollection > &tVCH) const
edm::EDGetTokenT< reco::VertexToTrackingVertexAssociator > vertexAssociatorToken_
std::unique_ptr< RecoTrackSelectorBase > dRTrackSelector
const bool ignoremissingtkcollection_
MTVHistoProducerAlgoForTrackerHistograms histoProducerAlgo
const int getPU_NumInteractions() const
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.
edm::EDGetTokenT< edm::View< reco::Candidate > > cores_
math::XYZVectorD Vector
point in the space
edm::EDGetTokenT< TrackingParticleRefVector > label_tp_effic_refvector
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
virtual double phi() const =0
momentum azimuthal angle
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_