CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MTVHistoProducerAlgo.h
Go to the documentation of this file.
1 #ifndef Validation_RecoTrack_MTVHistoProducerAlgo_h
2 #define Validation_RecoTrack_MTVHistoProducerAlgo_h
3 
4 /* \author B.Mangano, UCSD
5  *
6  * Base class which defines the interface of a generic HistoProducerAlogs
7  * to be used within the MultiTrackValidator module.
8  * The concrete algorithms will be plugged into the MTV to produce all
9  * the validation plots that the user wants.
10  */
13 
17 
20 
23 
24 #include <TH1F.h>
25 #include <TH2F.h>
26 
28  public:
29 
32  virtual ~MTVHistoProducerAlgo() {}
33  // to be implemented in the concrete classes
34  virtual void initialize()=0;
35 
36  virtual void bookSimHistos(DQMStore::IBooker& ibook)=0;
37  virtual void bookRecoHistos(DQMStore::IBooker& ibook)=0;
39 
40  virtual void fill_generic_simTrack_histos(int counter,const TrackingParticle::Vector&,const TrackingParticle::Point& vertex, int bx)=0;
41 
43  const TrackingParticle& tp,
44  const TrackingParticle::Vector& momentumTP, const TrackingParticle::Point& vertexTP,
45  double dxy, double dz, int nSimHits,
46  const reco::Track* track,
47  int numVertices,
48  double dR)=0;
49 
51  const reco::GenParticle& tp,
52  const TrackingParticle::Vector & momentumTP, const TrackingParticle::Point & vertexTP,
53  double dxy, double dz, int nSimHits,
54  const reco::Track* track,
55  int numVertices)=0;
56 
57  virtual void fill_generic_recoTrack_histos(int count,
58  const reco::Track& track,
59  const math::XYZPoint& bsPosition,
60  bool isMatched,
61  bool isSigMatched,
62  bool isChargeMatched,
63  int numAssocRecoTracks,
64  int numVertices,
65  int nSimHits,
66  double sharedFraction, double dR)=0;
67 
68  virtual void fill_dedx_recoTrack_histos(int count, edm::RefToBase<reco::Track>& trackref,const std::vector< edm::ValueMap<reco::DeDxData> >& v_dEdx)=0;
69  // virtual void fill_dedx_recoTrack_histos(reco::TrackRef trackref, std::vector< edm::ValueMap<reco::DeDxData> > v_dEdx)=0;
70 
72  const reco::Track& track)=0;
73 
74  virtual void fill_trackBased_histos(int count,
75  int assTracks,
76  int numRecoTracks,
77  int numSimTracks)=0;
78 
80  const TrackingParticle::Vector& momentumTP,
81  const TrackingParticle::Point& vertexTP,
82  int chargeTP,
83  const reco::Track& track,
84  const math::XYZPoint& bsPosition)=0;
85 
86  virtual void finalHistoFits(int counter)=0;
87 
88 
89  virtual void fillProfileHistosFromVectors(int counter)=0;
90 
91 
92  protected:
93  //protected functions
94 
95  virtual double getEta(double eta)=0;
96 
97  virtual double getPt(double pt)=0;
98 
99  void doProfileX(TH2 * th2, MonitorElement* me);
100 
102  doProfileX(th2m->getTH2F(), me);
103  }
104 
105  template<typename T> void fillPlotNoFlow(MonitorElement* h, T val){
106  h->Fill(std::min(std::max(val,((T) h->getTH1()->GetXaxis()->GetXmin())),((T) h->getTH1()->GetXaxis()->GetXmax())));
107  }
108 
109  void fillPlotFromVector(MonitorElement* h, std::vector<int>& vec);
110 
112  std::vector<int>& numerator,
113  std::vector<int>& denominator,
114  std::string type);
115 
117  TH1* numerator,
118  TH1* denominator,
119  std::string type);
120 
121  void BinLogX(TH1*h);
122 
123  private:
124  //private data members
126 
127 
128 };
129 
130 #endif
type
Definition: HCALResponse.h:21
MTVHistoProducerAlgo(const edm::ParameterSet &pset, edm::ConsumesCollector &&iC)
void fillPlotFromVectors(MonitorElement *h, std::vector< int > &numerator, std::vector< int > &denominator, std::string type)
MTVHistoProducerAlgo(const edm::ParameterSet &pset, edm::ConsumesCollector &iC)
list numerator
Definition: cuy.py:483
void fillPlotNoFlow(MonitorElement *h, T val)
void doProfileX(TH2 *th2, MonitorElement *me)
void fillPlotFromVector(MonitorElement *h, std::vector< int > &vec)
void doProfileX(MonitorElement *th2m, MonitorElement *me)
virtual void fill_dedx_recoTrack_histos(int count, edm::RefToBase< reco::Track > &trackref, const std::vector< edm::ValueMap< reco::DeDxData > > &v_dEdx)=0
const edm::ParameterSet & pset_
virtual double getEta(double eta)=0
virtual void fill_ResoAndPull_recoTrack_histos(int count, const TrackingParticle::Vector &momentumTP, const TrackingParticle::Point &vertexTP, int chargeTP, const reco::Track &track, const math::XYZPoint &bsPosition)=0
virtual void bookRecoHistosForStandaloneRunning(DQMStore::IBooker &ibook)=0
T eta() const
virtual void fill_recoAssociated_simTrack_histos(int count, const TrackingParticle &tp, const TrackingParticle::Vector &momentumTP, const TrackingParticle::Point &vertexTP, double dxy, double dz, int nSimHits, const reco::Track *track, int numVertices, double dR)=0
void Fill(long long x)
math::XYZPointD Point
point in the space
list denominator
Definition: cuy.py:484
TH1 * getTH1(void) const
bool isMatched(TrackingRecHit const &hit)
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
virtual void bookRecoHistos(DQMStore::IBooker &ibook)=0
virtual void fillProfileHistosFromVectors(int counter)=0
virtual void initialize()=0
virtual void bookSimHistos(DQMStore::IBooker &ibook)=0
T min(T a, T b)
Definition: MathUtil.h:58
virtual void finalHistoFits(int counter)=0
virtual void fill_simAssociated_recoTrack_histos(int count, const reco::Track &track)=0
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
virtual void fill_trackBased_histos(int count, int assTracks, int numRecoTracks, int numSimTracks)=0
void fillPlotFromPlots(MonitorElement *h, TH1 *numerator, TH1 *denominator, std::string type)
virtual double getPt(double pt)=0
virtual void fill_generic_recoTrack_histos(int count, const reco::Track &track, const math::XYZPoint &bsPosition, bool isMatched, bool isSigMatched, bool isChargeMatched, int numAssocRecoTracks, int numVertices, int nSimHits, double sharedFraction, double dR)=0
static std::atomic< unsigned int > counter
Monte Carlo truth information used for tracking validation.
math::XYZVectorD Vector
point in the space
TH2F * getTH2F(void) const
virtual void fill_generic_simTrack_histos(int counter, const TrackingParticle::Vector &, const TrackingParticle::Point &vertex, int bx)=0
long double T