CMS 3D CMS Logo

DTTracoCard.h
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
13 //
14 //--------------------------------------------------
15 #ifndef DT_TRACO_CARD_H
16 #define DT_TRACO_CARD_H
17 
18 //------------------------------------
19 // Collaborating Class Declarations --
20 //------------------------------------
21 class DTTracoChip;
22 class DTTracoTrig;
23 class DTBtiCard;
24 class DTTSTheta;
25 class DTTrigGeom;
26 
27 //----------------------
28 // Base Class Headers --
29 //----------------------
38 //#include "FWCore/ParameterSet/interface/ParameterSet.h"
39 
40 //---------------
41 // C++ Headers --
42 //---------------
43 #include <map>
44 #include <vector>
45 
46 // ---------------------
47 // -- Class Interface --
48 // ---------------------
49 
50 typedef std::map<int, DTTracoChip *, std::less<int>> TRACOContainer;
51 typedef TRACOContainer::const_iterator TRACO_const_iter;
52 typedef TRACOContainer::iterator TRACO_iter;
53 
54 typedef std::map<DTTracoId, DTConfigTraco> ConfTracoMap;
55 
57 
58 class DTTracoCard : public TRACOCache, public DTGeomSupplier {
59 public:
61  // DTTracoCard(DTTrigGeom*, DTBtiCard*, DTTSTheta*,edm::ParameterSet&);
63 
65  ~DTTracoCard() override;
66 
68  void clearCache();
69 
71  void setConfig(const DTConfigManager *conf);
72 
74  inline bool debug() { return _debug; }
75 
77  inline DTTSTheta *TSTh() const { return _tstheta; }
78 
80  DTTracoChip *getTRACO(int n) const;
81 
83  DTTracoChip *getTRACO(const DTTracoId &tracoid) const { return getTRACO(tracoid.traco()); }
84 
86  std::vector<DTTracoChip *> tracoList();
87 
93 
95  LocalPoint localPosition(const DTTrigData *) const override;
96 
98  LocalVector localDirection(const DTTrigData *) const override;
99 
101  void reconstruct() override {
102  clearCache();
103  loadTRACO();
104  runTRACO();
105  }
106 
108  const DTConfigLUTs *config_luts() const { return _conf_luts; }
109 
111  inline bool useAcceptParamFlag() { return _flag_acc; }
112 
114  inline bool lutFromDBFlag() { return _lut_from_db; }
115 
116 private:
118  void loadTRACO();
119 
121  void runTRACO();
122 
125 
127  DTTracoChip *activeGetTRACO(const DTTracoId &tracoid) { return activeGetTRACO(tracoid.traco()); }
128 
130  void localClear();
131 
133  DTConfigTraco *config_traco(const DTTracoId &tracoid) const;
134 
135 private:
138 
140  ConfTracoMap _conf_traco_map; // bti configuration map for this chamber
141 
143 
144  bool _debug;
145 
146  bool _flag_acc;
148 };
149 
150 #endif
LocalVector localDirection(const DTTrigData *) const override
NEWGEO Local direction in chamber of a trigger-data object.
Definition: DTTracoCard.cc:403
void clearCache()
Clear all traco stuff (cache & map)
Definition: DTTracoCard.cc:61
DTTSTheta * _tstheta
Definition: DTTracoCard.h:137
DTTracoChip * getTRACO(int n) const
Returns the required DTTracoChip. Return 0 if it doesn&#39;t exist.
Definition: DTTracoCard.cc:286
TRACOContainer _tracomap
Definition: DTTracoCard.h:139
void runTRACO()
run TRACO algorithm
Definition: DTTracoCard.cc:214
std::map< DTTracoId, DTConfigTraco > ConfTracoMap
Definition: DTTracoCard.h:54
DTTracoCard(DTTrigGeom *, DTBtiCard *, DTTSTheta *)
Constructor.
Definition: DTTracoCard.cc:48
DTCache< DTTracoTrigData, std::vector< DTTracoTrigData > > TRACOCache
Definition: DTTracoCard.h:56
DTTracoChip * activeGetTRACO(int)
Returns the required DTTracoChip. Create it if it doesn&#39;t exist.
Definition: DTTracoCard.cc:270
TRACOContainer::iterator TRACO_iter
Definition: DTTracoCard.h:52
void setConfig(const DTConfigManager *conf)
Set configuration.
Definition: DTTracoCard.cc:66
bool lutFromDBFlag()
Return lut computation option (DB/geometry)
Definition: DTTracoCard.h:114
void reconstruct() override
Load BTIs triggers and run TRACOs algorithm.
Definition: DTTracoCard.h:101
bool _flag_acc
Definition: DTTracoCard.h:146
~DTTracoCard() override
Destructor.
Definition: DTTracoCard.cc:55
void localClear()
clear the TRACO map
Definition: DTTracoCard.cc:84
ConfTracoMap _conf_traco_map
Definition: DTTracoCard.h:140
DTBtiCard * _bticard
Definition: DTTracoCard.h:136
TRACOContainer::const_iterator TRACO_const_iter
Definition: DTTracoCard.h:51
DTTracoTrig * storeTrigger(DTTracoTrigData)
Definition: DTTracoCard.cc:305
bool debug()
Return TU debug flag.
Definition: DTTracoCard.h:74
int traco() const
Returns the traco.
Definition: DTTracoId.h:62
bool _lut_from_db
Definition: DTTracoCard.h:147
DTTracoChip * activeGetTRACO(const DTTracoId &tracoid)
Returns the required DTTracoChip. Create it if it doesn&#39;t exist.
Definition: DTTracoCard.h:127
bool useAcceptParamFlag()
Return acceptance flag.
Definition: DTTracoCard.h:111
std::vector< DTTracoChip * > tracoList()
Returns the active TRACO list.
Definition: DTTracoCard.cc:293
DTTracoChip * getTRACO(const DTTracoId &tracoid) const
Returns the required DTTracoChip. Return 0 if it doesn&#39;t exist.
Definition: DTTracoCard.h:83
const DTConfigLUTs * config_luts() const
Return LUTS config for this chamber (=minicrate)
Definition: DTTracoCard.h:108
std::map< int, DTTracoChip *, std::less< int > > TRACOContainer
Definition: DTTracoCard.h:25
void loadTRACO()
store BTI triggers in TRACO&#39;s
Definition: DTTracoCard.cc:92
DTTSTheta * TSTh() const
Return TSTheta.
Definition: DTTracoCard.h:77
const DTConfigLUTs * _conf_luts
Definition: DTTracoCard.h:142
DTConfigTraco * config_traco(const DTTracoId &tracoid) const
Return single TRACO config.
Definition: DTTracoCard.cc:436
LocalPoint localPosition(const DTTrigData *) const override
NEWGEO Local position in chamber of a trigger-data object.
Definition: DTTracoCard.cc:351