File indexing completed on 2024-04-06 11:58:26
0001 #ifndef CalibMuon_DTT0CalibrationRMS_H
0002 #define CalibMuon_DTT0CalibrationRMS_H
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0013 #include "Geometry/DTGeometry/interface/DTGeometry.h"
0014 #include "DataFormats/MuonDetId/interface/DTWireId.h"
0015 #include "DataFormats/DTDigi/interface/DTDigiCollection.h"
0016 #include "FWCore/Framework/interface/ESHandle.h"
0017 #include "Geometry/Records/interface/MuonGeometryRecord.h"
0018
0019 #include <string>
0020 #include <vector>
0021 #include <map>
0022
0023 class TFile;
0024 class TH1I;
0025 class TH1D;
0026 class DTT0;
0027
0028 class DTT0CalibrationRMS : public edm::one::EDAnalyzer<> {
0029 public:
0030
0031 DTT0CalibrationRMS(const edm::ParameterSet& pset);
0032
0033
0034 ~DTT0CalibrationRMS() override;
0035
0036
0037
0038
0039 void analyze(const edm::Event& event, const edm::EventSetup& eventSetup) override;
0040
0041
0042 void endJob() override;
0043
0044 protected:
0045 private:
0046
0047 std::string getHistoName(const DTWireId& wId) const;
0048 std::string getHistoName(const DTLayerId& lId) const;
0049
0050
0051 bool debug;
0052
0053
0054 edm::EDGetTokenT<DTDigiCollection> digiToken;
0055
0056
0057 TFile* theFile;
0058
0059 TFile* theOutputFile;
0060
0061
0062 unsigned int nevents;
0063
0064 unsigned int eventsForLayerT0;
0065
0066 unsigned int eventsForWireT0;
0067
0068
0069 unsigned int rejectDigiFromPeak;
0070
0071
0072 double tpPeakWidth;
0073
0074
0075 bool correctByChamberMean_;
0076
0077
0078 std::string theCalibWheel;
0079 int selWheel;
0080 std::string theCalibSector;
0081 int selSector;
0082
0083
0084 std::map<DTLayerId, TH1I*> theHistoLayerMap;
0085
0086 TH1D* hT0SectorHisto;
0087
0088
0089 std::vector<DTWireId> wireIdWithHistos;
0090 std::vector<std::string> cellsWithHistos;
0091
0092
0093 std::map<DTWireId, double> theAbsoluteT0PerWire;
0094 std::map<DTWireId, double> theRelativeT0PerWire;
0095 std::map<DTWireId, double> theSigmaT0PerWire;
0096 std::map<DTWireId, int> nDigiPerWire;
0097 std::map<DTWireId, int> nDigiPerWire_ref;
0098 std::map<DTWireId, double> mK;
0099 std::map<DTWireId, double> mK_ref;
0100 std::map<DTWireId, double> qK;
0101
0102 std::map<DTWireId, TH1I*> theHistoWireMap;
0103 std::map<DTWireId, TH1I*> theHistoWireMap_ref;
0104
0105 std::map<std::string, double> theT0LayerMap;
0106 std::map<std::string, double> theSigmaT0LayerMap;
0107
0108
0109 edm::ESHandle<DTGeometry> dtGeom;
0110 const edm::ESGetToken<DTGeometry, MuonGeometryRecord> dtGeomToken_;
0111 };
0112 #endif