Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:27:04

0001 #ifndef MuonIsolation_JetExtractor_H
0002 #define MuonIsolation_JetExtractor_H
0003 
0004 /** \class JetExtractor
0005  *  Extracts deposits in each calorimeter section (ECAL, HCAL, HO)
0006  *  vetoes are set based on expected crossed DetIds (xtals, towers)
0007  *  these can later be subtracted from deposits in a cone.
0008  *  All work is done by TrackDetectorAssociator. Because of the heavy
0009  *  weight of the tool, all extractions can (should?) be placed in a single place.
0010  *
0011  *  \author S. Krutelyov
0012  */
0013 
0014 #include <string>
0015 
0016 #include "FWCore/Framework/interface/ConsumesCollector.h"
0017 
0018 #include "PhysicsTools/IsolationAlgos/interface/IsoDepositExtractor.h"
0019 
0020 #include "DataFormats/RecoCandidate/interface/IsoDeposit.h"
0021 #include "DataFormats/TrackReco/interface/Track.h"
0022 #include "DataFormats/TrackReco/interface/TrackFwd.h"
0023 #include "DataFormats/CaloTowers/interface/CaloTowerCollection.h"
0024 #include "DataFormats/JetReco/interface/CaloJetCollection.h"
0025 
0026 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
0027 
0028 #include "MagneticField/Engine/interface/MagneticField.h"
0029 #include "MagneticField/Records/interface/IdealMagneticFieldRecord.h"
0030 
0031 class TrackAssociatorParameters;
0032 class TrackDetectorAssociator;
0033 class MuonServiceProxy;
0034 
0035 namespace muonisolation {
0036 
0037   class JetExtractor : public reco::isodeposit::IsoDepositExtractor {
0038   public:
0039     JetExtractor();
0040     JetExtractor(const edm::ParameterSet& par, edm::ConsumesCollector&& iC);
0041 
0042     ~JetExtractor() override;
0043 
0044     void fillVetos(const edm::Event& ev, const edm::EventSetup& evSetup, const reco::TrackCollection& tracks) override;
0045     reco::IsoDeposit deposit(const edm::Event& ev,
0046                              const edm::EventSetup& evSetup,
0047                              const reco::Track& track) const override;
0048 
0049   private:
0050     edm::EDGetTokenT<reco::CaloJetCollection> theJetCollectionToken;
0051 
0052     std::string thePropagatorName;
0053 
0054     edm::ESGetToken<MagneticField, IdealMagneticFieldRecord> theFieldToken;
0055 
0056     // Cone cuts and thresholds
0057     double theThreshold;
0058     double theDR_Veto;
0059     double theDR_Max;
0060 
0061     //excludes sumEt of towers that are inside muon veto cone
0062     bool theExcludeMuonVeto;
0063 
0064     //! the event setup proxy, it takes care the services update
0065     std::unique_ptr<MuonServiceProxy> theService;
0066 
0067     std::unique_ptr<TrackAssociatorParameters> theAssociatorParameters;
0068     std::unique_ptr<TrackDetectorAssociator> theAssociator;
0069 
0070     bool thePrintTimeReport;
0071   };
0072 
0073 }  // namespace muonisolation
0074 
0075 #endif