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 
60 public:
62  // DTTracoCard(DTTrigGeom*, DTBtiCard*, DTTSTheta*,edm::ParameterSet&);
64 
66  ~DTTracoCard() override;
67 
69  void clearCache();
70 
72  void setConfig(const DTConfigManager *conf);
73 
75  inline bool debug() { return _debug; }
76 
78  inline DTTSTheta *TSTh() const { return _tstheta; }
79 
81  DTTracoChip *getTRACO(int n) const;
82 
84  DTTracoChip *getTRACO(const DTTracoId &tracoid) const {
85  return getTRACO(tracoid.traco());
86  }
87 
89  std::vector<DTTracoChip *> tracoList();
90 
96 
98  LocalPoint localPosition(const DTTrigData *) const override;
99 
101  LocalVector localDirection(const DTTrigData *) const override;
102 
104  void reconstruct() override {
105  clearCache();
106  loadTRACO();
107  runTRACO();
108  }
109 
111  const DTConfigLUTs *config_luts() const { return _conf_luts; }
112 
114  inline bool useAcceptParamFlag() { return _flag_acc; }
115 
117  inline bool lutFromDBFlag() { return _lut_from_db; }
118 
119 private:
121  void loadTRACO();
122 
124  void runTRACO();
125 
128 
131  return activeGetTRACO(tracoid.traco());
132  }
133 
135  void localClear();
136 
138  DTConfigTraco *config_traco(const DTTracoId &tracoid) const;
139 
140 private:
143 
145  ConfTracoMap _conf_traco_map; // bti configuration map for this chamber
146 
148 
149  bool _debug;
150 
151  bool _flag_acc;
153 };
154 
155 #endif
DTTSTheta * TSTh() const
Return TSTheta.
Definition: DTTracoCard.h:78
void clearCache()
Clear all traco stuff (cache & map)
Definition: DTTracoCard.cc:62
DTTSTheta * _tstheta
Definition: DTTracoCard.h:142
TRACOContainer _tracomap
Definition: DTTracoCard.h:144
void runTRACO()
run TRACO algorithm
Definition: DTTracoCard.cc:225
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:286
TRACOContainer::iterator TRACO_iter
Definition: DTTracoCard.h:52
void setConfig(const DTConfigManager *conf)
Set configuration.
Definition: DTTracoCard.cc:68
DTTracoChip * getTRACO(const DTTracoId &tracoid) const
Returns the required DTTracoChip. Return 0 if it doesn&#39;t exist.
Definition: DTTracoCard.h:84
bool lutFromDBFlag()
Return lut computation option (DB/geometry)
Definition: DTTracoCard.h:117
DTTracoChip * getTRACO(int n) const
Returns the required DTTracoChip. Return 0 if it doesn&#39;t exist.
Definition: DTTracoCard.cc:303
void reconstruct() override
Load BTIs triggers and run TRACOs algorithm.
Definition: DTTracoCard.h:104
bool _flag_acc
Definition: DTTracoCard.h:151
~DTTracoCard() override
Destructor.
Definition: DTTracoCard.cc:56
int traco() const
Returns the traco.
Definition: DTTracoId.h:70
void localClear()
clear the TRACO map
Definition: DTTracoCard.cc:86
ConfTracoMap _conf_traco_map
Definition: DTTracoCard.h:145
DTBtiCard * _bticard
Definition: DTTracoCard.h:141
TRACOContainer::const_iterator TRACO_const_iter
Definition: DTTracoCard.h:51
DTTracoTrig * storeTrigger(DTTracoTrigData)
Definition: DTTracoCard.cc:323
bool debug()
Return TU debug flag.
Definition: DTTracoCard.h:75
DTConfigTraco * config_traco(const DTTracoId &tracoid) const
Return single TRACO config.
Definition: DTTracoCard.cc:465
bool _lut_from_db
Definition: DTTracoCard.h:152
DTTracoChip * activeGetTRACO(const DTTracoId &tracoid)
Returns the required DTTracoChip. Create it if it doesn&#39;t exist.
Definition: DTTracoCard.h:130
bool useAcceptParamFlag()
Return acceptance flag.
Definition: DTTracoCard.h:114
std::vector< DTTracoChip * > tracoList()
Returns the active TRACO list.
Definition: DTTracoCard.cc:310
std::map< int, DTTracoChip *, std::less< int > > TRACOContainer
Definition: DTTracoCard.h:25
void loadTRACO()
store BTI triggers in TRACO&#39;s
Definition: DTTracoCard.cc:94
const DTConfigLUTs * config_luts() const
Return LUTS config for this chamber (=minicrate)
Definition: DTTracoCard.h:111
const DTConfigLUTs * _conf_luts
Definition: DTTracoCard.h:147
LocalPoint localPosition(const DTTrigData *) const override
NEWGEO Local position in chamber of a trigger-data object.
Definition: DTTracoCard.cc:372
LocalVector localDirection(const DTTrigData *) const override
NEWGEO Local direction in chamber of a trigger-data object.
Definition: DTTracoCard.cc:428