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 
34  virtual void bookSimHistos(DQMStore::IBooker& ibook)=0;
35  virtual void bookSimTrackHistos(DQMStore::IBooker& ibook)=0;
36  virtual void bookRecoHistos(DQMStore::IBooker& ibook)=0;
37  virtual void bookRecodEdxHistos(DQMStore::IBooker& ibook)=0;
38 
39  virtual void fill_generic_simTrack_histos(int counter,const TrackingParticle::Vector&,const TrackingParticle::Point& vertex, int bx)=0;
40 
42  const TrackingParticle& tp,
43  const TrackingParticle::Vector& momentumTP, const TrackingParticle::Point& vertexTP,
44  double dxy, double dz, int nSimHits,
45  int nSimLayers, int nSimPixelLayers, int nSimStripMonoAndStereoLayers,
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_simTrackBased_histos(int count, int numSimTracks) = 0;
58 
59  virtual void fill_generic_recoTrack_histos(int count,
60  const reco::Track& track,
61  const math::XYZPoint& bsPosition,
62  bool isMatched,
63  bool isSigMatched,
64  bool isChargeMatched,
65  int numAssocRecoTracks,
66  int numVertices,
67  int nSimHits,
68  double sharedFraction, double dR)=0;
69 
70  virtual void fill_dedx_recoTrack_histos(int count, const edm::RefToBase<reco::Track>& trackref, const std::vector< const edm::ValueMap<reco::DeDxData> *>& v_dEdx)=0;
71 
73  const reco::Track& track)=0;
74 
75  virtual void fill_trackBased_histos(int count,
76  int assTracks,
77  int numRecoTracks,
78  int numSimTracks)=0;
79 
81  const TrackingParticle::Vector& momentumTP,
82  const TrackingParticle::Point& vertexTP,
83  int chargeTP,
84  const reco::Track& track,
85  const math::XYZPoint& bsPosition)=0;
86 
87  protected:
88  //protected functions
89 
90  virtual double getEta(double eta)=0;
91 
92  virtual double getPt(double pt)=0;
93 
94  void doProfileX(TH2 * th2, MonitorElement* me);
95 
97  doProfileX(th2m->getTH2F(), me);
98  }
99 
100  template<typename T> void fillPlotNoFlow(MonitorElement* h, T val){
101  h->Fill(std::min(std::max(val,((T) h->getTH1()->GetXaxis()->GetXmin())),((T) h->getTH1()->GetXaxis()->GetXmax())));
102  }
103 
104  void fillPlotFromVector(MonitorElement* h, std::vector<int>& vec);
105 
107  std::vector<int>& numerator,
108  std::vector<int>& denominator,
109  std::string type);
110 
112  TH1* numerator,
113  TH1* denominator,
114  std::string type);
115 
116  void BinLogX(TH1*h);
117 
118  private:
119  //private data members
121 
122 
123 };
124 
125 #endif
type
Definition: HCALResponse.h:21
MTVHistoProducerAlgo(const edm::ParameterSet &pset, edm::ConsumesCollector &&iC)
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, int nSimLayers, int nSimPixelLayers, int nSimStripMonoAndStereoLayers, const reco::Track *track, int numVertices, double dR)=0
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)
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
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 bookSimHistos(DQMStore::IBooker &ibook)=0
T min(T a, T b)
Definition: MathUtil.h:58
virtual void bookSimTrackHistos(DQMStore::IBooker &ibook)=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.
virtual void fill_simTrackBased_histos(int count, int numSimTracks)=0
virtual void fill_dedx_recoTrack_histos(int count, const edm::RefToBase< reco::Track > &trackref, const std::vector< const edm::ValueMap< reco::DeDxData > * > &v_dEdx)=0
virtual void bookRecodEdxHistos(DQMStore::IBooker &ibook)=0
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