Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:26:59

0001 #ifndef MuonIdentification_MuonTimingFiller_h
0002 #define MuonIdentification_MuonTimingFiller_h 1
0003 
0004 // -*- C++ -*-
0005 //
0006 // Package:    MuonTimingFiller
0007 // Class:      MuonTimingFiller
0008 //
0009 /**\class MuonTimingFiller MuonTimingFiller.h RecoMuon/MuonIdentification/interface/MuonTimingFiller.h
0010 
0011  Description: Class filling the DT, CSC and Combined MuonTimeExtra objects
0012 
0013  Implementation:
0014      <Notes on implementation>
0015 */
0016 //
0017 // Original Author:  Piotr Traczyk, CERN
0018 //         Created:  Mon Mar 16 12:27:22 CET 2009
0019 //
0020 //
0021 
0022 // system include files
0023 #include <memory>
0024 
0025 // user include files
0026 #include "FWCore/Framework/interface/Frameworkfwd.h"
0027 
0028 #include "FWCore/Framework/interface/Event.h"
0029 
0030 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0031 
0032 #include "DataFormats/MuonReco/interface/MuonTimeExtra.h"
0033 #include "RecoMuon/MuonIdentification/interface/DTTimingExtractor.h"
0034 #include "RecoMuon/MuonIdentification/interface/CSCTimingExtractor.h"
0035 
0036 //
0037 // class decleration
0038 //
0039 
0040 class MuonTimingFiller {
0041 public:
0042   MuonTimingFiller(const edm::ParameterSet&, edm::ConsumesCollector&& iC);
0043   ~MuonTimingFiller();
0044   void fillTiming(const reco::Muon& muon,
0045                   reco::MuonTimeExtra& dtTime,
0046                   reco::MuonTimeExtra& cscTime,
0047                   reco::MuonTime& rpcTime,
0048                   reco::MuonTimeExtra& combinedTime,
0049                   edm::Event& iEvent,
0050                   const edm::EventSetup& iSetup);
0051 
0052 private:
0053   void fillTimeFromMeasurements(const TimeMeasurementSequence& tmSeq, reco::MuonTimeExtra& muTime);
0054   void fillRPCTime(const reco::Muon& muon, reco::MuonTime& muTime, edm::Event& iEvent);
0055   void rawFit(
0056       double& a, double& da, double& b, double& db, const std::vector<double>& hitsx, const std::vector<double>& hitsy);
0057   void addEcalTime(const reco::Muon& muon, TimeMeasurementSequence& cmbSeq);
0058   void combineTMSequences(const reco::Muon& muon,
0059                           const TimeMeasurementSequence& dtSeq,
0060                           const TimeMeasurementSequence& cscSeq,
0061                           TimeMeasurementSequence& cmbSeq);
0062 
0063   std::unique_ptr<MuonSegmentMatcher> theMatcher_;
0064   std::unique_ptr<DTTimingExtractor> theDTTimingExtractor_;
0065   std::unique_ptr<CSCTimingExtractor> theCSCTimingExtractor_;
0066   double errorEB_, errorEE_, ecalEcut_;
0067   bool useDT_, useCSC_, useECAL_;
0068 };
0069 
0070 #endif