Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:19:50

0001 //-------------------------------------------------
0002 //
0003 /**  \class DTTSPhi
0004  *    Implementation of TS Phi trigger algorithm
0005  *
0006  *
0007  *
0008  *   \author C. Grandi, D. Bonacorsi, S. Marcellini
0009  */
0010 //
0011 //--------------------------------------------------
0012 #ifndef DT_TS_PHI_H
0013 #define DT_TS_PHI_H
0014 
0015 //-------------------
0016 // Constants file  --
0017 //-------------------
0018 
0019 //------------------------------------
0020 // Collaborating Class Declarations --
0021 //------------------------------------
0022 class DTTracoCard;
0023 class DTTracoTrigData;
0024 class DTTSS;
0025 class DTTSM;
0026 class DTSectColl;
0027 class DTTSCand;
0028 class DTTrigGeom;
0029 
0030 //----------------------
0031 // Base Class Headers --
0032 //----------------------
0033 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0034 #include "L1Trigger/DTUtilities/interface/DTCache.h"
0035 #include "L1Trigger/DTUtilities/interface/DTGeomSupplier.h"
0036 #include "L1TriggerConfig/DTTPGConfig/interface/DTConfigManager.h"
0037 #include "L1TriggerConfig/DTTPGConfig/interface/DTConfigTSPhi.h"
0038 
0039 #include "L1Trigger/DTTriggerServerPhi/interface/DTChambPhSegm.h"
0040 
0041 //---------------
0042 // C++ Headers --
0043 //---------------
0044 #include <vector>
0045 
0046 //              ---------------------
0047 //              -- Class Interface --
0048 //              ---------------------
0049 
0050 typedef std::vector<DTChambPhSegm> DTChambPhVector;
0051 typedef DTCache<DTChambPhSegm, DTChambPhVector> DTTSPhiManager;
0052 
0053 class DTTSPhi : public DTTSPhiManager, public DTGeomSupplier {
0054 public:
0055   /// Constructor
0056   DTTSPhi(DTTrigGeom *, DTTracoCard *);
0057 
0058   /// Destructor
0059   ~DTTSPhi() override;
0060 
0061   /// Return the configuration class
0062   inline const DTConfigTSPhi *config() const { return _config; }
0063 
0064   /// Set configuration
0065   void setConfig(const DTConfigManager *conf);
0066 
0067   /// Return number of DTTSPhi segments
0068   int nSegm(int step);
0069 
0070   /// Return the requested DTTSPhi segment
0071   const DTChambPhSegm *segment(int step, unsigned n);
0072 
0073   /// Local position in chamber of a trigger-data object
0074   LocalPoint localPosition(const DTTrigData *) const override;
0075 
0076   /// Local direction in chamber of a trigger-data object
0077   LocalVector localDirection(const DTTrigData *) const override;
0078 
0079   /// Load TRACO triggers and run TSPhi algorithm
0080   void reconstruct() override {
0081     loadTSPhi();
0082     runTSPhi();
0083   }
0084 
0085 private:
0086   /// store DTTracoChip triggers in the DTTSS's
0087   void loadTSPhi();
0088 
0089   /// run DTTSPhi algorithm (DTTSS+DTTSM)
0090   void runTSPhi();
0091 
0092   /// Add a DTTracoChip trigger to the DTTSPhi, ifs is track number (first or
0093   /// second)
0094   void addTracoT(int step, const DTTracoTrigData *tracotrig, int ifs);
0095 
0096   /// Set a flag to ignore second tracks (if first track at following BX)
0097   void ignoreSecondTrack(int step, int tracon);
0098 
0099   /// Clear
0100   void localClear();
0101 
0102   // Return a DTTSS
0103   DTTSS *getDTTSS(int step, unsigned n) const;
0104 
0105   // SM double TSM
0106   // Return a DTTSM
0107   DTTSM *getDTTSM(int step, unsigned n) const;
0108 
0109 private:
0110   DTTracoCard *_tracocard;
0111 
0112   const DTConfigTSPhi *_config;
0113 
0114   // Components
0115   std::vector<DTTSS *> _tss[DTConfigTSPhi::NSTEPL - DTConfigTSPhi::NSTEPF + 1];
0116   // DBSM-doubleTSM
0117   std::vector<DTTSM *> _tsm[DTConfigTSPhi::NSTEPL - DTConfigTSPhi::NSTEPF + 1];
0118 
0119   // Input data
0120   std::vector<DTTSCand *> _tctrig[DTConfigTSPhi::NSTEPL - DTConfigTSPhi::NSTEPF + 1];
0121 };
0122 
0123 #endif