CMS 3D CMS Logo

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