Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:21:55

0001 #ifndef L1Trigger_TrackFindingTracklet_interface_Residual_h
0002 #define L1Trigger_TrackFindingTracklet_interface_Residual_h
0003 
0004 #include "L1Trigger/TrackFindingTracklet/interface/FPGAWord.h"
0005 
0006 #include <cassert>
0007 
0008 namespace trklet {
0009 
0010   class Settings;
0011   class Stub;
0012 
0013   class Residual {
0014   public:
0015     Residual() { valid_ = false; }
0016 
0017     ~Residual() = default;
0018 
0019     void init(Settings const& settings,
0020               unsigned int layerdisk,
0021               int iphiresid,
0022               int irzresid,
0023               int istubid,
0024               double phiresid,
0025               double rzresid,
0026               double phiresidapprox,
0027               double rzresidapprox,
0028               const Stub* stubptr);
0029 
0030     bool valid() const { return valid_; }
0031 
0032     const FPGAWord& fpgaphiresid() const {
0033       assert(valid_);
0034       return fpgaphiresid_;
0035     };
0036 
0037     const FPGAWord& fpgarzresid() const {
0038       assert(valid_);
0039       return fpgarzresid_;
0040     };
0041 
0042     const FPGAWord& fpgastubid() const {
0043       assert(valid_);
0044       return fpgastubid_;
0045     };
0046 
0047     double phiresid() const {
0048       assert(valid_);
0049       return phiresid_;
0050     };
0051 
0052     double rzresid() const {
0053       assert(valid_);
0054       return rzresid_;
0055     };
0056 
0057     double phiresidapprox() const {
0058       assert(valid_);
0059       return phiresidapprox_;
0060     };
0061 
0062     double rzresidapprox() const {
0063       assert(valid_);
0064       return rzresidapprox_;
0065     };
0066 
0067     const Stub* stubptr() const {
0068       assert(valid_);
0069       return stubptr_;
0070     }
0071 
0072   protected:
0073     bool valid_;
0074 
0075     unsigned int layerdisk_;
0076 
0077     FPGAWord fpgaphiresid_;
0078     FPGAWord fpgarzresid_;
0079     FPGAWord fpgastubid_;
0080 
0081     double phiresid_;
0082     double rzresid_;
0083 
0084     double phiresidapprox_;
0085     double rzresidapprox_;
0086 
0087     const Stub* stubptr_;
0088   };
0089 
0090 };  // namespace trklet
0091 #endif