File indexing completed on 2024-04-06 11:58:27
0001 #ifndef CalibMuon_DTTTrigCalibration_H
0002 #define CalibMuon_DTTTrigCalibration_H
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0013 #include "DataFormats/MuonDetId/interface/DTSuperLayerId.h"
0014 #include "DataFormats/MuonDetId/interface/DTLayerId.h"
0015 #include "DataFormats/DTDigi/interface/DTDigiCollection.h"
0016
0017 #include <string>
0018 #include <map>
0019
0020 namespace edm {
0021 class ParameterSet;
0022 class Event;
0023 class EventSetup;
0024 }
0025
0026 class TFile;
0027 class TH1F;
0028 class DTTimeBoxFitter;
0029 class DTTTrigBaseSync;
0030 class DTTtrig;
0031 class DTStatusFlag;
0032 class DTStatusFlagRcd;
0033
0034 class DTTTrigCalibration : public edm::one::EDAnalyzer<> {
0035 public:
0036
0037 DTTTrigCalibration(const edm::ParameterSet& pset);
0038
0039
0040 ~DTTTrigCalibration() override;
0041
0042
0043
0044
0045 void analyze(const edm::Event& event, const edm::EventSetup& eventSetup) override;
0046
0047
0048 void endJob() override;
0049
0050 protected:
0051 private:
0052
0053 std::string getTBoxName(const DTSuperLayerId& slId) const;
0054
0055 std::string getOccupancyName(const DTLayerId& slId) const;
0056
0057
0058 void dumpTTrigMap(const DTTtrig* tTrig) const;
0059
0060
0061 void plotTTrig(const DTTtrig* tTrig) const;
0062
0063
0064 bool debug;
0065
0066
0067 edm::EDGetTokenT<DTDigiCollection> digiToken;
0068
0069
0070 int maxTDCCounts;
0071
0072 int maxDigiPerLayer;
0073
0074
0075 TFile* theFile;
0076
0077
0078 std::map<DTSuperLayerId, TH1F*> theHistoMap;
0079 std::map<DTLayerId, TH1F*> theOccupancyMap;
0080
0081
0082 bool doSubtractT0;
0083
0084 bool checkNoisyChannels;
0085
0086 bool findTMeanAndSigma;
0087
0088 double kFactor;
0089
0090
0091 std::unique_ptr<DTTimeBoxFitter> theFitter;
0092
0093 std::unique_ptr<DTTTrigBaseSync> theSync;
0094 edm::ESGetToken<DTStatusFlag, DTStatusFlagRcd> theStatusMapToken;
0095 };
0096 #endif