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 //
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();
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;
90 
92  std::vector<DTBtiChip*> btiList(int);
93 
99 
100  // run the trigger algorithm
101  virtual void reconstruct(const DTDigiCollection dtDigis) { clearCache();loadBTI(dtDigis); runBTI(); }
102 
104  DTConfigBti* config_bti(DTBtiId& btiid) const;
105 
107  inline bool useAcceptParamFlag() { return _flag_acc; }
108 
109  private:
110 
112  void loadBTI(const DTDigiCollection dtDigis);
113 
115  void runBTI();
116 
118  DTBtiChip* activeGetBTI(int sl, int n);
119 
121  DTBtiChip* activeGetBTI(const DTBtiId& btiid) {
122  return activeGetBTI(btiid.superlayer(),btiid.bti());
123  }
124 
126  void localClear();
127 
128  private:
129 
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
std::map< DTBtiId, DTConfigBti > ConfBtiMap
Definition: DTBtiCard.h:55
virtual void reconstruct(const DTDigiCollection dtDigis)
Definition: DTBtiCard.h:101
BTIContainer _btimap[3]
Definition: DTBtiCard.h:130
DTConfigBti * config_bti(DTBtiId &btiid) const
Return bti chip configuration.
Definition: DTBtiCard.cc:676
std::vector< DTDigi * > _digis
Definition: DTBtiCard.h:133
std::map< int, DTBtiChip *, std::less< int > > BTIContainer
Definition: DTBtiCard.h:51
ConfBtiMap _conf_bti_map
Definition: DTBtiCard.h:131
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:82
const DTConfigPedestals * _pedestals
Definition: DTBtiCard.h:136
bool _debug
Definition: DTBtiCard.h:135
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:121
bool debug() const
Return TU debug flag.
Definition: DTBtiCard.h:76
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:52
DTCache< DTBtiTrigData, std::vector< DTBtiTrigData > > BTICache
Definition: DTBtiCard.h:57
tuple conf
Definition: dbtoconf.py:185
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:107
void loadBTI(const DTDigiCollection dtDigis)
store digi&#39;s in DTBtiChip&#39;s
Definition: DTBtiCard.cc:258
bool _flag_acc
Definition: DTBtiCard.h:138
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