Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-08-09 23:47:31

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 "SimDataFormats/Associations/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     // underlying TTStubRef
0023     TTStubRef ttStubRef() const { return ttStubRef_; }
0024     // did pass pt and eta cut
0025     bool valid() const { return valid_; }
0026     // stub bend in quarter pitch units
0027     int bend() const { return bend_; }
0028     // bit accurate representation of Stub
0029     tt::Frame frame(int region) const;
0030     // checks stubs region assignment
0031     bool inRegion(int region) const;
0032 
0033   private:
0034     // truncates double precision to f/w integer equivalent
0035     double digi(double value, double precision) const;
0036     // 64 bit stub in hybrid data format
0037     tt::Frame formatHybrid(int region) const;
0038     // 64 bit stub in tmtt data format
0039     tt::Frame formatTMTT(int region) const;
0040     // stores, calculates and provides run-time constants
0041     const tt::Setup* setup_;
0042     // class to encode layer ids used between DTC and TFP in Hybrid
0043     const LayerEncoding* layerEncoding_;
0044     // representation of an outer tracker sensormodule
0045     tt::SensorModule* sm_;
0046     // underlying TTStubRef
0047     TTStubRef ttStubRef_;
0048     // chosen TT algorithm
0049     bool hybrid_;
0050     // passes pt and eta cut
0051     bool valid_;
0052     // column number in pitch units
0053     int col_;
0054     // row number in half pitch units
0055     int row_;
0056     // bend number in quarter pitch units
0057     int bend_;
0058     // reduced row number for look up
0059     int rowLUT_;
0060     // sub row number inside reduced row number
0061     int rowSub_;
0062     // stub r w.r.t. an offset in cm
0063     double r_;
0064     // stub phi w.r.t. detector region centre in rad
0065     double phi_;
0066     // stub z w.r.t. an offset in cm
0067     double z_;
0068     // slope of linearized stub phi in rad / pitch
0069     double m_;
0070     // intercept of linearized stub phi in rad
0071     double c_;
0072     // radius of a column of strips/pixel in cm
0073     double d_;
0074     // range of stub inv2R in 1/cm
0075     std::pair<double, double> inv2R_;
0076     // range of stub cot(theta)
0077     std::pair<double, double> cot_;
0078     // range of stub extrapolated phi to radius chosenRofPhi in rad
0079     std::pair<double, double> phiT_;
0080     // shared regions this stub belongs to [0-1]
0081     std::vector<int> regions_;
0082   };
0083 
0084 }  // namespace trackerDTC
0085 
0086 #endif