Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 11:58:28

0001 #ifndef DTTTrigOffsetCalibration_H
0002 #define DTTTrigOffsetCalibration_H
0003 
0004 /** \class DTTTrigOffsetCalibration
0005  *  No description available.
0006  *
0007  *  \author A. Vilela Pereira
0008  */
0009 
0010 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0011 #include "FWCore/Utilities/interface/InputTag.h"
0012 #include "CalibMuon/DTCalibration/interface/DTSegmentSelector.h"
0013 #include "DataFormats/DTRecHit/interface/DTRecSegment4DCollection.h"
0014 #include "Geometry/Records/interface/MuonGeometryRecord.h"
0015 #include "CondFormats/DataRecord/interface/DTTtrigRcd.h"
0016 #include "Geometry/DTGeometry/interface/DTGeometry.h"
0017 
0018 #include <map>
0019 
0020 namespace edm {
0021   class ParameterSet;
0022   class Event;
0023   class EventSetup;
0024 }  // namespace edm
0025 
0026 class DTChamberId;
0027 class DTTtrig;
0028 class TFile;
0029 class TH1F;
0030 
0031 class DTTTrigOffsetCalibration : public edm::one::EDAnalyzer<edm::one::WatchRuns> {
0032 public:
0033   // Constructor
0034   DTTTrigOffsetCalibration(const edm::ParameterSet& pset);
0035   // Destructor
0036   ~DTTTrigOffsetCalibration() override;
0037 
0038   void beginRun(const edm::Run& run, const edm::EventSetup& setup) override;
0039   void analyze(const edm::Event& event, const edm::EventSetup& eventSetup) override;
0040   void endRun(const edm::Run& run, const edm::EventSetup& setup) override{};
0041   void endJob() override;
0042 
0043 private:
0044   typedef std::map<DTChamberId, std::vector<TH1F*> > ChamberHistosMap;
0045   void bookHistos(DTChamberId);
0046 
0047   DTSegmentSelector* select_;
0048 
0049   const edm::EDGetTokenT<DTRecSegment4DCollection> theRecHits4DToken_;
0050   const bool doTTrigCorrection_;
0051   const std::string theCalibChamber_;
0052 
0053   TFile* rootFile_;
0054   const DTTtrig* tTrigMap_;
0055   ChamberHistosMap theT0SegHistoMap_;
0056 
0057   const edm::ESGetToken<DTTtrig, DTTtrigRcd> ttrigToken_;
0058   const edm::ESGetToken<DTGeometry, MuonGeometryRecord> dtGeomToken_;
0059 };
0060 #endif