CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DTTracoCard.h
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
15 //
16 //--------------------------------------------------
17 #ifndef DT_TRACO_CARD_H
18 #define DT_TRACO_CARD_H
19 
20 //------------------------------------
21 // Collaborating Class Declarations --
22 //------------------------------------
23 class DTTracoChip;
24 class DTTracoTrig;
25 class DTBtiCard;
26 class DTTSTheta;
27 class DTTrigGeom;
28 
29 //----------------------
30 // Base Class Headers --
31 //----------------------
40 //#include "FWCore/ParameterSet/interface/ParameterSet.h"
41 
42 //---------------
43 // C++ Headers --
44 //---------------
45 #include <vector>
46 #include <map>
47 
48 // ---------------------
49 // -- Class Interface --
50 // ---------------------
51 
52 typedef std::map< int,DTTracoChip*,std::less<int> > TRACOContainer;
53 typedef TRACOContainer::const_iterator TRACO_const_iter;
54 typedef TRACOContainer::iterator TRACO_iter;
55 
56 typedef std::map<DTTracoId,DTConfigTraco> ConfTracoMap;
57 
59 
60 class DTTracoCard : public TRACOCache, public DTGeomSupplier {
61 
62  public:
63 
65  //DTTracoCard(DTTrigGeom*, DTBtiCard*, DTTSTheta*,edm::ParameterSet&);
67 
69  ~DTTracoCard();
70 
72  void clearCache();
73 
75  void setConfig(const DTConfigManager *conf);
76 
78  inline bool debug() {return _debug;}
79 
81  inline DTTSTheta* TSTh() const { return _tstheta; }
82 
84  DTTracoChip* getTRACO(int n) const;
85 
87  DTTracoChip* getTRACO(const DTTracoId& tracoid) const {
88  return getTRACO(tracoid.traco());
89  }
90 
92  std::vector<DTTracoChip*> tracoList();
93 
99 
101  LocalPoint localPosition(const DTTrigData*) const;
102 
104  LocalVector localDirection(const DTTrigData*) const;
105 
107  virtual void reconstruct() { clearCache(); loadTRACO(); runTRACO(); }
108 
110  DTConfigLUTs* config_luts() const { return _conf_luts; }
111 
113  inline bool useAcceptParamFlag() { return _flag_acc; }
114 
116  inline bool lutFromDBFlag() { return _lut_from_db; }
117 
118  private:
119 
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:
141 
144 
146  ConfTracoMap _conf_traco_map; //bti configuration map for this chamber
147 
149 
150  bool _debug;
151 
152  bool _flag_acc;
154 };
155 
156 #endif
DTTSTheta * TSTh() const
Return TSTheta.
Definition: DTTracoCard.h:81
void clearCache()
Clear all traco stuff (cache &amp; map)
Definition: DTTracoCard.cc:70
DTTSTheta * _tstheta
Definition: DTTracoCard.h:143
TRACOContainer _tracomap
Definition: DTTracoCard.h:145
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
DTConfigLUTs * _conf_luts
Definition: DTTracoCard.h:148
TRACOContainer::iterator TRACO_iter
Definition: DTTracoCard.h:54
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:87
bool lutFromDBFlag()
Return lut computation option (DB/geometry)
Definition: DTTracoCard.h:116
DTTracoChip * getTRACO(int n) const
Returns the required DTTracoChip. Return 0 if it doesn&#39;t exist.
Definition: DTTracoCard.cc:307
DTConfigLUTs * config_luts() const
Return LUTS config for this chamber (=minicrate)
Definition: DTTracoCard.h:110
bool _flag_acc
Definition: DTTracoCard.h:152
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:146
DTBtiCard * _bticard
Definition: DTTracoCard.h:142
TRACOContainer::const_iterator TRACO_const_iter
Definition: DTTracoCard.h:53
DTTracoTrig * storeTrigger(DTTracoTrigData)
Definition: DTTracoCard.cc:328
bool debug()
Return TU debug flag.
Definition: DTTracoCard.h:78
~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:153
DTCache< DTTracoTrigData, std::vector< DTTracoTrigData > > TRACOCache
Definition: DTTracoCard.h:58
LocalPoint localPosition(const DTTrigData *) const
NEWGEO Local position in chamber of a trigger-data object.
Definition: DTTracoCard.cc:376
tuple conf
Definition: dbtoconf.py:185
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:113
std::vector< DTTracoChip * > tracoList()
Returns the active TRACO list.
Definition: DTTracoCard.cc:314
std::map< DTTracoId, DTConfigTraco > ConfTracoMap
Definition: DTTracoCard.h:56
void loadTRACO()
store BTI triggers in TRACO&#39;s
Definition: DTTracoCard.cc:107
std::map< int, DTTracoChip *, std::less< int > > TRACOContainer
Definition: DTTracoCard.h:27
virtual void reconstruct()
Load BTIs triggers and run TRACOs algorithm.
Definition: DTTracoCard.h:107
LocalVector localDirection(const DTTrigData *) const
NEWGEO Local direction in chamber of a trigger-data object.
Definition: DTTracoCard.cc:429