00001 //------------------------------------------------- 00002 // 00011 // 00012 //-------------------------------------------------- 00013 #ifndef DT_SC_TRIG_UNIT_H 00014 #define DT_SC_TRIG_UNIT_H 00015 00016 //--------------- 00017 // C++ Headers -- 00018 //--------------- 00019 #include <vector> 00020 00021 //---------------------- 00022 // Base Class Headers -- 00023 //---------------------- 00024 00025 00026 //------------------------------------ 00027 // Collaborating Class Declarations -- 00028 //------------------------------------ 00029 #include "L1TriggerConfig/DTTPGConfig/interface/DTConfigManager.h" 00030 #include "L1Trigger/DTUtilities/interface/DTTrigGeom.h" 00031 #include "L1Trigger/DTUtilities/interface/DTTrigData.h" 00032 #include "L1Trigger/DTBti/interface/DTBtiChip.h" 00033 #include "L1Trigger/DTTraco/interface/DTTracoChip.h" 00034 #include "L1Trigger/DTTriggerServerPhi/interface/DTChambPhSegm.h" 00035 #include "L1Trigger/DTTriggerServerTheta/interface/DTChambThSegm.h" 00036 #include "L1Trigger/DTUtilities/interface/DTGeomSupplier.h" 00037 #include "L1Trigger/DTBti/interface/DTBtiCard.h" 00038 #include "L1Trigger/DTTraco/interface/DTTracoCard.h" 00039 #include "L1Trigger/DTTriggerServerPhi/interface/DTTSPhi.h" 00040 #include "L1Trigger/DTTriggerServerTheta/interface/DTTSTheta.h" 00041 #include "DataFormats/GeometryVector/interface/GlobalPoint.h" 00042 #include "DataFormats/GeometryVector/interface/GlobalVector.h" 00043 #include "DataFormats/GeometryVector/interface/LocalPoint.h" 00044 #include "DataFormats/GeometryVector/interface/LocalVector.h" 00045 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00046 00047 class DTChamber; 00048 class DTTTrigBaseSync; 00049 00050 00051 // --------------------- 00052 // -- Class Interface -- 00053 // --------------------- 00054 00055 class DTSCTrigUnit { 00056 00057 public: 00058 00060 //DTSCTrigUnit(DTChamber* stat, edm::ParameterSet& tu_pset) ; 00061 DTSCTrigUnit(DTChamber *stat, DTTTrigBaseSync *sync) ; 00062 00064 ~DTSCTrigUnit() ; 00065 00067 inline DTTrigGeom* geom() const { return _geom; } 00068 00070 void setGeom(const DTChamber* stat) { _geom->setGeom(stat); } 00071 00073 void setConfig(const DTConfigManager *conf); 00074 00076 inline const DTChamber* stat() const { return _geom->stat(); } 00077 00079 inline DTChamberId statId() const { return _geom->statId(); } 00080 00082 inline int wheel() const { return _geom->wheel(); } 00083 00085 inline int station() const { return _geom->station(); } 00086 00088 inline int sector() const { return _geom->sector(); } 00089 00091 inline DTBtiCard* BtiTrigs() const { return _theBTIs; } 00092 00094 inline DTTracoCard* TracoTrigs() const { return _theTRACOs; } 00095 00097 inline DTTSPhi* TSPhTrigs() const { return _theTSPhi; } 00098 00100 inline DTTSTheta* TSThTrigs() const { return _theTSTheta; } 00101 00103 DTGeomSupplier* GeomSupplier(const DTTrigData* trig) const; 00104 00106 inline LocalPoint localPosition(const DTTrigData* trig) const { 00107 return GeomSupplier(trig)->localPosition(trig); 00108 } 00109 00111 inline GlobalPoint CMSPosition(const DTTrigData* trig) const { 00112 return GeomSupplier(trig)->CMSPosition(trig); 00113 } 00114 00116 inline LocalVector localDirection(const DTTrigData* trig) const { 00117 return GeomSupplier(trig)->localDirection(trig); 00118 } 00119 00121 inline GlobalVector CMSDirection(const DTTrigData* trig) const { 00122 return GeomSupplier(trig)->CMSDirection(trig); 00123 } 00124 00126 inline void print(DTTrigData* trig) const { 00127 GeomSupplier(trig)->print(trig); 00128 } 00129 00131 inline void dumpGeom() const { _geom->dumpGeom(); } 00132 00134 int nDTBtiChip() { return _theBTIs->size(); } 00135 00137 int nDTTracoChip() { return _theTRACOs->size(); } 00138 00140 int nPhiSegm(int step) { return _theTSPhi->nSegm(step); } 00141 00142 00144 const DTChambPhSegm* phiSegment(int step, int n) { 00145 return _theTSPhi->segment(step, n); 00146 } 00147 00149 int nThetaSegm(int step) { return _theTSTheta->nSegm(step); } 00150 00152 const DTChambThSegm* thetaSegment(int step, int n) { 00153 return _theTSTheta->segment(step, n); 00154 } 00155 00156 private: 00157 00158 DTTrigGeom* _geom; // Pointer to the geometry 00159 00160 // Containers for DTBtiChip, DTTracoChip and TS 00161 DTBtiCard* _theBTIs; 00162 DTTracoCard* _theTRACOs; 00163 DTTSPhi* _theTSPhi; 00164 DTTSTheta* _theTSTheta; 00165 00166 }; 00167 00168 #endif