Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef RecoTauTag_RecoTau_PositionAtECalEntranceComputer_h
0002 #define RecoTauTag_RecoTau_PositionAtECalEntranceComputer_h
0003 
0004 /** \class PositionAtECalEntranceComputer
0005  *
0006  * Extrapolate particle (charged or neutral) to ECAL entrance,
0007  * in order to compute the distance of the tau to ECAL cracks and/or dead ECAL channels
0008  *
0009  * \authors Fabio Colombo,
0010  *          Christian Veelken
0011  *
0012  *
0013  *
0014  */
0015 
0016 #include "FWCore/Framework/interface/EventSetup.h"
0017 #include "FWCore/Utilities/interface/ESGetToken.h"
0018 #include "FWCore/Framework/interface/ConsumesCollector.h"
0019 #include "DataFormats/Candidate/interface/Candidate.h"
0020 #include "RecoLocalCalo/HGCalRecAlgos/interface/RecHitTools.h"
0021 
0022 class MagneticField;
0023 class IdealMagneticFieldRecord;
0024 
0025 class PositionAtECalEntranceComputer {
0026 public:
0027   PositionAtECalEntranceComputer(edm::ConsumesCollector&&, bool isPhase2 = false);
0028   PositionAtECalEntranceComputer(edm::ConsumesCollector&, bool isPhase2 = false);
0029   ~PositionAtECalEntranceComputer();
0030 
0031   void beginEvent(const edm::EventSetup&);
0032 
0033   //To do: it seems to more practical to put this to the ES
0034   reco::Candidate::Point operator()(const reco::Candidate* particle, bool& success) const;
0035 
0036 private:
0037   edm::ESGetToken<MagneticField, IdealMagneticFieldRecord> bField_esToken_;
0038   edm::ESGetToken<CaloGeometry, CaloGeometryRecord> caloGeo_esToken_;
0039   double bField_z_;
0040   bool isPhase2_;
0041   hgcal::RecHitTools recHitTools_;
0042   float hgcalFace_z_;
0043   static constexpr float ecalBarrelEndcapEtaBorder_ = 1.479;
0044   static constexpr float hgcalHfEtaBorder_ = 3.0;
0045 };
0046 
0047 #endif  // RecoTauTag_RecoTau_PositionAtECalEntranceComputer_h