00001 //------------------------------------------------- 00002 // 00015 // 00016 //-------------------------------------------------- 00017 #ifndef DT_TRACO_CARD_H 00018 #define DT_TRACO_CARD_H 00019 00020 //------------------------------------ 00021 // Collaborating Class Declarations -- 00022 //------------------------------------ 00023 class DTTracoChip; 00024 class DTTracoTrig; 00025 class DTBtiCard; 00026 class DTTSTheta; 00027 class DTTrigGeom; 00028 00029 //---------------------- 00030 // Base Class Headers -- 00031 //---------------------- 00032 #include "L1Trigger/DTUtilities/interface/DTGeomSupplier.h" 00033 #include "DataFormats/MuonDetId/interface/DTTracoId.h" 00034 #include "L1TriggerConfig/DTTPGConfig/interface/DTConfig.h" 00035 #include "L1Trigger/DTTraco/interface/DTTracoTrigData.h" 00036 #include "L1Trigger/DTUtilities/interface/DTCache.h" 00037 #include "L1TriggerConfig/DTTPGConfig/interface/DTConfigTraco.h" 00038 #include "L1TriggerConfig/DTTPGConfig/interface/DTConfigLUTs.h" 00039 #include "L1TriggerConfig/DTTPGConfig/interface/DTConfigManager.h" 00040 //#include "FWCore/ParameterSet/interface/ParameterSet.h" 00041 00042 //--------------- 00043 // C++ Headers -- 00044 //--------------- 00045 #include <vector> 00046 #include <map> 00047 00048 // --------------------- 00049 // -- Class Interface -- 00050 // --------------------- 00051 00052 typedef std::map< int,DTTracoChip*,std::less<int> > TRACOContainer; 00053 typedef TRACOContainer::const_iterator TRACO_const_iter; 00054 typedef TRACOContainer::iterator TRACO_iter; 00055 00056 typedef std::map<DTTracoId,DTConfigTraco> ConfTracoMap; 00057 00058 typedef DTCache<DTTracoTrigData,std::vector<DTTracoTrigData> > TRACOCache; 00059 00060 class DTTracoCard : public TRACOCache, public DTGeomSupplier { 00061 00062 public: 00063 00065 //DTTracoCard(DTTrigGeom*, DTBtiCard*, DTTSTheta*,edm::ParameterSet&); 00066 DTTracoCard(DTTrigGeom*, DTBtiCard*, DTTSTheta*); 00067 00069 ~DTTracoCard(); 00070 00072 void clearCache(); 00073 00075 void setConfig(const DTConfigManager *conf); 00076 00078 inline bool debug() {return _debug;} 00079 00081 inline DTTSTheta* TSTh() const { return _tstheta; } 00082 00084 DTTracoChip* getTRACO(int n) const; 00085 00087 DTTracoChip* getTRACO(const DTTracoId& tracoid) const { 00088 return getTRACO(tracoid.traco()); 00089 } 00090 00092 std::vector<DTTracoChip*> tracoList(); 00093 00098 DTTracoTrig* storeTrigger(DTTracoTrigData); 00099 00101 LocalPoint localPosition(const DTTrigData*) const; 00102 00104 LocalVector localDirection(const DTTrigData*) const; 00105 00107 virtual void reconstruct() { clearCache(); loadTRACO(); runTRACO(); } 00108 00110 DTConfigLUTs* config_luts() const { return _conf_luts; } 00111 00113 inline bool useAcceptParamFlag() { return _flag_acc; } 00114 00116 inline bool lutFromDBFlag() { return _lut_from_db; } 00117 00118 private: 00119 00121 void loadTRACO(); 00122 00124 void runTRACO(); 00125 00127 DTTracoChip* activeGetTRACO(int); 00128 00130 DTTracoChip* activeGetTRACO(const DTTracoId& tracoid) { 00131 return activeGetTRACO(tracoid.traco()); 00132 } 00133 00135 void localClear(); 00136 00138 DTConfigTraco* config_traco(const DTTracoId& tracoid) const; 00139 00140 private: 00141 00142 DTBtiCard* _bticard; 00143 DTTSTheta* _tstheta; 00144 00145 TRACOContainer _tracomap; 00146 ConfTracoMap _conf_traco_map; //bti configuration map for this chamber 00147 00148 DTConfigLUTs* _conf_luts; 00149 00150 bool _debug; 00151 00152 bool _flag_acc; 00153 bool _lut_from_db; 00154 }; 00155 00156 #endif