File indexing completed on 2023-03-17 11:11:10
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #ifndef DT_TRACO_CARD_H
0016 #define DT_TRACO_CARD_H
0017
0018
0019
0020
0021 class DTTracoChip;
0022 class DTTracoTrig;
0023 class DTBtiCard;
0024 class DTTSTheta;
0025 class DTTrigGeom;
0026
0027
0028
0029
0030 #include "DataFormats/MuonDetId/interface/DTTracoId.h"
0031 #include "L1Trigger/DTTraco/interface/DTTracoTrigData.h"
0032 #include "L1Trigger/DTUtilities/interface/DTCache.h"
0033 #include "L1Trigger/DTUtilities/interface/DTGeomSupplier.h"
0034 #include "L1TriggerConfig/DTTPGConfig/interface/DTConfig.h"
0035 #include "L1TriggerConfig/DTTPGConfig/interface/DTConfigLUTs.h"
0036 #include "L1TriggerConfig/DTTPGConfig/interface/DTConfigManager.h"
0037 #include "L1TriggerConfig/DTTPGConfig/interface/DTConfigTraco.h"
0038
0039
0040
0041
0042
0043 #include <map>
0044 #include <vector>
0045
0046
0047
0048
0049
0050 typedef std::map<int, DTTracoChip *, std::less<int>> TRACOContainer;
0051 typedef TRACOContainer::const_iterator TRACO_const_iter;
0052 typedef TRACOContainer::iterator TRACO_iter;
0053
0054 typedef std::map<DTTracoId, DTConfigTraco> ConfTracoMap;
0055
0056 typedef DTCache<DTTracoTrigData, std::vector<DTTracoTrigData>> TRACOCache;
0057
0058 class DTTracoCard : public TRACOCache, public DTGeomSupplier {
0059 public:
0060
0061
0062 DTTracoCard(DTTrigGeom *, DTBtiCard *, DTTSTheta *);
0063
0064
0065 ~DTTracoCard() override;
0066
0067
0068 void clearCache();
0069
0070
0071 void setConfig(const DTConfigManager *conf);
0072
0073
0074 inline bool debug() { return _debug; }
0075
0076
0077 inline DTTSTheta *TSTh() const { return _tstheta; }
0078
0079
0080 DTTracoChip *getTRACO(int n) const;
0081
0082
0083 DTTracoChip *getTRACO(const DTTracoId &tracoid) const { return getTRACO(tracoid.traco()); }
0084
0085
0086 std::vector<DTTracoChip *> tracoList();
0087
0088
0089
0090
0091
0092 DTTracoTrig *storeTrigger(DTTracoTrigData);
0093
0094
0095 LocalPoint localPosition(const DTTrigData *) const override;
0096
0097
0098 LocalVector localDirection(const DTTrigData *) const override;
0099
0100
0101 void reconstruct() override {
0102 clearCache();
0103 loadTRACO();
0104 runTRACO();
0105 }
0106
0107
0108 const DTConfigLUTs *config_luts() const { return _conf_luts; }
0109
0110
0111 inline bool useAcceptParamFlag() { return _flag_acc; }
0112
0113
0114 inline bool lutFromDBFlag() { return _lut_from_db; }
0115
0116 private:
0117
0118 void loadTRACO();
0119
0120
0121 void runTRACO();
0122
0123
0124 DTTracoChip *activeGetTRACO(int);
0125
0126
0127 DTTracoChip *activeGetTRACO(const DTTracoId &tracoid) { return activeGetTRACO(tracoid.traco()); }
0128
0129
0130 void localClear();
0131
0132
0133 DTConfigTraco *config_traco(const DTTracoId &tracoid) const;
0134
0135 private:
0136 DTBtiCard *_bticard;
0137 DTTSTheta *_tstheta;
0138
0139 TRACOContainer _tracomap;
0140 ConfTracoMap _conf_traco_map;
0141
0142 const DTConfigLUTs *_conf_luts;
0143
0144 bool _debug;
0145
0146 bool _flag_acc;
0147 bool _lut_from_db;
0148 };
0149
0150 #endif