CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/CalibMuon/DTCalibration/plugins/DTNoiseCalibration.h

Go to the documentation of this file.
00001 #ifndef DTNoiseCalibration_H
00002 #define DTNoiseCalibration_H
00003 
00004 /*
00005  * \file DTNoiseCalibration.h
00006  *
00007  * $Date: 2011/08/16 11:05:23 $
00008  * $Revision: 1.12 $
00009  * \author G. Mila - INFN Torino
00010  *         A. Vilela Pereira - INFN Torino
00011  *
00012 */
00013 
00014 #include "FWCore/Framework/interface/EDAnalyzer.h"
00015 #include "FWCore/Framework/interface/ESHandle.h"
00016 #include "FWCore/Utilities/interface/InputTag.h"
00017 
00018 #include <string>
00019 #include <vector>
00020 #include <map>
00021 #include <ctime>
00022 
00023 class DTGeometry;
00024 class DTChamberId;
00025 class DTSuperLayerId;
00026 class DTLayerId; 
00027 class DTWireId;
00028 class DTTtrig;
00029 class TFile;
00030 class TH2F;
00031 class TH1F;
00032 
00033 class DTNoiseCalibration: public edm::EDAnalyzer{
00034 
00035  public:
00037   DTNoiseCalibration(const edm::ParameterSet& ps);
00039   virtual ~DTNoiseCalibration();
00040 
00041   void beginJob();
00042   void beginRun(const edm::Run& run, const edm::EventSetup& setup );
00043   void analyze(const edm::Event& e, const edm::EventSetup& c);
00044   void endJob();
00045 
00046 private:
00047   std::string getChannelName(const DTWireId&) const;
00048   // Get the name of the layer
00049   std::string getLayerName(const DTLayerId&) const;
00050   // Get the name of the superLayer
00051   std::string getSuperLayerName(const DTSuperLayerId&) const;
00052   // Get the name of the chamber
00053   std::string getChamberName(const DTChamberId&) const;
00054 
00055   edm::InputTag digiLabel_;
00056   bool useTimeWindow_;
00057   double triggerWidth_;
00058   int timeWindowOffset_;
00059   double maximumNoiseRate_;
00060   bool useAbsoluteRate_; 
00061 
00062   /*bool fastAnalysis;
00063   int wh;
00064   int sect;*/
00065 
00066   bool readDB_;
00067   int defaultTtrig_;
00068   std::string dbLabel_;
00069 
00070   std::vector<DTWireId> wireIdWithHisto_;
00071   unsigned int lumiMax_;
00072 
00073   int nevents_;
00074   //int counter;
00075   time_t runBeginTime_;
00076   time_t runEndTime_;
00077 
00078   // Get the DT Geometry
00079   edm::ESHandle<DTGeometry> dtGeom_;
00080   // tTrig map
00081   edm::ESHandle<DTTtrig> tTrigMap_;
00082 
00083   TFile* rootFile_;
00084   // TDC digi distribution
00085   TH1F* hTDCTriggerWidth_;
00086   // Map of the occupancy histograms by layer
00087   std::map<DTLayerId, TH1F*> theHistoOccupancyMap_;
00088   // Map of occupancy by lumi by wire
00089   std::map<DTWireId, TH1F*> theHistoOccupancyVsLumiMap_;
00090   // Map of occupancy by lumi by chamber
00091   std::map<DTChamberId, TH1F*> chamberOccupancyVsLumiMap_;
00092   // Map of occupancy by time by chamber
00093   std::map<DTChamberId, TH1F*> chamberOccupancyVsTimeMap_; 
00094   // Map of the histograms with the number of events per evt per wire
00095   //std::map<DTLayerId, TH2F*> theHistoEvtPerWireMap_;
00096   // Map of skipped histograms
00097   //std::map<DTLayerId, int> skippedPlot;
00098 };
00099 #endif