CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DTBtiCard.h
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
16 //
17 //--------------------------------------------------
18 #ifndef DT_BTI_CARD_H
19 #define DT_BTI_CARD_H
20 
21 //------------------------------------
22 // Collaborating Class Declarations --
23 //------------------------------------
24 class DTBtiChip;
25 class DTBtiTrig;
26 class DTTrigGeom;
27 class DTTTrigBaseSync;
28 
29 //----------------------
30 // Base Class Headers --
31 //----------------------
39 
40 
41 //---------------
42 // C++ Headers --
43 //---------------
44 #include <vector>
45 #include <map>
46 
47 namespace edm {class ParameterSet; class Event; class EventSetup;}
48 
49 // ---------------------
50 // -- Class Interface --
51 // ---------------------
52 
53 typedef std::map< int,DTBtiChip*,std::less<int> > BTIContainer;
54 typedef BTIContainer::const_iterator BTI_const_iter;
55 typedef BTIContainer::iterator BTI_iter;
56 
57 typedef std::map<DTBtiId,DTConfigBti> ConfBtiMap;
58 
60 
61 class DTBtiCard : public BTICache, public DTGeomSupplier {
62 
63  public:
64 
67 
69  ~DTBtiCard();
70 
72  void clearCache();
73 
75  void setConfig(const DTConfigManager *conf);
76 
78  inline bool debug() const {return _debug;}
79 
81  DTBtiChip* getBTI(int sl, int n) const;
82 
84  DTBtiChip* getBTI(const DTBtiId& btiid) const {
85  return getBTI(btiid.superlayer(),btiid.bti());
86  }
87 
89  LocalPoint localPosition(const DTTrigData*) const;
92 
94  std::vector<DTBtiChip*> btiList(int);
95 
101 
102  // run the trigger algorithm
103  virtual void reconstruct(const DTDigiCollection dtDigis) { clearCache();loadBTI(dtDigis); runBTI(); }
104 
106  DTConfigBti* config_bti(DTBtiId& btiid) const;
107 
109  inline bool useAcceptParamFlag() { return _flag_acc; }
110 
111  private:
112 
114  void loadBTI(const DTDigiCollection dtDigis);
115 
117  void runBTI();
118 
120  DTBtiChip* activeGetBTI(int sl, int n);
121 
123  DTBtiChip* activeGetBTI(const DTBtiId& btiid) {
124  return activeGetBTI(btiid.superlayer(),btiid.bti());
125  }
126 
128  void localClear();
129 
130  private:
131 
133  ConfBtiMap _conf_bti_map; //bti configuration map for this chamber
134 
135  std::vector<DTDigi*> _digis;
136 
137  bool _debug;
139 
140  bool _flag_acc;
141 };
142 
143 #endif
std::map< DTBtiId, DTConfigBti > ConfBtiMap
Definition: DTBtiCard.h:57
virtual void reconstruct(const DTDigiCollection dtDigis)
Definition: DTBtiCard.h:103
BTIContainer _btimap[3]
Definition: DTBtiCard.h:132
DTConfigBti * config_bti(DTBtiId &btiid) const
Return bti chip configuration.
Definition: DTBtiCard.cc:676
std::vector< DTDigi * > _digis
Definition: DTBtiCard.h:135
std::map< int, DTBtiChip *, std::less< int > > BTIContainer
Definition: DTBtiCard.h:53
ConfBtiMap _conf_bti_map
Definition: DTBtiCard.h:133
LocalVector localDirection(const DTTrigData *) const
NEWGEO Local direction in chamber of a trigger-data object.
Definition: DTBtiCard.cc:600
std::vector< DTBtiChip * > btiList(int)
Returns the active BTI list in a given superlayer.
Definition: DTBtiCard.cc:471
DTBtiTrig * storeTrigger(DTBtiTrigData)
Definition: DTBtiCard.cc:492
LocalPoint localPosition(const DTTrigData *) const
NEWGEO Local position in chamber of a trigger-data object.
Definition: DTBtiCard.cc:553
DTBtiCard(DTTrigGeom *)
Constructor.
Definition: DTBtiCard.cc:62
void clearCache()
Clear all BTI stuff (map &amp; cache)
Definition: DTBtiCard.cc:95
DTBtiChip * activeGetBTI(int sl, int n)
Returns the required DTBtiChip. Create it if it doesn&#39;t exist.
Definition: DTBtiCard.cc:406
DTBtiChip * getBTI(const DTBtiId &btiid) const
Returns the required BTI. Return 0 if it doesn&#39;t exist.
Definition: DTBtiCard.h:84
bool _debug
Definition: DTBtiCard.h:137
void setConfig(const DTConfigManager *conf)
Set configuration.
Definition: DTBtiCard.cc:103
DTBtiChip * activeGetBTI(const DTBtiId &btiid)
Returns the required DTBtiChip. Create it if it doesn&#39;t exist.
Definition: DTBtiCard.h:123
bool debug() const
Return TU debug flag.
Definition: DTBtiCard.h:78
int superlayer() const
Returns the superlayer.
Definition: DTBtiId.h:73
DTBtiChip * getBTI(int sl, int n) const
Returns the required BTI. Return 0 if it doesn&#39;t exist.
Definition: DTBtiCard.cc:456
BTIContainer::const_iterator BTI_const_iter
Definition: DTBtiCard.h:54
DTCache< DTBtiTrigData, std::vector< DTBtiTrigData > > BTICache
Definition: DTBtiCard.h:59
DTConfigPedestals * _pedestals
Definition: DTBtiCard.h:138
tuple conf
Definition: dbtoconf.py:185
int bti() const
Returns the bti.
Definition: DTBtiId.h:75
BTIContainer::iterator BTI_iter
Definition: DTBtiCard.h:55
bool useAcceptParamFlag()
Return acceptance flag.
Definition: DTBtiCard.h:109
void loadBTI(const DTDigiCollection dtDigis)
store digi&#39;s in DTBtiChip&#39;s
Definition: DTBtiCard.cc:258
bool _flag_acc
Definition: DTBtiCard.h:140
void runBTI()
run DTBtiChip algorithm
Definition: DTBtiCard.cc:361
void localClear()
clear the BTI maps
Definition: DTBtiCard.cc:117
~DTBtiCard()
Destructor.
Definition: DTBtiCard.cc:83