CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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_;
93 
94  std::vector<bool> doResolutionPlots_;
95 
96  std::unique_ptr<MTVHistoProducerAlgoForTracker> histoProducerAlgo_;
97 
98 private:
101  const edm::Handle<TrackingVertexCollection>& htv) const;
103  const Histograms& histograms,
104  const TrackingParticleRefVector& tPCeff,
105  const edm::Event& event,
106  const edm::EventSetup& setup,
107  const reco::BeamSpot& bs,
108  std::vector<std::tuple<TrackingParticle::Vector, TrackingParticle::Point>>& momVert_tPCeff,
109  std::vector<size_t>& selected_tPCeff) const;
110  size_t tpDR(const TrackingParticleRefVector& tPCeff,
111  const std::vector<size_t>& selected_tPCeff,
112  DynArray<float>& dR_tPCeff,
113  DynArray<float>& dR_tPCeff_jet,
114  const edm::View<reco::Candidate>* cores) const;
116  const edm::View<reco::Track>& trackCollectionDr,
117  DynArray<float>& dR_trk,
118  DynArray<float>& dR_trk_jet,
119  const edm::View<reco::Candidate>* cores) const;
120 
121  std::vector<edm::EDGetTokenT<reco::TrackToTrackingParticleAssociator>> associatorTokens;
122  std::vector<edm::EDGetTokenT<reco::SimToRecoCollection>> associatormapStRs;
123  std::vector<edm::EDGetTokenT<reco::RecoToSimCollection>> associatormapRtSs;
124 
128 
129  using MVACollection = std::vector<float>;
130  using QualityMaskCollection = std::vector<unsigned char>;
131  std::vector<std::vector<std::tuple<edm::EDGetTokenT<MVACollection>, edm::EDGetTokenT<QualityMaskCollection>>>>
133 
135 
136  bool useGsf;
137  const double simPVMaxZ_;
138 
140  double ptMinJet_;
141  // select tracking particles
142  //(i.e. "denominator" of the efficiency ratio)
146  std::unique_ptr<RecoTrackSelectorBase> dRTrackSelector;
147 
152 };
153 
154 #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
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
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
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
const reco::Vertex::Point * getRecoPVPosition(const edm::Event &event, const edm::Handle< TrackingVertexCollection > &htv) const
~MultiTrackValidator() override
Destructor.
edm::EDGetTokenT< edm::ValueMap< unsigned int > > tpNPixelLayersToken_
math::XYZTLorentzVectorD LorentzVector
std::vector< edm::InputTag > associators
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
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
std::vector< edm::EDGetTokenT< reco::RecoToSimCollection > > associatormapRtSs
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_
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_
tuple trackCollection
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_
edm::EDGetTokenT< TrackingParticleCollection > label_tp_fake
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
edm::EDGetTokenT< edm::View< reco::Candidate > > cores_
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: Run.h:45
const TrackingVertex::LorentzVector * getSimPVPosition(const edm::Handle< TrackingVertexCollection > &htv) const
const bool parametersDefinerIsCosmic_