CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/Validation/RecoTrack/interface/MTVHistoProducerAlgo.h

Go to the documentation of this file.
00001 #ifndef Validation_RecoTrack_MTVHistoProducerAlgo_h
00002 #define Validation_RecoTrack_MTVHistoProducerAlgo_h
00003 
00004 /* \author B.Mangano, UCSD
00005  *
00006  * Base class which defines the interface of a generic HistoProducerAlogs 
00007  * to be used within the MultiTrackValidator module. 
00008  * The concrete algorithms will be plugged into the MTV to produce all 
00009  * the validation plots that the user wants.
00010  */
00011 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00012 
00013 #include "SimDataFormats/TrackingAnalysis/interface/TrackingParticle.h"
00014 #include "DataFormats/TrackReco/interface/Track.h"
00015 
00016 #include "DQMServices/Core/interface/MonitorElement.h"
00017 #include "DQMServices/Core/interface/DQMStore.h"
00018 
00019 #include "DataFormats/TrackReco/interface/DeDxData.h"
00020 #include "DataFormats/Common/interface/ValueMap.h"
00021 
00022 #include <TH1F.h>
00023 #include <TH2F.h>
00024 
00025 class MTVHistoProducerAlgo{
00026  public:
00027   
00028  MTVHistoProducerAlgo(const edm::ParameterSet& pset) : pset_(pset){};
00029 
00030   // to be implemented in the concrete classes
00031   virtual void initialize()=0; 
00032 
00033   void setDQMStore(DQMStore* dbe) {dbe_ = dbe;}
00034 
00035   virtual void bookSimHistos()=0;
00036   virtual void bookRecoHistos()=0;
00037   virtual void bookRecoHistosForStandaloneRunning()=0;
00038 
00039   virtual void fill_generic_simTrack_histos(int counter,ParticleBase::Vector,ParticleBase::Point vertex, int bx)=0;
00040 
00041   virtual void fill_recoAssociated_simTrack_histos(int count,
00042                                                    const TrackingParticle& tp,
00043                                                    ParticleBase::Vector momentumTP,ParticleBase::Point vertexTP,
00044                                                    double dxy, double dz, int nSimHits,
00045                                                    const reco::Track* track,
00046                            int numVertices, double vertz)=0;
00047 
00048   virtual void fill_generic_recoTrack_histos(int count,
00049                                              const reco::Track& track,
00050                                              math::XYZPoint bsPosition,
00051                                              bool isMatched,
00052                                              bool isSigMatched,
00053                                              bool isChargeMatched,
00054                              int numAssocRecoTracks,
00055                                              int numVertices, 
00056                                              int tpbunchcrossing,
00057                                              int nSimHits,
00058                                              double sharedFraction)=0;
00059 
00060   virtual void fill_dedx_recoTrack_histos(int count, edm::RefToBase<reco::Track>& trackref, std::vector< edm::ValueMap<reco::DeDxData> > v_dEdx)=0;
00061   //  virtual void fill_dedx_recoTrack_histos(reco::TrackRef trackref, std::vector< edm::ValueMap<reco::DeDxData> > v_dEdx)=0;
00062 
00063   virtual void fill_simAssociated_recoTrack_histos(int count,
00064                                                    const reco::Track& track)=0;
00065 
00066   virtual void fill_trackBased_histos(int count, 
00067                                       int assTracks, 
00068                                       int numRecoTracks,
00069                                       int numSimTracks)=0;
00070 
00071   virtual void fill_ResoAndPull_recoTrack_histos(int count,
00072                                                  ParticleBase::Vector momentumTP,
00073                                                  ParticleBase::Point vertexTP,
00074                                                  int chargeTP,
00075                                                  const reco::Track& track,
00076                                                  math::XYZPoint bsPosition)=0;
00077 
00078   virtual void finalHistoFits(int counter)=0;
00079 
00080 
00081   virtual void fillHistosFromVectors(int counter)=0;
00082   virtual void fillProfileHistosFromVectors(int counter)=0;
00083 
00084 
00085  protected: 
00086   //protected functions 
00087 
00088   virtual double getEta(double eta)=0;
00089   
00090   virtual double getPt(double pt)=0;
00091 
00092   void doProfileX(TH2 * th2, MonitorElement* me);
00093 
00094   void doProfileX(MonitorElement * th2m, MonitorElement* me) {
00095     doProfileX(th2m->getTH2F(), me);
00096   }
00097   
00098   void fillPlotFromVector(MonitorElement* h, std::vector<int>& vec);
00099   
00100   void fillPlotFromVectors(MonitorElement* h, 
00101                            std::vector<int>& numerator, 
00102                            std::vector<int>& denominator,
00103                            std::string type);
00104 
00105   void BinLogX(TH1*h);
00106 
00107   DQMStore* dbe_;
00108  private:
00109   //private data members
00110   const edm::ParameterSet& pset_;
00111 
00112 
00113 };
00114 
00115 #endif