CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch1/src/DQM/TrackingMonitor/interface/TrackingMonitor.h

Go to the documentation of this file.
00001 #ifndef TrackingMonitor_H
00002 #define TrackingMonitor_H
00003 // -*- C++ -*-
00004 //
00005 // Package:    TrackingMonitor
00006 // Class:      TrackingMonitor
00007 // 
00011 // Original Author:  Suchandra Dutta, Giorgia Mila
00012 //         Created:  Thu 28 22:45:30 CEST 2008
00013 // $Id: TrackingMonitor.h,v 1.7 2012/10/15 13:24:45 threus Exp $
00014 
00015 #include <memory>
00016 #include <fstream>
00017 #include "FWCore/Framework/interface/Frameworkfwd.h"
00018 #include "FWCore/Framework/interface/EDAnalyzer.h"
00019 #include "FWCore/Framework/interface/Event.h"
00020 #include "FWCore/Framework/interface/MakerMacros.h"
00021 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00022 #include "FWCore/ServiceRegistry/interface/Service.h"
00023 #include "DQMServices/Core/interface/MonitorElement.h"
00024 #include "TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHitBuilder.h"
00025 
00026 class DQMStore;
00027 class TrackAnalyzer;
00028 class TrackBuildingAnalyzer;
00029 class VertexMonitor;
00030 class GetLumi;
00031 class TProfile;
00032 class GenericTriggerEventFlag;
00033 
00034 class TrackingMonitor : public edm::EDAnalyzer 
00035 {
00036     public:
00037         explicit TrackingMonitor(const edm::ParameterSet&);
00038         ~TrackingMonitor();
00039         virtual void beginJob(void);
00040         virtual void endJob(void);
00041 
00042         virtual void setMaxMinBin(std::vector<double> & ,std::vector<double> &  ,std::vector<int> &  ,double, double, int, double, double, int);
00043         virtual void setNclus(const edm::Event&, std::vector<int> & );
00044 
00045         virtual void beginLuminosityBlock(const edm::LuminosityBlock& lumi, const edm::EventSetup&  eSetup);
00046         virtual void analyze(const edm::Event&, const edm::EventSetup&);
00047         virtual void beginRun(const edm::Run&, const edm::EventSetup&); 
00048         virtual void endRun(const edm::Run&, const edm::EventSetup&);
00049 
00050     private:
00051         void doProfileX(TH2 * th2, MonitorElement* me);
00052         void doProfileX(MonitorElement * th2m, MonitorElement* me);
00053 
00054 
00055         // ----------member data ---------------------------
00056 
00057         std::string histname;  //for naming the histograms according to algorithm used
00058 
00059         DQMStore * dqmStore_;
00060         edm::ParameterSet conf_;
00061 
00062         // the track analyzer
00063         edm::InputTag bsSrc;
00064         edm::InputTag pvSrc;
00065 
00066         TrackAnalyzer * theTrackAnalyzer;
00067         TrackBuildingAnalyzer  * theTrackBuildingAnalyzer;
00068         std::vector<VertexMonitor*> theVertexMonitor;
00069         GetLumi*                    theLumiDetails_;
00070 
00071         // Tracks 
00072         MonitorElement * NumberOfTracks;
00073         MonitorElement * NumberOfMeanRecHitsPerTrack;
00074         MonitorElement * NumberOfMeanLayersPerTrack;  
00075 
00076         // Good Tracks 
00077         MonitorElement * NumberOfGoodTracks;
00078         MonitorElement * FractionOfGoodTracks;
00079 
00080         // Track Seeds 
00081         MonitorElement * NumberOfSeeds;
00082         std::vector<MonitorElement *> SeedsVsClusters;
00083         std::vector<std::string> ClusterLabels;
00084         
00085 
00086         // Track Candidates
00087         MonitorElement * NumberOfTrackCandidates;
00088 
00089         // Cluster Properties
00090         /*
00091         MonitorElement* NumberOfPixelClus;
00092         MonitorElement* NumberOfStripClus;
00093         MonitorElement* RatioOfPixelAndStripClus;
00094         */
00095         std::vector<MonitorElement*> NumberOfTrkVsClusters;
00096         MonitorElement* NumberOfTrkVsClus;
00097         MonitorElement* NumberOfTrkVsStripClus;
00098         MonitorElement* NumberOfTrkVsPixelClus;
00099         MonitorElement* NumberOfGoodTrkVsClus;
00100 
00101         // Monitoring vs LS
00102         MonitorElement* NumberOfTracksVsLS;
00103         MonitorElement* NumberOfGoodTracksVsLS;
00104         MonitorElement* GoodTracksFractionVsLS;
00105         MonitorElement* GoodTracksNumberOfRecHitsPerTrackVsLS;
00106 
00107         // Monitoring PU
00108         MonitorElement* NumberOfTracksVsGoodPVtx;
00109         MonitorElement* NumberOfTracksVsBXlumi;
00110         MonitorElement* NumberOfGoodTracksVsGoodPVtx;
00111         MonitorElement* NumberOfGoodTracksVsBXlumi;
00112         MonitorElement* FractionOfGoodTracksVsGoodPVtx;
00113         MonitorElement* FractionOfGoodTracksVsBXlumi;
00114         
00115         // add in order to deal with LS transitions
00116         MonitorElement * NumberOfTracks_lumiFlag;
00117         MonitorElement * NumberOfGoodTracks_lumiFlag;
00118 
00119         std::string builderName;
00120         edm::ESHandle<TransientTrackingRecHitBuilder> theTTRHBuilder;
00121  
00122         bool doTrackerSpecific_; 
00123         bool doLumiAnalysis;
00124         bool doProfilesVsLS_;
00125         bool doAllSeedPlots;
00126         bool doAllPlots;
00127         bool doDCAPlots_;
00128         bool doGeneralPropertiesPlots_;
00129         bool doHitPropertiesPlots_;
00130         bool doTkCandPlots;
00131         bool doSeedNumberPlot;
00132         bool doSeedVsClusterPlot;
00133         bool runTrackBuildingAnalyzerForSeed;
00134         // ADD by Mia in order to have GoodTrack plots only for collision
00135         bool doGoodTrackPlots_;
00136         bool doPUmonitoring_;
00137         bool doPlotsVsBXlumi_;
00138         bool doPlotsVsGoodPVtx_;
00139 
00140         GenericTriggerEventFlag* genTriggerEventFlag_;
00141 };
00142 
00143 #endif //define TrackingMonitor_H