CMS 3D CMS Logo

DTNoiseComputation.h

Go to the documentation of this file.
00001 #ifndef DTNoiseComputation_H
00002 #define DTNoiseComputation_H
00003 
00004 /*
00005  * \file DTNoiseComputation.h
00006  *
00007  * $Date: 2008/02/06 10:31:21 $
00008  * $Revision: 1.3 $
00009  * \author G. Mila - INFN Torino
00010  *
00011 */
00012 
00013 #include <FWCore/Framework/interface/EDAnalyzer.h>
00014 #include "DataFormats/MuonDetId/interface/DTLayerId.h"
00015 #include "DataFormats/MuonDetId/interface/DTWireId.h"
00016 #include "DataFormats/MuonDetId/interface/DTChamberId.h"
00017 #include <FWCore/Framework/interface/ESHandle.h>
00018 
00019 #include <string>
00020 #include <map>
00021 #include <vector>
00022 
00023 namespace edm {
00024   class ParameterSet;
00025   class Event;
00026   class EventSetup;
00027 }
00028 
00029 class DTGeometry;
00030 class TFile;
00031 class TH2F;
00032 class TH1F;
00033 
00034 class DTNoiseComputation: public edm::EDAnalyzer{
00035   
00036  public:
00037   
00039   DTNoiseComputation(const edm::ParameterSet& ps);
00040   
00042   virtual ~DTNoiseComputation();
00043 
00045   void beginJob(const edm::EventSetup& c);
00046 
00047   void analyze(const edm::Event& event, const edm::EventSetup& setup) {}
00048 
00050   void endJob();
00051 
00052 
00053 protected:
00054 
00055 private:
00056 
00057   bool debug;
00058   int counter;
00059   int MaxEvents;
00060   bool fastAnalysis;
00061   
00062   // Get the DT Geometry
00063   edm::ESHandle<DTGeometry> dtGeom;
00064 
00065   // The file which contain the occupancy plot and the digi event plot
00066   TFile *theFile;
00067   
00068   // The file which will contain the occupancy plot and the digi event plot
00069   TFile *theNewFile;
00070 
00071   // Map of label to compute the average noise per layer
00072   std::map<DTLayerId , bool> toComputeNoiseAverage;
00073 
00074   // Map of the average noise per layer
00075   std::map<DTWireId , double>  theAverageNoise;
00076 
00077    // Map of the histograms with the number of events per evt per wire
00078   std::map<DTLayerId, std::vector<TH2F*> > theEvtMap;
00079 
00080   // map of histos with the distance of event per wire
00081   std::map<DTWireId, TH1F*> theHistoEvtDistancePerWire;
00082   
00083   // Map of label for analysis histos
00084   std::map<DTWireId , bool> toDel;
00085 
00086   // Map of the Time Constants per wire
00087   std::map<DTWireId , double> theTimeConstant;
00088 
00090   std::string getLayerName(const DTLayerId& lId) const;
00091 
00093   std::string getSuperLayerName(const DTSuperLayerId& slId) const;
00094 
00096   std::string getChamberName(const DTLayerId& lId) const;
00097   
00098   // map of histos with the average noise per chamber
00099   std::map<DTChamberId, TH1F*> AvNoisePerChamber;
00100 
00101   // map of histos with the average integrated noise per chamber
00102   std::map<DTChamberId, TH1F*> AvNoiseIntegratedPerChamber;
00103 
00104   // map of histos with the average noise per SuperLayer
00105   std::map<DTSuperLayerId, TH1F*> AvNoisePerSuperLayer;
00106 
00107   // map of histos with the average integrated noise per SuperLayer
00108   std::map<DTSuperLayerId, TH1F*> AvNoiseIntegratedPerSuperLayer;
00109 
00110   // get the maximum bin number
00111   int getMaxNumBins(const DTChamberId& chId) const;
00112   
00113   // get the Y axis maximum
00114   double getYMaximum(const DTSuperLayerId& slId) const;
00115 
00116   // map of noisy cell occupancy
00117   std::map< std::pair<int,int> , TH1F*> noisyC;
00118 
00119   // map of somehow noisy cell occupancy
00120   std::map< std::pair<int,int> , TH1F*> someHowNoisyC;
00121 
00122 };
00123 #endif

Generated on Tue Jun 9 17:25:28 2009 for CMSSW by  doxygen 1.5.4