Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 //-------------------------------------------------
0002 //
0003 /**  \class DTBtiTrig
0004  *
0005  *    BTI Trigger Data
0006  *    Has pointers to parent BTI and DTDigis
0007  *    which allow algorithm debugging
0008  *
0009  *
0010  *
0011  *   \author  C. Grandi
0012  *
0013  */
0014 //
0015 //--------------------------------------------------
0016 #ifndef DT_BTI_TRIG_H
0017 #define DT_BTI_TRIG_H
0018 
0019 //------------------------------------
0020 // Collaborating Class Declarations --
0021 //------------------------------------
0022 class DTDigi;
0023 class DTBtiChip;
0024 
0025 //----------------------
0026 // Base Class Headers --
0027 //----------------------
0028 #include "L1Trigger/DTUtilities/interface/DTTrigData.h"
0029 #include "L1Trigger/DTBti/interface/DTBtiTrigData.h"
0030 
0031 //---------------
0032 // C++ Headers --
0033 //---------------
0034 #include <vector>
0035 
0036 //              ---------------------
0037 //              -- Class Interface --
0038 //              ---------------------
0039 
0040 class DTBtiTrig : public DTTrigData {
0041 public:
0042   //! Constructor
0043   DTBtiTrig();
0044 
0045   //! Constructor
0046   DTBtiTrig(DTBtiChip*, int);
0047 
0048   //! Constructor
0049   DTBtiTrig(DTBtiChip* tparent, int, int, int, int, int);
0050 
0051   //! Constructor
0052   DTBtiTrig(DTBtiChip* tparent, int, int, int, int, int, int, float*);
0053 
0054   //! Constructor
0055   DTBtiTrig(DTBtiChip*, DTBtiTrigData);
0056 
0057   //! Destructor
0058   ~DTBtiTrig() override;
0059 
0060   //! Set the parent DTBtiChip
0061   inline void setParent(DTBtiChip* parent) { _tparent = parent; }
0062 
0063   //! Add a digi to the list
0064   inline void addDigi(const DTDigi* digi) { _digi.push_back(digi); }
0065 
0066   //! Set trigger step
0067   inline void setStep(int step) { _data.setStep(step); }
0068 
0069   //! Set trigger code
0070   inline void setCode(int code) { _data.setCode(code); }
0071 
0072   //! Set trigger K parameter
0073   inline void setK(int k) { _data.setK(k); }
0074 
0075   //! Set trigger X parameter
0076   inline void setX(int x) { _data.setX(x); }
0077 
0078   //! Set triggering equation
0079   inline void setEq(int eq) { _data.setEq(eq); }
0080 
0081   //! Clear
0082   inline void clear() {
0083     _data.clear();
0084     _digi.clear();
0085   }
0086 
0087   // Const methods
0088 
0089   //! Return chamber identifier
0090   inline DTChamberId ChamberId() const override { return _data.ChamberId(); }
0091 
0092   //! Print
0093   inline void print() const override { _data.print(); }
0094 
0095   //! Return parent BTI pointer
0096   inline DTBtiChip* tParent() const { return _tparent; }
0097 
0098   //! Return the data part
0099   inline DTBtiTrigData data() const { return _data; }
0100 
0101   //! Return parent BTI number
0102   inline int btiNumber() const { return _data.btiNumber(); }
0103 
0104   //! Return parent BTI superlayer
0105   inline int btiSL() const { return _data.btiSL(); }
0106 
0107   //! Return trigger step
0108   inline int step() const { return _data.step(); }
0109 
0110   //! Return trigger code
0111   inline int code() const { return _data.code(); }
0112 
0113   //! Return trigger K parameter
0114   inline int K() const { return _data.K(); }
0115 
0116   //! Return trigger X parameter
0117   inline int X() const { return _data.X(); }
0118 
0119   //! Return triggering equation
0120   inline int eq() const { return _data.eq(); }
0121 
0122   //! Return the digi list
0123   std::vector<const DTDigi*> digiList() const { return _digi; }
0124 
0125 private:
0126   // Parent BTI
0127   DTBtiChip* _tparent;
0128 
0129   // Trigger data component
0130   DTBtiTrigData _data;
0131 
0132   // vector of digi in the cells of the DTBtiChip trigger
0133   std::vector<const DTDigi*> _digi;
0134 };
0135 #endif