Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 //-------------------------------------------------
0002 //
0003 /**  \class DTTSM
0004  *    Implementation of TSM trigger algorithm
0005  *
0006  *
0007  *
0008  *   \author C. Grandi, D. Bonacorsi, S. Marcellini
0009  */
0010 //
0011 //--------------------------------------------------
0012 #ifndef MU_DT_TSM_H
0013 #define MU_DT_TSM_H
0014 
0015 //------------------------------------
0016 // Collaborating Class Declarations --
0017 //------------------------------------
0018 class DTTracoTrigData;
0019 class DTTSCand;
0020 class DTConfigTSPhi;
0021 // added DBSM
0022 class DTTrigGeom;
0023 //----------------------
0024 // Base Class Headers --
0025 //----------------------
0026 // added DBSM
0027 #include "L1Trigger/DTUtilities/interface/DTGeomSupplier.h"
0028 
0029 //---------------
0030 // C++ Headers --
0031 //---------------
0032 #include <vector>
0033 
0034 //              ---------------------
0035 //              -- Class Interface --
0036 //              ---------------------
0037 
0038 class DTTSM {
0039 public:
0040   ///  Constructor
0041   // SM double TSM
0042   DTTSM(int);
0043 
0044   /// Destructor
0045   ~DTTSM();
0046 
0047   /// Return identifier
0048   inline int number() const { return _n; }
0049 
0050   /// Set configuration
0051   void setConfig(const DTConfigTSPhi *config) { _config = config; }
0052 
0053   /// Add a TSS candidate to the TSM, ifs is first/second track flag
0054   void addCand(DTTSCand *cand);
0055 
0056   /// Set a flag to skip sort2
0057   void ignoreSecondTrack() { _ignoreSecondTrack = 1; }
0058 
0059   /// Run the TSM algorithm
0060   void run(int bkmod);
0061 
0062   /// Sort 1
0063   // added DBSM
0064   DTTSCand *sortTSM1(int bkmod);
0065 
0066   /// Sort 2
0067   DTTSCand *sortTSM2(int bkmod);
0068 
0069   /// Clear
0070   void clear();
0071 
0072   /// Configuration set
0073   inline const DTConfigTSPhi *config() const { return _config; }
0074 
0075   /// Return the number of input tracks (first/second)
0076   unsigned nCand(int ifs) const;
0077 
0078   /// Return the number of input first tracks
0079   inline int nFirstT() const { return _incand[0].size(); }
0080 
0081   /// Return the number of input second tracks
0082   inline int nSecondT() const { return _incand[1].size(); }
0083 
0084   /// Return requested TS candidate
0085   DTTSCand *getDTTSCand(int ifs, unsigned n) const;
0086 
0087   /// Return requested TRACO trigger
0088   const DTTracoTrigData *getTracoT(int ifs, unsigned n) const;
0089 
0090   /// Return the number of sorted tracks
0091   inline int nTracks() const { return _outcand.size(); }
0092 
0093   /// Return the requested track
0094   DTTSCand *getTrack(int n) const;
0095 
0096 private:
0097   const DTConfigTSPhi *_config;
0098 
0099   // SM double TSM
0100   // identification (as for DTTSS.h)
0101   int _n;
0102 
0103   // input data
0104   std::vector<DTTSCand *> _incand[2];
0105 
0106   // output data
0107   std::vector<DTTSCand *> _outcand;
0108 
0109   // internal use variables
0110   int _ignoreSecondTrack;
0111 };
0112 #endif