31 #include <type_traits>
44 bool trackSelected(
unsigned char mask,
unsigned char qual) {
return mask & 1 << qual; }
50 parametersDefinerIsCosmic_(pset.getParameter<std::
string>(
"parametersDefiner") ==
"CosmicParametersDefinerForTP"),
51 associators(pset.getUntrackedParameter<std::
vector<edm::
InputTag>>(
"associators")),
53 ignoremissingtkcollection_(pset.getUntrackedParameter<bool>(
"ignoremissingtrackcollection",
false)),
54 useAssociators_(pset.getParameter<bool>(
"UseAssociators")),
55 calculateDrSingleCollection_(pset.getUntrackedParameter<bool>(
"calculateDrSingleCollection")),
56 doPlotsOnlyForTruePV_(pset.getUntrackedParameter<bool>(
"doPlotsOnlyForTruePV")),
57 doSummaryPlots_(pset.getUntrackedParameter<bool>(
"doSummaryPlots")),
58 doSimPlots_(pset.getUntrackedParameter<bool>(
"doSimPlots")),
59 doSimTrackPlots_(pset.getUntrackedParameter<bool>(
"doSimTrackPlots")),
60 doRecoTrackPlots_(pset.getUntrackedParameter<bool>(
"doRecoTrackPlots")),
61 dodEdxPlots_(pset.getUntrackedParameter<bool>(
"dodEdxPlots")),
62 doPVAssociationPlots_(pset.getUntrackedParameter<bool>(
"doPVAssociationPlots")),
63 doSeedPlots_(pset.getUntrackedParameter<bool>(
"doSeedPlots")),
64 doMVAPlots_(pset.getUntrackedParameter<bool>(
"doMVAPlots")),
65 simPVMaxZ_(pset.getUntrackedParameter<double>(
"simPVMaxZ")) {
77 if (pset.
getParameter<
bool>(
"label_tp_effic_refvector")) {
80 label_tp_effic = consumes<TrackingParticleCollection>(label_tp_effic_tag);
82 if (pset.
getParameter<
bool>(
"label_tp_fake_refvector")) {
85 label_tp_fake = consumes<TrackingParticleCollection>(label_tp_fake_tag);
88 for (
const auto&
tag : pset.
getParameter<std::vector<edm::InputTag>>(
"sim")) {
93 pset.
getParameter<std::vector<edm::InputTag>>(
"doResolutionPlotsForLabels");
95 for (
auto& itag :
label) {
97 const bool doResol = doResolutionPlotsForLabels.empty() ||
98 (
std::find(cbegin(doResolutionPlotsForLabels), cend(doResolutionPlotsForLabels), itag) !=
99 cend(doResolutionPlotsForLabels));
104 std::sort(
begin(labelTmp),
end(labelTmp));
109 throw cms::Exception(
"Configuration") <<
"Duplicate InputTag in labels: " <<
l;
150 for (
size_t iIter = 0; iIter <
labelToken.size(); ++iIter) {
153 if (mvaPSet.exists(labels.
module)) {
155 mvaPSet.getUntrackedParameter<std::vector<std::string>>(labels.
module), [&](
const std::string&
tag) {
156 return std::make_tuple(consumes<MVACollection>(
edm::InputTag(tag,
"MVAValues")),
157 consumes<QualityMaskCollection>(
edm::InputTag(tag,
"QualityMasks")));
164 pset.getParameter<
double>(
"ptMaxTP"),
165 pset.getParameter<
double>(
"minRapidityTP"),
166 pset.getParameter<
double>(
"maxRapidityTP"),
167 pset.getParameter<
double>(
"tipTP"),
168 pset.getParameter<
double>(
"lipTP"),
169 pset.getParameter<
int>(
"minHitTP"),
170 pset.getParameter<
bool>(
"signalOnlyTP"),
171 pset.getParameter<
bool>(
"intimeOnlyTP"),
172 pset.getParameter<
bool>(
"chargedOnlyTP"),
173 pset.getParameter<
bool>(
"stableOnlyTP"),
174 pset.getParameter<std::vector<int>>(
"pdgIdTP"),
175 pset.getParameter<
bool>(
"invertRapidityCutTP"));
178 pset.getParameter<
double>(
"minRapidityTP"),
179 pset.getParameter<
double>(
"maxRapidityTP"),
180 pset.getParameter<
double>(
"tipTP"),
181 pset.getParameter<
double>(
"lipTP"),
182 pset.getParameter<
int>(
"minHitTP"),
183 pset.getParameter<
bool>(
"chargedOnlyTP"),
184 pset.getParameter<std::vector<int>>(
"pdgIdTP"));
188 psetVsPhi.getParameter<
double>(
"ptMax"),
189 psetVsPhi.getParameter<
double>(
"minRapidity"),
190 psetVsPhi.getParameter<
double>(
"maxRapidity"),
191 psetVsPhi.getParameter<
double>(
"tip"),
192 psetVsPhi.getParameter<
double>(
"lip"),
193 psetVsPhi.getParameter<
int>(
"minHit"),
194 psetVsPhi.getParameter<
bool>(
"signalOnly"),
195 psetVsPhi.getParameter<
bool>(
"intimeOnly"),
196 psetVsPhi.getParameter<
bool>(
"chargedOnly"),
197 psetVsPhi.getParameter<
bool>(
"stableOnly"),
198 psetVsPhi.getParameter<std::vector<int>>(
"pdgId"),
199 psetVsPhi.getParameter<
bool>(
"invertRapidityCut"));
203 useGsf =
pset.getParameter<
bool>(
"useGsf");
205 _simHitTpMapTag = mayConsume<SimHitTPAssociationProducer::SimHitTPAssociationList>(
208 if (calculateDrSingleCollection_) {
209 labelTokenForDrCalculation =
210 consumes<edm::View<reco::Track>>(
pset.getParameter<
edm::InputTag>(
"trackCollectionForDrCalculation"));
213 if (useAssociators_) {
214 for (
auto const&
src : associators) {
215 associatorTokens.push_back(consumes<reco::TrackToTrackingParticleAssociator>(
src));
218 for (
auto const&
src : associators) {
219 associatormapStRs.push_back(consumes<reco::SimToRecoCollection>(
src));
220 associatormapRtSs.push_back(consumes<reco::RecoToSimCollection>(
src));
236 const auto minColl = -0.5;
237 const auto maxColl =
label.size() - 0.5;
238 const auto nintColl =
label.size();
241 for (
size_t i = 0;
i <
label.size(); ++
i) {
244 me->disableAlphanumeric();
259 for (
unsigned int ww = 0; ww < associators.size(); ww++) {
267 binLabels(ibook.
book1D(
"num_assoc(simToReco)_coll",
268 "N of associated (simToReco) tracks vs track collection",
273 ibook.
book1D(
"num_simul_coll",
"N of simulated tracks vs track collection", nintColl, minColl, maxColl)));
277 ibook.
book1D(
"num_reco_coll",
"N of reco track vs track collection", nintColl, minColl, maxColl)));
279 binLabels(ibook.
book1D(
"num_assoc(recoToSim)_coll",
280 "N of associated (recoToSim) tracks vs track collection",
285 binLabels(ibook.
book1D(
"num_duplicate_coll",
286 "N of associated (recoToSim) looper tracks vs track collection",
291 binLabels(ibook.
book1D(
"num_pileup_coll",
292 "N of associated (recoToSim) pileup tracks vs track collection",
299 for (
unsigned int www = 0; www <
label.size(); www++) {
304 dirName += algo.
process() +
"_";
305 if (!algo.
label().empty())
306 dirName += algo.
label() +
"_";
309 if (dirName.find(
"Tracks") < dirName.length()) {
310 dirName.replace(dirName.find(
"Tracks"), 6,
"");
312 string assoc = associators[ww].label();
313 if (assoc.find(
"Track") < assoc.length()) {
314 assoc.replace(assoc.find(
"Track"), 5,
"");
359 if (eff.
id() != fake.
id()) {
361 <<
"Efficiency and fake TrackingParticle (refs) point to different collections (eff " << eff.
id() <<
" fake "
363 <<
"). This is not supported. Efficiency TP set must be the same or a subset of the fake TP set.";
369 for (
const auto& ref : fake) {
370 fakeKeys.
insert(ref.key());
373 for (
const auto& ref : eff) {
374 if (!fakeKeys.
has(ref.key())) {
375 throw cms::Exception(
"Configuration") <<
"Efficiency TrackingParticle " << ref.key()
376 <<
" is not found from the set of fake TPs. This is not supported. The "
377 "efficiency TP set must be the same or a subset of the fake TP set.";
386 for (
const auto& simV : *htv) {
387 if (simV.eventId().bunchCrossing() != 0)
389 if (simV.eventId().event() != 0)
391 return &(simV.position());
404 auto v_r2s = hvassociator->associateRecoToSim(hvertex, htv);
405 auto pvPtr = hvertex->refAt(0);
406 if (pvPtr->isFake() || pvPtr->ndof() < 0)
409 auto pvFound = v_r2s.find(pvPtr);
410 if (pvFound == v_r2s.end())
413 for (
const auto& vertexRefQuality : pvFound->val) {
416 return &(pvPtr->position());
429 std::vector<std::tuple<TrackingParticle::Vector, TrackingParticle::Point>>& momVert_tPCeff,
430 std::vector<size_t>& selected_tPCeff)
const {
431 selected_tPCeff.reserve(tPCeff.
size());
432 momVert_tPCeff.reserve(tPCeff.
size());
435 for (
size_t j = 0;
j < tPCeff.
size(); ++
j) {
445 if (tpr->eventId().bunchCrossing() == 0)
449 selected_tPCeff.push_back(
j);
450 momVert_tPCeff.emplace_back(momentum, vertex);
455 for (
auto const& tpr : tPCeff) {
470 selected_tPCeff.push_back(j);
482 const std::vector<size_t>& selected_tPCeff,
486 if (tPCeff.
empty()) {
489 float etaL[tPCeff.
size()], phiL[tPCeff.
size()];
490 size_t n_selTP_dr = 0;
491 for (
size_t iTP : selected_tPCeff) {
493 auto const& tp2 = *(tPCeff[iTP]);
494 auto&&
p = tp2.momentum();
495 etaL[iTP] = etaFromXYZ(
p.x(),
p.y(),
p.z());
496 phiL[iTP] = atan2f(
p.y(),
p.x());
498 for (
size_t iTP1 : selected_tPCeff) {
499 auto const&
tp = *(tPCeff[iTP1]);
504 float eta = etaL[iTP1];
505 float phi = phiL[iTP1];
506 for (
size_t iTP2 : selected_tPCeff) {
511 auto dR_tmp =
reco::deltaR2(eta, phi, etaL[iTP2], phiL[iTP2]);
515 if (cores !=
nullptr) {
516 for (
unsigned int ji = 0; ji < cores->
size(); ji++) {
518 double jet_eta = jet.
eta();
519 double jet_phi = jet.
phi();
521 if (dR_jet_tmp < dR_jet)
538 if (trackCollectionDr.
empty()) {
542 float etaL[trackCollectionDr.
size()];
543 float phiL[trackCollectionDr.
size()];
544 bool validL[trackCollectionDr.
size()];
545 for (
auto const& track2 : trackCollectionDr) {
546 auto&&
p = track2.momentum();
547 etaL[
i] = etaFromXYZ(
p.x(),
p.y(),
p.z());
548 phiL[
i] = atan2f(
p.y(),
p.x());
553 auto const&
track = trackCollection[
i];
557 auto&&
p =
track.momentum();
558 float eta = etaFromXYZ(
p.x(),
p.y(),
p.z());
559 float phi = atan2f(
p.y(),
p.x());
567 if (cores !=
nullptr) {
568 for (
unsigned int ji = 0; ji < cores->
size(); ji++) {
570 double jet_eta = jet.
eta();
571 double jet_phi = jet.
phi();
573 if (dR_jet_tmp < dR_jet)
591 using namespace reco;
593 LogDebug(
"TrackValidator") <<
"\n===================================================="
595 <<
"Analyzing new event"
597 <<
"====================================================\n"
614 if (!tp_effic_refvector) {
616 tmpTPeff.reserve(TPCollectionHeff->size());
617 for (
size_t i = 0,
size = TPCollectionHeff->size();
i <
size; ++
i) {
620 tmpTPeffPtr = &tmpTPeff;
623 tmpTPeffPtr = TPCollectionHeffRefVector.product();
628 tmpTPfake.reserve(TPCollectionHfake->size());
629 for (
size_t i = 0,
size = TPCollectionHfake->size();
i <
size; ++
i) {
632 tmpTPfakePtr = &tmpTPfake;
636 tmpTPfakePtr = TPCollectionHfakeRefVector.
product();
643 ensureEffIsSubsetOfFake(tPCeff, tPCfake);
659 if (!theSimPVPosition)
677 thePVposition =
nullptr;
681 event.getByToken(
bsSrc, recoBeamSpotHandle);
688 for (
unsigned int puinfo_ite = 0; puinfo_ite < (*puinfoH).size(); ++puinfo_ite) {
689 if ((*puinfoH)[puinfo_ite].getBunchCrossing() == 0) {
690 puinfo = (*puinfoH)[puinfo_ite];
698 const auto& nLayers_tPCeff = *tpNLayersH;
701 const auto& nPixelLayers_tPCeff = *tpNLayersH;
704 const auto& nStripMonoAndStereoLayers_tPCeff = *tpNLayersH;
724 std::vector<size_t> selected_tPCeff;
725 std::vector<std::tuple<TrackingParticle::Vector, TrackingParticle::Point>> momVert_tPCeff;
735 event.getByToken(
cores_, cores);
742 size_t n_selTP_dr =
tpDR(tPCeff, selected_tPCeff, dR_tPCeff, dR_tPCeff_jet, coresVector);
752 std::vector<const edm::ValueMap<reco::DeDxData>*> v_dEdx;
758 v_dEdx.push_back(dEdx1Handle.
product());
759 v_dEdx.push_back(dEdx2Handle.
product());
762 std::vector<const MVACollection*> mvaCollections;
763 std::vector<const QualityMaskCollection*> qualityMaskCollections;
764 std::vector<float> mvaValues;
767 for (
unsigned int ww = 0; ww < associators.size(); ww++) {
775 simRecCollPFull = simtorecoCollectionH.
product();
779 recSimCollP = recotosimCollectionH.
product();
785 recSimCollP = &recSimCollL;
788 for (
unsigned int www = 0; www <
label.size();
802 LogTrace(
"TrackValidator") <<
"Analyzing " <<
label[www] <<
" with " << associators[ww] <<
"\n";
814 LogTrace(
"TrackValidator") <<
"Calling associateRecoToSim method"
816 recSimCollL = theAssociator->associateRecoToSim(trackRefs, tPCfake);
817 recSimCollP = &recSimCollL;
818 LogTrace(
"TrackValidator") <<
"Calling associateSimToReco method"
826 simRecCollL = theAssociator->associateSimToReco(trackRefs, tPCfake);
827 simRecCollP = &simRecCollL;
834 simRecCollP = &simRecCollL;
845 event.getByToken(std::get<0>(tokenTpl), hmva);
846 event.getByToken(std::get<1>(tokenTpl), hqual);
848 mvaCollections.push_back(hmva.
product());
849 qualityMaskCollections.push_back(hqual.
product());
850 if (mvaCollections.back()->size() != trackCollection.
size()) {
852 <<
"Inconsistency in track collection and MVA sizes. Track collection " << www <<
" has "
853 << trackCollection.
size() <<
" tracks, whereas the MVA " << (mvaCollections.size() - 1)
854 <<
" for it has " << mvaCollections.back()->size() <<
" entries. Double-check your configuration.";
856 if (qualityMaskCollections.back()->size() != trackCollection.
size()) {
858 <<
"Inconsistency in track collection and quality mask sizes. Track collection " << www <<
" has "
859 << trackCollection.
size() <<
" tracks, whereas the quality mask " << (qualityMaskCollections.size() - 1)
860 <<
" for it has " << qualityMaskCollections.back()->size()
861 <<
" entries. Double-check your configuration.";
872 LogTrace(
"TrackValidator") <<
"\n# of TrackingParticles: " << tPCeff.size() <<
"\n";
877 for (
size_t i = 0;
i < selected_tPCeff.size(); ++
i) {
878 size_t iTP = selected_tPCeff[
i];
882 auto const& momVert = momVert_tPCeff[
i];
890 double dR = dR_tPCeff[iTP];
891 double dR_jet = dR_tPCeff_jet[iTP];
904 if (theSimPVPosition) {
911 momentumTP = std::get<TrackingParticle::Vector>(momVert);
912 vertexTP = std::get<TrackingParticle::Point>(momVert);
932 const reco::Track* matchedSecondTrackPointer =
nullptr;
933 unsigned int selectsLoose = mvaCollections.size();
934 unsigned int selectsHP = mvaCollections.size();
935 if (simRecColl.
find(tpr) != simRecColl.
end()) {
936 auto const&
rt = simRecColl[tpr];
940 matchedTrackPointer =
rt.begin()->first.get();
941 if (
rt.size() >= 2) {
942 matchedSecondTrackPointer = (
rt.begin() + 1)->
first.get();
944 LogTrace(
"TrackValidator") <<
"TrackingParticle #" << st <<
" with pt=" <<
sqrt(momentumTP.perp2())
945 <<
" associated with quality:" <<
rt.begin()->second <<
"\n";
954 for (
size_t imva = 0; imva < mvaCollections.size(); ++imva) {
955 const auto&
mva = *(mvaCollections[imva]);
956 const auto& qual = *(qualityMaskCollections[imva]);
958 auto iMatch =
rt.begin();
959 float maxMva =
mva[iMatch->first.key()];
960 for (; iMatch !=
rt.end(); ++iMatch) {
961 auto itrk = iMatch->first.key();
969 mvaValues.push_back(maxMva);
974 LogTrace(
"TrackValidator") <<
"TrackingParticle #" << st <<
" with pt,eta,phi: " <<
sqrt(momentumTP.perp2())
975 <<
" , " << momentumTP.eta() <<
" , " << momentumTP.phi() <<
" , "
976 <<
" NOT associated to any reco::Track"
981 int nSimLayers = nLayers_tPCeff[tpr];
982 int nSimPixelLayers = nPixelLayers_tPCeff[tpr];
983 int nSimStripMonoAndStereoLayers = nStripMonoAndStereoLayers_tPCeff[tpr];
996 nSimStripMonoAndStereoLayers,
998 puinfo.getPU_NumInteractions(),
1009 if (matchedTrackPointer && matchedSecondTrackPointer) {
1017 if (matchedTrackPointer) {
1030 LogTrace(
"TrackValidator") <<
"\n# of reco::Tracks with " <<
label[www].process() <<
":" <<
label[www].label()
1031 <<
":" <<
label[www].instance() <<
": " << trackCollection.
size() <<
"\n";
1036 int seed_fit_failed = 0;
1037 size_t n_selTrack_dr = 0;
1046 trackCollectionDr = trackCollectionForDrCalculation.product();
1048 trackDR(trackCollection, *trackCollectionDr, dR_trk, dR_trk_jet, coresVector);
1059 bool isSigSimMatched(
false);
1060 bool isSimMatched(
false);
1061 bool isChargeMatched(
true);
1062 int numAssocRecoTracks = 0;
1064 double sharedFraction = 0.;
1067 isSimMatched = tpFound != recSimColl.
end();
1069 const auto&
tp = tpFound->val;
1070 nSimHits =
tp[0].first->numberOfTrackerHits();
1071 sharedFraction =
tp[0].second;
1073 isChargeMatched =
false;
1074 if (simRecColl.
find(
tp[0].first) != simRecColl.
end())
1075 numAssocRecoTracks = simRecColl[
tp[0].
first].
size();
1077 for (
unsigned int tp_ite = 0; tp_ite <
tp.size(); ++tp_ite) {
1080 isSigSimMatched =
true;
1085 LogTrace(
"TrackValidator") <<
"reco::Track #" << rT <<
" with pt=" <<
track->pt()
1086 <<
" associated with quality:" <<
tp.begin()->second <<
"\n";
1088 LogTrace(
"TrackValidator") <<
"reco::Track #" << rT <<
" with pt=" <<
track->pt()
1089 <<
" NOT associated to any TrackingParticle"
1096 unsigned int selectsLoose = mvaCollections.size();
1097 unsigned int selectsHP = mvaCollections.size();
1099 for (
size_t imva = 0; imva < mvaCollections.size(); ++imva) {
1100 const auto&
mva = *(mvaCollections[imva]);
1101 const auto& qual = *(qualityMaskCollections[imva]);
1102 mvaValues.push_back(
mva[
i]);
1105 selectsLoose = imva;
1111 double dR = dR_trk[
i];
1112 double dR_jet = dR_trk_jet[
i];
1124 puinfo.getPU_NumInteractions(),
1138 if (numAssocRecoTracks > 1) {
1141 if (!isSigSimMatched) {
1176 int chargeTP = tpr->charge();
1187 mvaCollections.clear();
1188 qualityMaskCollections.clear();
1197 LogTrace(
"TrackValidator") <<
"Collection " << www <<
"\n"
1198 <<
"Total Simulated (selected): " << n_selTP_dr <<
"\n"
1199 <<
"Total Reconstructed (selected): " << n_selTrack_dr <<
"\n"
1200 <<
"Total Reconstructed: " << rT <<
"\n"
1201 <<
"Total Associated (recoToSim): " << at <<
"\n"
1202 <<
"Total Fakes: " << rT - at <<
"\n";
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoEsToken
T getUntrackedParameter(std::string const &, T const &) const
std::vector< dqm::reco::MonitorElement * > h_simul_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
virtual void setCurrentFolder(std::string const &fullpath)
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
std::vector< dqm::reco::MonitorElement * > h_assoc2_coll
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_
constexpr bool isUninitialized() const noexcept
std::vector< dqm::reco::MonitorElement * > h_reco_coll
edm::EDGetTokenT< edm::ValueMap< unsigned int > > tpNStripStereoLayersToken_
edm::EDGetTokenT< edm::ValueMap< unsigned int > > tpNLayersToken_
T_AssociationMap associationMapFilterValues(const T_AssociationMap &map, const T_RefVector &valueRefs)
TrackingParticleSelector dRtpSelector
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
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
~MultiTrackValidator() override
Destructor.
RefToBase< value_type > refAt(size_type i) const
math::XYZPointD Point
point in the space
bool getData(T &iHolder) const
const bool useAssociators_
edm::EDGetTokenT< edm::ValueMap< unsigned int > > tpNPixelLayersToken_
math::XYZTLorentzVectorD LorentzVector
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
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &, Histograms &) const override
Method called to book the DQM histograms.
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::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.
std::vector< dqm::reco::MonitorElement * > h_assoc_coll
int bunchCrossing() const
get the detector field from this detid
TrackingParticleSelector tpSelector
std::vector< bool > doResolutionPlots_
Abs< T >::type abs(const T &t)
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
std::unique_ptr< ParametersDefinerForTP > parametersDefinerTP_
MultiTrackValidator(const edm::ParameterSet &pset)
Constructor.
std::vector< dqm::reco::MonitorElement * > h_looper_coll
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())
T const * product() const
edm::EDGetTokenT< TrackingVertexCollection > label_tv
list doResolutionPlotsForLabels
edm::EDGetTokenT< reco::VertexToTrackingVertexAssociator > vertexAssociatorToken_
std::unique_ptr< RecoTrackSelectorBase > dRTrackSelector
edm::Ref< edm::HepMCProduct, HepMC::GenParticle > GenParticleRef
T getParameter(std::string const &) const
const bool ignoremissingtkcollection_
MTVHistoProducerAlgoForTrackerHistograms histoProducerAlgo
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 > &)
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.
#define declareDynArray(T, n, x)
void tpParametersAndSelection(const Histograms &histograms, const TrackingParticleRefVector &tPCeff, 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
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
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
edm::EDGetTokenT< TrackingParticleRefVector > label_tp_effic_refvector
static std::unique_ptr< RecoTrackSelectorBase > makeRecoTrackSelectorFromTPSelectorParameters(const edm::ParameterSet &pset)
void dqmAnalyze(const edm::Event &, const edm::EventSetup &, const Histograms &) const override
Method called once per event.
void reserve(unsigned int size)
Reserve memory for the set.
SingleObjectSelector< TrackingParticleCollection,::TrackingParticleSelector > TrackingParticleSelector
std::vector< dqm::reco::MonitorElement * > h_pileup_coll
edm::EDGetTokenT< TrackingParticleCollection > label_tp_effic
tuple size
Write out results.
edm::Ref< TrackingParticleCollection > TrackingParticleRef
const bool doRecoTrackPlots_
virtual double phi() const =0
momentum azimuthal angle
virtual double eta() const =0
momentum pseudorapidity
const TrackingVertex::LorentzVector * getSimPVPosition(const edm::Handle< TrackingVertexCollection > &htv) const
const bool parametersDefinerIsCosmic_
const bool doSimTrackPlots_