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"),
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 applyTPSelToSimMatch_(
pset.getParameter<
bool>(
"applyTPSelToSimMatch")),
66 simPVMaxZ_(
pset.getUntrackedParameter<double>(
"simPVMaxZ")) {
78 if (
pset.getParameter<
bool>(
"label_tp_effic_refvector")) {
81 label_tp_effic = consumes<TrackingParticleCollection>(label_tp_effic_tag);
83 if (
pset.getParameter<
bool>(
"label_tp_fake_refvector")) {
86 label_tp_fake = consumes<TrackingParticleCollection>(label_tp_fake_tag);
89 for (
const auto&
tag :
pset.getParameter<std::vector<edm::InputTag>>(
"sim")) {
94 pset.getParameter<std::vector<edm::InputTag>>(
"doResolutionPlotsForLabels");
96 for (
auto& itag :
label) {
110 throw cms::Exception(
"Configuration") <<
"Duplicate InputTag in labels: " <<
l;
132 consumes<edm::ValueMap<unsigned int>>(
pset.getParameter<
edm::InputTag>(
"label_tp_npixellayers"));
134 consumes<edm::ValueMap<unsigned int>>(
pset.getParameter<
edm::InputTag>(
"label_tp_nstripstereolayers"));
145 consumes<reco::VertexToTrackingVertexAssociator>(
pset.getUntrackedParameter<
edm::InputTag>(
"vertexAssociator"));
151 for (
size_t iIter = 0; iIter <
labelToken.size(); ++iIter) {
154 if (mvaPSet.exists(
labels.module)) {
156 mvaPSet.getUntrackedParameter<std::vector<std::string>>(
labels.module), [&](
const std::string&
tag) {
157 return std::make_tuple(consumes<MVACollection>(edm::InputTag(tag,
"MVAValues")),
158 consumes<QualityMaskCollection>(edm::InputTag(tag,
"QualityMasks")));
165 pset.getParameter<
double>(
"ptMaxTP"),
166 pset.getParameter<
double>(
"minRapidityTP"),
167 pset.getParameter<
double>(
"maxRapidityTP"),
168 pset.getParameter<
double>(
"tipTP"),
169 pset.getParameter<
double>(
"lipTP"),
170 pset.getParameter<
int>(
"minHitTP"),
171 pset.getParameter<
bool>(
"signalOnlyTP"),
172 pset.getParameter<
bool>(
"intimeOnlyTP"),
173 pset.getParameter<
bool>(
"chargedOnlyTP"),
174 pset.getParameter<
bool>(
"stableOnlyTP"),
175 pset.getParameter<std::vector<int>>(
"pdgIdTP"),
176 pset.getParameter<
bool>(
"invertRapidityCutTP"),
177 pset.getParameter<
double>(
"minPhi"),
178 pset.getParameter<
double>(
"maxPhi"));
181 pset.getParameter<
double>(
"minRapidityTP"),
182 pset.getParameter<
double>(
"maxRapidityTP"),
183 pset.getParameter<
double>(
"tipTP"),
184 pset.getParameter<
double>(
"lipTP"),
185 pset.getParameter<
int>(
"minHitTP"),
186 pset.getParameter<
bool>(
"chargedOnlyTP"),
187 pset.getParameter<std::vector<int>>(
"pdgIdTP"));
210 _simHitTpMapTag = mayConsume<SimHitTPAssociationProducer::SimHitTPAssociationList>(
215 consumes<edm::View<reco::Track>>(
pset.getParameter<
edm::InputTag>(
"trackCollectionForDrCalculation"));
241 const auto minColl = -0.5;
242 const auto maxColl =
label.size() - 0.5;
243 const auto nintColl =
label.size();
246 for (
size_t i = 0;
i <
label.size(); ++
i) {
249 me->disableAlphanumeric();
272 binLabels(ibook.
book1D(
"num_assoc(simToReco)_coll",
273 "N of associated (simToReco) tracks vs track collection",
278 ibook.
book1D(
"num_simul_coll",
"N of simulated tracks vs track collection", nintColl, minColl, maxColl)));
282 ibook.
book1D(
"num_reco_coll",
"N of reco track vs track collection", nintColl, minColl, maxColl)));
284 binLabels(ibook.
book1D(
"num_assoc(recoToSim)_coll",
285 "N of associated (recoToSim) tracks vs track collection",
290 binLabels(ibook.
book1D(
"num_duplicate_coll",
291 "N of associated (recoToSim) looper tracks vs track collection",
296 binLabels(ibook.
book1D(
"num_pileup_coll",
297 "N of associated (recoToSim) pileup tracks vs track collection",
304 for (
unsigned int www = 0; www <
label.size(); www++) {
308 if (!
algo.process().empty())
310 if (!
algo.label().empty())
312 if (!
algo.instance().empty())
364 if (eff.
id() != fake.
id()) {
366 <<
"Efficiency and fake TrackingParticle (refs) point to different collections (eff " << eff.
id() <<
" fake " 368 <<
"). This is not supported. Efficiency TP set must be the same or a subset of the fake TP set.";
374 for (
const auto& ref : fake) {
375 fakeKeys.
insert(ref.key());
378 for (
const auto& ref : eff) {
379 if (!fakeKeys.
has(ref.key())) {
380 throw cms::Exception(
"Configuration") <<
"Efficiency TrackingParticle " << ref.key()
381 <<
" is not found from the set of fake TPs. This is not supported. The " 382 "efficiency TP set must be the same or a subset of the fake TP set.";
391 for (
const auto& simV : *htv) {
392 if (simV.eventId().bunchCrossing() != 0)
394 if (simV.eventId().event() != 0)
396 return &(simV.position());
410 auto pvPtr = hvertex->refAt(0);
411 if (pvPtr->isFake() || pvPtr->ndof() < 0)
414 auto pvFound = v_r2s.find(pvPtr);
415 if (pvFound == v_r2s.end())
418 for (
const auto& vertexRefQuality : pvFound->val) {
421 return &(pvPtr->position());
434 std::vector<std::tuple<TrackingParticle::Vector, TrackingParticle::Point>>& momVert_tPCeff,
435 std::vector<size_t>& selected_tPCeff)
const {
436 selected_tPCeff.reserve(tPCeff.
size());
437 momVert_tPCeff.reserve(tPCeff.
size());
440 for (
size_t j = 0;
j < tPCeff.
size(); ++
j) {
448 histograms.histoProducerAlgo, momentum,
vertex, tpr->eventId().bunchCrossing());
450 if (tpr->eventId().bunchCrossing() == 0)
454 selected_tPCeff.push_back(
j);
455 momVert_tPCeff.emplace_back(momentum,
vertex);
460 for (
auto const& tpr : tPCeff) {
469 histograms.histoProducerAlgo,
tp.momentum(),
tp.vertex(),
tp.eventId().bunchCrossing());
471 if (
tp.eventId().bunchCrossing() == 0)
475 selected_tPCeff.push_back(
j);
487 const std::vector<size_t>& selected_tPCeff,
491 if (tPCeff.
empty()) {
494 float etaL[tPCeff.
size()], phiL[tPCeff.
size()];
495 size_t n_selTP_dr = 0;
496 for (
size_t iTP : selected_tPCeff) {
498 auto const& tp2 = *(tPCeff[iTP]);
499 auto&&
p = tp2.momentum();
500 etaL[iTP] = etaFromXYZ(
p.x(),
p.y(),
p.z());
501 phiL[iTP] = atan2f(
p.y(),
p.x());
503 for (
size_t iTP1 : selected_tPCeff) {
504 auto const&
tp = *(tPCeff[iTP1]);
509 float eta = etaL[iTP1];
510 float phi = phiL[iTP1];
511 for (
size_t iTP2 : selected_tPCeff) {
520 if (
cores !=
nullptr) {
521 for (
unsigned int ji = 0; ji <
cores->size(); ji++) {
523 double jet_eta =
jet.eta();
524 double jet_phi =
jet.phi();
526 if (dR_jet_tmp < dR_jet)
543 if (trackCollectionDr.
empty()) {
547 float etaL[trackCollectionDr.
size()];
548 float phiL[trackCollectionDr.
size()];
549 bool validL[trackCollectionDr.
size()];
550 for (
auto const& track2 : trackCollectionDr) {
551 auto&&
p = track2.momentum();
552 etaL[
i] = etaFromXYZ(
p.x(),
p.y(),
p.z());
553 phiL[
i] = atan2f(
p.y(),
p.x());
562 auto&&
p =
track.momentum();
563 float eta = etaFromXYZ(
p.x(),
p.y(),
p.z());
564 float phi = atan2f(
p.y(),
p.x());
572 if (
cores !=
nullptr) {
573 for (
unsigned int ji = 0; ji <
cores->size(); ji++) {
575 double jet_eta =
jet.eta();
576 double jet_phi =
jet.phi();
578 if (dR_jet_tmp < dR_jet)
596 using namespace reco;
598 LogDebug(
"TrackValidator") <<
"\n====================================================" 600 <<
"Analyzing new event" 602 <<
"====================================================\n" 619 if (!tp_effic_refvector) {
621 tmpTPeff.
reserve(TPCollectionHeff->size());
622 for (
size_t i = 0,
size = TPCollectionHeff->size();
i <
size; ++
i) {
625 tmpTPeffPtr = &tmpTPeff;
628 tmpTPeffPtr = TPCollectionHeffRefVector.
product();
633 tmpTPfake.
reserve(TPCollectionHfake->size());
634 for (
size_t i = 0,
size = TPCollectionHfake->size();
i <
size; ++
i) {
637 tmpTPfakePtr = &tmpTPfake;
641 tmpTPfakePtr = TPCollectionHfakeRefVector.
product();
648 ensureEffIsSubsetOfFake(tPCeff, tPCfake);
664 if (!theSimPVPosition)
682 thePVposition =
nullptr;
686 event.getByToken(
bsSrc, recoBeamSpotHandle);
693 for (
unsigned int puinfo_ite = 0; puinfo_ite < (*puinfoH).size(); ++puinfo_ite) {
694 if ((*puinfoH)[puinfo_ite].getBunchCrossing() == 0) {
695 puinfo = (*puinfoH)[puinfo_ite];
703 const auto& nLayers_tPCeff = *tpNLayersH;
706 const auto& nPixelLayers_tPCeff = *tpNLayersH;
709 const auto& nStripMonoAndStereoLayers_tPCeff = *tpNLayersH;
729 std::vector<size_t> selected_tPCeff;
730 std::vector<std::tuple<TrackingParticle::Vector, TrackingParticle::Point>> momVert_tPCeff;
741 if (
cores.isValid()) {
742 coresVector =
cores.product();
747 size_t n_selTP_dr =
tpDR(tPCeff, selected_tPCeff, dR_tPCeff, dR_tPCeff_jet, coresVector);
757 std::vector<const edm::ValueMap<reco::DeDxData>*> v_dEdx;
763 v_dEdx.push_back(dEdx1Handle.
product());
764 v_dEdx.push_back(dEdx2Handle.
product());
767 std::vector<const MVACollection*> mvaCollections;
768 std::vector<const QualityMaskCollection*> qualityMaskCollections;
769 std::vector<float> mvaValues;
780 simRecCollPFull = simtorecoCollectionH.
product();
784 recSimCollP = recotosimCollectionH.
product();
790 recSimCollP = &recSimCollL;
793 for (
unsigned int www = 0; www <
label.size();
819 LogTrace(
"TrackValidator") <<
"Calling associateRecoToSim method" 822 recSimCollP = &recSimCollL;
823 LogTrace(
"TrackValidator") <<
"Calling associateSimToReco method" 832 simRecCollP = &simRecCollL;
839 simRecCollP = &simRecCollL;
850 event.getByToken(std::get<0>(tokenTpl), hmva);
851 event.getByToken(std::get<1>(tokenTpl), hqual);
853 mvaCollections.push_back(hmva.
product());
854 qualityMaskCollections.push_back(hqual.
product());
857 <<
"Inconsistency in track collection and MVA sizes. Track collection " << www <<
" has " 858 <<
trackCollection.size() <<
" tracks, whereas the MVA " << (mvaCollections.size() - 1)
859 <<
" for it has " << mvaCollections.back()->size() <<
" entries. Double-check your configuration.";
863 <<
"Inconsistency in track collection and quality mask sizes. Track collection " << www <<
" has " 864 <<
trackCollection.size() <<
" tracks, whereas the quality mask " << (qualityMaskCollections.size() - 1)
865 <<
" for it has " << qualityMaskCollections.back()->size()
866 <<
" entries. Double-check your configuration.";
877 LogTrace(
"TrackValidator") <<
"\n# of TrackingParticles: " << tPCeff.
size() <<
"\n";
881 for (
size_t i = 0;
i < selected_tPCeff.size(); ++
i) {
882 size_t iTP = selected_tPCeff[
i];
886 auto const& momVert = momVert_tPCeff[
i];
894 double dR = dR_tPCeff[iTP];
895 double dR_jet = dR_tPCeff_jet[iTP];
900 momentumTP =
tp.momentum();
901 vertexTP =
tp.vertex();
908 if (theSimPVPosition) {
915 momentumTP = std::get<TrackingParticle::Vector>(momVert);
916 vertexTP = std::get<TrackingParticle::Point>(momVert);
936 const reco::Track* matchedSecondTrackPointer =
nullptr;
937 unsigned int selectsLoose = mvaCollections.size();
938 unsigned int selectsHP = mvaCollections.size();
939 if (simRecColl.
find(tpr) != simRecColl.
end()) {
940 auto const&
rt = simRecColl[tpr];
943 matchedTrackPointer =
rt.begin()->first.get();
944 if (
rt.size() >= 2) {
945 matchedSecondTrackPointer = (
rt.begin() + 1)->
first.get();
947 LogTrace(
"TrackValidator") <<
"TrackingParticle #" << st <<
" with pt=" <<
sqrt(momentumTP.perp2())
948 <<
" associated with quality:" <<
rt.begin()->second <<
"\n";
957 for (
size_t imva = 0; imva < mvaCollections.size(); ++imva) {
958 const auto&
mva = *(mvaCollections[imva]);
959 const auto&
qual = *(qualityMaskCollections[imva]);
961 auto iMatch =
rt.begin();
962 float maxMva =
mva[iMatch->first.key()];
963 for (; iMatch !=
rt.end(); ++iMatch) {
964 auto itrk = iMatch->first.key();
972 mvaValues.push_back(maxMva);
977 LogTrace(
"TrackValidator") <<
"TrackingParticle #" << st <<
" with pt,eta,phi: " <<
sqrt(momentumTP.perp2())
978 <<
" , " << momentumTP.eta() <<
" , " << momentumTP.phi() <<
" , " 979 <<
" NOT associated to any reco::Track" 983 int nSimHits =
tp.numberOfTrackerHits();
984 int nSimLayers = nLayers_tPCeff[tpr];
985 int nSimPixelLayers = nPixelLayers_tPCeff[tpr];
986 int nSimStripMonoAndStereoLayers = nStripMonoAndStereoLayers_tPCeff[tpr];
999 nSimStripMonoAndStereoLayers,
1000 matchedTrackPointer,
1012 if (matchedTrackPointer && matchedSecondTrackPointer) {
1014 histograms.histoProducerAlgo,
w, *matchedTrackPointer, *matchedSecondTrackPointer);
1020 if (matchedTrackPointer) {
1033 LogTrace(
"TrackValidator") <<
"\n# of reco::Tracks with " <<
label[www].process() <<
":" <<
label[www].label()
1038 int seed_fit_failed = 0;
1039 size_t n_selTrack_dr = 0;
1061 bool isSigSimMatched(
false);
1062 bool isSimMatched(
false);
1063 bool isChargeMatched(
true);
1064 int numAssocRecoTracks = 0;
1066 double sharedFraction = 0.;
1069 isSimMatched = tpFound != recSimColl.
end();
1071 isSimMatched =
tpSelector(*tpFound->val[0].first);
1073 const auto&
tp = tpFound->val;
1074 nSimHits =
tp[0].first->numberOfTrackerHits();
1075 sharedFraction =
tp[0].second;
1077 isChargeMatched =
false;
1078 if (simRecColl.
find(
tp[0].first) != simRecColl.
end())
1079 numAssocRecoTracks = simRecColl[
tp[0].
first].
size();
1081 for (
unsigned int tp_ite = 0; tp_ite <
tp.size(); ++tp_ite) {
1084 isSigSimMatched =
true;
1088 LogTrace(
"TrackValidator") <<
"reco::Track #" << rT <<
" with pt=" <<
track->pt()
1089 <<
" associated with quality:" <<
tp.begin()->second <<
"\n";
1091 LogTrace(
"TrackValidator") <<
"reco::Track #" << rT <<
" with pt=" <<
track->pt()
1092 <<
" NOT associated to any TrackingParticle" 1099 unsigned int selectsLoose = mvaCollections.size();
1100 unsigned int selectsHP = mvaCollections.size();
1102 for (
size_t imva = 0; imva < mvaCollections.size(); ++imva) {
1103 const auto&
mva = *(mvaCollections[imva]);
1104 const auto&
qual = *(qualityMaskCollections[imva]);
1105 mvaValues.push_back(
mva[
i]);
1108 selectsLoose = imva;
1114 double dR = dR_trk[
i];
1115 double dR_jet = dR_trk_jet[
i];
1141 if (numAssocRecoTracks > 1) {
1144 if (!isSigSimMatched) {
1179 int chargeTP = tpr->charge();
1182 histograms.histoProducerAlgo,
w, momentumTP, vertexTP, chargeTP, *
track,
bs.position());
1190 mvaCollections.clear();
1191 qualityMaskCollections.clear();
1200 LogTrace(
"TrackValidator") <<
"Collection " << www <<
"\n" 1201 <<
"Total Simulated (selected): " << n_selTP_dr <<
"\n" 1202 <<
"Total Reconstructed (selected): " << n_selTrack_dr <<
"\n" 1203 <<
"Total Reconstructed: " << rT <<
"\n" 1204 <<
"Total Associated (recoToSim): " << at <<
"\n" 1205 <<
"Total Fakes: " << rT - at <<
"\n";
reco::SimToRecoCollection associateSimToReco(const edm::Handle< edm::View< reco::Track >> &tCH, const edm::Handle< TrackingParticleCollection > &tPCH) const
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoEsToken
bool empty() const
Is the RefVector empty.
T getParameter(std::string const &) const
EncodedEventId eventId() const
Signal source, crossing number.
edm::EDGetTokenT< SimHitTPAssociationProducer::SimHitTPAssociationList > _simHitTpMapTag
edm::EDGetTokenT< edm::ValueMap< reco::DeDxData > > m_dEdx2Tag
int event() const
get the contents of the subdetector field (should be protected?)
bool trackFromSeedFitFailed(const reco::Track &track)
std::vector< edm::EDGetTokenT< reco::SimToRecoCollection > > associatormapStRs
reco::RecoToSimCollection associateRecoToSim(const edm::Handle< edm::View< reco::Track >> &tCH, const edm::Handle< TrackingParticleCollection > &tPCH) const
CosmicTrackingParticleSelector cosmictpSelector
virtual void setCurrentFolder(std::string const &fullpath)
T const * product() const
std::vector< std::vector< std::tuple< edm::EDGetTokenT< MVACollection >, edm::EDGetTokenT< QualityMaskCollection > > > > mvaQualityCollectionTokens_
constexpr bool isUninitialized() const noexcept
edm::EDGetTokenT< edm::ValueMap< unsigned int > > tpNStripStereoLayersToken_
def replace(string, replacements)
edm::EDGetTokenT< edm::ValueMap< unsigned int > > tpNLayersToken_
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
bool has(unsigned int index) const
Check if an element (=index) is in the set.
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
const bool doPlotsOnlyForTruePV_
edm::EDGetTokenT< reco::BeamSpot > bsSrc
const_iterator find(const key_type &k) const
find element with specified reference key
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
const_iterator end() const
last iterator over the map (read only)
~MultiTrackValidator() override
Destructor.
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
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &, Histograms &) const override
Method called to book the DQM histograms.
ProductID id() const
Accessor for product ID.
std::vector< edm::EDGetTokenT< edm::View< reco::Track > > > labelToken
edm::EDGetTokenT< edm::ValueMap< reco::DeDxData > > m_dEdx1Tag
const reco::Vertex::Point * getRecoPVPosition(const edm::Event &event, const edm::Handle< TrackingVertexCollection > &htv) const
std::vector< edm::EDGetTokenT< reco::RecoToSimCollection > > associatormapRtSs
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
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.
const EncodedEventId & eventId() const
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
std::unique_ptr< ParametersDefinerForTP > parametersDefinerTP_
void reserve(size_type n)
Reserve space for RefVector.
MultiTrackValidator(const edm::ParameterSet &pset)
Constructor.
ObjectSelector< CosmicTrackingParticleSelector > CosmicTrackingParticleSelector
edm::EDGetTokenT< TrackingParticleRefVector > label_tp_fake_refvector
std::unique_ptr< MTVHistoProducerAlgoForTracker > histoProducerAlgo_
const bool applyTPSelToSimMatch_
const bool doSummaryPlots_
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
size_type size() const
Size of the RefVector.
edm::EDGetTokenT< TrackingVertexCollection > label_tv
edm::EDGetTokenT< reco::VertexToTrackingVertexAssociator > vertexAssociatorToken_
std::unique_ptr< RecoTrackSelectorBase > dRTrackSelector
edm::Ref< edm::HepMCProduct, HepMC::GenParticle > GenParticleRef
const bool ignoremissingtkcollection_
const bool doPVAssociationPlots_
edm::EDGetTokenT< edm::View< reco::Vertex > > recoVertexToken_
std::vector< edm::EDGetTokenT< std::vector< PSimHit > > > simHitTokens_
const bool calculateDrSingleCollection_
auto dxy(const T_Vertex &vertex, const T_Momentum &momentum, const T_Point &point)
void push_back(const RefToBase< T > &)
void push_back(value_type const &ref)
Add a Ref<C, T> to the RefVector.
edm::EDGetTokenT< TrackingParticleCollection > label_tp_fake
void initEvent(edm::Handle< SimHitTPAssociationProducer::SimHitTPAssociationList > simHitsTPAssocToSet) const
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)
reco::VertexRecoToSimCollection associateRecoToSim(const edm::Handle< edm::View< reco::Vertex >> &vCH, const edm::Handle< TrackingVertexCollection > &tVCH) const
edm::EDGetTokenT< edm::View< reco::Candidate > > cores_
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
const TrackingVertex::LorentzVector * getSimPVPosition(const edm::Handle< TrackingVertexCollection > &htv) const
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
doResolutionPlotsForLabels
do resolution plots only for these labels (or all if empty)
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
edm::EDGetTokenT< TrackingParticleCollection > label_tp_effic
const int getPU_NumInteractions() const
edm::Ref< TrackingParticleCollection > TrackingParticleRef
const bool doRecoTrackPlots_
void labelsForToken(EDGetToken iToken, Labels &oLabels) const
const bool parametersDefinerIsCosmic_
const bool doSimTrackPlots_