CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DTT0Calibration.h
Go to the documentation of this file.
1 #ifndef CalibMuon_DTT0Calibration_H
2 #define CalibMuon_DTT0Calibration_H
3 
20 
21 #include <string>
22 #include <vector>
23 #include <map>
24 
25 class TFile;
26 class TH1I;
27 class TH1D;
28 class DTT0;
29 
31 public:
34 
36  virtual ~DTT0Calibration();
37 
38  // Operations
39 
41  void analyze(const edm::Event & event, const edm::EventSetup& eventSetup);
42 
44  void endJob();
45 
46 
47 protected:
48 
49 private:
50  // Generate the histo name
51  std::string getHistoName(const DTWireId& wId) const;
52  std::string getHistoName(const DTLayerId& lId) const;
53 
54  // Debug flag
55  bool debug;
56 
57  // The label used to retrieve digis from the event
58  std::string digiLabel;
59 
60  // The root file which contain the histos per layer
61  TFile *theFile;
62  // The root file which will contain the histos per wire (for the given layer)
63  TFile *theOutputFile;
64 
65  //The event counter
66  unsigned int nevents;
67  //Number of events to be used for the t0 per layer histos
68  unsigned int eventsForLayerT0;
69  //Number of events to be used for the t0 reference per wire
70  unsigned int eventsForWireT0;
71 
72  //Reject digis if far from TP peak
73  unsigned int rejectDigiFromPeak;
74 
75  //Acceptance of t0 w.r.t. reference peak
76  double tpPeakWidth;
77 
78  //The wheels,sector to be calibrated (default All)
79  std::string theCalibWheel;
80  int selWheel;
81  std::string theCalibSector;
82  int selSector;
83 
84  // Map of the histos and graph by layer
85  std::map<DTLayerId, TH1I*> theHistoLayerMap;
86  //Histo with t0 mean per layer for all the sector
88 
89  //Layer with histos for each wire
90  std::vector<DTWireId> wireIdWithHistos;
91  std::vector<std::string> cellsWithHistos;
92 
93  //Maps with t0, sigma, number of digi per wire
94  std::map<DTWireId,double> theAbsoluteT0PerWire;
95  std::map<DTWireId,double> theRelativeT0PerWire;
96  std::map<DTWireId,double> theSigmaT0PerWire;
97  std::map<DTWireId,int> nDigiPerWire;
98  std::map<DTWireId,int> nDigiPerWire_ref;
99  std::map<DTWireId,double> mK;
100  std::map<DTWireId,double> mK_ref;
101  std::map<DTWireId,double> qK;
102  //Map with histo per wire for the chosen layer
103  std::map<DTWireId,TH1I*> theHistoWireMap;
104  std::map<DTWireId,TH1I*> theHistoWireMap_ref;
105  //Map with mean and RMS of t0 per layer
106  std::map<std::string,double> theT0LayerMap;
107  std::map<std::string,double> theSigmaT0LayerMap;
108 
109  //DTGeometry used to loop on the SL in the endJob
111 };
112 #endif
113 
std::map< DTLayerId, TH1I * > theHistoLayerMap
unsigned int nevents
std::map< DTWireId, double > theAbsoluteT0PerWire
std::map< DTWireId, TH1I * > theHistoWireMap
std::map< DTWireId, int > nDigiPerWire
std::vector< DTWireId > wireIdWithHistos
std::string theCalibWheel
std::map< DTWireId, TH1I * > theHistoWireMap_ref
std::string getHistoName(const DTWireId &wId) const
std::map< DTWireId, double > theSigmaT0PerWire
edm::ESHandle< DTGeometry > dtGeom
std::map< DTWireId, double > mK
unsigned int eventsForLayerT0
Definition: DTT0.h:52
unsigned int rejectDigiFromPeak
std::map< DTWireId, double > theRelativeT0PerWire
virtual ~DTT0Calibration()
Destructor.
void endJob()
Compute the mean and the RMS of the t0 from the maps and write them to the DB with channel granularit...
std::string theCalibSector
std::map< DTWireId, double > qK
std::map< std::string, double > theSigmaT0LayerMap
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
std::map< std::string, double > theT0LayerMap
std::map< DTWireId, double > mK_ref
std::string digiLabel
std::vector< std::string > cellsWithHistos
DTT0Calibration(const edm::ParameterSet &pset)
Constructor.
unsigned int eventsForWireT0
void analyze(const edm::Event &event, const edm::EventSetup &eventSetup)
Fill the maps with t0 (by channel)
std::map< DTWireId, int > nDigiPerWire_ref