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 00049 00050 // --------------------- 00051 // -- Class Interface -- 00052 // --------------------- 00053 00054 class DTSCTrigUnit { 00055 00056 public: 00057 00059 //DTSCTrigUnit(DTChamber* stat, edm::ParameterSet& tu_pset) ; 00060 DTSCTrigUnit(DTChamber *stat) ; 00061 00063 ~DTSCTrigUnit() ; 00064 00066 inline DTTrigGeom* geom() const { return _geom; } 00067 00069 void setGeom(const DTChamber* stat) { _geom->setGeom(stat); } 00070 00072 void setConfig(const DTConfigManager *conf); 00073 00075 inline const DTChamber* stat() const { return _geom->stat(); } 00076 00078 inline DTChamberId statId() const { return _geom->statId(); } 00079 00081 inline int wheel() const { return _geom->wheel(); } 00082 00084 inline int station() const { return _geom->station(); } 00085 00087 inline int sector() const { return _geom->sector(); } 00088 00090 inline DTBtiCard* BtiTrigs() const { return _theBTIs; } 00091 00093 inline DTTracoCard* TracoTrigs() const { return _theTRACOs; } 00094 00096 inline DTTSPhi* TSPhTrigs() const { return _theTSPhi; } 00097 00099 inline DTTSTheta* TSThTrigs() const { return _theTSTheta; } 00100 00102 DTGeomSupplier* GeomSupplier(const DTTrigData* trig) const; 00103 00105 inline LocalPoint localPosition(const DTTrigData* trig) const { 00106 return GeomSupplier(trig)->localPosition(trig); 00107 } 00108 00110 inline GlobalPoint CMSPosition(const DTTrigData* trig) const { 00111 return GeomSupplier(trig)->CMSPosition(trig); 00112 } 00113 00115 inline LocalVector localDirection(const DTTrigData* trig) const { 00116 return GeomSupplier(trig)->localDirection(trig); 00117 } 00118 00120 inline GlobalVector CMSDirection(const DTTrigData* trig) const { 00121 return GeomSupplier(trig)->CMSDirection(trig); 00122 } 00123 00125 inline void print(DTTrigData* trig) const { 00126 GeomSupplier(trig)->print(trig); 00127 } 00128 00130 inline void dumpGeom() const { _geom->dumpGeom(); } 00131 00133 inline void dumpLUT(short int btic) const { _geom->dumpLUT(btic); } 00134 00136 int nDTBtiChip() { return _theBTIs->size(); } 00137 00139 int nDTTracoChip() { return _theTRACOs->size(); } 00140 00142 int nPhiSegm(int step) { return _theTSPhi->nSegm(step); } 00143 00144 00146 const DTChambPhSegm* phiSegment(int step, int n) { 00147 return _theTSPhi->segment(step, n); 00148 } 00149 00151 int nThetaSegm(int step) { return _theTSTheta->nSegm(step); } 00152 00154 const DTChambThSegm* thetaSegment(int step, int n) { 00155 return _theTSTheta->segment(step, n); 00156 } 00157 00158 private: 00159 00160 DTTrigGeom* _geom; // Pointer to the geometry 00161 00162 // Containers for DTBtiChip, DTTracoChip and TS 00163 DTBtiCard* _theBTIs; 00164 DTTracoCard* _theTRACOs; 00165 DTTSPhi* _theTSPhi; 00166 DTTSTheta* _theTSTheta; 00167 00168 }; 00169 00170 #endif