Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef MuonReco_CaloMuon_h
0002 #define MuonReco_CaloMuon_h
0003 /** \class reco::CaloMuon CaloMuon.h DataFormats/MuonReco/interface/CaloMuon.h

0004  *  

0005  * A lightweight reconstructed Muon to store low momentum muons without matches

0006  * in the muon detectors. Contains:

0007  *  - reference to a silicon tracker track

0008  *  - calorimeter energy deposition

0009  *  - calo compatibility variable

0010  *

0011  * \author Dmytro Kovalskyi, UCSB

0012  *

0013  *

0014  */
0015 #include "DataFormats/MuonReco/interface/MuonEnergy.h"
0016 #include "DataFormats/TrackReco/interface/TrackFwd.h"
0017 #include "DataFormats/TrackReco/interface/Track.h"
0018 
0019 namespace reco {
0020 
0021   class CaloMuon {
0022   public:
0023     CaloMuon();
0024     virtual ~CaloMuon() {}
0025 
0026     /// reference to Track reconstructed in the tracker only

0027     virtual TrackRef innerTrack() const { return innerTrack_; }
0028     virtual TrackRef track() const { return innerTrack(); }
0029     /// set reference to Track

0030     virtual void setInnerTrack(const TrackRef& t) { innerTrack_ = t; }
0031     virtual void setTrack(const TrackRef& t) { setInnerTrack(t); }
0032     /// energy deposition

0033     bool isEnergyValid() const { return energyValid_; }
0034     /// get energy deposition information

0035     MuonEnergy calEnergy() const { return calEnergy_; }
0036     /// set energy deposition information

0037     void setCalEnergy(const MuonEnergy& calEnergy) {
0038       calEnergy_ = calEnergy;
0039       energyValid_ = true;
0040     }
0041 
0042     /// Muon hypothesis compatibility block

0043     /// Relative likelihood based on ECAL, HCAL, HO energy defined as

0044     /// L_muon/(L_muon+L_not_muon)

0045     float caloCompatibility() const { return caloCompatibility_; }
0046     void setCaloCompatibility(float input) { caloCompatibility_ = input; }
0047     bool isCaloCompatibilityValid() const { return caloCompatibility_ >= 0; }
0048 
0049     /// a bunch of useful accessors

0050     int charge() const { return innerTrack_.get()->charge(); }
0051     /// polar angle

0052     double theta() const { return innerTrack_.get()->theta(); }
0053     /// momentum vector magnitude

0054     double p() const { return innerTrack_.get()->p(); }
0055     /// track transverse momentum

0056     double pt() const { return innerTrack_.get()->pt(); }
0057     /// x coordinate of momentum vector

0058     double px() const { return innerTrack_.get()->px(); }
0059     /// y coordinate of momentum vector

0060     double py() const { return innerTrack_.get()->py(); }
0061     /// z coordinate of momentum vector

0062     double pz() const { return innerTrack_.get()->pz(); }
0063     /// azimuthal angle of momentum vector

0064     double phi() const { return innerTrack_.get()->phi(); }
0065     /// pseudorapidity of momentum vector

0066     double eta() const { return innerTrack_.get()->eta(); }
0067 
0068   private:
0069     /// reference to Track reconstructed in the tracker only

0070     TrackRef innerTrack_;
0071     /// energy deposition

0072     MuonEnergy calEnergy_;
0073     bool energyValid_;
0074     /// muon hypothesis compatibility with observer calorimeter energy

0075     float caloCompatibility_;
0076   };
0077 
0078 }  // namespace reco

0079 
0080 #endif