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 
29 class PileupSummaryInfo;
30 namespace reco {
31 class DeDxData;
32 }
33 
36  std::vector<ConcurrentMonitorElement> h_reco_coll, h_assoc_coll, h_assoc2_coll, h_simul_coll, h_looper_coll, h_pileup_coll;
37 };
38 
39 class MultiTrackValidator : public DQMGlobalEDAnalyzer<MultiTrackValidatorHistograms> {
40  public:
42 
45 
47  ~MultiTrackValidator() override;
48 
49 
51  void dqmAnalyze(const edm::Event&, const edm::EventSetup&, const Histograms& ) const override;
53  void bookHistograms(DQMStore::ConcurrentBooker&, edm::Run const&, edm::EventSetup const&, Histograms&) const override;
54 
55 
56  protected:
57  //these are used by MTVGenPs
58  // MTV-specific data members
59  std::vector<edm::InputTag> associators;
66 
67  std::vector<edm::EDGetTokenT<std::vector<PSimHit> > > simHitTokens_;
68 
69  std::vector<edm::InputTag> label;
70  std::vector<edm::EDGetTokenT<edm::View<reco::Track> > > labelToken;
71  std::vector<edm::EDGetTokenT<edm::View<TrajectorySeed> > > labelTokenSeed;
73 
76 
78 
81  const bool useAssociators_;
84  const bool doSummaryPlots_;
85  const bool doSimPlots_;
86  const bool doSimTrackPlots_;
87  const bool doRecoTrackPlots_;
88  const bool dodEdxPlots_;
90  const bool doSeedPlots_;
91  const bool doMVAPlots_;
92 
93  std::vector<bool> doResolutionPlots_;
94 
95  std::unique_ptr<MTVHistoProducerAlgoForTracker> histoProducerAlgo_;
96 
97  private:
98  const TrackingVertex::LorentzVector *getSimPVPosition(const edm::Handle<TrackingVertexCollection>& htv) const;
99  const reco::Vertex::Point *getRecoPVPosition(const edm::Event& event, const edm::Handle<TrackingVertexCollection>& htv) const;
100  void tpParametersAndSelection(const Histograms& histograms,
101  const TrackingParticleRefVector& tPCeff,
102  const ParametersDefinerForTP& parametersDefinerTP,
103  const edm::Event& event, const edm::EventSetup& setup,
104  const reco::BeamSpot& bs,
105  std::vector<std::tuple<TrackingParticle::Vector, TrackingParticle::Point> >& momVert_tPCeff,
106  std::vector<size_t>& selected_tPCeff) const;
107  size_t tpDR(const TrackingParticleRefVector& tPCeff,
108  const std::vector<size_t>& selected_tPCeff,
109  DynArray<float>& dR_tPCeff,
110  DynArray<float>& dR_tPCeff_jet,
111  const edm::View<reco::Candidate>* cores) const;
112  void trackDR(const edm::View<reco::Track>& trackCollection,
113  const edm::View<reco::Track>& trackCollectionDr,
114  DynArray<float>& dR_trk,
115  DynArray<float>& dR_trk_jet,
116  const edm::View<reco::Candidate>* cores) const;
117 
118  std::vector<edm::EDGetTokenT<reco::TrackToTrackingParticleAssociator>> associatorTokens;
119  std::vector<edm::EDGetTokenT<reco::SimToRecoCollection>> associatormapStRs;
120  std::vector<edm::EDGetTokenT<reco::RecoToSimCollection>> associatormapRtSs;
121 
125 
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> > > > mvaQualityCollectionTokens_;
130 
132 
133  bool useGsf;
134  const double simPVMaxZ_;
135 
137  double ptMinJet_;
138  // select tracking particles
139  //(i.e. "denominator" of the efficiency ratio)
143  std::unique_ptr<RecoTrackSelectorBase> dRTrackSelector;
144 
149 };
150 
151 
152 #endif
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_
std::vector< ConcurrentMonitorElement > h_simul_coll
edm::EDGetTokenT< edm::ValueMap< unsigned int > > tpNStripStereoLayersToken_
edm::EDGetTokenT< edm::ValueMap< unsigned int > > tpNLayersToken_
def setup(process, global_tag, zero_tesla=False)
Definition: GeneralSetup.py:2
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_