46 bool trackSelected(
unsigned char mask,
unsigned char qual) {
47 return mask & 1<<qual;
57 ignoremissingtkcollection_(pset.getUntrackedParameter<
bool>(
"ignoremissingtrackcollection",
false)),
58 useAssociators_(pset.getParameter<
bool >(
"UseAssociators")),
59 calculateDrSingleCollection_(pset.getUntrackedParameter<
bool>(
"calculateDrSingleCollection")),
60 doPlotsOnlyForTruePV_(pset.getUntrackedParameter<
bool>(
"doPlotsOnlyForTruePV")),
61 doSummaryPlots_(pset.getUntrackedParameter<
bool>(
"doSummaryPlots")),
62 doSimPlots_(pset.getUntrackedParameter<
bool>(
"doSimPlots")),
63 doSimTrackPlots_(pset.getUntrackedParameter<
bool>(
"doSimTrackPlots")),
64 doRecoTrackPlots_(pset.getUntrackedParameter<
bool>(
"doRecoTrackPlots")),
65 dodEdxPlots_(pset.getUntrackedParameter<
bool>(
"dodEdxPlots")),
66 doPVAssociationPlots_(pset.getUntrackedParameter<
bool>(
"doPVAssociationPlots")),
67 doSeedPlots_(pset.getUntrackedParameter<
bool>(
"doSeedPlots")),
68 doMVAPlots_(pset.getUntrackedParameter<
bool>(
"doMVAPlots")),
69 simPVMaxZ_(pset.getUntrackedParameter<double>(
"simPVMaxZ"))
74 if(pset.
getParameter<
bool>(
"label_tp_effic_refvector")) {
78 label_tp_effic = consumes<TrackingParticleCollection>(label_tp_effic_tag);
84 label_tp_fake = consumes<TrackingParticleCollection>(label_tp_fake_tag);
87 for(
const auto&
tag: pset.
getParameter<std::vector<edm::InputTag>>(
"sim")) {
93 for (
auto& itag :
label) {
95 const bool doResol = doResolutionPlotsForLabels.empty() || (
std::find(cbegin(doResolutionPlotsForLabels), cend(doResolutionPlotsForLabels), itag) != cend(doResolutionPlotsForLabels));
100 std::sort(
begin(labelTmp),
end(labelTmp));
105 throw cms::Exception(
"Configuration") <<
"Duplicate InputTag in labels: " <<
l;
137 for(
size_t iIter=0; iIter<
labelToken.size(); ++iIter) {
140 if(mvaPSet.exists(labels.
module)) {
143 return std::make_tuple(consumes<MVACollection>(edm::InputTag(tag,
"MVAValues")),
144 consumes<QualityMaskCollection>(edm::InputTag(tag,
"QualityMasks")));
215 const auto minColl = -0.5;
216 const auto maxColl =
label.size()-0.5;
217 const auto nintColl =
label.size();
220 for(
size_t i=0;
i<
label.size(); ++
i) {
223 me.disableAlphanumeric();
238 for (
unsigned int ww=0;ww<
associators.size();ww++){
245 histograms.
h_assoc_coll.push_back(binLabels( ibook.
book1D(
"num_assoc(simToReco)_coll",
"N of associated (simToReco) tracks vs track collection", nintColl, minColl, maxColl) ));
246 histograms.
h_simul_coll.push_back(binLabels( ibook.
book1D(
"num_simul_coll",
"N of simulated tracks vs track collection", nintColl, minColl, maxColl) ));
249 histograms.
h_reco_coll.push_back(binLabels( ibook.
book1D(
"num_reco_coll",
"N of reco track vs track collection", nintColl, minColl, maxColl) ));
250 histograms.
h_assoc2_coll.push_back(binLabels( ibook.
book1D(
"num_assoc(recoToSim)_coll",
"N of associated (recoToSim) tracks vs track collection", nintColl, minColl, maxColl) ));
251 histograms.
h_looper_coll.push_back(binLabels( ibook.
book1D(
"num_duplicate_coll",
"N of associated (recoToSim) looper tracks vs track collection", nintColl, minColl, maxColl) ));
252 histograms.
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++){
262 if(!algo.
label().empty())
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());
369 std::vector<std::tuple<TrackingParticle::Vector, TrackingParticle::Point> >& momVert_tPCeff,
370 std::vector<size_t>& selected_tPCeff)
const {
371 selected_tPCeff.reserve(tPCeff.
size());
372 momVert_tPCeff.reserve(tPCeff.
size());
375 for(
size_t j=0; j<tPCeff.
size(); ++j) {
383 if(tpr->eventId().bunchCrossing() == 0)
387 selected_tPCeff.push_back(j);
388 momVert_tPCeff.emplace_back(momentum, vertex);
394 for(
auto const& tpr: tPCeff) {
408 selected_tPCeff.push_back(j);
411 momVert_tPCeff.emplace_back(momentum, vertex);
423 const std::vector<size_t>& selected_tPCeff,
425 float etaL[tPCeff.
size()], phiL[tPCeff.
size()];
426 size_t n_selTP_dr = 0;
427 for(
size_t iTP: selected_tPCeff) {
429 auto const& tp2 = *(tPCeff[iTP]);
430 auto &&
p = tp2.momentum();
431 etaL[iTP] = etaFromXYZ(
p.x(),
p.y(),
p.z());
432 phiL[iTP] = atan2f(
p.y(),
p.x());
434 for(
size_t iTP1: selected_tPCeff) {
435 auto const& tp = *(tPCeff[iTP1]);
439 float eta = etaL[iTP1];
440 float phi = phiL[iTP1];
441 for(
size_t iTP2: selected_tPCeff) {
443 if (iTP1==iTP2) {
continue;}
444 auto dR_tmp =
reco::deltaR2(eta, phi, etaL[iTP2], phiL[iTP2]);
445 if (dR_tmp<dR) dR=dR_tmp;
455 float etaL[trackCollectionDr.
size()];
456 float phiL[trackCollectionDr.
size()];
457 bool validL[trackCollectionDr.
size()];
458 for (
auto const & track2 : trackCollectionDr) {
459 auto &&
p = track2.momentum();
460 etaL[
i] = etaFromXYZ(
p.x(),
p.y(),
p.z());
461 phiL[
i] = atan2f(
p.y(),
p.x());
466 auto const &
track = trackCollection[
i];
469 auto &&
p =
track.momentum();
470 float eta = etaFromXYZ(
p.x(),
p.y(),
p.z());
471 float phi = atan2f(
p.y(),
p.x());
473 if(!validL[j])
continue;
484 using namespace reco;
486 LogDebug(
"TrackValidator") <<
"\n====================================================" <<
"\n" 487 <<
"Analyzing new event" <<
"\n" 488 <<
"====================================================\n" <<
"\n";
494 auto parametersDefinerTP = parametersDefinerTPHandle->
clone();
512 if(!tp_effic_refvector) {
514 for(
size_t i=0,
size=TPCollectionHeff->size();
i<
size; ++
i) {
517 tmpTPeffPtr = &tmpTPeff;
521 tmpTPeffPtr = TPCollectionHeffRefVector.
product();
526 for(
size_t i=0,
size=TPCollectionHfake->size();
i<
size; ++
i) {
529 tmpTPfakePtr = &tmpTPfake;
534 tmpTPfakePtr = TPCollectionHfakeRefVector.
product();
540 ensureEffIsSubsetOfFake(tPCeff, tPCfake);
546 parametersDefinerTP->initEvent(simHitsTPAssoc);
555 if(!theSimPVPosition)
return;
571 thePVposition =
nullptr;
575 event.getByToken(
bsSrc,recoBeamSpotHandle);
582 for (
unsigned int puinfo_ite=0;puinfo_ite<(*puinfoH).size();++puinfo_ite){
583 if ((*puinfoH)[puinfo_ite].getBunchCrossing()==0){
584 puinfo=(*puinfoH)[puinfo_ite];
592 const auto& nLayers_tPCeff = *tpNLayersH;
595 const auto& nPixelLayers_tPCeff = *tpNLayersH;
598 const auto& nStripMonoAndStereoLayers_tPCeff = *tpNLayersH;
618 std::vector<size_t> selected_tPCeff;
619 std::vector<std::tuple<TrackingParticle::Vector, TrackingParticle::Point>> momVert_tPCeff;
620 tpParametersAndSelection(histograms, tPCeff, *parametersDefinerTP, event, setup, bs, momVert_tPCeff, selected_tPCeff);
624 size_t n_selTP_dr =
tpDR(tPCeff, selected_tPCeff, dR_tPCeff);
634 std::vector<const edm::ValueMap<reco::DeDxData> *> v_dEdx;
640 v_dEdx.push_back(dEdx1Handle.
product());
641 v_dEdx.push_back(dEdx2Handle.
product());
644 std::vector<const MVACollection *> mvaCollections;
645 std::vector<const QualityMaskCollection *> qualityMaskCollections;
646 std::vector<float> mvaValues;
649 for (
unsigned int ww=0;ww<
associators.size();ww++){
657 simRecCollPFull = simtorecoCollectionH.
product();
661 recSimCollP = recotosimCollectionH.
product();
667 recSimCollP = &recSimCollL;
670 for (
unsigned int www=0;www<
label.size();www++, w++){
682 LogTrace(
"TrackValidator") <<
"Analyzing " 683 <<
label[www] <<
" with " 696 LogTrace(
"TrackValidator") <<
"Calling associateRecoToSim method" <<
"\n";
698 recSimCollP = &recSimCollL;
699 LogTrace(
"TrackValidator") <<
"Calling associateSimToReco method" <<
"\n";
707 simRecCollP = &simRecCollL;
715 simRecCollP = &simRecCollL;
726 event.getByToken(std::get<0>(tokenTpl), hmva);
727 event.getByToken(std::get<1>(tokenTpl), hqual);
729 mvaCollections.push_back(hmva.
product());
730 qualityMaskCollections.push_back(hqual.
product());
731 if(mvaCollections.back()->size() != trackCollection.
size()) {
732 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.";
734 if(qualityMaskCollections.back()->size() != trackCollection.
size()) {
735 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.";
746 LogTrace(
"TrackValidator") <<
"\n# of TrackingParticles: " << tPCeff.
size() <<
"\n";
751 for(
size_t i=0;
i<selected_tPCeff.size(); ++
i) {
752 size_t iTP = selected_tPCeff[
i];
756 auto const& momVert = momVert_tPCeff[
i];
764 double dR=dR_tPCeff[iTP];
778 if(theSimPVPosition) {
786 momentumTP = std::get<TrackingParticle::Vector>(momVert);
787 vertexTP = std::get<TrackingParticle::Point>(momVert);
807 const reco::Track *matchedSecondTrackPointer =
nullptr;
808 unsigned int selectsLoose = mvaCollections.size();
809 unsigned int selectsHP = mvaCollections.size();
810 if(simRecColl.
find(tpr) != simRecColl.
end()){
811 auto const & rt = simRecColl[tpr];
815 matchedTrackPointer = rt.begin()->first.get();
817 matchedSecondTrackPointer = (rt.begin()+1)->
first.get();
819 LogTrace(
"TrackValidator") <<
"TrackingParticle #" << st
820 <<
" with pt=" <<
sqrt(momentumTP.perp2())
821 <<
" associated with quality:" << rt.begin()->second <<
"\n";
830 for(
size_t imva=0; imva<mvaCollections.size(); ++imva) {
831 const auto&
mva = *(mvaCollections[imva]);
832 const auto& qual = *(qualityMaskCollections[imva]);
834 auto iMatch = rt.begin();
835 float maxMva =
mva[iMatch->first.key()];
836 for(; iMatch!=rt.end(); ++iMatch) {
837 auto itrk = iMatch->first.key();
845 mvaValues.push_back(maxMva);
851 <<
"TrackingParticle #" << st
852 <<
" with pt,eta,phi: " 853 <<
sqrt(momentumTP.perp2()) <<
" , " 854 << momentumTP.eta() <<
" , " 855 << momentumTP.phi() <<
" , " 856 <<
" NOT associated to any reco::Track" <<
"\n";
863 int nSimLayers = nLayers_tPCeff[tpr];
864 int nSimPixelLayers = nPixelLayers_tPCeff[tpr];
865 int nSimStripMonoAndStereoLayers = nStripMonoAndStereoLayers_tPCeff[tpr];
866 histoProducerAlgo_->fill_recoAssociated_simTrack_histos(histograms.
histoProducerAlgo,w,tp,momentumTP,vertexTP,dxySim,dzSim,dxyPVSim,dzPVSim,nSimHits,nSimLayers,nSimPixelLayers,nSimStripMonoAndStereoLayers,matchedTrackPointer,puinfo.
getPU_NumInteractions(),
dR, thePVposition, theSimPVPosition, bs.
position(), mvaValues, selectsLoose, selectsHP);
869 if(matchedTrackPointer && matchedSecondTrackPointer) {
876 if (matchedTrackPointer) {
892 LogTrace(
"TrackValidator") <<
"\n# of reco::Tracks with " 893 <<
label[www].process()<<
":" 894 <<
label[www].label()<<
":" 895 <<
label[www].instance()
896 <<
": " << trackCollection.
size() <<
"\n";
901 int seed_fit_failed = 0;
902 size_t n_selTrack_dr = 0;
907 trackCollectionDr = trackCollectionForDrCalculation.
product();
910 trackDR(trackCollection, *trackCollectionDr, dR_trk);
918 bool isSigSimMatched(
false);
919 bool isSimMatched(
false);
920 bool isChargeMatched(
true);
921 int numAssocRecoTracks = 0;
923 double sharedFraction = 0.;
926 isSimMatched = tpFound != recSimColl.
end();
928 const auto& tp = tpFound->val;
929 nSimHits = tp[0].first->numberOfTrackerHits();
930 sharedFraction = tp[0].second;
931 if (tp[0].
first->charge() !=
track->charge()) isChargeMatched =
false;
932 if(simRecColl.
find(tp[0].first) != simRecColl.
end()) numAssocRecoTracks = simRecColl[tp[0].
first].
size();
934 for (
unsigned int tp_ite=0;tp_ite<tp.size();++tp_ite){
937 isSigSimMatched =
true;
942 LogTrace(
"TrackValidator") <<
"reco::Track #" << rT <<
" with pt=" <<
track->pt()
943 <<
" associated with quality:" << tp.begin()->second <<
"\n";
945 LogTrace(
"TrackValidator") <<
"reco::Track #" << rT <<
" with pt=" <<
track->pt()
946 <<
" NOT associated to any TrackingParticle" <<
"\n";
952 unsigned int selectsLoose = mvaCollections.size();
953 unsigned int selectsHP = mvaCollections.size();
955 for(
size_t imva=0; imva<mvaCollections.size(); ++imva) {
956 const auto&
mva = *(mvaCollections[imva]);
957 const auto& qual = *(qualityMaskCollections[imva]);
958 mvaValues.push_back(
mva[
i]);
968 histoProducerAlgo_->fill_generic_recoTrack_histos(histograms.
histoProducerAlgo,w,*
track, ttopo, bs.
position(), thePVposition, theSimPVPosition, isSimMatched,isSigSimMatched, isChargeMatched, numAssocRecoTracks, puinfo.
getPU_NumInteractions(), nSimHits, sharedFraction,
dR, mvaValues, selectsLoose, selectsHP);
975 if(numAssocRecoTracks>1) {
978 if(!isSigSimMatched) {
989 if (!isSimMatched)
continue;
1013 int chargeTP = tpr->charge();
1025 mvaCollections.clear();
1026 qualityMaskCollections.clear();
1035 LogTrace(
"TrackValidator") <<
"Collection " << www <<
"\n" 1036 <<
"Total Simulated (selected): " << n_selTP_dr <<
"\n" 1037 <<
"Total Reconstructed (selected): " << n_selTrack_dr <<
"\n" 1038 <<
"Total Reconstructed: " << rT <<
"\n" 1039 <<
"Total Associated (recoToSim): " << at <<
"\n" 1040 <<
"Total Fakes: " << rT-at <<
"\n";
void trackDR(const edm::View< reco::Track > &trackCollection, const edm::View< reco::Track > &trackCollectionDr, DynArray< float > &dR_trk) const
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
std::vector< ConcurrentMonitorElement > h_pileup_coll
edm::EDGetTokenT< SimHitTPAssociationProducer::SimHitTPAssociationList > _simHitTpMapTag
int event() const
get the contents of the subdetector field (should be protected?)
edm::EDGetTokenT< edm::ValueMap< reco::DeDxData > > m_dEdx2Tag
bool trackFromSeedFitFailed(const reco::Track &track)
std::vector< edm::EDGetTokenT< reco::SimToRecoCollection > > associatormapStRs
CosmicTrackingParticleSelector cosmictpSelector
Vector momentum() const
spatial momentum vector
const_iterator end() const
last iterator over the map (read only)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
const_iterator find(const key_type &k) const
find element with specified reference key
std::vector< std::vector< std::tuple< edm::EDGetTokenT< MVACollection >, edm::EDGetTokenT< QualityMaskCollection > > > > mvaQualityCollectionTokens_
std::vector< ConcurrentMonitorElement > h_simul_coll
edm::EDGetTokenT< edm::ValueMap< unsigned int > > tpNStripStereoLayersToken_
def replace(string, replacements)
edm::EDGetTokenT< edm::ValueMap< unsigned int > > tpNLayersToken_
def setup(process, global_tag, zero_tesla=False)
T_AssociationMap associationMapFilterValues(const T_AssociationMap &map, const T_RefVector &valueRefs)
TrackingParticleSelector dRtpSelector
trackCollectionForDrCalculation
auto vector_transform(std::vector< InputType > const &input, Function predicate) -> std::vector< typename std::remove_cv< typename std::remove_reference< decltype(predicate(input.front()))>::type >::type >
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
std::vector< edm::EDGetTokenT< reco::TrackToTrackingParticleAssociator > > associatorTokens
bool empty() const
Is the RefVector empty.
const bool doPlotsOnlyForTruePV_
edm::EDGetTokenT< reco::BeamSpot > bsSrc
const reco::Vertex::Point * getRecoPVPosition(const edm::Event &event, const edm::Handle< TrackingVertexCollection > &htv) const
std::vector< ConcurrentMonitorElement > h_looper_coll
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
void tpParametersAndSelection(const Histograms &histograms, const TrackingParticleRefVector &tPCeff, const ParametersDefinerForTP ¶metersDefinerTP, const edm::Event &event, const edm::EventSetup &setup, const reco::BeamSpot &bs, std::vector< std::tuple< TrackingParticle::Vector, TrackingParticle::Point > > &momVert_tPCeff, std::vector< size_t > &selected_tPCeff) const
std::vector< ConcurrentMonitorElement > h_reco_coll
~MultiTrackValidator() override
Destructor.
RefToBase< value_type > refAt(size_type i) const
math::XYZPointD Point
point in the space
const bool useAssociators_
edm::EDGetTokenT< edm::ValueMap< unsigned int > > tpNPixelLayersToken_
math::XYZTLorentzVectorD LorentzVector
std::vector< edm::InputTag > associators
SingleObjectSelector< TrackingParticleCollection,::TrackingParticleSelector > TrackingParticleSelector
std::vector< edm::EDGetTokenT< edm::View< reco::Track > > > labelToken
bool has(unsigned int index) const
Check if an element (=index) is in the set.
edm::Ref< edm::HepMCProduct, HepMC::GenParticle > GenParticleRef
edm::EDGetTokenT< edm::ValueMap< reco::DeDxData > > m_dEdx1Tag
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)
size_t tpDR(const TrackingParticleRefVector &tPCeff, const std::vector< size_t > &selected_tPCeff, DynArray< float > &dR_tPCeff) const
int bunchCrossing() const
get the detector field from this detid
TrackingParticleSelector tpSelector
std::vector< bool > doResolutionPlots_
Abs< T >::type abs(const T &t)
std::vector< ConcurrentMonitorElement > h_assoc_coll
ConcurrentMonitorElement book1D(Args &&...args)
virtual TrackingParticle::Vector momentum(const edm::Event &iEvent, const edm::EventSetup &iSetup, const Charge ch, const Point &vtx, const LorentzVector &lv) const
edm::EDGetTokenT< edm::View< reco::Track > > labelTokenForDrCalculation
math::XYZPoint Point
point in the space
edm::EDGetTokenT< std::vector< PileupSummaryInfo > > label_pileupinfo
std::vector< edm::InputTag > label
void initEvent(edm::Handle< SimHitTPAssociationProducer::SimHitTPAssociationList > simHitsTPAssocToSet) const
virtual std::unique_ptr< ParametersDefinerForTP > clone() const
MultiTrackValidator(const edm::ParameterSet &pset)
Constructor.
ObjectSelector< CosmicTrackingParticleSelector > CosmicTrackingParticleSelector
edm::EDGetTokenT< TrackingParticleRefVector > label_tp_fake_refvector
std::unique_ptr< MTVHistoProducerAlgoForTracker > histoProducerAlgo_
const bool doSummaryPlots_
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
T const * product() const
edm::EDGetTokenT< TrackingVertexCollection > label_tv
reco::RecoToSimCollection associateRecoToSim(const edm::Handle< edm::View< reco::Track > > &tCH, const edm::Handle< TrackingParticleCollection > &tPCH) const
compare reco to sim the handle of reco::Track and TrackingParticle collections
edm::EDGetTokenT< reco::VertexToTrackingVertexAssociator > vertexAssociatorToken_
std::unique_ptr< RecoTrackSelectorBase > dRTrackSelector
const bool ignoremissingtkcollection_
MTVHistoProducerAlgoForTrackerHistograms histoProducerAlgo
const int getPU_NumInteractions() const
void labelsForToken(EDGetToken iToken, Labels &oLabels) const
const bool doPVAssociationPlots_
EncodedEventId eventId() const
Signal source, crossing number.
Point vertex() const
Parent vertex position.
edm::EDGetTokenT< edm::View< reco::Vertex > > recoVertexToken_
std::vector< edm::EDGetTokenT< std::vector< PSimHit > > > simHitTokens_
void dqmAnalyze(const edm::Event &, const edm::EventSetup &, const Histograms &) const override
Method called once per event.
const EncodedEventId & eventId() const
const bool calculateDrSingleCollection_
auto dxy(const T_Vertex &vertex, const T_Momentum &momentum, const T_Point &point)
void bookHistograms(DQMStore::ConcurrentBooker &, edm::Run const &, edm::EventSetup const &, Histograms &) const override
Method called to book the DQM histograms.
void push_back(const RefToBase< T > &)
std::string parametersDefiner
void push_back(value_type const &ref)
Add a Ref<C, T> to the RefVector.
size_type size() const
Size of the RefVector.
edm::EDGetTokenT< TrackingParticleCollection > label_tp_fake
Monte Carlo truth information used for tracking validation.
void insert(unsigned int index)
Insert an element (=index) to the set.
bool isUninitialized() const
const Point & position() const
position
#define declareDynArray(T, n, x)
int numberOfTrackerHits() const
The number of hits in the tracker. Hits on overlaps in the same layer count separately.
reco::SimToRecoCollection associateSimToReco(const edm::Handle< edm::View< reco::Track > > &tCH, const edm::Handle< TrackingParticleCollection > &tPCH) const
compare reco to sim the handle of reco::Track and TrackingParticle collections
math::XYZVectorD Vector
point in the space
edm::EDGetTokenT< TrackingParticleRefVector > label_tp_effic_refvector
reco::VertexRecoToSimCollection associateRecoToSim(const edm::Handle< edm::View< reco::Vertex > > &vCH, const edm::Handle< TrackingVertexCollection > &tVCH) const
compare reco to sim the handle of reco::Vertex and TrackingVertex collections
doResolutionPlotsForLabels
do resolution plots only for these labels (or all if empty)
static std::unique_ptr< RecoTrackSelectorBase > makeRecoTrackSelectorFromTPSelectorParameters(const edm::ParameterSet &pset)
void reserve(unsigned int size)
Reserve memory for the set.
std::vector< ConcurrentMonitorElement > h_assoc2_coll
edm::EDGetTokenT< TrackingParticleCollection > label_tp_effic
edm::Ref< TrackingParticleCollection > TrackingParticleRef
const bool doRecoTrackPlots_
virtual TrackingParticle::Point vertex(const edm::Event &iEvent, const edm::EventSetup &iSetup, const Charge ch, const Point &vtx, const LorentzVector &lv) const
const TrackingVertex::LorentzVector * getSimPVPosition(const edm::Handle< TrackingVertexCollection > &htv) const
const bool parametersDefinerIsCosmic_
const bool doSimTrackPlots_