CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/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)=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)=0;
00046 
00047   virtual void fill_generic_recoTrack_histos(int count,
00048                                              const reco::Track& track,
00049                                              math::XYZPoint bsPosition,
00050                                              bool isMatched)=0;
00051 
00052   virtual void fill_dedx_recoTrack_histos(int count, edm::RefToBase<reco::Track>& trackref, std::vector< edm::ValueMap<reco::DeDxData> > v_dEdx)=0;
00053   //  virtual void fill_dedx_recoTrack_histos(reco::TrackRef trackref, std::vector< edm::ValueMap<reco::DeDxData> > v_dEdx)=0;
00054 
00055   virtual void fill_simAssociated_recoTrack_histos(int count,
00056                                                    const reco::Track& track)=0;
00057 
00058   virtual void fill_ResoAndPull_recoTrack_histos(int count,
00059                                                  ParticleBase::Vector momentumTP,
00060                                                  ParticleBase::Point vertexTP,
00061                                                  int chargeTP,
00062                                                  const reco::Track& track,
00063                                                  math::XYZPoint bsPosition)=0;
00064 
00065   virtual void finalHistoFits(int counter)=0;
00066 
00067 
00068   virtual void fillHistosFromVectors(int counter)=0;
00069   virtual void fillProfileHistosFromVectors(int counter)=0;
00070 
00071 
00072  protected: 
00073   //protected functions 
00074 
00075   virtual double getEta(double eta)=0;
00076   
00077   virtual double getPt(double pt)=0;
00078 
00079   void doProfileX(TH2 * th2, MonitorElement* me);
00080 
00081   void doProfileX(MonitorElement * th2m, MonitorElement* me) {
00082     doProfileX(th2m->getTH2F(), me);
00083   }
00084   
00085   void fillPlotFromVector(MonitorElement* h, std::vector<int>& vec);
00086   
00087   void fillPlotFromVectors(MonitorElement* h, 
00088                            std::vector<int>& numerator, 
00089                            std::vector<int>& denominator,
00090                            std::string type);
00091 
00092   void BinLogX(TH1*h);
00093 
00094   DQMStore* dbe_;
00095  private:
00096   //private data members
00097   const edm::ParameterSet& pset_;
00098 
00099 
00100 };
00101 
00102 #endif