Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef HcalIsolatedTrack_EcalIsolatedParticleCandidate_h
0002 #define HcalIsolatedTrack_EcalIsolatedParticleCandidate_h
0003 /** \class reco::EcalIsolatedParticleCandidate
0004  *
0005  *
0006  */
0007 #include "DataFormats/Candidate/interface/LeafCandidate.h"
0008 #include "DataFormats/Candidate/interface/OverlapChecker.h"
0009 #include "DataFormats/L1Trigger/interface/L1JetParticle.h"
0010 #include "DataFormats/L1Trigger/interface/L1JetParticleFwd.h"
0011 #include "DataFormats/HcalIsolatedTrack/interface/EcalIsolatedParticleCandidateFwd.h"
0012 
0013 namespace reco {
0014 
0015   class EcalIsolatedParticleCandidate : public LeafCandidate {
0016   public:
0017     // default constructor
0018     EcalIsolatedParticleCandidate() : LeafCandidate() {}
0019     // constructor from a tau jet
0020     EcalIsolatedParticleCandidate(const l1extra::L1JetParticleRef& l1tau,
0021                                   double etatau,
0022                                   double phitau,
0023                                   double enIn,
0024                                   double enOut,
0025                                   int nhitIn,
0026                                   int nhitOut)
0027         : LeafCandidate(0, PtEtaPhiMass(0., etatau, phitau, 0.)),
0028           l1tau_(l1tau),
0029           enIn_(enIn),
0030           enOut_(enOut),
0031           nhitIn_(nhitIn),
0032           nhitOut_(nhitOut) {}
0033 
0034     //constructor with null candidate
0035     EcalIsolatedParticleCandidate(double etatau, double phitau, double enIn, double enOut, int nhitIn, int nhitOut)
0036         : LeafCandidate(0, PtEtaPhiMass(0., etatau, phitau, 0.)),
0037           enIn_(enIn),
0038           enOut_(enOut),
0039           nhitIn_(nhitIn),
0040           nhitOut_(nhitOut) {}
0041 
0042     /// destructor
0043     ~EcalIsolatedParticleCandidate() override;
0044     /// returns a clone of the candidate
0045     EcalIsolatedParticleCandidate* clone() const override;
0046 
0047     /// reference to a tau jet
0048     virtual l1extra::L1JetParticleRef l1TauJet() const;
0049 
0050     /// ECAL energy in the inner cone around tau jet
0051     double energyIn() const { return enIn_; }
0052 
0053     /// ECAL energy in the outer cone around tau jet
0054     double energyOut() const { return enOut_; }
0055 
0056     /// number of ECAL hits in the inner cone around tau jet
0057     int nHitIn() const { return nhitIn_; }
0058 
0059     /// number of ECAL hits in the outer cone around tau jet
0060     int nHitOut() const { return nhitOut_; }
0061 
0062     /// set reference to l1 tau jet
0063     void setL1TauJet(const l1extra::L1JetParticleRef& l1tau) { l1tau_ = l1tau; }
0064 
0065   private:
0066     /// reference to a L1 tau jet
0067     l1extra::L1JetParticleRef l1tau_;
0068     /// energy in inner cone around L1 tau jet
0069     double enIn_;
0070     /// energy in outer cone around L1 tau jet
0071     double enOut_;
0072     /// number of hits in inner cone
0073     int nhitIn_;
0074     /// number of hits in inner cone
0075     int nhitOut_;
0076   };
0077 
0078 }  // namespace reco
0079 
0080 #endif  // HcalIsolatedTrack_EcalIsolatedParticleCandidate_h