CMS 3D CMS Logo

MultiTrackValidator.h
Go to the documentation of this file.
1 #ifndef MultiTrackValidator_h
2 #define MultiTrackValidator_h
3 
14 
16 
28 
29 class PileupSummaryInfo;
30 namespace reco {
31  class DeDxData;
32 }
33 
36  std::vector<dqm::reco::MonitorElement*> h_reco_coll, h_assoc_coll, h_assoc2_coll, h_simul_coll, h_looper_coll,
38 };
39 
40 class MultiTrackValidator : public DQMGlobalEDAnalyzer<MultiTrackValidatorHistograms> {
41 public:
43 
46 
48  ~MultiTrackValidator() override;
49 
51  void dqmAnalyze(const edm::Event&, const edm::EventSetup&, const Histograms&) const override;
53  void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&, Histograms&) const override;
54 
55 protected:
56  // ES Tokens
58 
62 
63  //these are used by MTVGenPs
64  // MTV-specific data members
65  std::vector<edm::InputTag> associators;
72 
73  std::vector<edm::EDGetTokenT<std::vector<PSimHit>>> simHitTokens_;
74 
75  std::vector<edm::InputTag> label;
76  std::vector<edm::EDGetTokenT<edm::View<reco::Track>>> labelToken;
77  std::vector<edm::EDGetTokenT<edm::View<TrajectorySeed>>> labelTokenSeed;
79 
82 
84  const bool useAssociators_;
87  const bool doSummaryPlots_;
88  const bool doSimPlots_;
89  const bool doSimTrackPlots_;
90  const bool doRecoTrackPlots_;
91  const bool dodEdxPlots_;
93  const bool doSeedPlots_;
94  const bool doMVAPlots_;
95 
96  std::vector<bool> doResolutionPlots_;
97 
98  std::unique_ptr<MTVHistoProducerAlgoForTracker> histoProducerAlgo_;
99 
100 private:
103  const edm::Handle<TrackingVertexCollection>& htv) const;
105  const Histograms& histograms,
106  const TrackingParticleRefVector& tPCeff,
107  const ParametersDefinerForTP& parametersDefinerTP,
108  const edm::Event& event,
109  const edm::EventSetup& setup,
110  const reco::BeamSpot& bs,
111  std::vector<std::tuple<TrackingParticle::Vector, TrackingParticle::Point>>& momVert_tPCeff,
112  std::vector<size_t>& selected_tPCeff) const;
113  size_t tpDR(const TrackingParticleRefVector& tPCeff,
114  const std::vector<size_t>& selected_tPCeff,
115  DynArray<float>& dR_tPCeff,
116  DynArray<float>& dR_tPCeff_jet,
117  const edm::View<reco::Candidate>* cores) const;
119  const edm::View<reco::Track>& trackCollectionDr,
120  DynArray<float>& dR_trk,
121  DynArray<float>& dR_trk_jet,
122  const edm::View<reco::Candidate>* cores) const;
123 
124  std::vector<edm::EDGetTokenT<reco::TrackToTrackingParticleAssociator>> associatorTokens;
125  std::vector<edm::EDGetTokenT<reco::SimToRecoCollection>> associatormapStRs;
126  std::vector<edm::EDGetTokenT<reco::RecoToSimCollection>> associatormapRtSs;
127 
131 
132  using MVACollection = std::vector<float>;
133  using QualityMaskCollection = std::vector<unsigned char>;
134  std::vector<std::vector<std::tuple<edm::EDGetTokenT<MVACollection>, edm::EDGetTokenT<QualityMaskCollection>>>>
136 
138 
139  bool useGsf;
140  const double simPVMaxZ_;
141 
143  double ptMinJet_;
144  // select tracking particles
145  //(i.e. "denominator" of the efficiency ratio)
149  std::unique_ptr<RecoTrackSelectorBase> dRTrackSelector;
150 
155 };
156 
157 #endif
MultiTrackValidator::dRtpSelector
TrackingParticleSelector dRtpSelector
Definition: MultiTrackValidator.h:148
MultiTrackValidator::simPVMaxZ_
const double simPVMaxZ_
Definition: MultiTrackValidator.h:140
MultiTrackValidator::associatorTokens
std::vector< edm::EDGetTokenT< reco::TrackToTrackingParticleAssociator > > associatorTokens
Definition: MultiTrackValidator.h:124
MultiTrackValidator::tpNLayersToken_
edm::EDGetTokenT< edm::ValueMap< unsigned int > > tpNLayersToken_
Definition: MultiTrackValidator.h:128
MultiTrackValidator::labelToken
std::vector< edm::EDGetTokenT< edm::View< reco::Track > > > labelToken
Definition: MultiTrackValidator.h:76
MultiTrackValidator::dqmAnalyze
void dqmAnalyze(const edm::Event &, const edm::EventSetup &, const Histograms &) const override
Method called once per event.
Definition: MultiTrackValidator.cc:574
CosmicTrackingParticleSelector.h
MultiTrackValidator::cores_
edm::EDGetTokenT< edm::View< reco::Candidate > > cores_
Definition: MultiTrackValidator.h:142
MultiTrackValidator::label_tp_effic_refvector
edm::EDGetTokenT< TrackingParticleRefVector > label_tp_effic_refvector
Definition: MultiTrackValidator.h:68
ESHandle.h
MultiTrackValidator::useGsf
bool useGsf
Definition: MultiTrackValidator.h:139
MultiTrackValidator::label
std::vector< edm::InputTag > label
Definition: MultiTrackValidator.h:75
MultiTrackValidator::bookHistograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &, Histograms &) const override
Method called to book the DQM histograms.
Definition: MultiTrackValidator.cc:224
edm::Run
Definition: Run.h:45
edm::EDGetTokenT< TrackingParticleCollection >
MultiTrackValidator::labelTokenSeed
std::vector< edm::EDGetTokenT< edm::View< TrajectorySeed > > > labelTokenSeed
Definition: MultiTrackValidator.h:77
TrackingParticleSelector.h
CosmicTrackingParticleSelector
Definition: CosmicTrackingParticleSelector.h:39
MultiTrackValidator::dRTrackSelector
std::unique_ptr< RecoTrackSelectorBase > dRTrackSelector
Definition: MultiTrackValidator.h:149
MultiTrackValidator::tpNPixelLayersToken_
edm::EDGetTokenT< edm::ValueMap< unsigned int > > tpNPixelLayersToken_
Definition: MultiTrackValidator.h:129
TrackingParticleSelector
Definition: TrackingParticleSelector.h:16
edm::RefVector< TrackingParticleCollection >
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
edm::Handle
Definition: AssociativeIterator.h:50
MultiTrackValidator::MVACollection
std::vector< float > MVACollection
Definition: MultiTrackValidator.h:132
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
MultiTrackValidator::label_tp_fake_refvector
edm::EDGetTokenT< TrackingParticleRefVector > label_tp_fake_refvector
Definition: MultiTrackValidator.h:69
RecoTrackSelectorBase.h
MultiTrackValidator::tpNStripStereoLayersToken_
edm::EDGetTokenT< edm::ValueMap< unsigned int > > tpNStripStereoLayersToken_
Definition: MultiTrackValidator.h:130
cms::cuda::bs
bs
Definition: HistoContainer.h:127
MultiTrackValidator::associators
std::vector< edm::InputTag > associators
Definition: MultiTrackValidator.h:65
MultiTrackValidator::doMVAPlots_
const bool doMVAPlots_
Definition: MultiTrackValidator.h:94
DynArray
Definition: DynArray.h:5
reco::BeamSpot
Definition: BeamSpot.h:21
MultiTrackValidator::tpDR
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
Definition: MultiTrackValidator.cc:478
MultiTrackValidator::doRecoTrackPlots_
const bool doRecoTrackPlots_
Definition: MultiTrackValidator.h:90
MultiTrackValidatorHistograms::h_reco_coll
std::vector< dqm::reco::MonitorElement * > h_reco_coll
Definition: MultiTrackValidator.h:36
MTVHistoProducerAlgoForTracker.h
MultiTrackValidator::_simHitTpMapTag
edm::EDGetTokenT< SimHitTPAssociationProducer::SimHitTPAssociationList > _simHitTpMapTag
Definition: MultiTrackValidator.h:151
MultiTrackValidator::tTopoEsToken
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoEsToken
Definition: MultiTrackValidator.h:57
MultiTrackValidator::getRecoPVPosition
const reco::Vertex::Point * getRecoPVPosition(const edm::Event &event, const edm::Handle< TrackingVertexCollection > &htv) const
Definition: MultiTrackValidator.cc:391
MultiTrackValidator::parametersDefiner
std::string parametersDefiner
Definition: MultiTrackValidator.h:59
MultiTrackValidator::ignoremissingtkcollection_
const bool ignoremissingtkcollection_
Definition: MultiTrackValidator.h:83
EDGetToken.h
MultiTrackValidator::doSimPlots_
const bool doSimPlots_
Definition: MultiTrackValidator.h:88
MultiTrackValidator::associatormapRtSs
std::vector< edm::EDGetTokenT< reco::RecoToSimCollection > > associatormapRtSs
Definition: MultiTrackValidator.h:126
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
MultiTrackValidator::dodEdxPlots_
const bool dodEdxPlots_
Definition: MultiTrackValidator.h:91
edm::View
Definition: CaloClusterFwd.h:14
TrackToTrackingParticleAssociator.h
edm::ParameterSet
Definition: ParameterSet.h:47
MultiTrackValidator::doSimTrackPlots_
const bool doSimTrackPlots_
Definition: MultiTrackValidator.h:89
MultiTrackValidator::tpParametersAndSelection
void tpParametersAndSelection(const Histograms &histograms, const TrackingParticleRefVector &tPCeff, const ParametersDefinerForTP &parametersDefinerTP, 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
Definition: MultiTrackValidator.cc:418
duplicaterechits_cfi.trackCollection
trackCollection
Definition: duplicaterechits_cfi.py:4
Event.h
MultiTrackValidator::vertexAssociatorToken_
edm::EDGetTokenT< reco::VertexToTrackingVertexAssociator > vertexAssociatorToken_
Definition: MultiTrackValidator.h:154
MultiTrackValidator::calculateDrSingleCollection_
const bool calculateDrSingleCollection_
Definition: MultiTrackValidator.h:85
MultiTrackValidator::doPVAssociationPlots_
const bool doPVAssociationPlots_
Definition: MultiTrackValidator.h:92
MultiTrackValidator::m_dEdx1Tag
edm::EDGetTokenT< edm::ValueMap< reco::DeDxData > > m_dEdx1Tag
Definition: MultiTrackValidator.h:80
MultiTrackValidatorHistograms::h_assoc2_coll
std::vector< dqm::reco::MonitorElement * > h_assoc2_coll
Definition: MultiTrackValidator.h:36
MultiTrackValidator::doResolutionPlots_
std::vector< bool > doResolutionPlots_
Definition: MultiTrackValidator.h:96
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
MultiTrackValidator::~MultiTrackValidator
~MultiTrackValidator() override
Destructor.
Definition: MultiTrackValidator.cc:222
MultiTrackValidator::doSummaryPlots_
const bool doSummaryPlots_
Definition: MultiTrackValidator.h:87
MultiTrackValidatorHistograms::h_assoc_coll
std::vector< dqm::reco::MonitorElement * > h_assoc_coll
Definition: MultiTrackValidator.h:36
MultiTrackValidator::MultiTrackValidator
MultiTrackValidator(const edm::ParameterSet &pset)
Constructor.
Definition: MultiTrackValidator.cc:49
edm::EventSetup
Definition: EventSetup.h:58
histograms
Definition: histograms.py:1
TrackAssociatorRecord.h
MTVHistoProducerAlgoForTrackerHistograms
Definition: MTVHistoProducerAlgoForTracker.h:29
MultiTrackValidator::recoVertexToken_
edm::EDGetTokenT< edm::View< reco::Vertex > > recoVertexToken_
Definition: MultiTrackValidator.h:153
MultiTrackValidator::useAssociators_
const bool useAssociators_
Definition: MultiTrackValidator.h:84
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd >
DynArray.h
ParametersDefinerForTP.h
MultiTrackValidator::doSeedPlots_
const bool doSeedPlots_
Definition: MultiTrackValidator.h:93
ValueMap.h
MultiTrackValidator::parametersDefinerIsCosmic_
const bool parametersDefinerIsCosmic_
Definition: MultiTrackValidator.h:61
MultiTrackValidator::histoProducerAlgo_
std::unique_ptr< MTVHistoProducerAlgoForTracker > histoProducerAlgo_
Definition: MultiTrackValidator.h:98
MultiTrackValidatorHistograms::h_looper_coll
std::vector< dqm::reco::MonitorElement * > h_looper_coll
Definition: MultiTrackValidator.h:36
reco::Vertex::Point
math::XYZPoint Point
point in the space
Definition: Vertex.h:40
MultiTrackValidator::tpDefinerEsToken
const edm::ESGetToken< ParametersDefinerForTP, TrackAssociatorRecord > tpDefinerEsToken
Definition: MultiTrackValidator.h:60
MultiTrackValidatorHistograms::h_pileup_coll
std::vector< dqm::reco::MonitorElement * > h_pileup_coll
Definition: MultiTrackValidator.h:36
MultiTrackValidator::label_tp_fake
edm::EDGetTokenT< TrackingParticleCollection > label_tp_fake
Definition: MultiTrackValidator.h:67
MultiTrackValidator::tpSelector
TrackingParticleSelector tpSelector
Definition: MultiTrackValidator.h:146
Frameworkfwd.h
MultiTrackValidator::label_tv
edm::EDGetTokenT< TrackingVertexCollection > label_tv
Definition: MultiTrackValidator.h:70
MultiTrackValidator::label_pileupinfo
edm::EDGetTokenT< std::vector< PileupSummaryInfo > > label_pileupinfo
Definition: MultiTrackValidator.h:71
MultiTrackValidator::associatormapStRs
std::vector< edm::EDGetTokenT< reco::SimToRecoCollection > > associatormapStRs
Definition: MultiTrackValidator.h:125
MultiTrackValidatorHistograms::h_simul_coll
std::vector< dqm::reco::MonitorElement * > h_simul_coll
Definition: MultiTrackValidator.h:36
HLT_FULL_cff.cores
cores
Definition: HLT_FULL_cff.py:104297
MultiTrackValidator::cosmictpSelector
CosmicTrackingParticleSelector cosmictpSelector
Definition: MultiTrackValidator.h:147
dqm::implementation::IBooker
Definition: DQMStore.h:43
MultiTrackValidator::QualityMaskCollection
std::vector< unsigned char > QualityMaskCollection
Definition: MultiTrackValidator.h:133
MultiTrackValidator
Definition: MultiTrackValidator.h:40
DQMGlobalEDAnalyzer
Definition: DQMGlobalEDAnalyzer.h:76
Candidate.h
MultiTrackValidator::ptMinJet_
double ptMinJet_
Definition: MultiTrackValidator.h:143
MultiTrackValidator::dirName_
std::string dirName_
Definition: MultiTrackValidator.h:137
ParameterSet.h
MultiTrackValidator::bsSrc
edm::EDGetTokenT< reco::BeamSpot > bsSrc
Definition: MultiTrackValidator.h:78
event
Definition: event.py:1
edm::Event
Definition: Event.h:73
MultiTrackValidator::getSimPVPosition
const TrackingVertex::LorentzVector * getSimPVPosition(const edm::Handle< TrackingVertexCollection > &htv) const
Definition: MultiTrackValidator.cc:379
MultiTrackValidator::m_dEdx2Tag
edm::EDGetTokenT< edm::ValueMap< reco::DeDxData > > m_dEdx2Tag
Definition: MultiTrackValidator.h:81
MultiTrackValidator::trackDR
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
Definition: MultiTrackValidator.cc:527
MultiTrackValidator::label_tp_effic
edm::EDGetTokenT< TrackingParticleCollection > label_tp_effic
Definition: MultiTrackValidator.h:66
MultiTrackValidator::doPlotsOnlyForTruePV_
const bool doPlotsOnlyForTruePV_
Definition: MultiTrackValidator.h:86
PileupSummaryInfo
Definition: PileupSummaryInfo.h:22
MultiTrackValidator::labelTokenForDrCalculation
edm::EDGetTokenT< edm::View< reco::Track > > labelTokenForDrCalculation
Definition: MultiTrackValidator.h:152
MultiTrackValidator::mvaQualityCollectionTokens_
std::vector< std::vector< std::tuple< edm::EDGetTokenT< MVACollection >, edm::EDGetTokenT< QualityMaskCollection > > > > mvaQualityCollectionTokens_
Definition: MultiTrackValidator.h:135
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
MultiTrackValidatorHistograms
Definition: MultiTrackValidator.h:34
VertexToTrackingVertexAssociator.h
MultiTrackValidator::simHitTokens_
std::vector< edm::EDGetTokenT< std::vector< PSimHit > > > simHitTokens_
Definition: MultiTrackValidator.h:73
TrackingVertex::LorentzVector
math::XYZTLorentzVectorD LorentzVector
Definition: TrackingVertex.h:28
ParametersDefinerForTP
Definition: ParametersDefinerForTP.h:19
MultiTrackValidatorHistograms::histoProducerAlgo
MTVHistoProducerAlgoForTrackerHistograms histoProducerAlgo
Definition: MultiTrackValidator.h:35
DQMGlobalEDAnalyzer.h