Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 //-------------------------------------------------
0002 //
0003 /**   \class: DTSC.h
0004  *
0005  *
0006  *
0007  *   Implementation of Sector Collector trigger algorithm
0008  *
0009  *   \Author S. Marcellini
0010  */
0011 //
0012 //
0013 //--------------------------------------------------
0014 #ifndef DT_SC_H
0015 #define DT_SC_H
0016 
0017 //------------------------------------
0018 // Collaborating Class Declarations --
0019 //------------------------------------
0020 class DTTracoTrigData;
0021 class DTChambPhSegm;
0022 class DTSectCollPhCand;
0023 class DTSectCollThCand;
0024 class DTConfigSectColl;
0025 class DTTrigGeom;
0026 
0027 //----------------------
0028 // Base Class Headers --
0029 //----------------------
0030 #include "L1Trigger/DTUtilities/interface/DTGeomSupplier.h"
0031 
0032 //---------------
0033 // C++ Headers --
0034 //---------------
0035 #include <vector>
0036 
0037 //              ---------------------
0038 //              -- Class Interface --
0039 //              ---------------------
0040 
0041 class DTSC {
0042 public:
0043   //!  Constructor
0044   DTSC(int istat);
0045 
0046   //!  Destructor
0047   ~DTSC();
0048 
0049   // non-const methods
0050 
0051   /// Set configuration
0052   void setConfig(const DTConfigSectColl* conf) { _config = conf; };
0053 
0054   //! Add a TSM candidate to the Sect Coll, ifs is first/second track flag
0055   void addPhCand(DTSectCollPhCand* cand);
0056 
0057   //! Add a Theta candidate to sect coll
0058   void addThCand(DTSectCollThCand* cand);
0059 
0060   // CB CONTROLLA LA DIFFERENZA TRA QUESTO E addPhCand!!!!!!!!!!
0061   //! Add a Sector Collector
0062   void addDTSectCollPhCand(DTSectCollPhCand* cand);
0063 
0064   //! Set a flag to skip sort2
0065   void ignoreSecondTrack() { _ignoreSecondTrack = 1; }
0066 
0067   //! Run the Sector Collector algorithm
0068   void run();
0069 
0070   //! Phi Sort 1
0071   DTSectCollPhCand* DTSectCollsort1();
0072 
0073   //! Phi Sort 2
0074   DTSectCollPhCand* DTSectCollsort2();
0075 
0076   //! Clear
0077   void clear();
0078 
0079   // const methods
0080 
0081   //! Configuration set
0082   inline const DTConfigSectColl* config() const { return _config; }
0083 
0084   //! Return the number of Phi input tracks (first/second)
0085   unsigned nCandPh(int ifs) const;
0086 
0087   //! Return the number of Theta input tracks
0088   unsigned nCandTh() const;
0089 
0090   //! Return the number of input first tracks
0091   inline int nFirstTPh() const { return _incand_ph[0].size(); }
0092 
0093   //! Return the number of input second tracks
0094   inline int nSecondTPh() const { return _incand_ph[1].size(); }
0095 
0096   //! Return requested TSS candidate
0097   DTSectCollPhCand* getDTSectCollPhCand(int ifs, unsigned n) const;
0098 
0099   //! Return requested Theta candidate
0100   DTSectCollThCand* getDTSectCollThCand(unsigned n) const;
0101 
0102   //! Return the number of output Phi tracks
0103   inline int nTracksPh() const { return _outcand_ph.size(); }
0104 
0105   //! Return the number of output Theta tracks
0106   inline int nTracksTh() const { return _cand_th.size(); }
0107 
0108   //! Return the requested Phi track
0109   DTSectCollPhCand* getTrackPh(int n) const;
0110 
0111   //! Return the requested Theta track
0112   DTSectCollThCand* getTrackTh(int n) const;
0113 
0114 private:
0115   // Configuration
0116   const DTConfigSectColl* _config;
0117 
0118   // input phi data
0119   std::vector<DTSectCollPhCand*> _incand_ph[2];
0120 
0121   // output phi data
0122   std::vector<DTSectCollPhCand*> _outcand_ph;
0123 
0124   // theta data
0125   std::vector<DTSectCollThCand*> _cand_th;
0126 
0127   // internal use variables
0128   int _ignoreSecondTrack;
0129 
0130   // station number [1-5]
0131   int _stat;
0132 };
0133 
0134 #endif