CMS 3D CMS Logo

MultiTrackValidator.h
Go to the documentation of this file.
1 #ifndef MultiTrackValidator_h
2 #define MultiTrackValidator_h
3 
14 
16 
26 
27 class PileupSummaryInfo;
28 namespace reco {
29 class DeDxData;
30 }
31 
34  std::vector<ConcurrentMonitorElement> h_reco_coll, h_assoc_coll, h_assoc2_coll, h_simul_coll, h_looper_coll, h_pileup_coll;
35 };
36 
37 class MultiTrackValidator : public DQMGlobalEDAnalyzer<MultiTrackValidatorHistograms> {
38  public:
40 
43 
45  ~MultiTrackValidator() override;
46 
47 
49  void dqmAnalyze(const edm::Event&, const edm::EventSetup&, const Histograms& ) const override;
51  void bookHistograms(DQMStore::ConcurrentBooker&, edm::Run const&, edm::EventSetup const&, Histograms&) const override;
52 
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, const edm::Handle<TrackingVertexCollection>& htv) const;
98  void tpParametersAndSelection(const Histograms& histograms,
99  const TrackingParticleRefVector& tPCeff,
100  const ParametersDefinerForTP& parametersDefinerTP,
101  const edm::Event& event, const edm::EventSetup& setup,
102  const reco::BeamSpot& bs,
103  std::vector<std::tuple<TrackingParticle::Vector, TrackingParticle::Point> >& momVert_tPCeff,
104  std::vector<size_t>& selected_tPCeff) const;
105  size_t tpDR(const TrackingParticleRefVector& tPCeff,
106  const std::vector<size_t>& selected_tPCeff,
107  DynArray<float>& dR_tPCeff) const;
108  void trackDR(const edm::View<reco::Track>& trackCollection,
109  const edm::View<reco::Track>& trackCollectionDr,
110  DynArray<float>& dR_trk) const;
111 
112  std::vector<edm::EDGetTokenT<reco::TrackToTrackingParticleAssociator>> associatorTokens;
113  std::vector<edm::EDGetTokenT<reco::SimToRecoCollection>> associatormapStRs;
114  std::vector<edm::EDGetTokenT<reco::RecoToSimCollection>> associatormapRtSs;
115 
119 
120 
121  using MVACollection = std::vector<float>;
122  using QualityMaskCollection = std::vector<unsigned char>;
123  std::vector<std::vector<std::tuple<edm::EDGetTokenT<MVACollection>, edm::EDGetTokenT<QualityMaskCollection> > > > mvaQualityCollectionTokens_;
124 
126 
127  bool useGsf;
128  const double simPVMaxZ_;
129  // select tracking particles
130  //(i.e. "denominator" of the efficiency ratio)
134  std::unique_ptr<RecoTrackSelectorBase> dRTrackSelector;
135 
140 };
141 
142 
143 #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
virtual example_global void dqmAnalyze(edm::Event const &,@example_global edm::EventSetup const &,@example_global Histograms___class__ const &) const override
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:1
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
TrackingParticleSelector tpSelector
virtual example_stream void bookHistograms(DQMStore::IBooker &,@example_stream edm::Run const &,@example_stream edm::EventSetup const &) override
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
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< TrackingParticleRefVector > label_tp_effic_refvector
edm::EDGetTokenT< TrackingParticleCollection > label_tp_effic
Definition: event.py:1
Definition: Run.h:43
const bool parametersDefinerIsCosmic_