CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
DTTracoCard Class Reference

#include <DTTracoCard.h>

Inheritance diagram for DTTracoCard:
DTCache< T, Coll > DTGeomSupplier

Public Member Functions

void clearCache ()
 Clear all traco stuff (cache & map) More...
 
const DTConfigLUTsconfig_luts () const
 Return LUTS config for this chamber (=minicrate) More...
 
bool debug ()
 Return TU debug flag. More...
 
 DTTracoCard (DTTrigGeom *, DTBtiCard *, DTTSTheta *)
 Constructor. More...
 
DTTracoChipgetTRACO (int n) const
 Returns the required DTTracoChip. Return 0 if it doesn't exist. More...
 
DTTracoChipgetTRACO (const DTTracoId &tracoid) const
 Returns the required DTTracoChip. Return 0 if it doesn't exist. More...
 
LocalVector localDirection (const DTTrigData *) const override
 NEWGEO Local direction in chamber of a trigger-data object. More...
 
LocalPoint localPosition (const DTTrigData *) const override
 NEWGEO Local position in chamber of a trigger-data object. More...
 
bool lutFromDBFlag ()
 Return lut computation option (DB/geometry) More...
 
void reconstruct () override
 Load BTIs triggers and run TRACOs algorithm. More...
 
void setConfig (const DTConfigManager *conf)
 Set configuration. More...
 
DTTracoTrigstoreTrigger (DTTracoTrigData)
 
std::vector< DTTracoChip * > tracoList ()
 Returns the active TRACO list. More...
 
DTTSThetaTSTh () const
 Return TSTheta. More...
 
bool useAcceptParamFlag ()
 Return acceptance flag. More...
 
 ~DTTracoCard () override
 Destructor. More...
 
- Public Member Functions inherited from DTCache< T, Coll >
const_iterator begin () const
 Get first cache element. More...
 
void clearCache ()
 Clear cache vector. More...
 
 DTCache ()
 Constructor. More...
 
const_iterator end () const
 Get last cache element. More...
 
int size () const
 Get cache vector's size. More...
 
virtual ~DTCache ()
 Destructor. More...
 
- Public Member Functions inherited from DTGeomSupplier
DTChamberId ChamberId () const
 Identifier of the associated chamber. More...
 
GlobalVector CMSDirection (const DTTrigData *trig) const
 CMS direction in chamber of a trigger -data object. More...
 
GlobalPoint CMSPosition (const DTTrigData *trig) const
 CMS position in chamber of a trigger-data object. More...
 
 DTGeomSupplier (DTTrigGeom *geom)
 Constructor. More...
 
DTTrigGeomgeom () const
 Associated geometry. More...
 
virtual void print (const DTTrigData *trig) const
 Print a trigger-data object with also local and global position/direction. More...
 
int sector () const
 Return sector number. More...
 
const DTChamberstat () const
 Associated chamber. More...
 
int station () const
 Return station number. More...
 
int wheel () const
 Return wheel number. More...
 
virtual ~DTGeomSupplier ()
 Destructor. More...
 

Private Member Functions

DTTracoChipactiveGetTRACO (int)
 Returns the required DTTracoChip. Create it if it doesn't exist. More...
 
DTTracoChipactiveGetTRACO (const DTTracoId &tracoid)
 Returns the required DTTracoChip. Create it if it doesn't exist. More...
 
DTConfigTracoconfig_traco (const DTTracoId &tracoid) const
 Return single TRACO config. More...
 
void loadTRACO ()
 store BTI triggers in TRACO's More...
 
void localClear ()
 clear the TRACO map More...
 
void runTRACO ()
 run TRACO algorithm More...
 

Private Attributes

DTBtiCard_bticard
 
const DTConfigLUTs_conf_luts
 
ConfTracoMap _conf_traco_map
 
bool _debug
 
bool _flag_acc
 
bool _lut_from_db
 
TRACOContainer _tracomap
 
DTTSTheta_tstheta
 

Additional Inherited Members

- Public Types inherited from DTCache< T, Coll >
typedef my_collection::const_iterator const_iterator
 
typedef my_collection::iterator iterator
 
typedef Coll my_collection
 
typedef T my_type
 
- Protected Attributes inherited from DTCache< T, Coll >
my_collection _cache
 
- Protected Attributes inherited from DTGeomSupplier
DTTrigGeom_geom
 

Detailed Description

Contains active DTTracoChips

Author
C. Grandi, S. Vanini

Modifications: III/07 : SV configuration with DTConfigManager

Definition at line 58 of file DTTracoCard.h.

Constructor & Destructor Documentation

◆ DTTracoCard()

DTTracoCard::DTTracoCard ( DTTrigGeom geo,
DTBtiCard bticard,
DTTSTheta tstheta 
)

Constructor.

Definition at line 48 of file DTTracoCard.cc.

49  : DTGeomSupplier(geo), _bticard(bticard), _tstheta(tstheta) {}
DTTSTheta * _tstheta
Definition: DTTracoCard.h:137
DTBtiCard * _bticard
Definition: DTTracoCard.h:136
DTGeomSupplier(DTTrigGeom *geom)
Constructor.

◆ ~DTTracoCard()

DTTracoCard::~DTTracoCard ( )
override

Destructor.

Definition at line 55 of file DTTracoCard.cc.

References localClear().

55 { localClear(); }
void localClear()
clear the TRACO map
Definition: DTTracoCard.cc:84

Member Function Documentation

◆ activeGetTRACO() [1/2]

DTTracoChip * DTTracoCard::activeGetTRACO ( int  n)
private

Returns the required DTTracoChip. Create it if it doesn't exist.

Definition at line 270 of file DTTracoCard.cc.

References _tracomap, config_traco(), DTGeomSupplier::geom(), dqmiodumpmetadata::n, and DTTrigGeom::statId().

Referenced by loadTRACO(), and storeTrigger().

270  {
271  // the traco identifier
272  DTChamberId sid = geom()->statId();
273  DTTracoId _id = DTTracoId(sid, n);
274 
275  DTTracoChip *traco = nullptr;
276  TRACO_iter ptraco = _tracomap.find(n);
277  if (ptraco != _tracomap.end()) {
278  traco = (*ptraco).second;
279  } else {
280  traco = new DTTracoChip(this, n, config_traco(_id));
281  _tracomap[n] = traco;
282  }
283  return traco;
284 }
TRACOContainer _tracomap
Definition: DTTracoCard.h:139
TRACOContainer::iterator TRACO_iter
Definition: DTTracoCard.h:52
DTTrigGeom * geom() const
Associated geometry.
DTChamberId statId() const
Identifier of the associated chamber.
Definition: DTTrigGeom.h:53
DTConfigTraco * config_traco(const DTTracoId &tracoid) const
Return single TRACO config.
Definition: DTTracoCard.cc:436

◆ activeGetTRACO() [2/2]

DTTracoChip* DTTracoCard::activeGetTRACO ( const DTTracoId tracoid)
inlineprivate

Returns the required DTTracoChip. Create it if it doesn't exist.

Definition at line 127 of file DTTracoCard.h.

References activeGetTRACO(), and DTTracoId::traco().

Referenced by activeGetTRACO().

127 { return activeGetTRACO(tracoid.traco()); }
DTTracoChip * activeGetTRACO(int)
Returns the required DTTracoChip. Create it if it doesn&#39;t exist.
Definition: DTTracoCard.cc:270
int traco() const
Returns the traco.
Definition: DTTracoId.h:62

◆ clearCache()

void DTTracoCard::clearCache ( )

Clear all traco stuff (cache & map)

Definition at line 61 of file DTTracoCard.cc.

References DTCache< T, Coll >::clearCache(), and localClear().

Referenced by reconstruct(), and DTTrig::triggerReco().

61  {
63  localClear();
64 }
void localClear()
clear the TRACO map
Definition: DTTracoCard.cc:84
void clearCache()
Clear cache vector.
Definition: DTCache.h:47

◆ config_luts()

const DTConfigLUTs* DTTracoCard::config_luts ( ) const
inline

Return LUTS config for this chamber (=minicrate)

Definition at line 108 of file DTTracoCard.h.

References _conf_luts.

Referenced by DTTracoChip::DTTracoChip().

108 { return _conf_luts; }
const DTConfigLUTs * _conf_luts
Definition: DTTracoCard.h:142

◆ config_traco()

DTConfigTraco * DTTracoCard::config_traco ( const DTTracoId tracoid) const
private

Return single TRACO config.

Definition at line 436 of file DTTracoCard.cc.

References _conf_traco_map, gather_cfg::cout, DTTracoId::sector(), DTTracoId::station(), DTTracoId::traco(), and DTTracoId::wheel().

Referenced by activeGetTRACO(), localDirection(), and localPosition().

436  {
437  // loop on map to find traco
438  ConfTracoMap::const_iterator titer = _conf_traco_map.find(tracoid);
439  if (titer == _conf_traco_map.end()) {
440  std::cout << "DTTracoCard::config_traco : TRACO (" << tracoid.wheel() << "," << tracoid.sector() << ","
441  << tracoid.station() << "," << tracoid.traco() << ") not found, return 0" << std::endl;
442  return nullptr;
443  }
444 
445  return const_cast<DTConfigTraco *>(&(*titer).second);
446 }
int wheel() const
Returns wheel number.
Definition: DTTracoId.h:56
int station() const
Returns station number.
Definition: DTTracoId.h:58
ConfTracoMap _conf_traco_map
Definition: DTTracoCard.h:140
int sector() const
Returns sector number.
Definition: DTTracoId.h:60
int traco() const
Returns the traco.
Definition: DTTracoId.h:62

◆ debug()

bool DTTracoCard::debug ( )
inline

Return TU debug flag.

Definition at line 74 of file DTTracoCard.h.

References _debug.

Referenced by loadTRACO(), localDirection(), and runTRACO().

74 { return _debug; }

◆ getTRACO() [1/2]

DTTracoChip * DTTracoCard::getTRACO ( int  n) const

Returns the required DTTracoChip. Return 0 if it doesn't exist.

Definition at line 286 of file DTTracoCard.cc.

References _tracomap, and dqmiodumpmetadata::n.

Referenced by DTTracoChip::setFlag().

286  {
287  TRACO_const_iter ptraco = _tracomap.find(n);
288  if (ptraco == _tracomap.end())
289  return nullptr;
290  return (*ptraco).second;
291 }
TRACOContainer _tracomap
Definition: DTTracoCard.h:139
TRACOContainer::const_iterator TRACO_const_iter
Definition: DTTracoCard.h:51

◆ getTRACO() [2/2]

DTTracoChip* DTTracoCard::getTRACO ( const DTTracoId tracoid) const
inline

Returns the required DTTracoChip. Return 0 if it doesn't exist.

Definition at line 83 of file DTTracoCard.h.

References getTRACO(), and DTTracoId::traco().

Referenced by getTRACO().

83 { return getTRACO(tracoid.traco()); }
DTTracoChip * getTRACO(int n) const
Returns the required DTTracoChip. Return 0 if it doesn&#39;t exist.
Definition: DTTracoCard.cc:286
int traco() const
Returns the traco.
Definition: DTTracoId.h:62

◆ loadTRACO()

void DTTracoCard::loadTRACO ( )
private

store BTI triggers in TRACO's

Definition at line 92 of file DTTracoCard.cc.

References _bticard, _flag_acc, activeGetTRACO(), DTTracoChip::add_btiT(), DTCache< T, Coll >::begin(), reco::ceil(), L1DTConfigBti_cff::CH, DTConfigBti::CH(), L1DTConfigBti_cff::CL, DTConfigBti::CL(), DTBtiCard::config_bti(), gather_cfg::cout, debug(), DTCache< T, Coll >::end(), DTGeomSupplier::geom(), createfilelist::int, L1DTConfigBti_cff::LH, DTConfigBti::LH(), L1DTConfigBti_cff::LL, DTConfigBti::LL(), localClear(), DTConfig::NBTITC, AlCaHLTBitMon_ParallelJobs::p, L1DTConfigBti_cff::RH, DTConfigBti::RH(), L1DTConfigBti_cff::RL, DTConfigBti::RL(), DTGeomSupplier::sector(), DTGeomSupplier::station(), and DTGeomSupplier::wheel().

Referenced by reconstruct().

92  {
93  localClear();
94 
95  if (debug()) {
96  std::cout << "DTTracoCard::loadTRACO called for wheel=" << wheel();
97  std::cout << ", station=" << station();
98  std::cout << ", sector=" << sector() << std::endl;
99  }
100 
101  int maxtc = int(ceil(float(geom()->nCell(1)) / float(DTConfig::NBTITC)));
102 
103  // loop on all BTI triggers
104  std::vector<DTBtiTrigData>::const_iterator p;
105  std::vector<DTBtiTrigData>::const_iterator pend = _bticard->end();
106  for (p = _bticard->begin(); p != pend; p++) {
107  if (debug()) {
108  std::cout << "Found bti trigger: ";
109  (*p).print();
110  }
111 
112  // BTI data
113  int nbti = (*p).btiNumber();
114  int nsl = (*p).btiSL();
115  int step = (*p).step();
116  int K = (*p).K();
117  DTBtiId id_bti = (*p).parentId();
118 
119  DTConfigBti *conf_bti = _bticard->config_bti(id_bti);
120  int LL = conf_bti->LL();
121  int LH = conf_bti->LH();
122  int CL = conf_bti->CL();
123  int CH = conf_bti->CH();
124  int RL = conf_bti->RL();
125  int RH = conf_bti->RH();
126  /*
127  if(debug())
128  std::cout << "Bti trigger acceptances: \n"
129  << " LL " << LL << ", LH " << LH << "\n"
130  << " CL " << CL << ", CH " << CH << "\n"
131  << " RL " << RL << ", RH " << RH << std::endl;
132  */
133  // assign BTI to TRACO (central TRACO for sl=3); ntc=1,2...maxtc
134  int ntc = static_cast<int>((nbti - 1) / DTConfig::NBTITC) + 1;
135  if (ntc < 1 || ntc > maxtc)
136  continue;
137 
138  if (debug())
139  std::cout << "Bti trigger assigned to traco " << ntc << " (maxtc " << maxtc << ")" << std::endl;
140 
141  // TRACO information
142  DTTracoId tracoid = DTTracoId(wheel(), station(), sector(), ntc);
143 
144  // position inside TRACO:
145  int pos = nbti - (ntc - 1) * DTConfig::NBTITC;
146 
147  // store trigger in TRACO. Create TRACO if it doesn't exist
148  // SV tb2003 : check if traco is connected!
149 
150  // SV 091103 : add bti trigger filtering in acceptance windows
151  // if flag is useAcceptParam() = true
152 
153  // Load master TRACO plane
154  if (nsl == 1) {
155  if (!_flag_acc || (K >= CL && K <= CH))
156  activeGetTRACO(ntc)->add_btiT(step, pos, &(*p));
157  else if (debug())
158  std::cout << "ATTENTION: in TRACO n. " << ntc << " bti pos " << pos << " trigger K= " << K
159  << " outside acceptance " << CL << "<K<" << CH << std::endl;
160  }
161 
162  // Load slave TRACO plane
163  if (nsl == 3) {
164  // 3 TRACO's
165  // for(int tci=-1;tci<=1;tci++) {
166  // if( (ntc+tci)>0 && (ntc+tci)<=maxtc )
167  // activeGetTRACO(ntc+tci)->add_btiT( step, pos+8-4*tci, &(*p) );
168  // else{
169  // if(debug())
170  // std::cout << "ATTENTION: traco " << ntc+tci << " is disconnected!"
171  // << std::endl;
172  // }
173 
174  // Left Traco
175  if ((ntc - 1) > 0 && (ntc - 1) <= maxtc) {
176  if (!_flag_acc || (K >= LL && K <= LH)) {
177  activeGetTRACO(ntc - 1)->add_btiT(step, pos + 8 - 4 * (-1), &(*p));
178  } else {
179  if (debug()) {
180  std::cout << "ATTENTION: in TRACO n. " << ntc - 1 << " bti pos " << pos + 8 - 4 * (-1)
181  << " trigger K= " << K << " outside acceptance " << LL << "<K<" << LH << std::endl;
182  }
183  }
184  }
185 
186  // Central Traco
187  if ((ntc) > 0 && (ntc) <= maxtc) {
188  if (!_flag_acc || (K >= CL && K <= CH)) {
189  activeGetTRACO(ntc)->add_btiT(step, pos + 8 - 4 * (0), &(*p));
190  } else {
191  if (debug())
192  std::cout << "ATTENTION: in TRACO n. " << ntc << " bti pos " << pos + 8 - 4 * (0) << " trigger K= " << K
193  << " outside acceptance " << CL << "<K<" << CH << std::endl;
194  }
195  }
196 
197  // Right Traco
198  if ((ntc + 1) > 0 && (ntc + 1) <= maxtc) {
199  if (!_flag_acc || (K >= RL && K <= RH)) {
200  activeGetTRACO(ntc + 1)->add_btiT(step, pos + 8 - 4 * (+1), &(*p));
201  } else {
202  if (debug())
203  std::cout << "ATTENTION: in TRACO n. " << ntc + 1 << " bti pos " << pos + 8 - 4 * (+1)
204  << " trigger K= " << K << " outside acceptance " << RL << "<K<" << RH << std::endl;
205  }
206  }
207  }
208 
209  // Filter Theta BTIs -> this is done in DTBtiChip
210 
211  } // end loop on bti trigs
212 }
int station() const
Return station number.
constexpr int32_t ceil(float num)
DTTracoChip * activeGetTRACO(int)
Returns the required DTTracoChip. Create it if it doesn&#39;t exist.
Definition: DTTracoCard.cc:270
int RH() const
K right limit for right traco.
Definition: DTConfigBti.h:115
int LH() const
K right limit for left traco.
Definition: DTConfigBti.h:103
CH
LTS and SET for low trigger suppression.
void add_btiT(int step, int pos, const DTBtiTrigData *btitrig)
Add a BTI trigger to the TRACO.
Definition: DTTracoChip.cc:962
bool _flag_acc
Definition: DTTracoCard.h:146
void localClear()
clear the TRACO map
Definition: DTTracoCard.cc:84
int CH() const
K right limit for center traco.
Definition: DTConfigBti.h:109
DTTrigGeom * geom() const
Associated geometry.
DTBtiCard * _bticard
Definition: DTTracoCard.h:136
int wheel() const
Return wheel number.
int sector() const
Return sector number.
LH
angular window limits for traco
bool debug()
Return TU debug flag.
Definition: DTTracoCard.h:74
const_iterator end() const
Get last cache element.
Definition: DTCache.h:41
DTConfigBti * config_bti(DTBtiId &btiid) const
Return bti chip configuration.
Definition: DTBtiCard.cc:637
int CL() const
K left limit for center traco.
Definition: DTConfigBti.h:106
int RL() const
K left limit for right traco.
Definition: DTConfigBti.h:112
int LL() const
K left limit for left traco.
Definition: DTConfigBti.h:100
step
Definition: StallMonitor.cc:83
static const int NBTITC
Definition: DTConfig.h:37
const_iterator begin() const
Get first cache element.
Definition: DTCache.h:38

◆ localClear()

void DTTracoCard::localClear ( )
private

clear the TRACO map

Definition at line 84 of file DTTracoCard.cc.

References _tracomap, and AlCaHLTBitMon_ParallelJobs::p.

Referenced by clearCache(), loadTRACO(), and ~DTTracoCard().

84  {
85  // Clear the map
86  for (TRACO_iter p = _tracomap.begin(); p != _tracomap.end(); p++) {
87  delete (*p).second;
88  }
89  _tracomap.clear();
90 }
TRACOContainer _tracomap
Definition: DTTracoCard.h:139
TRACOContainer::iterator TRACO_iter
Definition: DTTracoCard.h:52

◆ localDirection()

LocalVector DTTracoCard::localDirection ( const DTTrigData tr) const
overridevirtual

NEWGEO Local direction in chamber of a trigger-data object.

Implements DTGeomSupplier.

Definition at line 403 of file DTTracoCard.cc.

References L1DTConfigLUTs_cff::BTIC, DTTrigGeom::cellPitch(), config_traco(), funct::cos(), gather_cfg::cout, debug(), DTTrigGeom::distSL(), DTGeomSupplier::geom(), funct::sin(), and ClusterTask_cfi::trig.

Referenced by DTTracoChip::calculateAngles(), and DTTSPhi::localDirection().

403  {
404  // NEWGEO
405  DTTracoTrigData *trig = dynamic_cast<DTTracoTrigData *>(const_cast<DTTrigData *>(tr));
406  if (!trig) {
407  std::cout << "DTtracoCard::localDirection called with wrong argument!" << std::endl;
408  return LocalVector(0, 0, 0);
409  }
410 
411  // FE position
412  // int FE = geom()->posFE(3);
413 
414  float psi =
415  atan((float)(trig->K()) * geom()->cellPitch() / (geom()->distSL() * config_traco(trig->parentId())->BTIC()));
416 
417  if (config_traco(trig->parentId())->debug() == 4)
418  std::cout << "K " << trig->K() << " == psi " << psi << " in FE frame " << std::endl;
419 
420  // (xd,yd,zd) in chamber frame
421  float xd = -sin(psi);
422  float yd = 0;
423  float zd = -cos(psi);
424 
425  // 10/07/06 Not needed anymore (chages in geometry)
426  // if(FE==1){//FE in negative y
427  // xd = - xd;
428  //}
429 
430  if (config_traco(trig->parentId())->debug() == 4)
431  std::cout << "Direction in chamber frame is (" << xd << "," << yd << "," << zd << ")" << std::endl;
432 
433  return LocalVector(xd, yd, zd);
434 }
Local3DVector LocalVector
Definition: LocalVector.h:12
float cellPitch() const
Width of a cell (cm) i.e. distance between ywo wires.
Definition: DTTrigGeom.h:76
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
std::map< std::string, int, std::less< std::string > > psi
float distSL() const
Distance between the phi view superlayers (cms)
Definition: DTTrigGeom.h:79
DTTrigGeom * geom() const
Associated geometry.
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
bool debug()
Return TU debug flag.
Definition: DTTracoCard.h:74
DTConfigTraco * config_traco(const DTTracoId &tracoid) const
Return single TRACO config.
Definition: DTTracoCard.cc:436

◆ localPosition()

LocalPoint DTTracoCard::localPosition ( const DTTrigData tr) const
overridevirtual

NEWGEO Local position in chamber of a trigger-data object.

Implements DTGeomSupplier.

Definition at line 351 of file DTTracoCard.cc.

References L1DTConfigLUTs_cff::BTIC, DTTrigGeom::cellPitch(), config_traco(), gather_cfg::cout, DTTrigGeom::distSL(), nano_mu_digi_cff::float, DTGeomSupplier::geom(), DTTrigGeom::localPosition(), ClusterTask_cfi::trig, x, y, and z.

Referenced by DTTSPhi::localPosition().

351  {
352  // NEWGEO
353  DTTracoTrigData *trig = dynamic_cast<DTTracoTrigData *>(const_cast<DTTrigData *>(tr));
354  if (!trig) {
355  std::cout << "DTTracoCard::localPosition called with wrong argument!" << std::endl;
356  return LocalPoint(0, 0, 0);
357  }
358  float x = geom()->localPosition(trig->parentId()).x();
359  float y = geom()->localPosition(trig->parentId()).y();
360  float z = geom()->localPosition(trig->parentId()).z();
361 
362  float trig_pos = geom()->cellPitch() * ((float)trig->X() / (float)(config_traco(trig->parentId())->BTIC()));
363 
364  // 10/7/06 May be not needed anymore in new geometry
365  // if(geom()->posFE(1)==1)
366  // trig_pos = -trig_pos;
367 
368  x += trig_pos;
369 
370  // If not correlated get the position of the SL instead of the chamber center
371  // z axis toward vertex
372  if (trig->posIn() == 0) {
373  z -= 0.5 * geom()->distSL(); // no inner ==> only outer
374  } else if (trig->posOut() == 0) {
375  z += 0.5 * geom()->distSL(); // no outer ==> only inner
376  }
377  return LocalPoint(x, y, z);
378 }
LocalPoint localPosition(const DTBtiId) const
Local position in chamber of a BTI.
Definition: DTTrigGeom.cc:508
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30
float cellPitch() const
Width of a cell (cm) i.e. distance between ywo wires.
Definition: DTTrigGeom.h:76
float distSL() const
Distance between the phi view superlayers (cms)
Definition: DTTrigGeom.h:79
DTTrigGeom * geom() const
Associated geometry.
DTConfigTraco * config_traco(const DTTracoId &tracoid) const
Return single TRACO config.
Definition: DTTracoCard.cc:436

◆ lutFromDBFlag()

bool DTTracoCard::lutFromDBFlag ( )
inline

Return lut computation option (DB/geometry)

Definition at line 114 of file DTTracoCard.h.

References _lut_from_db.

Referenced by DTTracoChip::calculateAngles(), DTTracoChip::DTTracoChip(), and DTTracoChip::~DTTracoChip().

114 { return _lut_from_db; }
bool _lut_from_db
Definition: DTTracoCard.h:147

◆ reconstruct()

void DTTracoCard::reconstruct ( )
inlineoverridevirtual

Load BTIs triggers and run TRACOs algorithm.

Reimplemented from DTCache< T, Coll >.

Definition at line 101 of file DTTracoCard.h.

References clearCache(), loadTRACO(), and runTRACO().

Referenced by DTTrig::triggerReco().

101  {
102  clearCache();
103  loadTRACO();
104  runTRACO();
105  }
void clearCache()
Clear all traco stuff (cache & map)
Definition: DTTracoCard.cc:61
void runTRACO()
run TRACO algorithm
Definition: DTTracoCard.cc:214
void loadTRACO()
store BTI triggers in TRACO&#39;s
Definition: DTTracoCard.cc:92

◆ runTRACO()

void DTTracoCard::runTRACO ( )
private

run TRACO algorithm

Definition at line 214 of file DTTracoCard.cc.

References DTCache< T, Coll >::_cache, _tracomap, gather_cfg::cout, debug(), DTConfig::NSTEPF, DTConfig::NSTEPL, DTTracoChip::nTrig(), DTTracoChip::run(), DTGeomSupplier::sector(), DTGeomSupplier::station(), DTTracoChip::triggerData(), DTTracoChip::useSecondTrack(), and DTGeomSupplier::wheel().

Referenced by reconstruct().

214  {
215  if (debug()) {
216  std::cout << "DTTracoCard:runTRACO called for wheel=" << wheel();
217  std::cout << ", station=" << station();
218  std::cout << ", sector=" << sector();
219  std::cout << ", " << _tracomap.size() << " TRACOs with signal" << std::endl;
220  }
221 
222  // run TRACO algorithm on all non-empty TRACO
223  if (!_tracomap.empty()) {
224  if (debug()) {
225  std::cout << "====================================================" << std::endl;
226  std::cout << " TRACO triggers " << std::endl;
227  }
228 
229  TRACO_iter ptraco;
230  for (ptraco = _tracomap.begin(); ptraco != _tracomap.end(); ptraco++) {
231  DTTracoChip *traco = (*ptraco).second;
232  traco->run();
233  for (int step = DTConfig::NSTEPF; step <= DTConfig::NSTEPL; step++) {
234  if (traco->nTrig(step) > 0) {
235  _cache.push_back(traco->triggerData(step, 1));
236  /*
237  std::cout<<"first bti sl3:
238  "<<geom()->localPosition(DTBtiId(wheel(),station(),sector(),3,1))<<std::endl;
239  std::cout<<"traco pos: " <<
240  geom()->localPosition((traco->triggerData(step,1).parentId()))<<std::endl;
241  traco->triggerData(step,1).print();
242  std::cout<<"pos: " << localPosition(&(traco->triggerData(step,1))) <<
243  std::endl; std::cout<<"dir: " <<
244  localDirection(&(traco->triggerData(step,1))) << std::endl; std::cout
245  << std::endl;
246  */
247  }
248  // Store second track only if no first track at previous BX
249  if (traco->nTrig(step) > 1 && traco->useSecondTrack(step)) {
250  _cache.push_back(traco->triggerData(step, 2));
251  /*
252  std::cout<<"first bti sl3:
253  "<<geom()->localPosition(DTBtiId(wheel(),station(),sector(),3,1))<<std::endl;
254  std::cout<<"traco pos: " <<
255  geom()->localPosition((traco->triggerData(step,2).parentId()))<<std::endl;
256  traco->triggerData(step,2).print();
257  std::cout<<"pos: " << localPosition(&(traco->triggerData(step,2))) <<
258  std::endl; std::cout<<"dir: " <<
259  localDirection(&(traco->triggerData(step,2))) << std::endl; std::cout
260  << std::endl;
261  */
262  }
263  }
264  }
265  if (debug())
266  std::cout << "====================================================" << std::endl;
267  }
268 }
int station() const
Return station number.
my_collection _cache
Definition: DTCache.h:53
void run()
Run TRACO algorithm.
Definition: DTTracoChip.cc:239
TRACOContainer _tracomap
Definition: DTTracoCard.h:139
static const int NSTEPF
Definition: DTConfig.h:35
TRACOContainer::iterator TRACO_iter
Definition: DTTracoCard.h:52
int nTrig(int step) const
Return the number of trigger candidates.
int useSecondTrack(int step) const
a flag for a usable second track
int wheel() const
Return wheel number.
int sector() const
Return sector number.
bool debug()
Return TU debug flag.
Definition: DTTracoCard.h:74
static const int NSTEPL
Constants: first and last step to start trigger finding.
Definition: DTConfig.h:35
DTTracoTrigData triggerData(int step, unsigned n) const
Return the data part of the requested trigger.
step
Definition: StallMonitor.cc:83

◆ setConfig()

void DTTracoCard::setConfig ( const DTConfigManager conf)

Set configuration.

Definition at line 66 of file DTTracoCard.cc.

References _conf_luts, _conf_traco_map, _debug, _flag_acc, _lut_from_db, DTGeomSupplier::ChamberId(), DTConfigManager::getDTConfigLUTs(), DTConfigManager::getDTConfigTracoMap(), DTConfigManager::getDTTPGDebug(), DTConfigManager::lutFromDB(), and DTConfigManager::useAcceptParam().

Referenced by DTSCTrigUnit::setConfig().

66  {
67  // get traco configuration map
68  DTChamberId sid = ChamberId();
70  _debug = conf->getDTTPGDebug();
71 
72  // get bti acceptance flag
73  _flag_acc = conf->useAcceptParam();
74 
75  // get lut computation flag
76  _lut_from_db = conf->lutFromDB();
77 
78  // get lut configuration for this chamber
79  // 100511 SV only if luts are read from OMDS
80  if (_lut_from_db)
81  _conf_luts = conf->getDTConfigLUTs(sid);
82 }
bool getDTTPGDebug() const
Get global debug flag.
bool lutFromDB() const
Lut from DB flag.
bool _flag_acc
Definition: DTTracoCard.h:146
ConfTracoMap _conf_traco_map
Definition: DTTracoCard.h:140
bool _lut_from_db
Definition: DTTracoCard.h:147
bool useAcceptParam() const
Use Bti acceptance parameters (LL,LH,CL,CH,RL,RH)
const std::map< DTTracoId, DTConfigTraco > & getDTConfigTracoMap(DTChamberId) const
Get desired TRACO configuration map for a given DTChamber.
const DTConfigLUTs * getDTConfigLUTs(DTChamberId) const
Get desired LUT configuration.
DTChamberId ChamberId() const
Identifier of the associated chamber.
const DTConfigLUTs * _conf_luts
Definition: DTTracoCard.h:142

◆ storeTrigger()

DTTracoTrig * DTTracoCard::storeTrigger ( DTTracoTrigData  td)

Returns a DTTracoTrig corresponding to a DTTracoTrigData. Creates the corresponding TRACO chip if needed and stores the trigger

Definition at line 305 of file DTTracoCard.cc.

References activeGetTRACO(), DTTracoChip::addTrig(), gather_cfg::cout, DTTracoTrigData::parentId(), DTTracoId::sector(), DTGeomSupplier::sector(), DTTracoId::station(), DTGeomSupplier::station(), DTTracoTrigData::step(), DTTracoId::traco(), ClusterTask_cfi::trig, DTTracoId::wheel(), and DTGeomSupplier::wheel().

305  {
306  DTTracoId tracoid = td.parentId();
307  if (!(tracoid.wheel() == wheel() && tracoid.sector() == sector() && tracoid.station() == station()))
308  return nullptr;
309  std::cout << "DTTracoChip::trigger: trigger not belonging to this card! ";
310  std::cout << "card=(" << wheel() << "," << station() << "," << sector() << ") ";
311  std::cout << "trig=(" << tracoid.wheel() << "," << tracoid.station() << "," << tracoid.sector() << ")";
312  // get the appropriate Traco
313  DTTracoChip *traco = activeGetTRACO(tracoid.traco());
314  // create a new trigger in the Traco
315  DTTracoTrig *trig = new DTTracoTrig(traco, td);
316  // add the trigger to the Traco
317  traco->addTrig(td.step(), trig);
318  // return the trigger
319  return trig;
320 }
int station() const
Return station number.
void addTrig(int step, DTTracoTrig *)
Add a TRACO trigger.
DTTracoChip * activeGetTRACO(int)
Returns the required DTTracoChip. Create it if it doesn&#39;t exist.
Definition: DTTracoCard.cc:270
int wheel() const
Returns wheel number.
Definition: DTTracoId.h:56
int station() const
Returns station number.
Definition: DTTracoId.h:58
int step() const
Return step.
int wheel() const
Return wheel number.
int sector() const
Returns sector number.
Definition: DTTracoId.h:60
int sector() const
Return sector number.
int traco() const
Returns the traco.
Definition: DTTracoId.h:62
DTTracoId parentId() const
Return parent TRACO identifier.

◆ tracoList()

std::vector< DTTracoChip * > DTTracoCard::tracoList ( )

Returns the active TRACO list.

Definition at line 293 of file DTTracoCard.cc.

References _tracomap, AlCaHLTBitMon_ParallelJobs::p, and DTCache< T, Coll >::size().

293  {
294  std::vector<DTTracoChip *> blist;
295 
296  if (size() < 1)
297  return blist;
298 
299  for (TRACO_const_iter p = _tracomap.begin(); p != _tracomap.end(); p++) {
300  blist.push_back((*p).second);
301  }
302  return blist;
303 }
TRACOContainer _tracomap
Definition: DTTracoCard.h:139
int size() const
Get cache vector&#39;s size.
Definition: DTCache.h:44
TRACOContainer::const_iterator TRACO_const_iter
Definition: DTTracoCard.h:51

◆ TSTh()

DTTSTheta* DTTracoCard::TSTh ( ) const
inline

Return TSTheta.

Definition at line 77 of file DTTracoCard.h.

References _tstheta.

Referenced by DTTracoChip::storeUncorr().

77 { return _tstheta; }
DTTSTheta * _tstheta
Definition: DTTracoCard.h:137

◆ useAcceptParamFlag()

bool DTTracoCard::useAcceptParamFlag ( )
inline

Return acceptance flag.

Definition at line 111 of file DTTracoCard.h.

References _flag_acc.

Referenced by DTTracoChip::add_btiT().

111 { return _flag_acc; }
bool _flag_acc
Definition: DTTracoCard.h:146

Member Data Documentation

◆ _bticard

DTBtiCard* DTTracoCard::_bticard
private

Definition at line 136 of file DTTracoCard.h.

Referenced by loadTRACO().

◆ _conf_luts

const DTConfigLUTs* DTTracoCard::_conf_luts
private

Definition at line 142 of file DTTracoCard.h.

Referenced by config_luts(), and setConfig().

◆ _conf_traco_map

ConfTracoMap DTTracoCard::_conf_traco_map
private

Definition at line 140 of file DTTracoCard.h.

Referenced by config_traco(), and setConfig().

◆ _debug

bool DTTracoCard::_debug
private

Definition at line 144 of file DTTracoCard.h.

Referenced by debug(), and setConfig().

◆ _flag_acc

bool DTTracoCard::_flag_acc
private

Definition at line 146 of file DTTracoCard.h.

Referenced by loadTRACO(), setConfig(), and useAcceptParamFlag().

◆ _lut_from_db

bool DTTracoCard::_lut_from_db
private

Definition at line 147 of file DTTracoCard.h.

Referenced by lutFromDBFlag(), and setConfig().

◆ _tracomap

TRACOContainer DTTracoCard::_tracomap
private

Definition at line 139 of file DTTracoCard.h.

Referenced by activeGetTRACO(), getTRACO(), localClear(), runTRACO(), and tracoList().

◆ _tstheta

DTTSTheta* DTTracoCard::_tstheta
private

Definition at line 137 of file DTTracoCard.h.

Referenced by TSTh().