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 //---------------
40 // C++ Headers --
41 //---------------
42 #include <vector>
43 #include <map>
44 
45 namespace edm {class ParameterSet; class Event; class EventSetup;}
46 
47 // ---------------------
48 // -- Class Interface --
49 // ---------------------
50 
51 typedef std::map< int,DTBtiChip*,std::less<int> > BTIContainer;
52 typedef BTIContainer::const_iterator BTI_const_iter;
53 typedef BTIContainer::iterator BTI_iter;
54 
55 typedef std::map<DTBtiId,DTConfigBti> ConfBtiMap;
56 
58 
59 class DTBtiCard : public BTICache, public DTGeomSupplier {
60 
61  public:
62 
65 
67  ~DTBtiCard() override;
68 
70  void clearCache();
71 
73  void setConfig(const DTConfigManager *conf);
74 
76  inline bool debug() const {return _debug;}
77 
79  DTBtiChip* getBTI(int sl, int n) const;
80 
82  DTBtiChip* getBTI(const DTBtiId& btiid) const {
83  return getBTI(btiid.superlayer(),btiid.bti());
84  }
85 
87  LocalPoint localPosition(const DTTrigData*) const override;
89  LocalVector localDirection(const DTTrigData*) const override;
90 
92  std::vector<DTBtiChip*> btiList(int);
93 
98  DTBtiTrig* storeTrigger(DTBtiTrigData);
99 
100  using BTICache::reconstruct;
101  // run the trigger algorithm
102  virtual void reconstruct(const DTDigiCollection dtDigis) { clearCache();loadBTI(dtDigis); runBTI(); }
103 
105  DTConfigBti* config_bti(DTBtiId& btiid) const;
106 
108  inline bool useAcceptParamFlag() { return _flag_acc; }
109 
110  private:
111 
113  void loadBTI(const DTDigiCollection dtDigis);
114 
116  void runBTI();
117 
119  DTBtiChip* activeGetBTI(int sl, int n);
120 
122  DTBtiChip* activeGetBTI(const DTBtiId& btiid) {
123  return activeGetBTI(btiid.superlayer(),btiid.bti());
124  }
125 
127  void localClear();
128 
129  private:
130 
131  BTIContainer _btimap[3];
132  ConfBtiMap _conf_bti_map; //bti configuration map for this chamber
133 
134  std::vector<DTDigi*> _digis;
135 
136  bool _debug;
138 
139  bool _flag_acc;
140 };
141 
142 #endif
std::map< DTBtiId, DTConfigBti > ConfBtiMap
Definition: DTBtiCard.h:55
virtual void reconstruct(const DTDigiCollection dtDigis)
Definition: DTBtiCard.h:102
std::vector< DTDigi * > _digis
Definition: DTBtiCard.h:134
std::map< int, DTBtiChip *, std::less< int > > BTIContainer
Definition: DTBtiCard.h:51
ConfBtiMap _conf_bti_map
Definition: DTBtiCard.h:132
DTBtiChip * getBTI(const DTBtiId &btiid) const
Returns the required BTI. Return 0 if it doesn&#39;t exist.
Definition: DTBtiCard.h:82
const DTConfigPedestals * _pedestals
Definition: DTBtiCard.h:137
bool _debug
Definition: DTBtiCard.h:136
DTBtiChip * activeGetBTI(const DTBtiId &btiid)
Returns the required DTBtiChip. Create it if it doesn&#39;t exist.
Definition: DTBtiCard.h:122
bool debug() const
Return TU debug flag.
Definition: DTBtiCard.h:76
int superlayer() const
Returns the superlayer.
Definition: DTBtiId.h:73
BTIContainer::const_iterator BTI_const_iter
Definition: DTBtiCard.h:52
DTCache< DTBtiTrigData, std::vector< DTBtiTrigData > > BTICache
Definition: DTBtiCard.h:57
int bti() const
Returns the bti.
Definition: DTBtiId.h:75
BTIContainer::iterator BTI_iter
Definition: DTBtiCard.h:53
bool useAcceptParamFlag()
Return acceptance flag.
Definition: DTBtiCard.h:108
HLT enums.
virtual void reconstruct()
Virtual reconstruct member.
Definition: DTCache.h:52
bool _flag_acc
Definition: DTBtiCard.h:139