CMS 3D CMS Logo

DTBtiCard.h
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
14 //
15 //--------------------------------------------------
16 #ifndef DT_BTI_CARD_H
17 #define DT_BTI_CARD_H
18 
19 //------------------------------------
20 // Collaborating Class Declarations --
21 //------------------------------------
22 class DTBtiChip;
23 class DTBtiTrig;
24 class DTTrigGeom;
25 class DTTTrigBaseSync;
26 
27 //----------------------
28 // Base Class Headers --
29 //----------------------
37 
38 //---------------
39 // C++ Headers --
40 //---------------
41 #include <vector>
42 #include <map>
43 
44 namespace edm {
45  class ParameterSet;
46  class Event;
47  class EventSetup;
48 } // namespace edm
49 
50 // ---------------------
51 // -- Class Interface --
52 // ---------------------
53 
54 typedef std::map<int, DTBtiChip*, std::less<int> > BTIContainer;
55 typedef BTIContainer::const_iterator BTI_const_iter;
56 typedef BTIContainer::iterator BTI_iter;
57 
58 typedef std::map<DTBtiId, DTConfigBti> ConfBtiMap;
59 
61 
62 class DTBtiCard : public BTICache, public DTGeomSupplier {
63 public:
66 
68  ~DTBtiCard() override;
69 
71  void clearCache();
72 
74  void setConfig(const DTConfigManager* conf);
75 
77  inline bool debug() const { return _debug; }
78 
80  DTBtiChip* getBTI(int sl, int n) const;
81 
83  DTBtiChip* getBTI(const DTBtiId& btiid) const { return getBTI(btiid.superlayer(), btiid.bti()); }
84 
86  LocalPoint localPosition(const DTTrigData*) const override;
88  LocalVector localDirection(const DTTrigData*) const override;
89 
91  std::vector<DTBtiChip*> btiList(int);
92 
98 
100  // run the trigger algorithm
101  virtual void reconstruct(const DTDigiCollection dtDigis) {
102  clearCache();
103  loadBTI(dtDigis);
104  runBTI();
105  }
106 
108  DTConfigBti* config_bti(DTBtiId& btiid) const;
109 
111  inline bool useAcceptParamFlag() { return _flag_acc; }
112 
113 private:
115  void loadBTI(const DTDigiCollection dtDigis);
116 
118  void runBTI();
119 
121  DTBtiChip* activeGetBTI(int sl, int n);
122 
124  DTBtiChip* activeGetBTI(const DTBtiId& btiid) { return activeGetBTI(btiid.superlayer(), btiid.bti()); }
125 
127  void localClear();
128 
129 private:
131  ConfBtiMap _conf_bti_map; //bti configuration map for this chamber
132 
133  std::vector<DTDigi*> _digis;
134 
135  bool _debug;
137 
138  bool _flag_acc;
139 };
140 
141 #endif
virtual void reconstruct(const DTDigiCollection dtDigis)
Definition: DTBtiCard.h:101
BTIContainer _btimap[3]
Definition: DTBtiCard.h:130
std::vector< DTDigi * > _digis
Definition: DTBtiCard.h:133
ConfBtiMap _conf_bti_map
Definition: DTBtiCard.h:131
std::vector< DTBtiChip * > btiList(int)
Returns the active BTI list in a given superlayer.
Definition: DTBtiCard.cc:441
DTBtiTrig * storeTrigger(DTBtiTrigData)
Definition: DTBtiCard.cc:460
std::map< DTBtiId, DTConfigBti > ConfBtiMap
Definition: DTBtiCard.h:58
DTBtiCard(DTTrigGeom *)
Constructor.
Definition: DTBtiCard.cc:60
void clearCache()
Clear all BTI stuff (map & cache)
Definition: DTBtiCard.cc:85
DTBtiChip * activeGetBTI(int sl, int n)
Returns the required DTBtiChip. Create it if it doesn&#39;t exist.
Definition: DTBtiCard.cc:379
int bti() const
Returns the bti.
Definition: DTBtiId.h:66
const DTConfigPedestals * _pedestals
Definition: DTBtiCard.h:136
bool _debug
Definition: DTBtiCard.h:135
~DTBtiCard() override
Destructor.
Definition: DTBtiCard.cc:76
void setConfig(const DTConfigManager *conf)
Set configuration.
Definition: DTBtiCard.cc:90
DTBtiChip * activeGetBTI(const DTBtiId &btiid)
Returns the required DTBtiChip. Create it if it doesn&#39;t exist.
Definition: DTBtiCard.h:124
DTCache< DTBtiTrigData, std::vector< DTBtiTrigData > > BTICache
Definition: DTBtiCard.h:60
DTBtiChip * getBTI(int sl, int n) const
Returns the required BTI. Return 0 if it doesn&#39;t exist.
Definition: DTBtiCard.cc:427
std::map< int, DTBtiChip *, std::less< int > > BTIContainer
Definition: DTBtiCard.h:54
BTIContainer::const_iterator BTI_const_iter
Definition: DTBtiCard.h:55
int superlayer() const
Returns the superlayer.
Definition: DTBtiId.h:64
DTConfigBti * config_bti(DTBtiId &btiid) const
Return bti chip configuration.
Definition: DTBtiCard.cc:637
BTIContainer::iterator BTI_iter
Definition: DTBtiCard.h:56
LocalPoint localPosition(const DTTrigData *) const override
NEWGEO Local position in chamber of a trigger-data object.
Definition: DTBtiCard.cc:519
bool useAcceptParamFlag()
Return acceptance flag.
Definition: DTBtiCard.h:111
HLT enums.
LocalVector localDirection(const DTTrigData *) const override
NEWGEO Local direction in chamber of a trigger-data object.
Definition: DTBtiCard.cc:562
void loadBTI(const DTDigiCollection dtDigis)
store digi&#39;s in DTBtiChip&#39;s
Definition: DTBtiCard.cc:237
virtual void reconstruct()
Virtual reconstruct member.
Definition: DTCache.h:50
bool debug() const
Return TU debug flag.
Definition: DTBtiCard.h:77
bool _flag_acc
Definition: DTBtiCard.h:138
void runBTI()
run DTBtiChip algorithm
Definition: DTBtiCard.cc:339
void localClear()
clear the BTI maps
Definition: DTBtiCard.cc:100
DTBtiChip * getBTI(const DTBtiId &btiid) const
Returns the required BTI. Return 0 if it doesn&#39;t exist.
Definition: DTBtiCard.h:83