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 <vector>
44 #include <map>
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:
61 
63  //DTTracoCard(DTTrigGeom*, DTBtiCard*, DTTSTheta*,edm::ParameterSet&);
65 
67  ~DTTracoCard();
68 
70  void clearCache();
71 
73  void setConfig(const DTConfigManager *conf);
74 
76  inline bool debug() {return _debug;}
77 
79  inline DTTSTheta* TSTh() const { return _tstheta; }
80 
82  DTTracoChip* getTRACO(int n) const;
83 
85  DTTracoChip* getTRACO(const DTTracoId& tracoid) const {
86  return getTRACO(tracoid.traco());
87  }
88 
90  std::vector<DTTracoChip*> tracoList();
91 
97 
99  LocalPoint localPosition(const DTTrigData*) const;
100 
102  LocalVector localDirection(const DTTrigData*) const;
103 
105  virtual void reconstruct() { clearCache(); loadTRACO(); runTRACO(); }
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:
117 
119  void loadTRACO();
120 
122  void runTRACO();
123 
126 
129  return activeGetTRACO(tracoid.traco());
130  }
131 
133  void localClear();
134 
136  DTConfigTraco* config_traco(const DTTracoId& tracoid) const;
137 
138  private:
139 
142 
144  ConfTracoMap _conf_traco_map; //bti configuration map for this chamber
145 
147 
148  bool _debug;
149 
150  bool _flag_acc;
152 };
153 
154 #endif
DTTSTheta * TSTh() const
Return TSTheta.
Definition: DTTracoCard.h:79
void clearCache()
Clear all traco stuff (cache & map)
Definition: DTTracoCard.cc:70
DTTSTheta * _tstheta
Definition: DTTracoCard.h:141
TRACOContainer _tracomap
Definition: DTTracoCard.h:143
void runTRACO()
run TRACO algorithm
Definition: DTTracoCard.cc:235
DTTracoCard(DTTrigGeom *, DTBtiCard *, DTTSTheta *)
Constructor.
Definition: DTTracoCard.cc:49
DTTracoChip * activeGetTRACO(int)
Returns the required DTTracoChip. Create it if it doesn&#39;t exist.
Definition: DTTracoCard.cc:289
TRACOContainer::iterator TRACO_iter
Definition: DTTracoCard.h:52
void setConfig(const DTConfigManager *conf)
Set configuration.
Definition: DTTracoCard.cc:78
DTTracoChip * getTRACO(const DTTracoId &tracoid) const
Returns the required DTTracoChip. Return 0 if it doesn&#39;t exist.
Definition: DTTracoCard.h:85
bool lutFromDBFlag()
Return lut computation option (DB/geometry)
Definition: DTTracoCard.h:114
DTTracoChip * getTRACO(int n) const
Returns the required DTTracoChip. Return 0 if it doesn&#39;t exist.
Definition: DTTracoCard.cc:307
bool _flag_acc
Definition: DTTracoCard.h:150
int traco() const
Returns the traco.
Definition: DTTracoId.h:70
void localClear()
clear the TRACO map
Definition: DTTracoCard.cc:98
ConfTracoMap _conf_traco_map
Definition: DTTracoCard.h:144
DTBtiCard * _bticard
Definition: DTTracoCard.h:140
TRACOContainer::const_iterator TRACO_const_iter
Definition: DTTracoCard.h:51
DTTracoTrig * storeTrigger(DTTracoTrigData)
Definition: DTTracoCard.cc:328
bool debug()
Return TU debug flag.
Definition: DTTracoCard.h:76
~DTTracoCard()
Destructor.
Definition: DTTracoCard.cc:59
DTConfigTraco * config_traco(const DTTracoId &tracoid) const
Return single TRACO config.
Definition: DTTracoCard.cc:464
bool _lut_from_db
Definition: DTTracoCard.h:151
DTCache< DTTracoTrigData, std::vector< DTTracoTrigData > > TRACOCache
Definition: DTTracoCard.h:56
LocalPoint localPosition(const DTTrigData *) const
NEWGEO Local position in chamber of a trigger-data object.
Definition: DTTracoCard.cc:376
DTTracoChip * activeGetTRACO(const DTTracoId &tracoid)
Returns the required DTTracoChip. Create it if it doesn&#39;t exist.
Definition: DTTracoCard.h:128
bool useAcceptParamFlag()
Return acceptance flag.
Definition: DTTracoCard.h:111
std::vector< DTTracoChip * > tracoList()
Returns the active TRACO list.
Definition: DTTracoCard.cc:314
std::map< DTTracoId, DTConfigTraco > ConfTracoMap
Definition: DTTracoCard.h:54
void loadTRACO()
store BTI triggers in TRACO&#39;s
Definition: DTTracoCard.cc:107
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
virtual void reconstruct()
Load BTIs triggers and run TRACOs algorithm.
Definition: DTTracoCard.h:105
const DTConfigLUTs * _conf_luts
Definition: DTTracoCard.h:146
LocalVector localDirection(const DTTrigData *) const
NEWGEO Local direction in chamber of a trigger-data object.
Definition: DTTracoCard.cc:429