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 
33  public:
36 
38  virtual ~MultiTrackValidator();
39 
40 
42  void analyze(const edm::Event&, const edm::EventSetup& ) override;
44  void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
45 
46 
47  protected:
48  //these are used by MTVGenPs
49  // MTV-specific data members
50  std::vector<edm::InputTag> associators;
57 
58  std::vector<edm::EDGetTokenT<std::vector<PSimHit> > > simHitTokens_;
59 
60  std::vector<edm::InputTag> label;
61  std::vector<edm::EDGetTokenT<edm::View<reco::Track> > > labelToken;
62  std::vector<edm::EDGetTokenT<edm::View<TrajectorySeed> > > labelTokenSeed;
64 
67 
69 
72  const bool useAssociators_;
75  const bool doSummaryPlots_;
76  const bool doSimPlots_;
77  const bool doSimTrackPlots_;
78  const bool doRecoTrackPlots_;
79  const bool dodEdxPlots_;
81  const bool doSeedPlots_;
82  const bool doMVAPlots_;
83 
84  std::vector<bool> doResolutionPlots_;
85 
86  std::unique_ptr<MTVHistoProducerAlgoForTracker> histoProducerAlgo_;
87 
88  private:
89  const TrackingVertex::LorentzVector *getSimPVPosition(const edm::Handle<TrackingVertexCollection>& htv) const;
90  const reco::Vertex::Point *getRecoPVPosition(const edm::Event& event, const edm::Handle<TrackingVertexCollection>& htv) const;
91  void tpParametersAndSelection(const TrackingParticleRefVector& tPCeff,
92  const ParametersDefinerForTP& parametersDefinerTP,
93  const edm::Event& event, const edm::EventSetup& setup,
94  const reco::BeamSpot& bs,
95  std::vector<std::tuple<TrackingParticle::Vector, TrackingParticle::Point> >& momVert_tPCeff,
96  std::vector<size_t>& selected_tPCeff) const;
97  size_t tpDR(const TrackingParticleRefVector& tPCeff,
98  const std::vector<size_t>& selected_tPCeff,
99  DynArray<float>& dR_tPCeff) const;
100  void trackDR(const edm::View<reco::Track>& trackCollection,
101  const edm::View<reco::Track>& trackCollectionDr,
102  DynArray<float>& dR_trk) const;
103 
104  std::vector<edm::EDGetTokenT<reco::TrackToTrackingParticleAssociator>> associatorTokens;
105  std::vector<edm::EDGetTokenT<reco::SimToRecoCollection>> associatormapStRs;
106  std::vector<edm::EDGetTokenT<reco::RecoToSimCollection>> associatormapRtSs;
107 
111 
112 
113  using MVACollection = std::vector<float>;
114  using QualityMaskCollection = std::vector<unsigned char>;
115  std::vector<std::vector<std::tuple<edm::EDGetTokenT<MVACollection>, edm::EDGetTokenT<QualityMaskCollection> > > > mvaQualityCollectionTokens_;
116 
118 
119  bool useGsf;
120  const double simPVMaxZ_;
121  // select tracking particles
122  //(i.e. "denominator" of the efficiency ratio)
126  std::unique_ptr<RecoTrackSelectorBase> dRTrackSelector;
127 
132 
133  std::vector<MonitorElement *> h_reco_coll, h_assoc_coll, h_assoc2_coll, h_simul_coll, h_looper_coll, h_pileup_coll;
134 };
135 
136 
137 #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< MonitorElement * > h_simul_coll
def analyze(function, filename, filter=None)
Definition: Profiling.py:11
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_
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
void bookHistograms(fwlite::EventContainer &eventCont)
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
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_
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_