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,
36  h_pileup_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:
96  const TrackingVertex::LorentzVector* getSimPVPosition(const edm::Handle<TrackingVertexCollection>& htv) const;
97  const reco::Vertex::Point* getRecoPVPosition(const edm::Event& event,
98  const edm::Handle<TrackingVertexCollection>& htv) const;
99  void tpParametersAndSelection(
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;
113  void trackDR(const edm::View<reco::Track>& trackCollection,
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
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< std::vector< std::tuple< edm::EDGetTokenT< MVACollection >, edm::EDGetTokenT< QualityMaskCollection > > > > mvaQualityCollectionTokens_
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
edm::EDGetTokenT< edm::ValueMap< unsigned int > > tpNPixelLayersToken_
math::XYZTLorentzVectorD LorentzVector
std::vector< edm::InputTag > associators
std::vector< edm::EDGetTokenT< edm::View< reco::Track > > > labelToken
edm::EDGetTokenT< edm::ValueMap< reco::DeDxData > > m_dEdx1Tag
std::vector< edm::EDGetTokenT< reco::RecoToSimCollection > > associatormapRtSs
example_global void dqmAnalyze(edm::Event const &,@example_global edm::EventSetup const &,@example_global Histograms___class__ const &) const override
TrackingParticleSelector tpSelector
std::vector< bool > doResolutionPlots_
edm::EDGetTokenT< edm::View< reco::Track > > labelTokenForDrCalculation
math::XYZPoint Point
point in the space
Definition: Vertex.h:39
edm::EDGetTokenT< std::vector< PileupSummaryInfo > > label_pileupinfo
std::vector< edm::InputTag > label
edm::EDGetTokenT< TrackingParticleRefVector > label_tp_fake_refvector
std::unique_ptr< MTVHistoProducerAlgoForTracker > histoProducerAlgo_
edm::EDGetTokenT< TrackingVertexCollection > label_tv
edm::EDGetTokenT< reco::VertexToTrackingVertexAssociator > vertexAssociatorToken_
std::unique_ptr< RecoTrackSelectorBase > dRTrackSelector
example_stream void bookHistograms(DQMStore::IBooker &,@example_stream edm::Run const &,@example_stream edm::EventSetup const &) override
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_
edm::EDGetTokenT< TrackingParticleRefVector > label_tp_effic_refvector
edm::EDGetTokenT< TrackingParticleCollection > label_tp_effic
Definition: event.py:1
Definition: Run.h:45
const bool parametersDefinerIsCosmic_