Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef FakeTTrig_H
0002 #define FakeTTrig_H
0003 
0004 /** \class FakeTTrigDB
0005  *
0006  *  Class which produce fake DB of ttrig with the correction of :
0007  *    --- 500 ns of delay
0008  *    --- time of wire propagation
0009  *    --- time of fly
0010  *
0011  *  \author Giorgia Mila - INFN Torino
0012  */
0013 
0014 #include "FWCore/Framework/interface/Frameworkfwd.h"
0015 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0016 #include "FWCore/Framework/interface/ESHandle.h"
0017 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0018 #include "Geometry/Records/interface/MuonGeometryRecord.h"
0019 #include "Geometry/DTGeometry/interface/DTGeometry.h"
0020 #include "CondFormats/DataRecord/interface/DTTtrigRcd.h"
0021 #include <string>
0022 class DTGeometry;
0023 class DTSuperLayer;
0024 class DTTtrig;
0025 
0026 class FakeTTrig : public edm::one::EDAnalyzer<edm::one::WatchRuns, edm::one::WatchLuminosityBlocks> {
0027 public:
0028   /// Constructor
0029   FakeTTrig(const edm::ParameterSet& pset);
0030 
0031   /// Destructor
0032   virtual ~FakeTTrig();
0033 
0034   // Operations
0035   virtual void beginRun(const edm::Run& run, const edm::EventSetup& setup) override;
0036   virtual void beginLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) override;
0037   virtual void analyze(const edm::Event& event, const edm::EventSetup& setup) override {}
0038   virtual void endRun(const edm::Run& run, const edm::EventSetup& setup) override{};
0039   virtual void endLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) override{};
0040   virtual void endJob() override;
0041 
0042   // TOF computation
0043   double tofComputation(const DTSuperLayer* superlayer);
0044   // wire propagation delay
0045   double wirePropComputation(const DTSuperLayer* superlayer);
0046 
0047 protected:
0048 private:
0049   edm::ESHandle<DTGeometry> muonGeom;
0050   edm::ParameterSet ps;
0051 
0052   double smearing;
0053 
0054   /// tTrig from the DB
0055   float tTrigRef;
0056   float tTrigRMSRef;
0057   float kFactorRef;
0058 
0059   // Get the tTrigMap
0060   edm::ESHandle<DTTtrig> tTrigMapRef;
0061 
0062   bool dataBaseWriteWasDone;
0063 
0064   edm::ESGetToken<DTTtrig, DTTtrigRcd> ttrigToken_;
0065   edm::ESGetToken<DTGeometry, MuonGeometryRecord> dtGeomToken_;
0066 };
0067 #endif