Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef MuonReco_MuonTimeExtra_h
0002 #define MuonReco_MuonTimeExtra_h
0003 
0004 /** \class reco::MuonTimeExtra MuonTimeExtra.h DataFormats/MuonReco/interface/MuonTimeExtra.h
0005  *  
0006  * A class holding timing information calculated for a muon. 
0007  *
0008  * \author Piotr Traczyk, CERN
0009  *
0010  *
0011  */
0012 
0013 namespace reco {
0014 
0015   class MuonTimeExtra {
0016   public:
0017     MuonTimeExtra();
0018 
0019     enum Direction { OutsideIn = -1, Undefined = 0, InsideOut = 1 };
0020 
0021     /// number of measurements used in timing calculation
0022     int nDof() const { return nDof_; };
0023     void setNDof(const int nDof) { nDof_ = nDof; };
0024 
0025     /// 1/beta for prompt particle hypothesis
0026     /// (time is constraint to the bunch crossing time)
0027     float inverseBeta() const { return inverseBeta_; };
0028     float inverseBetaErr() const { return inverseBetaErr_; };
0029     void setInverseBeta(const float iBeta) { inverseBeta_ = iBeta; };
0030     void setInverseBetaErr(const float iBetaErr) { inverseBetaErr_ = iBetaErr; };
0031 
0032     /// unconstrained 1/beta (time is free)
0033     /// Sign convention:
0034     ///   positive - outward moving particle
0035     ///   negative - inward moving particle
0036     float freeInverseBeta() const { return freeInverseBeta_; };
0037     float freeInverseBetaErr() const { return freeInverseBetaErr_; };
0038     void setFreeInverseBeta(const float iBeta) { freeInverseBeta_ = iBeta; };
0039     void setFreeInverseBetaErr(const float iBetaErr) { freeInverseBetaErr_ = iBetaErr; };
0040 
0041     /// time of arrival at the IP for the Beta=1 hypothesis
0042     ///  a) particle is moving from inside out
0043     float timeAtIpInOut() const { return timeAtIpInOut_; };
0044     float timeAtIpInOutErr() const { return timeAtIpInOutErr_; };
0045     void setTimeAtIpInOut(const float timeIp) { timeAtIpInOut_ = timeIp; };
0046     void setTimeAtIpInOutErr(const float timeErr) { timeAtIpInOutErr_ = timeErr; };
0047     ///  b) particle is moving from outside in
0048     float timeAtIpOutIn() const { return timeAtIpOutIn_; };
0049     float timeAtIpOutInErr() const { return timeAtIpOutInErr_; };
0050     void setTimeAtIpOutIn(const float timeIp) { timeAtIpOutIn_ = timeIp; };
0051     void setTimeAtIpOutInErr(const float timeErr) { timeAtIpOutInErr_ = timeErr; };
0052 
0053     /// direction estimation based on time dispersion
0054     Direction direction() const {
0055       if (nDof_ < 2)
0056         return Undefined;
0057       if (timeAtIpInOutErr_ > timeAtIpOutInErr_)
0058         return OutsideIn;
0059       return InsideOut;
0060     }
0061 
0062   private:
0063     /// number of measurements used in timing calculation
0064     int nDof_;
0065 
0066     /// 1/beta for prompt particle hypothesis
0067     float inverseBeta_;
0068     float inverseBetaErr_;
0069 
0070     /// unconstrained 1/beta (time is free)
0071     float freeInverseBeta_;
0072     float freeInverseBetaErr_;
0073 
0074     /// time of arrival at the IP for the Beta=1 hypothesis
0075     float timeAtIpInOut_;
0076     float timeAtIpInOutErr_;
0077     float timeAtIpOutIn_;
0078     float timeAtIpOutInErr_;
0079   };
0080 
0081 }  // namespace reco
0082 
0083 #endif