Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 11:13:30

0001 #ifndef L1Trigger_TrackerDTC_Stub_h
0002 #define L1Trigger_TrackerDTC_Stub_h
0003 
0004 #include "L1Trigger/TrackTrigger/interface/Setup.h"
0005 #include "L1Trigger/TrackerDTC/interface/LayerEncoding.h"
0006 #include "SimTracker/TrackTriggerAssociation/interface/TTTypes.h"
0007 
0008 #include <utility>
0009 #include <vector>
0010 
0011 namespace trackerDTC {
0012 
0013   /*! \class  trackerDTC::Stub
0014    *  \brief  Class to represent an outer tracker Stub
0015    *  \author Thomas Schuh
0016    *  \date   2020, Jan
0017    */
0018   class Stub {
0019   public:
0020     Stub(const edm::ParameterSet&, const tt::Setup*, const LayerEncoding*, tt::SensorModule*, const TTStubRef&);
0021     ~Stub() {}
0022 
0023     // underlying TTStubRef
0024     TTStubRef ttStubRef() const { return ttStubRef_; }
0025     // did pass pt and eta cut
0026     bool valid() const { return valid_; }
0027     // stub bend in quarter pitch units
0028     int bend() const { return bend_; }
0029     // bit accurate representation of Stub
0030     tt::Frame frame(int region) const;
0031     // checks stubs region assignment
0032     bool inRegion(int region) const;
0033 
0034   private:
0035     // truncates double precision to f/w integer equivalent
0036     double digi(double value, double precision) const;
0037     // 64 bit stub in hybrid data format
0038     tt::Frame formatHybrid(int region) const;
0039     // 64 bit stub in tmtt data format
0040     tt::Frame formatTMTT(int region) const;
0041 
0042     // stores, calculates and provides run-time constants
0043     const tt::Setup* setup_;
0044     // class to encode layer ids used between DTC and TFP in Hybrid
0045     const LayerEncoding* layerEncoding_;
0046     // representation of an outer tracker sensormodule
0047     tt::SensorModule* sm_;
0048     // underlying TTStubRef
0049     TTStubRef ttStubRef_;
0050     // chosen TT algorithm
0051     bool hybrid_;
0052     // passes pt and eta cut
0053     bool valid_;
0054     // column number in pitch units
0055     int col_;
0056     // row number in half pitch units
0057     int row_;
0058     // bend number in quarter pitch units
0059     int bend_;
0060     // reduced row number for look up
0061     int rowLUT_;
0062     // sub row number inside reduced row number
0063     int rowSub_;
0064     // stub r w.r.t. an offset in cm
0065     double r_;
0066     // stub phi w.r.t. detector region centre in rad
0067     double phi_;
0068     // stub z w.r.t. an offset in cm
0069     double z_;
0070     // slope of linearized stub phi in rad / pitch
0071     double m_;
0072     // intercept of linearized stub phi in rad
0073     double c_;
0074     // radius of a column of strips/pixel in cm
0075     double d_;
0076     // range of stub inv2R in 1/cm
0077     std::pair<double, double> inv2R_;
0078     // range of stub cot(theta)
0079     std::pair<double, double> cot_;
0080     // range of stub extrapolated phi to radius chosenRofPhi in rad
0081     std::pair<double, double> phiT_;
0082     // shared regions this stub belongs to [0-1]
0083     std::vector<int> regions_;
0084   };
0085 
0086 }  // namespace trackerDTC
0087 
0088 #endif