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  // ES Tokens
57 
58  std::unique_ptr<ParametersDefinerForTP> parametersDefinerTP_;
60 
61  //these are used by MTVGenPs
62  // MTV-specific data members
63  std::vector<edm::InputTag> associators;
70 
71  std::vector<edm::EDGetTokenT<std::vector<PSimHit>>> simHitTokens_;
72 
73  std::vector<edm::InputTag> label;
74  std::vector<edm::EDGetTokenT<edm::View<reco::Track>>> labelToken;
75  std::vector<edm::EDGetTokenT<edm::View<TrajectorySeed>>> labelTokenSeed;
77 
80 
82  const bool useAssociators_;
85  const bool doSummaryPlots_;
86  const bool doSimPlots_;
87  const bool doSimTrackPlots_;
88  const bool doRecoTrackPlots_;
89  const bool dodEdxPlots_;
91  const bool doSeedPlots_;
92  const bool doMVAPlots_;
94 
95  std::vector<bool> doResolutionPlots_;
96 
97  std::unique_ptr<MTVHistoProducerAlgoForTracker> histoProducerAlgo_;
98 
99 private:
102  const edm::Handle<TrackingVertexCollection>& htv) const;
104  const Histograms& histograms,
105  const TrackingParticleRefVector& tPCeff,
106  const edm::Event& event,
107  const edm::EventSetup& setup,
108  const reco::BeamSpot& bs,
109  std::vector<std::tuple<TrackingParticle::Vector, TrackingParticle::Point>>& momVert_tPCeff,
110  std::vector<size_t>& selected_tPCeff) const;
111  size_t tpDR(const TrackingParticleRefVector& tPCeff,
112  const std::vector<size_t>& selected_tPCeff,
113  DynArray<float>& dR_tPCeff,
114  DynArray<float>& dR_tPCeff_jet,
115  const edm::View<reco::Candidate>* cores) const;
117  const edm::View<reco::Track>& trackCollectionDr,
118  DynArray<float>& dR_trk,
119  DynArray<float>& dR_trk_jet,
120  const edm::View<reco::Candidate>* cores) const;
121 
122  std::vector<edm::EDGetTokenT<reco::TrackToTrackingParticleAssociator>> associatorTokens;
123  std::vector<edm::EDGetTokenT<reco::SimToRecoCollection>> associatormapStRs;
124  std::vector<edm::EDGetTokenT<reco::RecoToSimCollection>> associatormapRtSs;
125 
129 
130  using MVACollection = std::vector<float>;
131  using QualityMaskCollection = std::vector<unsigned char>;
132  std::vector<std::vector<std::tuple<edm::EDGetTokenT<MVACollection>, edm::EDGetTokenT<QualityMaskCollection>>>>
134 
136 
137  bool useGsf;
138  const double simPVMaxZ_;
139 
141  double ptMinJet_;
142  // select tracking particles
143  //(i.e. "denominator" of the efficiency ratio)
147  std::unique_ptr<RecoTrackSelectorBase> dRTrackSelector;
148 
153 };
154 
155 #endif
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoEsToken
std::vector< dqm::reco::MonitorElement * > h_simul_coll
std::vector< float > MVACollection
edm::EDGetTokenT< SimHitTPAssociationProducer::SimHitTPAssociationList > _simHitTpMapTag
edm::EDGetTokenT< edm::ValueMap< reco::DeDxData > > m_dEdx2Tag
std::vector< edm::EDGetTokenT< reco::SimToRecoCollection > > associatormapStRs
CosmicTrackingParticleSelector cosmictpSelector
std::vector< dqm::reco::MonitorElement * > h_assoc2_coll
std::vector< std::vector< std::tuple< edm::EDGetTokenT< MVACollection >, edm::EDGetTokenT< QualityMaskCollection > > > > mvaQualityCollectionTokens_
std::vector< dqm::reco::MonitorElement * > h_reco_coll
edm::EDGetTokenT< edm::ValueMap< unsigned int > > tpNStripStereoLayersToken_
edm::EDGetTokenT< edm::ValueMap< unsigned int > > tpNLayersToken_
std::vector< unsigned char > QualityMaskCollection
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
std::vector< edm::EDGetTokenT< edm::View< TrajectorySeed > > > labelTokenSeed
TrackingParticleSelector dRtpSelector
std::vector< edm::EDGetTokenT< reco::TrackToTrackingParticleAssociator > > associatorTokens
const bool doPlotsOnlyForTruePV_
edm::EDGetTokenT< reco::BeamSpot > bsSrc
~MultiTrackValidator() override
Destructor.
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.
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
std::vector< dqm::reco::MonitorElement * > h_assoc_coll
TrackingParticleSelector tpSelector
std::vector< bool > doResolutionPlots_
edm::EDGetTokenT< edm::View< reco::Track > > labelTokenForDrCalculation
math::XYZPoint Point
point in the space
Definition: Vertex.h:40
edm::EDGetTokenT< std::vector< PileupSummaryInfo > > label_pileupinfo
std::vector< edm::InputTag > label
std::unique_ptr< ParametersDefinerForTP > parametersDefinerTP_
trackCollection
Definition: JetHT_cfg.py:51
MultiTrackValidator(const edm::ParameterSet &pset)
Constructor.
std::vector< dqm::reco::MonitorElement * > h_looper_coll
edm::EDGetTokenT< TrackingParticleRefVector > label_tp_fake_refvector
std::unique_ptr< MTVHistoProducerAlgoForTracker > histoProducerAlgo_
const bool applyTPSelToSimMatch_
edm::EDGetTokenT< TrackingVertexCollection > label_tv
edm::EDGetTokenT< reco::VertexToTrackingVertexAssociator > vertexAssociatorToken_
std::unique_ptr< RecoTrackSelectorBase > dRTrackSelector
const bool ignoremissingtkcollection_
MTVHistoProducerAlgoForTrackerHistograms histoProducerAlgo
const bool doPVAssociationPlots_
edm::EDGetTokenT< edm::View< reco::Vertex > > recoVertexToken_
std::vector< edm::EDGetTokenT< std::vector< PSimHit > > > simHitTokens_
const bool calculateDrSingleCollection_
fixed size matrix
edm::EDGetTokenT< TrackingParticleCollection > label_tp_fake
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
edm::EDGetTokenT< TrackingParticleRefVector > label_tp_effic_refvector
void dqmAnalyze(const edm::Event &, const edm::EventSetup &, const Histograms &) const override
Method called once per event.
std::vector< dqm::reco::MonitorElement * > h_pileup_coll
edm::EDGetTokenT< TrackingParticleCollection > label_tp_effic
Definition: event.py:1
Definition: Run.h:45
const bool parametersDefinerIsCosmic_