Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:21:58

0001 //-------------------------------------------------
0002 //
0003 /**  \class  DTSCTrigUnit
0004  *     Muon Barrel Sector Collector Trigger Unit (Chamber trigger)
0005  *
0006  *
0007  *   \author C.Grandi, S. Marcellini
0008  */
0009 //
0010 //--------------------------------------------------
0011 #ifndef DT_SC_TRIG_UNIT_H
0012 #define DT_SC_TRIG_UNIT_H
0013 
0014 //---------------
0015 // C++ Headers --
0016 //---------------
0017 #include <vector>
0018 
0019 //----------------------
0020 // Base Class Headers --
0021 //----------------------
0022 
0023 //------------------------------------
0024 // Collaborating Class Declarations --
0025 //------------------------------------
0026 #include "L1TriggerConfig/DTTPGConfig/interface/DTConfigManager.h"
0027 #include "L1Trigger/DTUtilities/interface/DTTrigGeom.h"
0028 #include "L1Trigger/DTUtilities/interface/DTTrigData.h"
0029 #include "L1Trigger/DTBti/interface/DTBtiChip.h"
0030 #include "L1Trigger/DTTraco/interface/DTTracoChip.h"
0031 #include "L1Trigger/DTTriggerServerPhi/interface/DTChambPhSegm.h"
0032 #include "L1Trigger/DTTriggerServerTheta/interface/DTChambThSegm.h"
0033 #include "L1Trigger/DTUtilities/interface/DTGeomSupplier.h"
0034 #include "L1Trigger/DTBti/interface/DTBtiCard.h"
0035 #include "L1Trigger/DTTraco/interface/DTTracoCard.h"
0036 #include "L1Trigger/DTTriggerServerPhi/interface/DTTSPhi.h"
0037 #include "L1Trigger/DTTriggerServerTheta/interface/DTTSTheta.h"
0038 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
0039 #include "DataFormats/GeometryVector/interface/GlobalVector.h"
0040 #include "DataFormats/GeometryVector/interface/LocalPoint.h"
0041 #include "DataFormats/GeometryVector/interface/LocalVector.h"
0042 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0043 
0044 class DTChamber;
0045 
0046 //              ---------------------
0047 //              -- Class Interface --
0048 //              ---------------------
0049 
0050 class DTSCTrigUnit {
0051 public:
0052   /// Constructor
0053   //DTSCTrigUnit(DTChamber* stat, edm::ParameterSet& tu_pset) ;
0054   DTSCTrigUnit(const DTChamber* stat);
0055 
0056   /// Destructor
0057   ~DTSCTrigUnit();
0058 
0059   /// The associated geometry
0060   inline DTTrigGeom* geom() const { return _geom; }
0061 
0062   /// Set geometry
0063   void setGeom(const DTChamber* stat) { _geom->setGeom(stat); }
0064 
0065   /// Set configuration
0066   void setConfig(const DTConfigManager* conf);
0067 
0068   /// The associated chamber
0069   inline const DTChamber* stat() const { return _geom->stat(); }
0070 
0071   /// Identifier of the associated chamber
0072   inline DTChamberId statId() const { return _geom->statId(); }
0073 
0074   /// Return wheel number
0075   inline int wheel() const { return _geom->wheel(); }
0076 
0077   /// Return station number
0078   inline int station() const { return _geom->station(); }
0079 
0080   /// Return sector number
0081   inline int sector() const { return _geom->sector(); }
0082 
0083   /// Return container of BTI triggers
0084   inline DTBtiCard* BtiTrigs() const { return _theBTIs; }
0085 
0086   /// Return container of TRACO triggers
0087   inline DTTracoCard* TracoTrigs() const { return _theTRACOs; }
0088 
0089   /// Return the chamber Trigger Server (Phi)
0090   inline DTTSPhi* TSPhTrigs() const { return _theTSPhi; }
0091 
0092   /// Return the chamber Trigger Server (Theta)
0093   inline DTTSTheta* TSThTrigs() const { return _theTSTheta; }
0094 
0095   /// Return the appropriate coordinate supplier
0096   DTGeomSupplier* GeomSupplier(const DTTrigData* trig) const;
0097 
0098   /// Coordinate of a trigger-data object in chamber frame
0099   inline LocalPoint localPosition(const DTTrigData* trig) const { return GeomSupplier(trig)->localPosition(trig); }
0100 
0101   /// Coordinate of a trigger-data object in CMS frame
0102   inline GlobalPoint CMSPosition(const DTTrigData* trig) const { return GeomSupplier(trig)->CMSPosition(trig); }
0103 
0104   /// Direction of a trigger-data object in chamber frame
0105   inline LocalVector localDirection(const DTTrigData* trig) const { return GeomSupplier(trig)->localDirection(trig); }
0106 
0107   /// Direction of a trigger-data object in CMS frame
0108   inline GlobalVector CMSDirection(const DTTrigData* trig) const { return GeomSupplier(trig)->CMSDirection(trig); }
0109 
0110   /// Print a trigger-data object
0111   inline void print(DTTrigData* trig) const { GeomSupplier(trig)->print(trig); }
0112 
0113   /// Dump the geometry
0114   inline void dumpGeom() const { _geom->dumpGeom(); }
0115 
0116   /// Dump the Lut file
0117   inline void dumpLUT(short int btic) const { _geom->dumpLUT(btic); }
0118 
0119   /// Number of active DTBtiChips
0120   int nDTBtiChip() { return _theBTIs->size(); }
0121 
0122   /// Number of active DTTracoChips
0123   int nDTTracoChip() { return _theTRACOs->size(); }
0124 
0125   /// Number of Phi segments for a given step
0126   int nPhiSegm(int step) { return _theTSPhi->nSegm(step); }
0127 
0128   /// Return output segments, phi view
0129   const DTChambPhSegm* phiSegment(int step, int n) { return _theTSPhi->segment(step, n); }
0130 
0131   /// Number of theta segments for a given step
0132   int nThetaSegm(int step) { return _theTSTheta->nSegm(step); }
0133 
0134   /// Return output segments, theta view
0135   const DTChambThSegm* thetaSegment(int step, int n) { return _theTSTheta->segment(step, n); }
0136 
0137 private:
0138   DTTrigGeom* _geom;  // Pointer to the geometry
0139 
0140   // Containers for DTBtiChip, DTTracoChip and TS
0141   DTBtiCard* _theBTIs;
0142   DTTracoCard* _theTRACOs;
0143   DTTSPhi* _theTSPhi;
0144   DTTSTheta* _theTSTheta;
0145 };
0146 
0147 #endif