CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
DTBtiChip Class Reference

#include <DTBtiChip.h>

Public Member Functions

void add_digi (int cell, const DTDigi *digi)
 Add a digi to the DTBtiChip. More...
 
void add_digi_clock (int cell, int clock_digi)
 Add a clock digi to the DTBtiChip. More...
 
void addTrig (int step, std::unique_ptr< DTBtiTrig > btitrig)
 
void clear ()
 delete hits and triggers More...
 
GlobalPoint CMSPosition () const
 Position in CMS frame. More...
 
DTConfigBticonfig () const
 Configuration set. More...
 
 DTBtiChip (DTBtiCard *card, DTTrigGeom *geom, int supl, int n, DTConfigBti *_config)
 original constructor More...
 
 DTBtiChip (DTBtiChip &&bti)=delete
 Copy constructor. More...
 
 DTBtiChip (DTBtiChip const &bti)=delete
 
DTTrigGeomgeom () const
 Return trigger geometry. More...
 
std::vector< const DTDigi * >
const & 
get_CellDigis (int cell) const
 get digi vector - SV 28/XI/02 More...
 
DTBtiId id () const
 Return the DTBtiChip Id. More...
 
void init_clock ()
 
LocalPoint localPosition () const
 Position in chamber frame (x is the one of first traco in slave plane) More...
 
int nCellHit () const
 Number of cells with hits. More...
 
int nTrig (int step) const
 Number of triggers found. More...
 
int number () const
 Return DTBtiChip number. More...
 
DTBtiChipoperator= (DTBtiChip &&bti)=delete
 Assignment operator. More...
 
DTBtiChipoperator= (DTBtiChip const &bti)=delete
 
void run ()
 Run DTBtiChip algorithm. More...
 
int sector () const
 Return sector number. More...
 
int station () const
 Return station number. More...
 
int superlayer () const
 Return superlayer. More...
 
DTBtiTrig const * trigger (int step, unsigned n) const
 Return the requested trigger. More...
 
DTBtiTrigData triggerData (int step, unsigned n) const
 Return the data part of the requested trigger. More...
 
std::vector< std::unique_ptr
< DTBtiTrig > > const & 
trigList (int step) const
 
int wheel () const
 Return wheel number. More...
 
 ~DTBtiChip ()
 Destructor. More...
 

Private Member Functions

void acceptMask (BitArray< 80 > *BitArrPtr, int k, int accep)
 
void computeEqs ()
 
void computeSums ()
 
int currentIntStep () const
 
int currentStep () const
 
void doLTS ()
 
void eraseTrigger (int step, unsigned n)
 
void findTrig ()
 
void init ()
 
int keepTrig (const int eq, const int acp, const int code)
 
int keepTrigPatt (int flag, const int eq, const int pattType, int hlflag)
 
bool matchEq (float eqA, float eqB, int AC)
 
int reSum (int a, int b)
 
int reSum23 (int a, int b)
 
void reSumSet ()
 
void setSnap ()
 
int store (const int eq, const int code, const int K, const int X, float KeqAB=0., float KeqBC=0., float KeqCD=0., float KeqAC=0., float KeqBD=0., float KeqAD=0.)
 
void sum (const int s, const int a, const int b)
 
void tick ()
 

Private Attributes

std::array< int, 9 > _busyStart_clock
 
DTBtiCard_card
 
DTConfigBti_config
 
int _curStep
 
std::array< float, 25 > _difs
 
std::array< std::vector< const
DTDigi * >, 9 > 
_digis
 
std::array< std::vector< int >, 9 > _digis_clock
 
DTTrigGeom_geom
 
std::array< std::vector
< DTBtiHit * >, 9 > 
_hits
 
DTBtiId _id
 
float _JTR [32][3]
 
float _Keq [32][6]
 
float _KTR [32][2]
 
int _MaxKAcc
 
int _MaxKcenterTraco
 
int _MaxKleftTraco
 
int _MaxKrightTraco
 
int _MinKAcc
 
int _MinKcenterTraco
 
int _MinKleftTraco
 
int _MinKrightTraco
 
int _nStepUsedHits
 
std::array< float, 25 > _sums
 
std::array< DTBtiHit *, 9 > _thisStepUsedHit
 
std::array< int, 9 > _thisStepUsedTimes
 
std::array< std::vector
< std::unique_ptr< DTBtiTrig >
>, DTConfig::NSTEPL-DTConfig::NSTEPF+1 > 
_trigs
 
float _Xeq [32][2]
 
float _XeqAB_patt0
 
float _XeqAC_patt0
 
float _XeqBD_patt0
 
float _XeqCD_patt0
 
int init_done
 
int RE23
 
int RE43
 
int reSumAr [3][5]
 
int reSumAr23 [3][5]
 
int ST
 
int ST2
 
int ST23
 
int ST3
 
int ST4
 
int ST43
 
int ST5
 
int ST7
 

Detailed Description

Implementation of DTBtiChip trigger algorithm Internally uses DTBtiHit to store muon digis

Author
S. Vanini

Definition at line 48 of file DTBtiChip.h.

Constructor & Destructor Documentation

DTBtiChip::DTBtiChip ( DTBtiCard card,
DTTrigGeom geom,
int  supl,
int  n,
DTConfigBti _config 
)

original constructor

new constructor with configuration

Definition at line 48 of file DTBtiChip.cc.

References _busyStart_clock, _card, _digis, _geom, _hits, _id, _MaxKAcc, _MinKAcc, _trigs, c, DTTrigGeom::cellH(), DTTrigGeom::cellPitch(), DTConfigBti::CH(), DTConfigBti::CL(), CMSPosition(), DTTrigGeom::CMSPosition(), config(), gather_cfg::cout, ztail::d, DTConfigBti::DEADpar(), debug, runTauDisplay::gp, h, init_done, DTConfigBti::KAccTheta(), dqmiodumpmetadata::n, PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), reSumSet(), setSnap(), DTConfigBti::ST(), DTTrigGeom::statId(), DTBtiId::superlayer(), submitPVValidationJobs::t, funct::tan(), theta(), DTBtiCard::useAcceptParamFlag(), and PV3DBase< T, PVType, FrameType >::z().

49  : _card(card), _geom(geom), _config(conf) {
50  // original constructor
51  setSnap();
52  reSumSet();
53 
54  // Debugging...
55  if (config()->debug() > 2) {
56  cout << "DTBtiChip constructor called for BTI number " << n;
57  cout << " in superlayer " << supl << endl;
58  }
59 
60  // reserve the appropriate amount of space for vectors
61  for (auto& t : _trigs) {
62  t.reserve(2);
63  }
64 
65  for (auto& d : _digis) {
66  d.reserve(10);
67  }
68  for (auto& h : _hits) {
69  h.reserve(10);
70  }
71 
72  //SV wire dead time init
73  int DEAD = config()->DEADpar();
74  for (auto& c : _busyStart_clock) {
75  c = -DEAD - 1;
76  }
77 
78  // Identifier
79  DTChamberId sid = _geom->statId();
80  _id = DTBtiId(sid, supl, n);
81 
82  //if(config()->trigSetupGeom() == 0){
83  // set K acceptance in theta view for this BTI: 6 bit resolution....
84  _MinKAcc = 0;
85  _MaxKAcc = 63;
86 
87  /* DTBtiId _id1 = DTBtiId(sid,supl,1);
88 
89  cout <<"superlayer" << _id.superlayer()<< "BTI1 " << _id1.bti() << " BTICur " << _id.bti()<< endl;
90  cout <<endl;
91  GlobalPoint gp1 = _geom->CMSPosition(_id1);
92  cout << "pos of BTI "<< _id1.bti() << gp1 <<endl;
93  // K of tracks from vertex
94  GlobalPoint gp = CMSPosition();
95  cout << "pos of BTI" << _id.bti() << gp <<endl;
96  cout << endl ; */
97 
98  // // theta bti acceptance cut is in bti chip (no traco in theta!)
99  // // acceptance from orca geom: bti theta angle in CMS frame +-2 in K units
100  // if(_id.superlayer()==2){
101  // float distp2 = (int)(2*_geom->cellH()*config()->ST()/_geom->cellPitch());
102  // float K0 = config()->ST();
103 
104  // /* DTBtiId _id1 = DTBtiId(sid,supl,1);
105 
106  // cout << "BTI1 " << _id1.bti() << endl;
107  // cout << "BTICur " << _id.bti() <<endl;
108  // GlobalPoint gp1 = _geom->CMSPosition(_id1);
109  // cout << "pos of BTI 1 " << gp1 <<endl;*/
110 
111  // // K of tracks from vertex
112  // GlobalPoint gp = CMSPosition();
113  // if(config()->debug()>3){
114  // cout << "Position: R=" << gp.perp() << "cm, Phi=" << gp.phi()*180/3.14159;
115  // cout << " deg, Z=" << gp.z() << " cm" << endl;
116  // }
117  // // CB TEST WITH NEW GEOMETRY
118  // // new geometry: modified wrt old due to specularity of theta SLs (still to understand on wheel zero) 19/06/06
119  // float theta;
120  // if (_id.wheel()==0){
121  // if(_id.sector()%4>1) theta = atan( gp.z()/gp.perp() );
122  // else theta = atan( -gp.z()/gp.perp() );
123  // }
124  // else theta = atan( fabs(gp.z())/gp.perp() );
125  // // .11 =TAN(6.3 deg) ==> k=2 (e' ancora vero? forse questa parte va aggiornata sena ripassare per gli angoli) 19/6/06
126  // float thetamin = theta-config()->KAccTheta()*0.055;
127  // float thetamax = theta+config()->KAccTheta()*0.055;
128 
129  // float fktmin = tan(thetamin)*distp2 + K0;
130  // int ktmin = (fktmin>0) ? (int)(fktmin+0.5) : (int)(fktmin-0.5);
131  // float fktmax = tan(thetamax)*distp2 + K0;
132  // int ktmax = (fktmax>0) ? (int)(fktmax+0.5) : (int)(fktmax-0.5);
133  // // float fkbti = -gp.z()/gp.perp()*distp2;
134  // // int kbti = (fkbti>0) ? (int)(fkbti+0.5) : (int)(fkbti-0.5);
135  // // // K acceptance to point to vertex
136  // // int ktmin = kbti-config()->KAccTheta(); // minimum
137  // // int ktmax = kbti+config()->KAccTheta(); // maximum
138  // if(ktmin>_MinKAcc)_MinKAcc=ktmin;
139  // if(ktmax<_MaxKAcc)_MaxKAcc=ktmax;
140  // }
141 
142  // // debugging
143  // if(config()->debug()>2){
144  // cout << "CMS position:" << CMSPosition() << endl;
145  // cout << "K acceptance:" << _MinKAcc << "," << _MaxKAcc << endl;
146  // }
147  // // end debugging
148  // theta bti acceptance cut is in bti chip (no traco in theta!)
149  // acceptance is determined about BTI angle wrt vertex with programmable value
150  if (_id.superlayer() == 2) {
151  // 091105 SV theta bti trigger angular acceptance in CMSSW is computed from geometry
152  // (theta of the bti) +- a given tolerance config()->KAccTheta(): tolerance NOT in
153  // hardware configuration. The hw tolerance is given in the system and the
154  // overall acceptance is computed "before" data (CH,CL) is given to the MC
155  // or written in the DB. No way to "extract" the tolerance from DB yet.
156 
157  if (_card->useAcceptParamFlag() == 0) {
158  //float distp2 = (int)(2*_geom->cellH()*config()->ST()/_geom->cellPitch()); SV fix 17/III/07
159  float distp2 = 2 * _geom->cellH() * config()->ST() / _geom->cellPitch();
160  float K0 = config()->ST();
161 
162  // position of BTI 1 and of current one
163  DTBtiId _id1 = DTBtiId(sid, supl, 1);
164  GlobalPoint gp1 = _geom->CMSPosition(_id1);
166  if (config()->debug() > 3) {
167  cout << "Position: R=" << gp.perp() << "cm, Phi=" << gp.phi() * 180 / 3.14159;
168  cout << " deg, Z=" << gp.z() << " cm" << endl;
169  }
170  // new geometry: modified wrt old due to specularity of theta SLs --> fixed 6/9/06
171  float theta;
172  if (gp1.z() < 0.0)
173  theta = atan(-(gp.z()) / gp.perp());
174  else
175  theta = atan((gp.z()) / gp.perp());
176 
177  // set BTI acceptance window : fixed wrt ORCA on 6/9/06
178  float fktmin = tan(theta) * distp2 + K0;
179  int ktmin = static_cast<int>(fktmin) - config()->KAccTheta();
180  float fktmax = tan(theta) * distp2 + K0 + 1;
181  int ktmax = static_cast<int>(fktmax) + config()->KAccTheta();
182  if (ktmin > _MinKAcc)
183  _MinKAcc = ktmin;
184  if (ktmax < _MaxKAcc)
185  _MaxKAcc = ktmax;
186  }
187  // 091105 SV acceptance is taken simply from CH, CL parameters
188  else {
189  _MinKAcc = config()->CL();
190  _MaxKAcc = config()->CH();
191  }
192 
193  // debugging
194  if (config()->debug() > 2) {
195  cout << "CMS position:" << CMSPosition() << endl;
196  cout << "K acceptance (theta view):" << _MinKAcc << "," << _MaxKAcc << endl;
197  } // end debugging
198 
199  } //end theta acceptance computation
200 
201  //}// end if trigSetupGeom=0
202 
203  //SV flag for initialization....
204  init_done = 0;
205 }
DTBtiId _id
Definition: DTBtiChip.h:176
int _MinKAcc
Definition: DTBtiChip.h:195
const edm::EventSetup & c
T perp() const
Definition: PV3DBase.h:69
float cellPitch() const
Width of a cell (cm) i.e. distance between ywo wires.
Definition: DTTrigGeom.h:76
std::array< std::vector< std::unique_ptr< DTBtiTrig > >, DTConfig::NSTEPL-DTConfig::NSTEPF+1 > _trigs
Definition: DTBtiChip.h:184
int DEADpar() const
Wire DEAD time parameter.
Definition: DTConfigBti.h:122
std::array< std::vector< const DTDigi * >, 9 > _digis
Definition: DTBtiChip.h:179
int CH() const
K right limit for center traco.
Definition: DTConfigBti.h:109
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
float ST() const
Max drift time in 12.5 ns steps.
Definition: DTConfigBti.h:61
Geom::Theta< T > theta() const
int init_done
Definition: DTBtiChip.h:209
DTBtiCard * _card
Definition: DTBtiChip.h:171
tuple d
Definition: ztail.py:151
int _MaxKAcc
Definition: DTBtiChip.h:196
int superlayer() const
Returns the superlayer.
Definition: DTBtiId.h:61
float cellH() const
Height of a cell (cm)
Definition: DTTrigGeom.h:73
DTTrigGeom * _geom
Definition: DTBtiChip.h:173
T z() const
Definition: PV3DBase.h:61
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
std::array< int, 9 > _busyStart_clock
Definition: DTBtiChip.h:210
GlobalPoint CMSPosition() const
Position in CMS frame.
Definition: DTBtiChip.h:98
int KAccTheta() const
BTI angular acceptance in theta view.
Definition: DTConfigBti.h:67
std::array< std::vector< DTBtiHit * >, 9 > _hits
Definition: DTBtiChip.h:188
#define debug
Definition: HDRShower.cc:19
DTChamberId statId() const
Identifier of the associated chamber.
Definition: DTTrigGeom.h:53
bool useAcceptParamFlag()
Return acceptance flag.
Definition: DTBtiCard.h:111
DTConfigBti * _config
Definition: DTBtiChip.h:174
tuple cout
Definition: gather_cfg.py:144
int CL() const
K left limit for center traco.
Definition: DTConfigBti.h:106
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
DTConfigBti * config() const
Configuration set.
Definition: DTBtiChip.h:119
GlobalPoint CMSPosition(const DTBtiId obj) const
CMS position of a BTI.
Definition: DTTrigGeom.h:177
void setSnap()
Definition: DTBtiChip.cc:699
DTBtiChip::DTBtiChip ( DTBtiChip &&  bti)
delete

Copy constructor.

DTBtiChip::DTBtiChip ( DTBtiChip const &  bti)
delete
DTBtiChip::~DTBtiChip ( )

Destructor.

Definition at line 210 of file DTBtiChip.cc.

References clear().

210 { clear(); }
void clear()
delete hits and triggers
Definition: DTBtiChip.cc:388

Member Function Documentation

void DTBtiChip::acceptMask ( BitArray< 80 > *  BitArrPtr,
int  k,
int  accep 
)
private

Definition at line 715 of file DTBtiChipSelTrig.cc.

References submitPVResolutionJobs::config, gather_cfg::cout, debug, and BitArray< N >::set().

715  {
716  if (k >= 0 && k < 78) {
717  if (config()->debug() > 4)
718  cout << "DTBtiChip::acceptMask -> Setting acceptance for k=" << k << endl;
719 
720  if (accep == 0) { //code 00
721  if (k >= 1)
722  BitArrPtr->set(k - 1);
723  BitArrPtr->set(k);
724  BitArrPtr->set(k + 1);
725  }
726  if (accep == 1) { //code 01
727  BitArrPtr->set(k);
728  BitArrPtr->set(k + 1);
729  BitArrPtr->set(k + 2);
730  }
731  if (accep == 2) { //code 10
732  if (k > 1)
733  BitArrPtr->set(k - 2);
734  if (k >= 1)
735  BitArrPtr->set(k - 1);
736  BitArrPtr->set(k);
737  }
738  if (accep == 3) { //code 11
739  if (k > 1)
740  BitArrPtr->set(k - 2);
741  if (k >= 1)
742  BitArrPtr->set(k - 1);
743  BitArrPtr->set(k);
744  BitArrPtr->set(k + 1);
745  BitArrPtr->set(k + 2);
746  }
747  }
748 
749  if (config()->debug() > 4)
750  cout << "DTBtiChip::acceptMask -> END " << endl;
751 }
#define debug
Definition: HDRShower.cc:19
tuple cout
Definition: gather_cfg.py:144
DTConfigBti * config() const
Configuration set.
Definition: DTBtiChip.h:119
void set(const int i)
Definition: BitArray.h:224
void DTBtiChip::add_digi ( int  cell,
const DTDigi digi 
)

Add a digi to the DTBtiChip.

Definition at line 212 of file DTBtiChip.cc.

References _busyStart_clock, _digis, _geom, _id, DTBtiHit::_stepTimeTdc, DTBtiId::bti(), config(), DTDigi::countsTDC(), gather_cfg::cout, DTConfigBti::DEADpar(), debug, DTTrigGeom::nCell(), DTDigi::print(), and superlayer().

Referenced by DTBtiCard::loadBTI().

212  {
213  if (_id.bti() < 1 || _id.bti() > _geom->nCell(superlayer()))
214  return;
215  if (cell < 1 || cell > 9) {
216  cout << "DTBtiChip::add_digi : wrong cell number: " << cell;
217  cout << ". Digi not added!" << endl;
218  return;
219  }
220 
221  int DEAD = config()->DEADpar();
222  float stepTimeTdc = DTBtiHit::_stepTimeTdc;
223 
224  if (int(digi->countsTDC() / stepTimeTdc) - _busyStart_clock[cell - 1] > DEAD) {
225  _busyStart_clock[cell - 1] = int(digi->countsTDC() / stepTimeTdc);
226  _digis[cell - 1].push_back(digi);
227 
228  // debugging
229  if (config()->debug() > 1) {
230  cout << "DTBtiChip::add_digi: DTBtiChip # " << _id.bti() << " cell " << cell
231  << " --> drift time (tdc units)= " << digi->countsTDC() << endl;
232  digi->print();
233  }
234  } else {
235  // debugging
236  if (config()->debug() > 1)
237  cout << "DTBtiChip::add_digi: DTBtiChip # " << _id.bti() << " cell " << cell
238  << " in dead time -> digi not added! " << endl;
239  }
240 }
DTBtiId _id
Definition: DTBtiChip.h:176
int superlayer() const
Return superlayer.
Definition: DTBtiChip.h:92
int DEADpar() const
Wire DEAD time parameter.
Definition: DTConfigBti.h:122
std::array< std::vector< const DTDigi * >, 9 > _digis
Definition: DTBtiChip.h:179
void print() const
Print content of digi.
Definition: DTDigi.cc:49
static const float _stepTimeTdc
Definition: DTBtiHit.h:110
DTTrigGeom * _geom
Definition: DTBtiChip.h:173
std::array< int, 9 > _busyStart_clock
Definition: DTBtiChip.h:210
int bti() const
Returns the bti.
Definition: DTBtiId.h:63
#define debug
Definition: HDRShower.cc:19
tuple cout
Definition: gather_cfg.py:144
DTConfigBti * config() const
Configuration set.
Definition: DTBtiChip.h:119
int32_t countsTDC() const
Get raw TDC count.
Definition: DTDigi.cc:39
int nCell(int sl) const
Number of BTIs in a required superlayer (i.e. nCells in lay 1)
Definition: DTTrigGeom.h:88
void DTBtiChip::add_digi_clock ( int  cell,
int  clock_digi 
)

Add a clock digi to the DTBtiChip.

Definition at line 242 of file DTBtiChip.cc.

References _busyStart_clock, _digis_clock, config(), gather_cfg::cout, DTConfigBti::DEADpar(), debug, and number().

242  {
243  if (cell < 1 || cell > 9) {
244  cout << "DTBtiChip::add_digi_clock : wrong cell number: " << cell;
245  cout << ". Digi not added!" << endl;
246  return;
247  }
248 
249  int DEAD = config()->DEADpar();
250 
251  if (digi - _busyStart_clock[cell - 1] > DEAD) {
252  _busyStart_clock[cell - 1] = digi;
253  _digis_clock[cell - 1].push_back(digi);
254  // debugging
255  if (config()->debug() > 1)
256  cout << "DTBtiChip::add_digi_clock: DTBtiChip # " << number() << " cell " << cell << " --> clock time = " << digi
257  << endl;
258  } else {
259  // debugging
260  if (config()->debug() > 1)
261  cout << "DTBtiChip::add_digi_clock: DTBtiChip # " << number() << " cell " << cell
262  << " in dead time -> digi not added! " << endl;
263  }
264 }
int DEADpar() const
Wire DEAD time parameter.
Definition: DTConfigBti.h:122
std::array< int, 9 > _busyStart_clock
Definition: DTBtiChip.h:210
std::array< std::vector< int >, 9 > _digis_clock
Definition: DTBtiChip.h:181
int number() const
Return DTBtiChip number.
Definition: DTBtiChip.h:89
#define debug
Definition: HDRShower.cc:19
tuple cout
Definition: gather_cfg.py:144
DTConfigBti * config() const
Configuration set.
Definition: DTBtiChip.h:119
void DTBtiChip::addTrig ( int  step,
std::unique_ptr< DTBtiTrig btitrig 
)

Add a DTBtiChip trigger (normally used by DTBtiChip itself - may be used for debugging by other classes)

Definition at line 314 of file DTBtiChip.cc.

References _trigs, config(), gather_cfg::cout, debug, eostools::move(), DTConfig::NSTEPF, and DTConfig::NSTEPL.

Referenced by store(), and DTBtiCard::storeTrigger().

314  {
316  if (config()->debug() > 3)
317  cout << "DTBtiChip: adding trigger..." << endl;
318  _trigs[step - DTConfig::NSTEPF].emplace_back(std::move(btitrig));
319  } else {
320  if (config()->debug() > 3) {
321  cout << "DTBtiChip::addTrig: step " << step;
322  cout << " outside range. Trigger not added" << endl;
323  }
324  }
325 }
std::array< std::vector< std::unique_ptr< DTBtiTrig > >, DTConfig::NSTEPL-DTConfig::NSTEPF+1 > _trigs
Definition: DTBtiChip.h:184
static const int NSTEPF
Definition: DTConfig.h:35
def move
Definition: eostools.py:511
static const int NSTEPL
Constants: first and last step to start trigger finding.
Definition: DTConfig.h:35
#define debug
Definition: HDRShower.cc:19
tuple cout
Definition: gather_cfg.py:144
step
Definition: StallMonitor.cc:98
DTConfigBti * config() const
Configuration set.
Definition: DTBtiChip.h:119
void DTBtiChip::clear ( void  )

delete hits and triggers

Definition at line 388 of file DTBtiChip.cc.

References _digis, _digis_clock, _hits, _trigs, c, config(), gather_cfg::cout, ztail::d, debug, h, and submitPVValidationJobs::t.

Referenced by ~DTBtiChip().

388  {
389  if (config()->debug() > 3)
390  cout << "DTBtiChip::clear()" << endl;
391 
392  for (auto& d : _digis) {
393  d.clear();
394  }
395  for (auto& c : _digis_clock) {
396  c.clear();
397  }
398  for (auto& h : _hits) {
399  h.clear();
400  }
401 
402  for (auto& t : _trigs) {
403  t.clear();
404  }
405 }
const edm::EventSetup & c
std::array< std::vector< std::unique_ptr< DTBtiTrig > >, DTConfig::NSTEPL-DTConfig::NSTEPF+1 > _trigs
Definition: DTBtiChip.h:184
std::array< std::vector< const DTDigi * >, 9 > _digis
Definition: DTBtiChip.h:179
tuple d
Definition: ztail.py:151
std::array< std::vector< int >, 9 > _digis_clock
Definition: DTBtiChip.h:181
std::array< std::vector< DTBtiHit * >, 9 > _hits
Definition: DTBtiChip.h:188
#define debug
Definition: HDRShower.cc:19
tuple cout
Definition: gather_cfg.py:144
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
DTConfigBti * config() const
Configuration set.
Definition: DTBtiChip.h:119
GlobalPoint DTBtiChip::CMSPosition ( ) const
inline

Position in CMS frame.

Definition at line 98 of file DTBtiChip.h.

References _geom, _id, and DTTrigGeom::CMSPosition().

Referenced by DTBtiChip().

98 { return _geom->CMSPosition(_id); }
DTBtiId _id
Definition: DTBtiChip.h:176
DTTrigGeom * _geom
Definition: DTBtiChip.h:173
GlobalPoint CMSPosition(const DTBtiId obj) const
CMS position of a BTI.
Definition: DTTrigGeom.h:177
void DTBtiChip::computeEqs ( )
private

Definition at line 134 of file DTBtiChipEquations.cc.

References SplitLinear::begin, submitPVResolutionJobs::config, gather_cfg::cout, relativeConstraints::empty, mps_fire::i, and dqmiolumiharvest::j.

Referenced by run().

134  {
135  //
136  // Compute all K and X equations of DTBtiChip algorithm
137  // NB now Keq=Kman
138 
139  float K0 = config()->ST();
140  //cout <<"K0="<<K0<<endl;
141 
142  //enabled patterns....
143  int PTMS[32];
144  for (int i = 0; i < 32; i++) {
145  PTMS[i] = config()->PTMSflag(i);
146  }
147 
148  int i;
149  // redundant patterns added by Sara Vanini
150  i = 0; // 1324A --> 1L3L2R4L
151  if (PTMS[i]) {
152  _Keq[i][0] = _difs[1] + 2. * K0; //eq. AB
153  _Keq[i][1] = -_sums[5] + 2. * K0; //eq. BC
154  _Keq[i][2] = _sums[6]; //eq. CD
155  _Keq[i][3] = -(_sums[0] / 2.) + 2. * K0 + 0.01; //eq. AC
156  _Keq[i][4] = (_difs[8] / 2.) + K0 + 0.01; //eq. BD
157  //_Keq[i][5] = (_difs[2]/3.) + 4.*K0/3. + 0.51; //eq. AD
158  _Keq[i][5] = ST43 + reSum(RE43, int(fmod(double(_difs[2]), 3.))) + int((double(_difs[2]) / 3.)); //eq. AD
159 
160  //patt 0 always uses Xbc, because Xad could be negative...
161  //when wire B is missing, TshiftB=0
162  //when hit B is gone out of shift register, Tshift=K0+1
163  float _difs_p0 = _difs[5];
164 
165  float TshiftB = 0;
166  float TshiftC = 0;
167  if (_thisStepUsedHit[3 - 1] == nullptr) {
168  if (_hits[3 - 1].empty())
169  TshiftB = 0;
170  if (!_hits[3 - 1].empty() && (*(_hits[3 - 1].begin()))->clockTime() <= -K0)
171  TshiftB = K0 + 1;
172  } else
173  TshiftB = _thisStepUsedHit[3 - 1]->jtrig();
174 
175  if (_thisStepUsedHit[2 - 1] == nullptr) {
176  if (_hits[2 - 1].empty())
177  TshiftC = 0;
178  if (!_hits[2 - 1].empty() && (*(_hits[2 - 1].begin()))->clockTime() <= -K0)
179  TshiftC = K0 + 1;
180  } else
181  TshiftC = _thisStepUsedHit[2 - 1]->jtrig();
182 
183  _difs_p0 = (float)(TshiftB - TshiftC);
184 
185  // Zotto's
186  _XeqAB_patt0 = (_sums[1] - K0) / 4.; //eq. AB
187  _Xeq[i][0] = (_difs_p0 + K0) / 4.; //eq. BC
188  _XeqCD_patt0 = (_difs[6] + K0) / 4.; //eq. CD
189  _XeqAC_patt0 = -(_difs[0]) / 4.; //eq. AC
190  _XeqBD_patt0 = (_sums[8]) / 4.; //eq. BD
191  _Xeq[i][1] = (_sums[2] - K0) / 4.; //eq. AD
192 
193  /*
194 // my eq
195  _XeqAB_patt0 = (_sums[1] - K0) / 4.; //eq. AB
196  _Xeq[i][0] = (_difs[5] + K0) / 4.; //eq. BC
197  _XeqCD_patt0 = (_difs[6] + K0) / 4.; //eq. CD
198  _XeqAC_patt0 = -(_difs[0]) / 4.; //eq. AC
199  _XeqBD_patt0 = (_sums[8]) / 4.; //eq. BD
200  _Xeq[i][1] = (_sums[2] - K0) / 4.; //eq. AD
201 */
202  }
203 
204  i = 1; // 1324B --> 1L3L2R4R
205  if (PTMS[i]) {
206  _Keq[i][0] = _difs[1] + 2. * K0;
207  _Keq[i][1] = -(_sums[5]) + 2. * K0;
208  _Keq[i][2] = -_difs[6] + 2. * K0;
209  _Keq[i][3] = -(_sums[0] / 2.) + 2. * K0 + 0.01;
210  _Keq[i][4] = -(_sums[8] / 2.) + 2. * K0 + 0.01;
211  //_Keq[i][5] = -(_sums[2]/3.) + 2.*K0 + 0.51;
212  _Keq[i][5] = ST2 + reSum23(0, int(fmod(double(-_sums[2]), 3.))) + int((double(-_sums[2]) / 3.));
213 
214  _Xeq[i][0] = (_difs[5] + K0) / 4.;
215  _Xeq[i][1] = (-_difs[2] + K0) / 4.;
216  }
217 
218  i = 2; // 1324C --> 1R3L2R4L
219  if (PTMS[i]) {
220  _Keq[i][0] = _sums[1];
221  _Keq[i][1] = -_sums[5] + 2. * K0;
222  _Keq[i][2] = _sums[6];
223  _Keq[i][3] = -(_difs[0] / 2.) + K0 + 0.01;
224  _Keq[i][4] = (_difs[8] / 2.) + K0 + 0.01;
225  //_Keq[i][5] = (_sums[2]/3.) + 2.*K0/3. + 0.51;
226  _Keq[i][5] = ST23 + reSum23(RE23, int(fmod(double(_sums[2]), 3.))) + int((double(_sums[2]) / 3.)); //eq. AD
227  /*
228 cout << "ST23 =" << ST23 << endl;
229 cout << "RE23 =" << RE23 << endl;
230 cout << "fmod(double(_sums[2]),3.) =" << fmod(double(_sums[2]),3.) << endl;
231 cout << "reSum23 = "<< reSum23( RE23 , fmod(double(_sums[2]),3.) ) << endl;
232 cout << "double(_sums[2])/3.="<<double(_sums[2])/3.<< endl;
233 cout << "int('') = " << int( (double(_sums[2])/3.) ) << endl;
234 */
235  _Xeq[i][0] = (_difs[5] + K0) / 4.;
236  _Xeq[i][1] = (_difs[2] + K0) / 4.;
237  }
238 
239  i = 3; // 1324D --> 1R3L2R4R
240  if (PTMS[i]) {
241  _Keq[i][0] = _sums[1];
242  _Keq[i][1] = -_sums[5] + 2. * K0;
243  _Keq[i][2] = -_difs[6] + 2. * K0;
244  _Keq[i][3] = -(_difs[0] / 2.) + K0 + 0.01;
245  _Keq[i][4] = -(_sums[8] / 2.) + 2. * K0 + 0.01;
246  //_Keq[i][5] = -(_difs[2]/3.) + 4.*K0/3.;
247  _Keq[i][5] = ST43 + reSum(RE43, int(fmod(double(-_difs[2]), 3.))) + int((double(-_difs[2]) / 3.)); //eq. AD
248 
249  _Xeq[i][0] = (_difs[5] + K0) / 4.;
250  _Xeq[i][1] = (-_sums[2] + 3. * K0) / 4.;
251  }
252 
253  i = 4; // i = DTBtiChipEQMAP->index("1364A"); --> 1L3L6L4R
254  if (PTMS[i]) {
255  _Keq[i][0] = _difs[1] + 2. * K0;
256  _Keq[i][1] = _difs[10] + 2. * K0;
257  _Keq[i][2] = -(_sums[13]) + 2. * K0;
258  _Keq[i][3] = (_difs[3] / 2.) + 2. * K0 + 0.01;
259  _Keq[i][4] = -(_sums[8] / 2.) + 2. * K0 + 0.01;
260  //_Keq[i][5] = -(_sums[2]/3.) + 2.*K0 + 0.51;
261  _Keq[i][5] = ST2 + reSum23(0, int(fmod(double(-_sums[2]), 3.))) + int((double(-_sums[2]) / 3.));
262 
263  _Xeq[i][0] = (_sums[10] + K0) / 4.;
264  _Xeq[i][1] = (-_difs[2] + K0) / 4.;
265  }
266 
267  i = 5; // i = DTBtiChipEQMAP->index("1364B"); --> 1R3L6L4R
268  if (PTMS[i]) {
269  _Keq[i][0] = _sums[1];
270  _Keq[i][1] = _difs[10] + 2. * K0;
271  _Keq[i][2] = -_sums[13] + 2. * K0;
272  _Keq[i][3] = (_sums[3] / 2.) + K0 + 0.01;
273  _Keq[i][4] = -(_sums[8] / 2.) + 2. * K0 + 0.01;
274  //_Keq[i][5] = -(_difs[2]/3.) + 4.*K0/3.;
275  _Keq[i][5] = ST43 + reSum(RE43, int(fmod(double(-_difs[2]), 3.))) + int((double(-_difs[2]) / 3.)); //eq. AD
276 
277  _Xeq[i][0] = (_sums[10] + K0) / 4.;
278  _Xeq[i][1] = (-_sums[2] + 3. * K0) / 4.;
279  }
280 
281  i = 6; // i = DTBtiChipEQMAP->index("1364C"); --> 1R3R6L4R
282  if (PTMS[i]) {
283  _Keq[i][0] = -_difs[1] + 2. * K0;
284  _Keq[i][1] = _sums[10];
285  _Keq[i][2] = -_sums[13] + 2. * K0;
286  _Keq[i][3] = (_sums[3] / 2.) + K0 + 0.01;
287  _Keq[i][4] = -(_difs[8] / 2.) + K0 + 0.01;
288  //_Keq[i][5] = -(_difs[2]/3.) + 4.*K0/3.;
289  _Keq[i][5] = ST43 + reSum(RE43, int(fmod(double(-_difs[2]), 3.))) + int((double(-_difs[2]) / 3.)); //eq. AD
290 
291  _Xeq[i][0] = (_difs[10] + 3. * K0) / 4.;
292  _Xeq[i][1] = (-_sums[2] + 3. * K0) / 4.;
293  }
294 
295  i = 7; // i = DTBtiChipEQMAP->index("1368A"); --> 1R3R6L8L
296  if (PTMS[i]) {
297  _Keq[i][0] = -_difs[1] + 2. * K0;
298  _Keq[i][1] = (_sums[10]);
299  _Keq[i][2] = _difs[20] + 2. * K0;
300  _Keq[i][3] = (_sums[3] / 2.) + K0 + 0.01;
301  _Keq[i][4] = (_sums[11] / 2.) + K0 + 0.01;
302  //_Keq[i][5] = (_sums[4]/3.) + 4.*K0/3. + 0.51;
303  _Keq[i][5] = ST43 + reSum(RE43, int(fmod(double(_sums[4]), 3.))) + int((double(_sums[4]) / 3.)); //eq. AD
304 
305  _Xeq[i][0] = (_difs[10] + 3. * K0) / 4.;
306  _Xeq[i][1] = (_difs[4] + 3. * K0) / 4.;
307  }
308 
309  i = 8; // i = DTBtiChipEQMAP->index("1368B"); --> 1R3R6R8L
310  if (PTMS[i]) {
311  _Keq[i][0] = -_difs[1] + 2. * K0;
312  _Keq[i][1] = -_difs[10] + 2. * K0;
313  _Keq[i][2] = (_sums[20]);
314  _Keq[i][3] = -(_difs[3] / 2.) + 2. * K0 + 0.01;
315  _Keq[i][4] = (_sums[11] / 2.) + K0 + 0.01;
316  //_Keq[i][5] = (_sums[4]/3.) + 4.*K0/3.;
317  _Keq[i][5] = ST43 + reSum(RE43, int(fmod(double(_sums[4]), 3.))) + int((double(_sums[4]) / 3.)); //eq. AD
318 
319  _Xeq[i][0] = (-_sums[10] + 5. * K0) / 4.;
320  _Xeq[i][1] = (_difs[4] + 3. * K0) / 4.;
321  }
322 
323  i = 9; // i = DTBtiChipEQMAP->index("1368C"); --> 1R3L6L8L
324  if (PTMS[i]) {
325  _Keq[i][0] = (_sums[1]);
326  _Keq[i][1] = _difs[10] + 2. * K0;
327  _Keq[i][2] = _difs[20] + 2. * K0;
328  _Keq[i][3] = (_sums[3] / 2.) + K0 + 0.01;
329  _Keq[i][4] = (_difs[11] / 2.) + 2. * K0 + 0.01;
330  //_Keq[i][5] = (_sums[4]/3.) + 4.*K0/3.;
331  _Keq[i][5] = ST43 + reSum(RE43, int(fmod(double(_sums[4]), 3.))) + int((double(_sums[4]) / 3.)); //eq. AD
332 
333  _Xeq[i][0] = (_sums[10] + K0) / 4.;
334  _Xeq[i][1] = (_difs[4] + 3. * K0) / 4.;
335  }
336 
337  i = 10; // i = DTBtiChipEQMAP->index("5324A"); --> 5L3L2R4L
338  if (PTMS[i]) {
339  _Keq[i][0] = -_difs[9];
340  _Keq[i][1] = -_sums[5] + 2. * K0;
341  _Keq[i][2] = _sums[6];
342  _Keq[i][3] = -(_sums[7] / 2.) + K0 + 0.01;
343  _Keq[i][4] = (_difs[8] / 2.) + K0 + 0.01;
344  //_Keq[i][5] = -(_difs[12]/3.) + 2.*K0/3.;
345  _Keq[i][5] = ST23 + reSum23(RE23, int(fmod(double(-_difs[12]), 3.))) + int((double(-_difs[12]) / 3.)); //eq. AD
346 
347  _Xeq[i][0] = (_difs[5] + K0) / 4.;
348  _Xeq[i][1] = (_sums[12] + K0) / 4.;
349  }
350 
351  i = 11; // i = DTBtiChipEQMAP->index("5324B"); --> 5L3R2R4L
352  if (PTMS[i]) {
353  _Keq[i][0] = -_sums[9] + 2. * K0;
354  _Keq[i][1] = _difs[5];
355  _Keq[i][2] = _sums[6];
356  _Keq[i][3] = -(_sums[7] / 2.) + K0 + 0.01;
357  _Keq[i][4] = (_sums[8] / 2. + 0.01);
358  //_Keq[i][5] = -(_difs[12]/3.) + 2.*K0/3.;
359  _Keq[i][5] = ST23 + reSum23(RE23, int(fmod(double(-_difs[12]), 3.))) + int((double(-_difs[12]) / 3.)); //eq. AD
360 
361  _Xeq[i][0] = (-_sums[5] + 3. * K0) / 4.;
362  _Xeq[i][1] = (_sums[12] + K0) / 4.;
363  }
364 
365  i = 12; // i = DTBtiChipEQMAP->index("5324C"); --> 5R3R2R4L
366  if (PTMS[i]) {
367  _Keq[i][0] = _difs[9];
368  _Keq[i][1] = _difs[5];
369  _Keq[i][2] = (_sums[6]);
370  _Keq[i][3] = (_difs[7] / 2.) + 0.01;
371  _Keq[i][4] = (_sums[8] / 2.) + 0.01;
372  _Keq[i][5] = (_sums[12] / 3.) + 0.51;
373 
374  _Xeq[i][0] = (-_sums[5] + 3. * K0) / 4.;
375  _Xeq[i][1] = (-_difs[12] + 3. * K0) / 4.;
376  }
377 
378  i = 13; // i = DTBtiChipEQMAP->index("5364A"); --> 5L3R6L4L
379  if (PTMS[i]) {
380  _Keq[i][0] = -_sums[9] + 2. * K0;
381  _Keq[i][1] = _sums[10];
382  _Keq[i][2] = -_difs[13];
383  _Keq[i][3] = (_difs[16] / 2.) + K0 + 0.01;
384  _Keq[i][4] = (_sums[8] / 2. + 0.01);
385  //_Keq[i][5] = -(_difs[12]/3.) + 2.*K0/3.;
386  _Keq[i][5] = ST23 + reSum23(RE23, int(fmod(double(-_difs[12]), 3.))) + int((double(-_difs[12]) / 3.)); //eq. AD
387 
388  _Xeq[i][0] = (_difs[10] + 3. * K0) / 4.;
389  _Xeq[i][1] = (_sums[12] + K0) / 4.;
390  }
391 
392  i = 14; // i = DTBtiChipEQMAP->index("5364B"); --> 5L3R6L4R
393  if (PTMS[i]) {
394  _Keq[i][0] = -_sums[9] + 2. * K0;
395  _Keq[i][1] = _sums[10];
396  _Keq[i][2] = -_sums[13] + 2. * K0;
397  _Keq[i][3] = (_difs[16] / 2.) + K0 + 0.01;
398  _Keq[i][4] = -(_difs[8] / 2.) + K0 + 0.01;
399  //_Keq[i][5] = -(_sums[12]/3.) + 4.*K0/3.;
400  _Keq[i][5] = ST43 + reSum(RE43, int(fmod(double(-_sums[12]), 3.))) + int((double(-_sums[12]) / 3.));
401 
402  _Xeq[i][0] = (_difs[10] + 3. * K0) / 4.;
403  _Xeq[i][1] = (_difs[12] + 3. * K0) / 4.;
404  }
405 
406  i = 15; // i = DTBtiChipEQMAP->index("5364C"); --> 5R3R6L4L
407  if (PTMS[i]) {
408  _Keq[i][0] = _difs[9];
409  _Keq[i][1] = (_sums[10]);
410  _Keq[i][2] = -_difs[13];
411  _Keq[i][3] = (_sums[16] / 2. + 0.01);
412  _Keq[i][4] = (_sums[8] / 2. + 0.01);
413  _Keq[i][5] = (_sums[12] / 3.) + 0.51;
414 
415  _Xeq[i][0] = (_difs[10] + 3. * K0) / 4.;
416  _Xeq[i][1] = (-_difs[12] + 3. * K0) / 4.;
417  }
418 
419  i = 16; // i = DTBtiChipEQMAP->index("5364D"); --> 5R3R6L4R
420  if (PTMS[i]) {
421  _Keq[i][0] = _difs[9];
422  _Keq[i][1] = _sums[10];
423  _Keq[i][2] = -_sums[13] + 2. * K0;
424  _Keq[i][3] = (_sums[16] / 2. + 0.01);
425  _Keq[i][4] = -(_difs[8] / 2.) + K0 + 0.01;
426  //_Keq[i][5] = (_difs[12]/3.) + 2.*K0/3.;
427  _Keq[i][5] = ST23 + reSum23(RE23, int(fmod(double(_difs[12]), 3.))) + int((double(_difs[12]) / 3.)); //eq. AD
428 
429  _Xeq[i][0] = (_difs[10] + 3. * K0) / 4.;
430  _Xeq[i][1] = (-_sums[12] + 5. * K0) / 4.;
431  }
432 
433  i = 17; // i = DTBtiChipEQMAP->index("5368A"); --> 5L3R6L8L
434  if (PTMS[i]) {
435  _Keq[i][0] = -_sums[9] + 2. * K0;
436  _Keq[i][1] = _sums[10];
437  _Keq[i][2] = _difs[20] + 2. * K0;
438  _Keq[i][3] = (_difs[16] / 2.) + K0 + 0.01;
439  _Keq[i][4] = (_sums[11] / 2.) + K0 + 0.01;
440  //_Keq[i][5] = (_difs[18]/3.) + 4.*K0/3.;
441  _Keq[i][5] = ST43 + reSum(RE43, int(fmod(double(_difs[18]), 3.))) + int((double(_difs[18]) / 3.)); //eq. AD
442 
443  _Xeq[i][0] = (_difs[10] + 3. * K0) / 4.;
444  _Xeq[i][1] = (_sums[18] + 3. * K0) / 4.;
445  }
446 
447  i = 18; // i = DTBtiChipEQMAP->index("5368B"); --> 5L3R6R8L
448  if (PTMS[i]) {
449  _Keq[i][0] = -_sums[9] + 2. * K0;
450  _Keq[i][1] = -_difs[10] + 2. * K0;
451  _Keq[i][2] = _sums[20];
452  _Keq[i][3] = -(_sums[16] / 2.) + 2. * K0 + 0.01;
453  _Keq[i][4] = (_sums[11] / 2.) + K0 + 0.01;
454  //_Keq[i][5] = (_difs[18]/3.) + 4.*K0/3.;
455  _Keq[i][5] = ST43 + reSum(RE43, int(fmod(double(_difs[18]), 3.))) + int((double(_difs[18]) / 3.)); //eq. AD
456 
457  _Xeq[i][0] = (-_sums[10] + 5. * K0) / 4.;
458  _Xeq[i][1] = (_sums[18] + 3. * K0) / 4.;
459  }
460 
461  i = 19; // i = DTBtiChipEQMAP->index("5368C"); --> 5L3R6R8R
462  if (PTMS[i]) {
463  _Keq[i][0] = -(_sums[9]) + 2. * K0;
464  _Keq[i][1] = -_difs[10] + 2. * K0;
465  _Keq[i][2] = -_difs[20] + 2. * K0;
466  _Keq[i][3] = -(_sums[16] / 2.) + 2. * K0 + 0.01;
467  _Keq[i][4] = -(_difs[11] / 2.) + 2. * K0 + 0.01;
468  //_Keq[i][5] = -(_sums[18]/3.) + 2.*K0 + 0.51;
469  _Keq[i][5] = ST2 + reSum23(0, int(fmod(double(-_sums[18]), 3.))) + int((double(-_sums[18]) / 3.));
470 
471  _Xeq[i][0] = (-_sums[10] + 5. * K0) / 4.;
472  _Xeq[i][1] = (-_difs[18] + 5. * K0) / 4.;
473  }
474 
475  i = 20; // i = DTBtiChipEQMAP->index("5764A"); --> 5R7L6L4R
476  if (PTMS[i]) {
477  _Keq[i][0] = _sums[17];
478  _Keq[i][1] = -_difs[19];
479  _Keq[i][2] = -_sums[13] + 2. * K0;
480  _Keq[i][3] = (_sums[16] / 2. + 0.01);
481  _Keq[i][4] = -(_sums[14] / 2.) + K0 + 0.01;
482  //_Keq[i][5] = (_difs[12]/3.) + 2.*K0/3.;
483  _Keq[i][5] = ST23 + reSum23(RE23, int(fmod(double(_difs[12]), 3.))) + int((double(_difs[12]) / 3.)); //eq. AD
484 
485  _Xeq[i][0] = (_sums[19] + 3. * K0) / 4.;
486  _Xeq[i][1] = (-_sums[12] + 5. * K0) / 4.;
487  }
488 
489  i = 21; // i = DTBtiChipEQMAP->index("5764B"); --> 5R7L6R4R
490  if (PTMS[i]) {
491  _Keq[i][0] = _sums[17];
492  _Keq[i][1] = -_sums[19] + 2. * K0;
493  _Keq[i][2] = _difs[13];
494  _Keq[i][3] = -(_difs[16] / 2.) + K0 + 0.01;
495  _Keq[i][4] = -(_sums[14] / 2.) + K0 + 0.01;
496  //_Keq[i][5] = (_difs[12]/3.) + 2.*K0/3.;
497  _Keq[i][5] = ST23 + reSum23(RE23, int(fmod(double(_difs[12]), 3.))) + int((double(_difs[12]) / 3.)); //eq. AD
498 
499  _Xeq[i][0] = (_difs[19] + 5. * K0) / 4.;
500  _Xeq[i][1] = (-_sums[12] + 5. * K0) / 4.;
501  }
502 
503  i = 22; // i = DTBtiChipEQMAP->index("5764C"); --> 5R7L6L4L
504  if (PTMS[i]) {
505  _Keq[i][0] = (_sums[17]);
506  _Keq[i][1] = -_difs[19];
507  _Keq[i][2] = -_difs[13];
508  _Keq[i][3] = (_sums[16] / 2. + 0.01);
509  _Keq[i][4] = -(_difs[14] / 2.) + 0.01;
510  _Keq[i][5] = (_sums[12] / 3.) + 0.51;
511 
512  _Xeq[i][0] = (_sums[19] + 3. * K0) / 4.;
513  _Xeq[i][1] = (-_difs[12] + 3. * K0) / 4.;
514  }
515 
516  i = 23; // i = DTBtiChipEQMAP->index("9764A"); --> 9L7L6L4R
517  if (PTMS[i]) {
518  _Keq[i][0] = -_difs[23];
519  _Keq[i][1] = -_difs[19];
520  _Keq[i][2] = -(_sums[13]) + 2. * K0;
521  _Keq[i][3] = -(_difs[21] / 2.) + 0.01;
522  _Keq[i][4] = -(_sums[14] / 2.) + K0 + 0.01;
523  //_Keq[i][5] = -(_sums[15]/3.) + 2.*K0/3.;
524  _Keq[i][5] = ST23 + reSum23(RE23, int(fmod(double(-_sums[15]), 3.))) + int((double(-_sums[15]) / 3.)); //eq. AD
525 
526  _Xeq[i][0] = (_sums[19] + 3. * K0) / 4.;
527  _Xeq[i][1] = (_difs[15] + 5. * K0) / 4.;
528  }
529 
530  i = 24; // i = DTBtiChipEQMAP->index("9764B"); --> 9L7L6R4R
531  if (PTMS[i]) {
532  _Keq[i][0] = -_difs[23];
533  _Keq[i][1] = -(_sums[19]) + 2. * K0;
534  _Keq[i][2] = _difs[13];
535  _Keq[i][3] = -(_sums[21] / 2.) + K0 + 0.01;
536  _Keq[i][4] = -(_sums[14] / 2.) + K0 + 0.01;
537  //_Keq[i][5] = -(_sums[15]/3.) + 2.*K0/3.;
538  _Keq[i][5] = ST23 + reSum23(RE23, int(fmod(double(-_sums[15]), 3.))) + int((double(-_sums[15]) / 3.)); //eq. AD
539 
540  _Xeq[i][0] = (_difs[19] + 5. * K0) / 4.;
541  _Xeq[i][1] = (_difs[15] + 5. * K0) / 4.;
542  }
543 
544  i = 25; // i = DTBtiChipEQMAP->index("9764C"); --> 9L7R6R4R
545  if (PTMS[i]) {
546  _Keq[i][0] = -(_sums[23]) + 2. * K0;
547  _Keq[i][1] = _difs[19];
548  _Keq[i][2] = _difs[13];
549  _Keq[i][3] = -(_sums[21] / 2.) + K0 + 0.01;
550  _Keq[i][4] = (_difs[14] / 2.) + 0.01;
551  //_Keq[i][5] = -(_sums[15]/3.) + 2.*K0/3.;
552  _Keq[i][5] = ST23 + reSum23(RE23, int(fmod(double(-_sums[15]), 3.))) + int((double(-_sums[15]) / 3.)); //eq. AD
553 
554  _Xeq[i][0] = (-_sums[19] + 7. * K0) / 4.;
555  _Xeq[i][1] = (_difs[15] + 5. * K0) / 4.;
556  }
557 
558  i = 26; // int i = DTBtiChipEQMAP->index("5768A") --> 5L7L6R8L
559  if (PTMS[i]) {
560  _Keq[i][0] = _difs[17] + 2. * K0;
561  _Keq[i][1] = -_sums[19] + 2. * K0;
562  _Keq[i][2] = _sums[20];
563  _Keq[i][3] = -(_sums[16] / 2.) + 2. * K0 + 0.01;
564  _Keq[i][4] = (_difs[22] / 2.) + K0 + 0.01;
565  //_Keq[i][5] = (_difs[18]/3.) + 4.*K0/3.;
566  _Keq[i][5] = ST43 + reSum(RE43, int(fmod(double(_difs[18]), 3.))) + int((double(_difs[18]) / 3.)); //eq. AD
567 
568  _Xeq[i][0] = (_difs[19] + 5. * K0) / 4.;
569  _Xeq[i][1] = (_sums[18] + 3. * K0) / 4.;
570  }
571 
572  i = 27; // i = DTBtiChipEQMAP->index("5768B"); --> 5L7L6R8R
573  if (PTMS[i]) {
574  _Keq[i][0] = _difs[17] + 2. * K0;
575  _Keq[i][1] = -(_sums[19]) + 2. * K0;
576  _Keq[i][2] = -_difs[20] + 2. * K0;
577  _Keq[i][3] = -(_sums[16] / 2.) + 2. * K0 + 0.01;
578  _Keq[i][4] = -(_sums[22] / 2.) + 2. * K0 + 0.01;
579  //_Keq[i][5] = -(_sums[18]/3.) + 2.*K0 + 0.51;
580  _Keq[i][5] = ST2 + reSum23(0, int(fmod(double(-_sums[18]), 3.))) + int((double(-_sums[18]) / 3.));
581 
582  _Xeq[i][0] = (_difs[19] + 5. * K0) / 4.;
583  _Xeq[i][1] = (-_difs[18] + 5. * K0) / 4.;
584  }
585 
586  i = 28; // i = DTBtiChipEQMAP->index("5768C"); --> 5R7L6R8L
587  if (PTMS[i]) {
588  _Keq[i][0] = _sums[17];
589  _Keq[i][1] = -_sums[19] + 2. * K0;
590  _Keq[i][2] = _sums[20];
591  _Keq[i][3] = -(_difs[16] / 2.) + K0 + 0.01;
592  _Keq[i][4] = (_difs[22] / 2.) + K0 + 0.01;
593  //_Keq[i][5] = (_sums[18]/3.) + 2.*K0/3.;
594  _Keq[i][5] = ST23 + reSum23(RE23, int(fmod(double(_sums[18]), 3.))) + int((double(_sums[18]) / 3.)); //eq. AD
595 
596  _Xeq[i][0] = (_difs[19] + 5. * K0) / 4.;
597  _Xeq[i][1] = (_difs[18] + 5. * K0) / 4.;
598  }
599 
600  i = 29; // i = DTBtiChipEQMAP->index("5768D"); --> 5R7L6R8R
601  if (PTMS[i]) {
602  _Keq[i][0] = _sums[17];
603  _Keq[i][1] = -_sums[19] + 2. * K0;
604  _Keq[i][2] = -_difs[20] + 2. * K0;
605  _Keq[i][3] = -(_difs[16] / 2.) + K0 + 0.01;
606  _Keq[i][4] = -(_sums[22] / 2.) + 2. * K0 + 0.01;
607  //_Keq[i][5] = -(_difs[18]/3.) + 4.*K0/3. ;
608  _Keq[i][5] = ST43 + reSum(RE43, int(fmod(double(-_difs[18]), 3.))) + int((double(-_difs[18]) / 3.)); //eq. AD
609 
610  _Xeq[i][0] = (_difs[19] + 5. * K0) / 4.;
611  _Xeq[i][1] = (-_sums[18] + 7. * K0) / 4.;
612  }
613 
614  i = 30; // 9768A --> 9L7L6R8L
615  if (PTMS[i]) {
616  _Keq[i][0] = -_difs[23];
617  _Keq[i][1] = -_sums[19] + 2. * K0;
618  _Keq[i][2] = _sums[20];
619  _Keq[i][3] = -(_sums[21] / 2.) + K0 + 0.01;
620  _Keq[i][4] = (_difs[22] / 2.) + K0 + 0.01;
621  //_Keq[i][5] = -(_difs[24]/3.) + 2.*K0/3. ;
622  _Keq[i][5] = ST23 + reSum23(RE23, int(fmod(double(-_difs[24]), 3.))) + int((double(-_difs[24]) / 3.)); //eq. AD
623 
624  _Xeq[i][0] = (_difs[19] + 5. * K0) / 4.;
625  _Xeq[i][1] = (_sums[24] + 5. * K0) / 4.;
626  }
627 
628  i = 31; // 9768B --> 9L7R6R8L
629  if (PTMS[i]) {
630  _Keq[i][0] = -_sums[23] + 2. * K0;
631  _Keq[i][1] = _difs[19];
632  _Keq[i][2] = _sums[20];
633  _Keq[i][3] = -(_sums[21] / 2.) + K0 + 0.01;
634  _Keq[i][4] = (_sums[22] / 2.) + 0.01;
635  //_Keq[i][5] = -(_difs[24]/3.) + 2.*K0/3.;
636  _Keq[i][5] = ST23 + reSum23(RE23, int(fmod(double(-_difs[24]), 3.))) + int((double(-_difs[24]) / 3.)); //eq. AD
637 
638  _Xeq[i][0] = (-_sums[19] + 7. * K0) / 4.;
639  _Xeq[i][1] = (_sums[24] + 5. * K0) / 4.;
640  }
641 
642  // debugging
643  if (config()->debug() > 3) {
644  cout << endl << " Step: " << currentStep() << endl;
645  for (i = 0; i < 32; i++) {
646  if (PTMS[i]) {
647  cout << "K Equation " << i << " --> ";
648  int j = 0;
649  for (j = 0; j < 6; j++) {
650  cout << _Keq[i][j] << " ";
651  }
652  cout << endl;
653  cout << "X Equation " << i << " --> ";
654  for (j = 0; j < 2; j++) {
655  cout << _Xeq[i][j] << " ";
656  }
657  if (i == 0) {
658  cout << _XeqAB_patt0 << " " << _XeqCD_patt0 << " ";
659  cout << _XeqAC_patt0 << " " << _XeqBD_patt0 << " ";
660  }
661  cout << endl;
662  }
663  }
664  }
665  // end debugging
666 }
int debug() const
Debug flag.
Definition: DTConfigBti.h:58
float _XeqBD_patt0
Definition: DTBtiChip.h:204
float _XeqCD_patt0
Definition: DTBtiChip.h:205
float ST() const
Max drift time in 12.5 ns steps.
Definition: DTConfigBti.h:61
std::array< float, 25 > _difs
Definition: DTBtiChip.h:192
float _Xeq[32][2]
Definition: DTBtiChip.h:194
int reSum(int a, int b)
Definition: DTBtiChip.h:166
std::array< DTBtiHit *, 9 > _thisStepUsedHit
Definition: DTBtiChip.h:190
int PTMSflag(int patt) const
Pattern mask flag.
Definition: DTConfigBti.h:94
int RE43
Definition: DTBtiChip.h:213
float _Keq[32][6]
Definition: DTBtiChip.h:193
int ST23
Definition: DTBtiChip.h:213
std::array< std::vector< DTBtiHit * >, 9 > _hits
Definition: DTBtiChip.h:188
int reSum23(int a, int b)
Definition: DTBtiChip.h:167
float _XeqAC_patt0
Definition: DTBtiChip.h:204
int currentStep() const
Definition: DTBtiChip.h:142
float _XeqAB_patt0
Definition: DTBtiChip.h:205
int RE23
Definition: DTBtiChip.h:213
std::array< float, 25 > _sums
Definition: DTBtiChip.h:192
tuple cout
Definition: gather_cfg.py:144
int ST43
Definition: DTBtiChip.h:213
DTConfigBti * config() const
Configuration set.
Definition: DTBtiChip.h:119
void DTBtiChip::computeSums ( )
private

Definition at line 38 of file DTBtiChipEquations.cc.

References submitPVResolutionJobs::config, gather_cfg::cout, and debug.

Referenced by run().

38  {
39  //
40  // compute all sums and diffs
41  // nothing more than a table...
42  // numbering convention here is the same as the fortran version:
43  // sum number in the range [1,25]
44  // cell numbers in the range [1,9]
45  // --> sum(int,int,int) decreases the indices by 1
46  // sum (sum_number, first_cell, second_cell)
47  //
48 
49  if (config()->debug() > 3) {
50  cout << "DTBtiChip::computeSums called" << endl;
51  }
52 
53  sum(1, 2, 1);
54  sum(2, 3, 1);
55  sum(3, 4, 1);
56  sum(4, 6, 1);
57  sum(5, 8, 1);
58  sum(6, 3, 2);
59  sum(7, 4, 2);
60  sum(8, 5, 2);
61  sum(9, 4, 3);
62  sum(10, 5, 3);
63  sum(11, 6, 3);
64  sum(12, 8, 3);
65  sum(13, 5, 4);
66  sum(14, 6, 4);
67  sum(15, 7, 4);
68  sum(16, 9, 4);
69  sum(17, 6, 5);
70  sum(18, 7, 5);
71  sum(19, 8, 5);
72  sum(20, 7, 6);
73  sum(21, 8, 6);
74  sum(22, 9, 6);
75  sum(23, 8, 7);
76  sum(24, 9, 7);
77  sum(25, 9, 8);
78 }
void sum(const int s, const int a, const int b)
#define debug
Definition: HDRShower.cc:19
tuple cout
Definition: gather_cfg.py:144
DTConfigBti * config() const
Configuration set.
Definition: DTBtiChip.h:119
DTConfigBti* DTBtiChip::config ( void  ) const
inline

Configuration set.

testing DTConfigBti

Definition at line 119 of file DTBtiChip.h.

References _config.

Referenced by add_digi(), add_digi_clock(), addTrig(), clear(), doLTS(), DTBtiChip(), init(), init_clock(), nCellHit(), run(), setSnap(), store(), tick(), and zMuMuValidation.ZMuMuValidation::trackcollection().

119 { return _config; }
DTConfigBti * _config
Definition: DTBtiChip.h:174
int DTBtiChip::currentIntStep ( ) const
inlineprivate

Definition at line 143 of file DTBtiChip.h.

References _curStep.

Referenced by run(), and tick().

143 { return _curStep; } // int. step (80MHz)
int _curStep
Definition: DTBtiChip.h:187
int DTBtiChip::currentStep ( ) const
inlineprivate

Definition at line 142 of file DTBtiChip.h.

References _curStep.

Referenced by run(), and store().

142 { return (int)(((float)(_curStep) + 0.5) / 2); }
int _curStep
Definition: DTBtiChip.h:187
void DTBtiChip::doLTS ( )
private

Definition at line 588 of file DTBtiChip.cc.

References DTBtiTrig::code(), config(), gather_cfg::cout, debug, DTConfigBti::debug(), eraseTrigger(), DTConfigBti::LTS(), DTConfig::NSTEPF, DTConfig::NSTEPL, nTrig(), DTConfigBti::SET(), and trigger().

Referenced by run().

588  {
589  if (config()->debug() > 2)
590  cout << "Do LTS" << endl;
591  int lts = config()->LTS();
592  int nbxlts = config()->SET();
593 
594  // Do LTS only on the requested SL
595  //if (superlayer()==2 && lts==1) return;
596  //if (superlayer()!=2 && lts==2) return;
597  //new DTConfig: do LTS only is LTS!=0 --> somewhat redundant !
598  if (lts == 0)
599  return;
600 
601  // loop on steps
602  for (int is = DTConfig::NSTEPF; is <= DTConfig::NSTEPL; is++) {
603  if (nTrig(is) > 0) { // non empty step
604  if (trigger(is, 1)->code() == 8) { // HTRIG at this step
605  // do LTS on nbxLTS[superlayer] following steps
606  for (int js = is + 1; (js <= is + nbxlts && js <= DTConfig::NSTEPL); js++) {
607  if (nTrig(js) > 0) { // non empty step
608  DTBtiTrig const* tr = trigger(js, 1);
609  if (tr->code() < 8 && (lts == 1 || lts == 3)) {
610  if (config()->debug() > 3)
611  cout << "LTS: erasing trigger!" << endl;
612  eraseTrigger(js, 1); // delete trigger
613  }
614  }
615  }
616  // do LTS on previous step
617  if (is > DTConfig::NSTEPF && nTrig(is - 1) > 0) { // non empty step
618  DTBtiTrig const* tr = trigger(is - 1, 1);
619  if (tr->code() < 8 && (lts == 2 || lts == 3)) {
620  if (config()->debug() > 3)
621  cout << "LTS: erasing trigger!" << endl;
622  eraseTrigger(is - 1, 1); // delete trigger
623  }
624  }
625  }
626  }
627  }
628 }
int debug() const
Debug flag.
Definition: DTConfigBti.h:58
void eraseTrigger(int step, unsigned n)
Definition: DTBtiChip.cc:375
static const int NSTEPF
Definition: DTConfig.h:35
DTBtiTrig const * trigger(int step, unsigned n) const
Return the requested trigger.
Definition: DTBtiChip.cc:345
int code() const
Return trigger code.
Definition: DTBtiTrig.h:111
int nTrig(int step) const
Number of triggers found.
Definition: DTBtiChip.cc:327
static const int NSTEPL
Constants: first and last step to start trigger finding.
Definition: DTConfig.h:35
int SET() const
SET.
Definition: DTConfigBti.h:76
#define debug
Definition: HDRShower.cc:19
tuple cout
Definition: gather_cfg.py:144
DTConfigBti * config() const
Configuration set.
Definition: DTBtiChip.h:119
int LTS() const
LTS.
Definition: DTConfigBti.h:73
void DTBtiChip::eraseTrigger ( int  step,
unsigned  n 
)
private

Definition at line 375 of file DTBtiChip.cc.

References _trigs, gather_cfg::cout, dqmiodumpmetadata::n, DTConfig::NSTEPF, DTConfig::NSTEPL, AlCaHLTBitMon_ParallelJobs::p, and findQualityFiles::size.

Referenced by doLTS().

375  {
377  cout << "DTBtiChip::eraseTrigger: step out of range: " << step;
378  cout << " trigger not deleted!" << endl;
379  }
380  if (n < 1 || n > _trigs[step - DTConfig::NSTEPF].size()) {
381  cout << "DTBtiChip::trigger: requested trigger does not exist: " << n;
382  cout << " trigger not deleted!" << endl;
383  }
384  auto p = _trigs[step - DTConfig::NSTEPF].begin() + n - 1;
385  _trigs[step - DTConfig::NSTEPF].erase(p);
386 }
std::array< std::vector< std::unique_ptr< DTBtiTrig > >, DTConfig::NSTEPL-DTConfig::NSTEPF+1 > _trigs
Definition: DTBtiChip.h:184
static const int NSTEPF
Definition: DTConfig.h:35
static const int NSTEPL
Constants: first and last step to start trigger finding.
Definition: DTConfig.h:35
tuple cout
Definition: gather_cfg.py:144
step
Definition: StallMonitor.cc:98
tuple size
Write out results.
void DTBtiChip::findTrig ( )
private

Definition at line 39 of file DTBtiChipSelTrig.cc.

References submitPVResolutionJobs::config, gather_cfg::cout, debug, and mps_fire::i.

Referenced by run().

39  {
40  if (config()->debug() > 3) {
41  cout << "DTBtiChip::findTrig called" << endl;
42  }
43 
44  //pattern type: 1 = normal
45  // 2 = 1L1
46  // 3 = 11L
47  // 4 = L11
48  // 5 = 1H1
49  // 6 = 11H
50  // 7 = H11
51 
52  // int accpatB = config()->AccPattB(); //default +-1
53  // int accpatA = config()->AccPattA(); //default +-2
54  // int tiKes = config()->XON();
55  int RON = config()->RONflag(); //default 1, redundant patterns enabled
56  int PTMS[32];
57  for (int i = 0; i < 32; i++) {
58  PTMS[i] = config()->PTMSflag(i);
59  }
60 
61  //Triggers (same order as manual):
62  for (int hl = 0; hl < 2; hl++) { //hl=0 high hl=1 low
63  if (RON == 1) {
64  if (keepTrigPatt(PTMS[0], 0, 1, hl))
65  return; // 1324A --> 0 - 1L3L2R4L: nor
66  }
67  if (keepTrigPatt(PTMS[1], 1, 2, hl))
68  return; // 1324B --> 1 - 1L3L2R4R: 1L1
69  if (keepTrigPatt(PTMS[2], 2, 1, hl))
70  return; // 1324C --> 2 - 1R3L2R4L: nor
71  if (keepTrigPatt(PTMS[3], 3, 1, hl))
72  return; // 1324D --> 3 - 1R3L2R4R: nor
73  if (keepTrigPatt(PTMS[4], 4, 3, hl))
74  return; // 1364A --> 4 - 1L3L6L4R: 11L
75  if (keepTrigPatt(PTMS[5], 5, 1, hl))
76  return; // 1364B --> 5 - 1R3L6L4R: nor
77  if (keepTrigPatt(PTMS[6], 6, 1, hl))
78  return; // 1364C --> 6 - 1R3R6L4R: nor
79  if (keepTrigPatt(PTMS[7], 7, 5, hl))
80  return; // 1368A --> 7 - 1R3R6L8L: 1H1
81  if (keepTrigPatt(PTMS[8], 8, 6, hl))
82  return; // 1368B --> 8 - 1R3R6R8L: 11H
83  if (keepTrigPatt(PTMS[9], 9, 7, hl))
84  return; // 1368C --> 9 - 1R3L6L8L: H11
85  if (keepTrigPatt(PTMS[10], 10, 1, hl))
86  return; // 5324A --> 10 - 5L3L2R4L: nor
87  if (keepTrigPatt(PTMS[11], 11, 1, hl))
88  return; // 5324B --> 11 - 5L3R2R4L: nor
89  if (keepTrigPatt(PTMS[12], 12, 6, hl))
90  return; // 5324C --> 12 - 5R3R2R4L: 11H
91  if (keepTrigPatt(PTMS[13], 13, 1, hl))
92  return; // 5364A --> 13 - 5L3R6L4L: nor
93  if (keepTrigPatt(PTMS[14], 14, 1, hl))
94  return; // 5364B --> 14 - 5L3R6L4R: nor
95  if (keepTrigPatt(PTMS[15], 15, 5, hl))
96  return; // 5364C --> 15 - 5R3R6L4L: 1H1
97  if (keepTrigPatt(PTMS[16], 16, 1, hl))
98  return; // 5364D --> 16 - 5R3R6L4R: nor
99  if (keepTrigPatt(PTMS[17], 17, 1, hl))
100  return; // 5368A --> 17 - 5L3R6L8L: nor
101  if (keepTrigPatt(PTMS[18], 18, 1, hl))
102  return; // 5368B --> 18 - 5L3R6R8L: nor
103  if (keepTrigPatt(PTMS[19], 19, 4, hl))
104  return; // 5368C --> 19 - 5L3R6R8R: L11
105  if (keepTrigPatt(PTMS[20], 20, 1, hl))
106  return; // 5764A --> 20 - 5R7L6L4R: nor
107  if (keepTrigPatt(PTMS[21], 21, 1, hl))
108  return; // 5764B --> 21 - 5R7L6R4R: nor
109  if (keepTrigPatt(PTMS[22], 22, 7, hl))
110  return; // 5764C --> 22 - 5R7L6L4L: H11
111  if (keepTrigPatt(PTMS[23], 23, 3, hl))
112  return; // 9764A --> 23 - 9L7L6L4R: 11L
113  if (keepTrigPatt(PTMS[24], 24, 2, hl))
114  return; // 9764B --> 24 - 9L7L6R4R: 1L1
115  if (keepTrigPatt(PTMS[25], 25, 4, hl))
116  return; // 9764C --> 25 - 9L7R6R4R: L11
117  if (keepTrigPatt(PTMS[26], 26, 1, hl))
118  return; // 5768A --> 26 - 5L7L6R8L: nor
119  if (RON == 1) {
120  if (keepTrigPatt(PTMS[27], 27, 2, hl))
121  return; // 5768B --> 27 - 5L7L6R8R: 1L1
122  if (keepTrigPatt(PTMS[28], 28, 1, hl))
123  return; // 5768C --> 28 - 5R7L6R8L: nor
124  if (keepTrigPatt(PTMS[29], 29, 1, hl))
125  return; // 5768D --> 29 - 5R7L6R8R: nor
126  if (keepTrigPatt(PTMS[30], 30, 1, hl))
127  return; // 9768A --> 30 - 9L7L6R8L: nor
128  if (keepTrigPatt(PTMS[31], 31, 1, hl))
129  return; // 9768B --> 31 - 9L7R6R8L: nor
130  }
131 
132  } //end h/l loop
133 
134  /*
135  for(int hl=0;hl<2;hl++){ //hl=0 high hl=1 low
136  if( keepTrigPatt(PTMS[0],0,1,hl) ) return; // 5768A --> 0 - 5L7L6R8L: nor
137  if( RON==1 ){
138  if( keepTrigPatt(PTMS[1],1,2,hl) ) return; // 5768B --> 1 - 5L7L6R8R: 1L1
139  if( keepTrigPatt(PTMS[2],2,1,hl) ) return; // 5768C --> 2 - 5R7L6R8L: nor
140  if( keepTrigPatt(PTMS[3],3,1,hl) ) return; // 5768D --> 3 - 5R7L6R8R: nor
141  }
142  if( keepTrigPatt(PTMS[4],4,3,hl) ) return; // 1364A --> 4 - 1L3L6L4R: 11L
143  if( keepTrigPatt(PTMS[5],5,1,hl) ) return; // 1364B --> 5 - 1R3L6L4R: nor
144  if( keepTrigPatt(PTMS[6],6,1,hl) ) return; // 1364C --> 6 - 1R3R6L4R: nor
145  if( keepTrigPatt(PTMS[7],7,5,hl) ) return; // 1368A --> 7 - 1R3R6L8L: 1H1
146  if( keepTrigPatt(PTMS[8],8,6,hl) ) return; // 1368B --> 8 - 1R3R6R8L: 11H
147  if( keepTrigPatt(PTMS[9],9,7,hl) ) return; // 1368C --> 9 - 1R3L6L8L: H11
148  if( keepTrigPatt(PTMS[10],10,1,hl) ) return; // 5324A --> 10 - 5L3L2R4L: nor
149  if( keepTrigPatt(PTMS[11],11,1,hl) ) return; // 5324B --> 11 - 5L3R2R4L: nor
150  if( keepTrigPatt(PTMS[12],12,6,hl) ) return; // 5324C --> 12 - 5R3R2R4L: 11H
151  if( keepTrigPatt(PTMS[13],13,1,hl) ) return; // 5364A --> 13 - 5L3R6L4L: nor
152  if( keepTrigPatt(PTMS[14],14,1,hl) ) return; // 5364B --> 14 - 5L3R6L4R: nor
153  if( keepTrigPatt(PTMS[15],15,5,hl) ) return; // 5364C --> 15 - 5R3R6L4L: 1H1
154  if( keepTrigPatt(PTMS[16],16,1,hl) ) return; // 5364D --> 16 - 5R3R6L4R: nor
155  if( keepTrigPatt(PTMS[17],17,1,hl) ) return; // 5368A --> 17 - 5L3R6L8L: nor
156  if( keepTrigPatt(PTMS[18],18,1,hl) ) return; // 5368B --> 18 - 5L3R6R8L: nor
157  if( keepTrigPatt(PTMS[19],19,4,hl) ) return; // 5368C --> 19 - 5L3R6R8R: L11
158  if( keepTrigPatt(PTMS[20],20,1,hl) ) return; // 5764A --> 20 - 5R7L6L4R: nor
159  if( keepTrigPatt(PTMS[21],21,1,hl) ) return; // 5764B --> 21 - 5R7L6R4R: nor
160  if( keepTrigPatt(PTMS[22],22,7,hl) ) return; // 5764C --> 22 - 5R7L6L4L: H11
161  if( keepTrigPatt(PTMS[23],23,3,hl) ) return; // 9764A --> 23 - 9L7L6L4R: 11L
162  if( keepTrigPatt(PTMS[24],24,2,hl) ) return; // 9764B --> 24 - 9L7L6R4R: 1L1
163  if( keepTrigPatt(PTMS[25],25,4,hl) ) return; // 9764C --> 25 - 9L7R6R4R: L11
164  if( RON==1 ){
165  if( keepTrigPatt(PTMS[26],26,1,hl) ) return; // 1324A --> 26 - 1L3L2R4L: nor
166  }
167  if( keepTrigPatt(PTMS[27],27,2,hl) ) return; // 1324B --> 27 - 1L3L2R4R: 1L1
168  if( keepTrigPatt(PTMS[28],28,1,hl) ) return; // 1324C --> 28 - 1R3L2R4L: nor
169  if( keepTrigPatt(PTMS[29],29,1,hl) ) return; // 1324D --> 29 - 1R3L2R4R: nor
170  if( RON==1 ){
171  if( keepTrigPatt(PTMS[30],30,1,hl) ) return; // 9768A --> 30 - 9L7L6R8L: nor
172  }
173  if( keepTrigPatt(PTMS[31],31,1,hl) ) return; // 9768B --> 31 - 9L7R6R8L: nor
174 
175  }//end h/l loop
176 
177 */
178 
179  /*
180  // High level triggers:
181  if( keepTrig( 1,accpatB,8) ) return; // 5768B --> 1 - acc. patt. B
182  if( keepTrig( 2,accpatA,8) ) return; // 5768C --> 2 - acc. patt. A
183  if( keepTrig( 3,accpatA,8) ) return; // 5768D --> 3 - acc. patt. A
184  if( keepTrig( 4,accpatB,8) ) return; // 1364A --> 4 - acc. patt. B
185  if( keepTrig( 5,accpatA,8) ) return; // 1364B --> 5 - acc. patt. A
186  if( keepTrig( 6,accpatA,8) ) return; // 1364C --> 6 - acc. patt. A
187  if( keepTrig( 7,accpatB,8) ) return; // 1368A --> 7 - acc. patt. B
188  if( keepTrig( 8,accpatB,8) ) return; // 1368B --> 8 - acc. patt. B
189  if( keepTrig( 9,accpatB,8) ) return; // 1368C --> 9 - acc. patt. B
190  if( keepTrig(10,accpatA,8) ) return; // 5324A --> 10 - acc. patt. A
191  if( keepTrig(11,accpatA,8) ) return; // 5324B --> 11 - acc. patt. A
192  if( keepTrig(12,accpatB,8) ) return; // 5324C --> 12 - acc. patt. B
193  if( keepTrig(13,accpatA,8) ) return; // 5364A --> 13 - acc. patt. A
194  if( keepTrig(14,accpatA,8) ) return; // 5364B --> 14 - acc. patt. A
195  if( keepTrig(15,accpatB,8) ) return; // 5364C --> 15 - acc. patt. B
196  if( keepTrig(16,accpatA,8) ) return; // 5364D --> 16 - acc. patt. A
197  if( keepTrig(17,accpatA,8) ) return; // 5368A --> 17 - acc. patt. A
198  if( keepTrig(18,accpatA,8) ) return; // 5368B --> 18 - acc. patt. A
199  if( keepTrig(19,accpatB,8) ) return; // 5368C --> 19 - acc. patt. B
200  if( keepTrig(20,accpatA,8) ) return; // 5764A --> 20 - acc. patt. A
201  if( keepTrig(21,accpatA,8) ) return; // 5764B --> 21 - acc. patt. A
202  if( keepTrig(22,accpatB,8) ) return; // 5764C --> 22 - acc. patt. B
203  if( keepTrig(23,accpatB,8) ) return; // 9764A --> 23 - acc. patt. B
204  if( keepTrig(24,accpatB,8) ) return; // 9764B --> 24 - acc. patt. B
205  if( keepTrig(25,accpatB,8) ) return; // 9764C --> 25 - acc. patt. B
206  if( keepTrig( 0,accpatA,8) ) return; // 5768A --> 0 - acc. patt. A
207  */
208  /*
209  // Low level triggers -B
210  if( keepTrig( 1,accpatB,2) ) return; // 5768B --> 1 - acc. patt. B
211  if( keepTrig( 2,accpatA,2) ) return; // 5768C --> 2 - acc. patt. A
212  if(tiKes==1) {
213  if( keepTrig( 3,accpatA,2) ) return; // 5768D --> 3 - acc. patt. A
214  }
215  if( keepTrig( 4,accpatB,2) ) return; // 1364A --> 4 - acc. patt. B
216  if( keepTrig( 5,accpatA,2) ) return; // 1364B --> 5 - acc. patt. A
217  if( keepTrig( 6,accpatA,2) ) return; // 1364C --> 6 - acc. patt. A
218  if( keepTrig( 7,accpatB,2) ) return; // 1368A --> 7 - acc. patt. B
219  if( keepTrig( 8,accpatB,2) ) return; // 1368B --> 8 - acc. patt. B
220  if( keepTrig( 9,accpatB,2) ) return; // 1368C --> 9 - acc. patt. B
221  if( keepTrig(10,accpatA,2) ) return; // 5324A --> 10 - acc. patt. A
222  if( keepTrig(11,accpatA,2) ) return; // 5324B --> 11 - acc. patt. A
223  if( keepTrig(12,accpatB,2) ) return; // 5324C --> 12 - acc. patt. B
224  if(tiKes==1) {
225  if( keepTrig(13,accpatA,2) ) return; // 5364A --> 13 - acc. patt. A
226  }
227  if( keepTrig(14,accpatA,2) ) return; // 5364B --> 14 - acc. patt. A
228  if( keepTrig(15,accpatB,2) ) return; // 5364C --> 15 - acc. patt. B
229  if( keepTrig(16,accpatA,2) ) return; // 5364D --> 16 - acc. patt. A
230  if(tiKes==1) {
231  if( keepTrig(17,accpatA,2) ) return; // 5368A --> 17 - acc. patt. A
232  }
233  if( keepTrig(18,accpatA,2) ) return; // 5368B --> 18 - acc. patt. A
234  if( keepTrig(19,accpatB,2) ) return; // 5368C --> 19 - acc. patt. B
235  if( keepTrig(20,accpatA,2) ) return; // 5764A --> 20 - acc. patt. A
236  if(tiKes==1) {
237  if( keepTrig(21,accpatA,2) ) return; // 5764B --> 21 - acc. patt. A
238  }
239  if( keepTrig(22,accpatB,2) ) return; // 5764C --> 22 - acc. patt. B
240  if( keepTrig(23,accpatB,2) ) return; // 9764A --> 23 - acc. patt. B
241  if( keepTrig(24,accpatB,2) ) return; // 9764B --> 24 - acc. patt. B
242  if( keepTrig(25,accpatB,2) ) return; // 9764C --> 25 - acc. patt. B
243  if( keepTrig( 0,accpatA,2) ) return; // 5768A --> 0 - acc. patt. A
244 
245  // Low level triggers -C
246  if( keepTrig( 1,accpatB,3) ) return; // 5768B --> 1 - acc. patt. B
247  if( keepTrig( 2,accpatA,3) ) return; // 5768C --> 2 - acc. patt. A
248  if( keepTrig( 3,accpatA,3) ) return; // 5768D --> 3 - acc. patt. A
249  if( keepTrig( 4,accpatB,3) ) return; // 1364A --> 4 - acc. patt. B
250  if( keepTrig( 5,accpatA,3) ) return; // 1364B --> 5 - acc. patt. A
251  if(tiKes==1) {
252  if( keepTrig( 6,accpatA,3) ) return; // 1364C --> 6 - acc. patt. A
253  }
254  if( keepTrig( 7,accpatB,3) ) return; // 1368A --> 7 - acc. patt. B
255  if( keepTrig( 8,accpatB,3) ) return; // 1368B --> 8 - acc. patt. B
256  if( keepTrig( 9,accpatB,3) ) return; // 1368C --> 9 - acc. patt. B
257  if(tiKes==1) {
258  if( keepTrig(10,accpatA,3) ) return; // 5324A --> 10 - acc. patt. A
259  }
260  if( keepTrig(11,accpatA,3) ) return; // 5324B --> 11 - acc. patt. A
261  if( keepTrig(12,accpatB,3) ) return; // 5324C --> 12 - acc. patt. B
262  if( keepTrig(13,accpatA,3) ) return; // 5364A --> 13 - acc. patt. A
263  if( keepTrig(14,accpatA,3) ) return; // 5364B --> 14 - acc. patt. A
264  if( keepTrig(15,accpatB,3) ) return; // 5364C --> 15 - acc. patt. B
265  if(tiKes==1) {
266  if( keepTrig(16,accpatA,3) ) return; // 5364D --> 16 - acc. patt. A
267  }
268  if( keepTrig(17,accpatA,3) ) return; // 5368A --> 17 - acc. patt. A
269  if( keepTrig(18,accpatA,3) ) return; // 5368B --> 18 - acc. patt. A
270  if( keepTrig(19,accpatB,3) ) return; // 5368C --> 19 - acc. patt. B
271  if( keepTrig(20,accpatA,3) ) return; // 5764A --> 20 - acc. patt. A
272  if( keepTrig(21,accpatA,3) ) return; // 5764B --> 21 - acc. patt. A
273  if( keepTrig(22,accpatB,3) ) return; // 5764C --> 22 - acc. patt. B
274  if( keepTrig(23,accpatB,3) ) return; // 9764A --> 23 - acc. patt. B
275  if( keepTrig(24,accpatB,3) ) return; // 9764B --> 24 - acc. patt. B
276  if( keepTrig(25,accpatB,3) ) return; // 9764C --> 25 - acc. patt. B
277  if(tiKes==1) {
278  if( keepTrig( 0,accpatA,3) ) return; // 5768A --> 0 - acc. patt. A
279  }
280 
281  // Low level triggers -A
282  if( keepTrig( 1,accpatB,1) ) return; // 5768B --> 1 - acc. patt. B
283  if( keepTrig( 2,accpatA,1) ) return; // 5768C --> 2 - acc. patt. A
284  if( keepTrig( 3,accpatA,1) ) return; // 5768D --> 3 - acc. patt. A
285  if( keepTrig( 4,accpatB,1) ) return; // 1364A --> 4 - acc. patt. B
286  if( keepTrig( 5,accpatA,1) ) return; // 1364B --> 5 - acc. patt. A
287  if( keepTrig( 6,accpatA,1) ) return; // 1364C --> 6 - acc. patt. A
288  if( keepTrig( 7,accpatB,1) ) return; // 1368A --> 7 - acc. patt. B
289  if( keepTrig( 8,accpatB,1) ) return; // 1368B --> 8 - acc. patt. B
290  if(tiKes==1) {
291  if( keepTrig( 9,accpatB,1) ) return; // 1368C --> 9 - acc. patt. B
292  }
293  if( keepTrig(10,accpatA,1) ) return; // 5324A --> 10 - acc. patt. A
294  if( keepTrig(11,accpatA,1) ) return; // 5324B --> 11 - acc. patt. A
295  if( keepTrig(12,accpatB,1) ) return; // 5324C --> 12 - acc. patt. B
296  if( keepTrig(13,accpatA,1) ) return; // 5364A --> 13 - acc. patt. A
297  if( keepTrig(14,accpatA,1) ) return; // 5364B --> 14 - acc. patt. A
298  if( keepTrig(15,accpatB,1) ) return; // 5364C --> 15 - acc. patt. B
299  if( keepTrig(16,accpatA,1) ) return; // 5364D --> 16 - acc. patt. A
300  if( keepTrig(17,accpatA,1) ) return; // 5368A --> 17 - acc. patt. A
301  if( keepTrig(18,accpatA,1) ) return; // 5368B --> 18 - acc. patt. A
302  if(tiKes==1) {
303  if( keepTrig(19,accpatB,1) ) return; // 5368C --> 19 - acc. patt. B
304  }
305  if( keepTrig(20,accpatA,1) ) return; // 5764A --> 20 - acc. patt. A
306  if( keepTrig(21,accpatA,1) ) return; // 5764B --> 21 - acc. patt. A
307  if(tiKes==1) {
308  if( keepTrig(22,accpatB,1) ) return; // 5764C --> 22 - acc. patt. B
309  }
310  if( keepTrig(23,accpatB,1) ) return; // 9764A --> 23 - acc. patt. B
311  if( keepTrig(24,accpatB,1) ) return; // 9764B --> 24 - acc. patt. B
312  if(tiKes==1) {
313  if( keepTrig(25,accpatB,1) ) return; // 9764C --> 25 - acc. patt. B
314  }
315  if( keepTrig( 0,accpatA,1) ) return; // 5768A --> 0 - acc. patt. A
316 
317  // Low level triggers -D
318  if( keepTrig( 0,accpatA,4) ) return; // 5768A --> 0 - acc. patt. A
319  if( keepTrig( 1,accpatB,4) ) return; // 5768B --> 1 - acc. patt. B
320  if( keepTrig( 2,accpatA,4) ) return; // 5768C --> 2 - acc. patt. A
321  if( keepTrig( 3,accpatA,4) ) return; // 5768D --> 3 - acc. patt. A
322  if(tiKes==1) {
323  if( keepTrig( 4,accpatB,4) ) return; // 1364A --> 4 - acc. patt. B
324  }
325  if( keepTrig( 5,accpatA,4) ) return; // 1364B --> 5 - acc. patt. A
326  if( keepTrig( 6,accpatA,4) ) return; // 1364C --> 6 - acc. patt. A
327  if( keepTrig( 7,accpatB,4) ) return; // 1368A --> 7 - acc. patt. B
328  if(tiKes==1) {
329  if( keepTrig( 8,accpatB,4) ) return; // 1368B --> 8 - acc. patt. B
330  }
331  if( keepTrig( 9,accpatB,4) ) return; // 1368C --> 9 - acc. patt. B
332  if( keepTrig(10,accpatA,4) ) return; // 5324A --> 10 - acc. patt. A
333  if( keepTrig(11,accpatA,4) ) return; // 5324B --> 11 - acc. patt. A
334  if(tiKes==1) {
335  if( keepTrig(12,accpatB,4) ) return; // 5324C --> 12 - acc. patt. B
336  }
337  if( keepTrig(13,accpatA,4) ) return; // 5364A --> 13 - acc. patt. A
338  if( keepTrig(14,accpatA,4) ) return; // 5364B --> 14 - acc. patt. A
339  if( keepTrig(15,accpatB,4) ) return; // 5364C --> 15 - acc. patt. B
340  if( keepTrig(16,accpatA,4) ) return; // 5364D --> 16 - acc. patt. A
341  if( keepTrig(17,accpatA,4) ) return; // 5368A --> 17 - acc. patt. A
342  if( keepTrig(18,accpatA,4) ) return; // 5368B --> 18 - acc. patt. A
343  if( keepTrig(19,accpatB,4) ) return; // 5368C --> 19 - acc. patt. B
344  if( keepTrig(20,accpatA,4) ) return; // 5764A --> 20 - acc. patt. A
345  if( keepTrig(21,accpatA,4) ) return; // 5764B --> 21 - acc. patt. A
346  if( keepTrig(22,accpatB,4) ) return; // 5764C --> 22 - acc. patt. B
347  if(tiKes==1) {
348  if( keepTrig(23,accpatB,4) ) return; // 9764A --> 23 - acc. patt. B
349  }
350  if( keepTrig(24,accpatB,4) ) return; // 9764B --> 24 - acc. patt. B
351  if( keepTrig(25,accpatB,4) ) return; // 9764C --> 25 - acc. patt. B
352 */
353 }
int PTMSflag(int patt) const
Pattern mask flag.
Definition: DTConfigBti.h:94
#define debug
Definition: HDRShower.cc:19
int keepTrigPatt(int flag, const int eq, const int pattType, int hlflag)
tuple cout
Definition: gather_cfg.py:144
bool RONflag() const
Redundant patterns flag RONDTBti/src/DTBtiChipEquations.cc:
Definition: DTConfigBti.h:91
DTConfigBti * config() const
Configuration set.
Definition: DTBtiChip.h:119
DTTrigGeom* DTBtiChip::geom ( ) const
inline

Return trigger geometry.

Definition at line 122 of file DTBtiChip.h.

References _geom.

122 { return _geom; }
DTTrigGeom * _geom
Definition: DTBtiChip.h:173
std::vector<const DTDigi*> const& DTBtiChip::get_CellDigis ( int  cell) const
inline

get digi vector - SV 28/XI/02

Definition at line 74 of file DTBtiChip.h.

References _digis.

74 { return _digis[cell]; }
std::array< std::vector< const DTDigi * >, 9 > _digis
Definition: DTBtiChip.h:179
DTBtiId DTBtiChip::id ( void  ) const
inline

Return the DTBtiChip Id.

Definition at line 125 of file DTBtiChip.h.

References _id.

Referenced by DTBtiTrig::DTBtiTrig().

125 { return _id; }
DTBtiId _id
Definition: DTBtiChip.h:176
void DTBtiChip::init ( void  )
private

Definition at line 407 of file DTBtiChip.cc.

References _curStep, _difs, _digis, _hits, _sums, _thisStepUsedHit, SplitLinear::begin, config(), gather_cfg::cout, debug, mps_fire::i, AlCaHLTBitMon_ParallelJobs::p, fireworks::p1, and DTConfigBti::WENflag().

Referenced by run().

407  {
408  if (config()->debug() > 3)
409  cout << "DTBtiChip::init() -> initializing bti chip" << endl;
410 
411  _curStep = 0;
412  for (int i = 0; i < 25; i++) {
413  _sums[i] = 1000;
414  _difs[i] = 1000;
415  }
416 
417  for (int cell = 0; cell < 9; cell++) {
418  int WEN = config()->WENflag(cell + 1);
419  if (WEN == 1) {
420  _thisStepUsedHit[cell] = nullptr;
421  vector<const DTDigi*>::const_iterator p;
422  for (p = _digis[cell].begin(); p < _digis[cell].end(); p++) {
423  DTBtiHit* hit = new DTBtiHit(*p, config());
424  //int clockTime = (int)(fabs(((*p)->time()+config()->SetupTime())/12.5));
425  //DTBtiHit* hit = new DTBtiHit(clockTime,config());
426  _hits[cell].push_back(hit);
427  }
428 
429  //debugging
430  if (config()->debug() > 2) {
431  vector<DTBtiHit*>::const_iterator p1;
432  for (p1 = _hits[cell].begin(); p1 < _hits[cell].end(); p1++) {
433  cout << " Filling hit in cell " << cell + 1;
434  if ((*p1)->curTime() != 4000)
435  cout << " raw time in trigger: " << (*p1)->curTime() << endl;
436  cout << " time (clock units): " << (*p1)->clockTime() << endl;
437  }
438  }
439  // end debugging
440  }
441  }
442 }
std::array< std::vector< const DTDigi * >, 9 > _digis
Definition: DTBtiChip.h:179
std::array< float, 25 > _difs
Definition: DTBtiChip.h:192
std::array< DTBtiHit *, 9 > _thisStepUsedHit
Definition: DTBtiChip.h:190
const TString p1
Definition: fwPaths.cc:12
int _curStep
Definition: DTBtiChip.h:187
std::array< std::vector< DTBtiHit * >, 9 > _hits
Definition: DTBtiChip.h:188
#define debug
Definition: HDRShower.cc:19
std::array< float, 25 > _sums
Definition: DTBtiChip.h:192
tuple cout
Definition: gather_cfg.py:144
DTConfigBti * config() const
Configuration set.
Definition: DTBtiChip.h:119
int WENflag(int wire) const
Wire mask flag.
Definition: DTConfigBti.h:97
void DTBtiChip::init_clock ( )

Definition at line 444 of file DTBtiChip.cc.

References _curStep, _difs, _digis_clock, _hits, _sums, _thisStepUsedHit, SplitLinear::begin, config(), gather_cfg::cout, debug, mps_fire::i, init_done, fireworks::p1, and DTConfigBti::WENflag().

444  {
445  if (config()->debug() > 3)
446  cout << "DTBtiChip::init_clock() -> initializing bti chip" << endl;
447 
448  init_done = 1;
449  _curStep = 0;
450 
451  for (int i = 0; i < 25; i++) {
452  _sums[i] = 1000;
453  _difs[i] = 1000;
454  }
455 
456  for (int cell = 0; cell < 9; cell++) {
457  int WEN = config()->WENflag(cell + 1);
458  if (WEN == 1) {
459  _thisStepUsedHit[cell] = nullptr;
460  for (unsigned int i = 0; i < _digis_clock[cell].size(); i++) {
461  const int clockTime = (_digis_clock[cell])[i];
462  DTBtiHit* hit = new DTBtiHit(clockTime, config());
463  _hits[cell].push_back(hit);
464  }
465 
466  //debugging
467  if (config()->debug() > 2) {
468  vector<DTBtiHit*>::const_iterator p1;
469  for (p1 = _hits[cell].begin(); p1 < _hits[cell].end(); p1++) {
470  cout << " Filling hit in cell " << cell + 1;
471  if ((*p1)->curTime() != 4000)
472  cout << " time: " << (*p1)->curTime() << endl;
473  else
474  cout << " time (clock units): " << (*p1)->clockTime() << endl;
475  }
476  }
477  // end debugging
478  }
479  }
480 }
int init_done
Definition: DTBtiChip.h:209
std::array< float, 25 > _difs
Definition: DTBtiChip.h:192
std::array< DTBtiHit *, 9 > _thisStepUsedHit
Definition: DTBtiChip.h:190
const TString p1
Definition: fwPaths.cc:12
int _curStep
Definition: DTBtiChip.h:187
std::array< std::vector< int >, 9 > _digis_clock
Definition: DTBtiChip.h:181
std::array< std::vector< DTBtiHit * >, 9 > _hits
Definition: DTBtiChip.h:188
#define debug
Definition: HDRShower.cc:19
std::array< float, 25 > _sums
Definition: DTBtiChip.h:192
tuple cout
Definition: gather_cfg.py:144
DTConfigBti * config() const
Configuration set.
Definition: DTBtiChip.h:119
int WENflag(int wire) const
Wire mask flag.
Definition: DTConfigBti.h:97
int DTBtiChip::keepTrig ( const int  eq,
const int  acp,
const int  code 
)
private

Definition at line 753 of file DTBtiChipSelTrig.cc.

References funct::abs(), submitPVResolutionJobs::config, gather_cfg::cout, debug, BitArray< N >::element(), mps_fire::i, BitArray< N >::print(), BitArray< N >::set(), and hgcalPerformanceValidation::val.

753  {
754  if (config()->debug() > 4) {
755  cout << "DTBtiChip::keepTrig called with arguments: ";
756  cout << eq << ", " << acp << ", " << code << endl;
757  }
758 
759  int const KCen = 40; // Arrays will start from 0 --> use 40 instead of 41
760  BitArray<80> val0, val1, val2, val3, val4, val5;
761  int mm[6];
762 
763  int i = 0;
764  for (i = 0; i < 6; i++) {
765  mm[i] = 0;
766  int mk = (int)(2 * _Keq[eq][i]);
767  if (abs(mk) > config()->KCut())
768  continue;
769  mm[i] = (int)(_Keq[eq][i] * 2) + KCen;
770  // if(_Keq[eq][i]<0){
771  // mm[i]=_Keq[eq][i]*2-0.5+KCen;
772  // } else {
773  // mm[i]=_Keq[eq][i]*2+KCen;
774  // }
775  }
776 
777  if (mm[0] > 0 && (code == 8 || code == 3 || code == 4)) {
778  val0.set(mm[0] - 1);
779  val0.set(mm[0]);
780  val0.set(mm[0] + 1);
781  if (acp == 2 && (code == 8 || code == 3)) {
782  val0.set(mm[0] - 2);
783  val0.set(mm[0] + 2);
784  }
785  }
786 
787  if (mm[1] > 0 && (code == 8 || code == 1 || code == 4)) {
788  val1.set(mm[1] - 1);
789  val1.set(mm[1]);
790  val1.set(mm[1] + 1);
791  if (acp == 2 && code == 8) {
792  val1.set(mm[1] - 2);
793  val1.set(mm[1] + 2);
794  }
795  }
796 
797  if (mm[2] > 0 && (code == 8 || code == 1 || code == 2)) {
798  val2.set(mm[2] - 1);
799  val2.set(mm[2]);
800  val2.set(mm[2] + 1);
801  if (acp == 2 && (code == 8 || code == 2)) {
802  val2.set(mm[2] - 2);
803  val2.set(mm[2] + 2);
804  }
805  }
806 
807  if (mm[3] > 0 && (code == 8 || code == 2 || code == 4)) {
808  val3.set(mm[3] - 1);
809  val3.set(mm[3]);
810  val3.set(mm[3] + 1);
811  }
812 
813  if (mm[4] > 0 && (code == 8 || code == 1 || code == 3)) {
814  val4.set(mm[4] - 1);
815  val4.set(mm[4]);
816  val4.set(mm[4] + 1);
817  }
818 
819  if (mm[5] > 0 && (code == 8 || code == 2 || code == 3)) {
820  val5.set(mm[5]);
821  }
822 
823  // debugging
824  if (config()->debug() > 4) {
825  cout << " dump of val arrays: " << endl;
826  // cout << val0.to_string() << endl;
827  // cout << val1.to_string() << endl;
828  // cout << val2.to_string() << endl;
829  // cout << val3.to_string() << endl;
830  // cout << val4.to_string() << endl;
831  // cout << val5.to_string() << endl;
832  val0.print();
833  cout << endl;
834  val1.print();
835  cout << endl;
836  val2.print();
837  cout << endl;
838  val3.print();
839  cout << endl;
840  val4.print();
841  cout << endl;
842  val5.print();
843  cout << endl;
844  }
845  // end debugging
846 
847  int KMax = 0;
848  int LKMax = -1;
849  for (i = 0; i < 80; i++) {
850  int val = val0.element(i) + val1.element(i) + val2.element(i) + val3.element(i) + val4.element(i) + val5.element(i);
851  // int val = val0.test(i)+val1.test(i)+val2.test(i)+
852  // val3.test(i)+val4.test(i)+val5.test(i);
853  if (val > KMax) {
854  KMax = val;
855  LKMax = i;
856  }
857  }
858 
859  // Note that all bits in val are shifted by one w.r.t. FORTRAN version
860  // The output K will be the same because of the different value of Kcen
861 
862  if (KMax == 6 && code == 8) {
863  store(eq, 8, LKMax - KCen, int(_Xeq[eq][1]));
864  return 1;
865  } else if (KMax == 3 && code != 8) {
866  if (code == 1 || code == 4) {
867  store(eq, code, LKMax - KCen, int(_Xeq[eq][0]));
868  } else {
869  store(eq, code, LKMax - KCen, int(_Xeq[eq][1]));
870  }
871  return 1;
872  }
873  return 0;
874  // return value is ITFL of FORTRAN version
875 }
int store(const int eq, const int code, const int K, const int X, float KeqAB=0., float KeqBC=0., float KeqCD=0., float KeqAC=0., float KeqBD=0., float KeqAD=0.)
Definition: DTBtiChip.cc:630
float _Xeq[32][2]
Definition: DTBtiChip.h:194
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int KCut() const
Max K param accepted: max bit number.
Definition: DTConfigBti.h:64
float _Keq[32][6]
Definition: DTBtiChip.h:193
#define debug
Definition: HDRShower.cc:19
int element(const int pos) const
Definition: BitArray.h:206
tuple cout
Definition: gather_cfg.py:144
std::ostream & print(std::ostream &o=std::cout) const
Definition: BitArray.h:340
DTConfigBti * config() const
Configuration set.
Definition: DTBtiChip.h:119
void set(const int i)
Definition: BitArray.h:224
int DTBtiChip::keepTrigPatt ( int  flag,
const int  eq,
const int  pattType,
int  hlflag 
)
private

Definition at line 355 of file DTBtiChipSelTrig.cc.

References funct::abs(), submitPVResolutionJobs::config, gather_cfg::cout, debug, BitArray< N >::element(), mps_fire::i, BitArray< N >::print(), BitArray< N >::reset(), BitArray< N >::set(), hgcalPerformanceValidation::val, and X.

355  {
356  //if pattern is not enabled, return
357  if (flag == 0)
358  return 0;
359 
360  int AC1 = config()->AccPattAC1(); //default 0
361  int AC2 = config()->AccPattAC2(); //default 3
362  int ACH = config()->AccPattACH(); //default 1
363  int ACL = config()->AccPattACL(); //default 2
364  int tiKes = config()->XON();
365 
366  if (config()->debug() > 4) {
367  cout << "DTBtiChip::keepTrigPatt called with arguments: ";
368  cout << eq << ", " << pattType << ", " << hlflag << endl;
369  cout << "AC1,AC2,ACH,ACL=" << AC1 << " " << AC2 << " " << ACH << " " << ACL << endl;
370  }
371 
372  BitArray<80> val0, val1, val2, val3, val4, val5;
373  int mm[6];
374 
375  //NB _Keq = (Kman - K0)/2 where K0=tmax*2 --->OBSOLETE, now Keq=Kman
376  //int K0 = 2 * (config()->ST()/2.);
377  int K0 = int(config()->ST());
378 
379  int i = 0;
380  float Keqfloat[6] = {0, 0, 0, 0, 0, 0};
381  for (i = 0; i < 6; i++) {
382  mm[i] = -1;
383  int mk = (int)(_Keq[eq][i] - K0);
384  //if(abs(mk) > config()->KCut(_id.superlayer()-1))continue;
385  if (abs(mk) > 2 * K0)
386  continue;
387  Keqfloat[i] = _Keq[eq][i];
388  mm[i] = (int)(_Keq[eq][i]);
389  // if(_Keq[eq][i]<0){
390  // mm[i]=_Keq[eq][i]*2-0.5+KCen;
391  // } else {
392  // mm[i]=_Keq[eq][i]*2+KCen;
393  // }
394  }
395 
396  switch (pattType) {
397  case 1: //normal pattern
398  //if(hlflag==1 && (eq!=2 && eq!=14 && eq!=28) ){ //test for L
399  /* if(hlflag==1){ //test for L
400  acceptMask(&val0,mm[0],AC1); //eqAB
401  acceptMask(&val1,mm[1],AC1); //eqBC
402  acceptMask(&val2,mm[2],AC1); //eqCD
403  }
404  else
405 */
406  {
407  acceptMask(&val0, mm[0], AC2); //eqAB
408  acceptMask(&val1, mm[1], AC2); //eqBC
409  acceptMask(&val2, mm[2], AC2); //eqCD
410  }
411  break;
412 
413  case 2: //1L1 pattern
414  acceptMask(&val0, mm[0], AC1); //eqAB
415  acceptMask(&val1, mm[1], ACL); //eqBC
416  acceptMask(&val2, mm[2], AC1); //eqCD
417  break;
418 
419  case 3: //11L pattern
420  acceptMask(&val0, mm[0], AC1); //eqAB
421  acceptMask(&val1, mm[1], AC1); //eqBC
422  acceptMask(&val2, mm[2], ACL); //eqCD
423  break;
424 
425  case 4: //L11 pattern
426  acceptMask(&val0, mm[0], ACL); //eqAB
427  acceptMask(&val1, mm[1], AC1); //eqBC
428  acceptMask(&val2, mm[2], AC1); //eqCD
429  break;
430 
431  case 5: //1H1 pattern
432  acceptMask(&val0, mm[0], AC1); //eqAB
433  acceptMask(&val1, mm[1], ACH); //eqBC
434  acceptMask(&val2, mm[2], AC1); //eqCD
435  break;
436 
437  case 6: //11H pattern
438  acceptMask(&val0, mm[0], AC1); //eqAB
439  acceptMask(&val1, mm[1], AC1); //eqBC
440  acceptMask(&val2, mm[2], ACH); //eqCD
441  break;
442 
443  case 7: //H11 pattern
444  acceptMask(&val0, mm[0], ACH); //eqAB
445  acceptMask(&val1, mm[1], AC1); //eqBC
446  acceptMask(&val2, mm[2], AC1); //eqCD
447  break;
448 
449  default:
450  acceptMask(&val0, mm[0], AC2); //eqAB
451  acceptMask(&val1, mm[1], AC2); //eqBC
452  acceptMask(&val2, mm[2], AC2); //eqCD
453  break;
454  }
455 
456  //eq. AC and BD acceptance are always +-1 ->code 00
457  int acc = 0;
458  acceptMask(&val3, mm[3], acc); //eq.AC
459  acceptMask(&val4, mm[4], acc); //eq.BD
460 
461  //eq. AD is the reference value!
462  if (mm[5] > 0) {
463  val5.set(mm[5]);
464  }
465 
466  // debugging: print() method prints from last to first bit!
467  if (config()->debug() > 4) {
468  cout << " dump of val arrays: " << endl;
469  // cout << val0.to_string() << endl;
470  // cout << val1.to_string() << endl;
471  // cout << val2.to_string() << endl;
472  // cout << val3.to_string() << endl;
473  // cout << val4.to_string() << endl;
474  // cout << val5.to_string() << endl;
475  val0.print();
476  cout << endl;
477  val1.print();
478  cout << endl;
479  val2.print();
480  cout << endl;
481  val3.print();
482  cout << endl;
483  val4.print();
484  cout << endl;
485  val5.print();
486  cout << endl;
487  }
488  // end debugging
489 
490  //search for High trigger:
491  if (hlflag == 0) {
492  int code = 0;
493  int KMax = 0;
494  int LKMax = -1;
495  for (i = 0; i < 80; i++) {
496  int val =
497  val0.element(i) + val1.element(i) + val2.element(i) + val3.element(i) + val4.element(i) + val5.element(i);
498  if (val > KMax) {
499  KMax = val;
500  LKMax = i;
501  }
502  }
503 
504  //SV: K value is stored in 6 bits, so K=64->0, etc
505  if (LKMax > 63)
506  LKMax -= 64;
507 
508  if (KMax == 6) {
509  code = 8;
510  int X;
511  if (eq == 0) //store Xbc only for patt 0, else store Xad
512  X = int(_Xeq[eq][0]);
513  else
514  X = int(_Xeq[eq][1]);
515  store(eq, code, LKMax, X, Keqfloat[0], Keqfloat[1], Keqfloat[2], Keqfloat[3], Keqfloat[4], Keqfloat[5]);
516  return 1;
517  }
518  return 0;
519  } //end H
520 
521  //search for Low triggers:
522  if (hlflag == 1) {
523  int code = 0;
524  int RON = config()->RONflag();
525 
526  //hit in B is missing
527  if (config()->debug() > 4)
528  cout << "SelTrig: searching low-B" << endl;
529  int LKMax = -1;
530  for (i = 0; i < 80; i++) {
531  int val = val2.element(i) + val3.element(i) + val5.element(i);
532  if (val == 3) { //Ref. is eqAD
533  code = 2;
534  LKMax = i;
535  int storefg = 1;
536 
537  //SV - XON time-ind.Keq suppr. XON=0 do not abilitate patterns
538  if (tiKes == 0) {
539  if (eq == 3 || eq == 13 || eq == 17 || eq == 21 || eq == 29) {
540  if (config()->debug() > 3)
541  cout << "SelTrig: doing XON suppression!" << endl;
542  storefg = 0;
543  }
544  }
545 
546  //SV - RON suppression for low triggers
547  if (RON == 0) {
548  if (eq == 19) {
549  if (config()->debug() > 3)
550  cout << "SelTrig: doing RON low triggers suppression!" << endl;
551  storefg = 0;
552  }
553  }
554 
555  if (storefg) {
556  //SV: K value is stored in 6 bits, so K=64->0, etc
557  if (LKMax > 63)
558  LKMax -= 64;
559  int X;
560  if (eq == 0)
561  X = int(_Xeq[eq][0]);
562  else
563  X = int(_Xeq[eq][1]);
564  store(eq, code, LKMax, X, Keqfloat[0], Keqfloat[1], Keqfloat[2], Keqfloat[3], Keqfloat[4], Keqfloat[5]);
565  return 1;
566  }
567  }
568  } //end -B Low
569 
570  //hit in C is missing
571  if (config()->debug() > 3)
572  cout << "SelTrig: searching low-C" << endl;
573  for (i = 0; i < 80; i++) {
574  int val = val0.element(i) + val4.element(i) + val5.element(i);
575  if (val == 3) { //Ref. is eqAD
576  code = 3;
577  LKMax = i;
578  int storefg = 1;
579 
580  //SV - XON time-ind.Keq suppr.
581  if (tiKes == 0) {
582  if (eq == 0 || eq == 6 || eq == 10 || eq == 16 || eq == 26 || eq == 30) {
583  if (config()->debug() > 3)
584  cout << "SelTrig: doing XON suppression!" << endl;
585  storefg = 0;
586  }
587  }
588 
589  if (storefg) {
590  //SV: K value is stored in 6 bits, so K=64->0, etc
591  if (LKMax > 63)
592  LKMax -= 64;
593 
594  int X;
595  if (eq == 0)
596  X = int(_Xeq[eq][0]);
597  else
598  X = int(_Xeq[eq][1]);
599  store(eq, code, LKMax, X, Keqfloat[0], Keqfloat[1], Keqfloat[2], Keqfloat[3], Keqfloat[4], Keqfloat[5]);
600  return 1;
601  }
602  }
603  } // end -C Low
604 
605  //for -A and -D low acceptance is +-1
606  // if(pattType==1){
607  val0.reset();
608  val1.reset();
609  val2.reset();
610  acceptMask(&val0, mm[0], AC1); //eqAB
611  acceptMask(&val1, mm[1], AC1); //eqBC
612  acceptMask(&val2, mm[2], AC1); //eqCD
613  // }
614 
615  //hit in A is missing
616  if (config()->debug() > 4)
617  cout << "SelTrig: searching low-A" << endl;
618  for (i = 0; i < 80; i++) {
619  int val = val1.element(i) + val2.element(i) + val4.element(i);
620  if (val == 3 && i == mm[4]) { //Ref. is eqBD
621  code = 1;
622  LKMax = i;
623  int storefg = 1;
624 
625  //SV - XON time-ind.Keq suppr.
626  if (tiKes == 0) {
627  if (eq == 9 || eq == 19 || eq == 22 || eq == 25) {
628  if (config()->debug() > 3)
629  cout << "SelTrig: doing low-A XON suppression!" << endl;
630  storefg = 0;
631  }
632  }
633 
634  if (RON == 0) { //SV - RON suppression
635  if (eq == 26) {
636  if (config()->debug() > 3)
637  cout << "SelTrig: doing RON low triggers suppression!" << endl;
638  storefg = 0;
639  }
640  }
641 
642  if (storefg) {
643  //SV: K value is stored in 6 bits, so K=64->0, etc
644  if (LKMax > 63)
645  LKMax -= 64;
646 
647  store(eq,
648  code,
649  LKMax,
650  int(_Xeq[eq][0]),
651  Keqfloat[0],
652  Keqfloat[1],
653  Keqfloat[2],
654  Keqfloat[3],
655  Keqfloat[4],
656  Keqfloat[5]);
657  return 1;
658  }
659  }
660  } //end -A Low
661 
662  //hit in D is missing
663  if (config()->debug() > 4)
664  cout << "SelTrig: searching low-D" << endl;
665  for (i = 0; i < 80; i++) {
666  int val = val0.element(i) + val1.element(i) + val3.element(i);
667  if (val == 3 && i == mm[3]) { //Ref. is eqAC
668  code = 4;
669  LKMax = i;
670  int storefg = 1;
671 
672  //SV - XON time-ind.Keq suppr.
673  if (tiKes == 0) {
674  if (eq == 4 || eq == 8 || eq == 12 || eq == 23) {
675  if (config()->debug() > 3)
676  cout << "SelTrig: doing XON suppression!" << endl;
677  storefg = 0;
678  }
679  }
680 
681  //SV - RON suppression for low triggers
682  if (RON == 0) {
683  if (eq == 1 || eq == 2 || eq == 3 || eq == 24 || eq == 25) {
684  if (config()->debug() > 3)
685  cout << "SelTrig: doing RON low triggers suppression!" << endl;
686  storefg = 0;
687  }
688  }
689 
690  if (storefg) { // && _Xeq[eq][1] >=0){
691  //SV: K value is stored in 6 bits, so K=64->0, etc
692  if (LKMax > 63)
693  LKMax -= 64;
694 
695  store(eq,
696  code,
697  LKMax,
698  int(_Xeq[eq][0]),
699  Keqfloat[0],
700  Keqfloat[1],
701  Keqfloat[2],
702  Keqfloat[3],
703  Keqfloat[4],
704  Keqfloat[5]);
705  return 1;
706  }
707  }
708  } //end -D Low
709 
710  return 0;
711  } //end Low
712  return 0;
713 }
int AccPattACL() const
Acceptance pattern ACL.
Definition: DTConfigBti.h:88
int store(const int eq, const int code, const int K, const int X, float KeqAB=0., float KeqBC=0., float KeqCD=0., float KeqAC=0., float KeqBD=0., float KeqAD=0.)
Definition: DTBtiChip.cc:630
#define X(str)
Definition: MuonsGrabber.cc:38
int AccPattAC1() const
Acceptance pattern AC1.
Definition: DTConfigBti.h:79
float _Xeq[32][2]
Definition: DTBtiChip.h:194
void reset()
Definition: BitArray.h:215
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
float _Keq[32][6]
Definition: DTBtiChip.h:193
int AccPattAC2() const
Acceptance pattern AC2.
Definition: DTConfigBti.h:82
#define debug
Definition: HDRShower.cc:19
int AccPattACH() const
Acceptance pattern ACH.
Definition: DTConfigBti.h:85
int element(const int pos) const
Definition: BitArray.h:206
tuple cout
Definition: gather_cfg.py:144
bool RONflag() const
Redundant patterns flag RONDTBti/src/DTBtiChipEquations.cc:
Definition: DTConfigBti.h:91
std::ostream & print(std::ostream &o=std::cout) const
Definition: BitArray.h:340
DTConfigBti * config() const
Configuration set.
Definition: DTBtiChip.h:119
void acceptMask(BitArray< 80 > *BitArrPtr, int k, int accep)
void set(const int i)
Definition: BitArray.h:224
bool XON() const
X-patterns flag XON: activates tracks passing on the same side of 3 wires.
Definition: DTConfigBti.h:70
LocalPoint DTBtiChip::localPosition ( ) const
inline

Position in chamber frame (x is the one of first traco in slave plane)

Definition at line 95 of file DTBtiChip.h.

References _geom, _id, and DTTrigGeom::localPosition().

95 { return _geom->localPosition(_id); }
DTBtiId _id
Definition: DTBtiChip.h:176
DTTrigGeom * _geom
Definition: DTBtiChip.h:173
LocalPoint localPosition(const DTBtiId) const
Local position in chamber of a BTI.
Definition: DTTrigGeom.cc:508
bool DTBtiChip::matchEq ( float  eqA,
float  eqB,
int  AC 
)
private
int DTBtiChip::nCellHit ( ) const

Number of cells with hits.

Definition at line 266 of file DTBtiChip.cc.

References _digis, _id, DTBtiId::bti(), config(), gather_cfg::cout, ztail::d, DTConfigBti::debug(), mps_fire::i, and dqmiodumpmetadata::n.

Referenced by run().

266  {
267  int n = 0;
268  int i = 0;
269  for (auto const& d : _digis) {
270  if (!d.empty())
271  n++;
272  }
273  if (config()->debug() > 2) {
274  cout << n << " cells with hits found:" << endl;
275  }
276  if (config()->debug() > 2) {
277  for (i = 0; i < 9; i++) {
278  for (auto const& d : _digis[i]) {
279  cout << "DTBtiChip # " << _id.bti() << " cell " << i + 1;
280  cout << " --> drift time (tdc units): " << d->countsTDC() << endl;
281  d->print();
282  }
283  }
284  }
285  return n;
286  /*
287  //SV 2/IV/03 counting hits from _hits
288  int n=0;
289  int i=0;
290  for(i=0;i<9;i++) {
291  if( _hits[i].size() >0 ) n++;
292  }
293  if(config()->debug()>2) {
294  cout << n << " cells with hits found:" << endl;
295  }
296  if(config()->debug()>2) {
297  for(i=0;i<9;i++) {
298  vector<const DTBtiHit*>::const_iterator p;
299  for(p=_hits[i].begin();p<_hits[i].end();p++) {
300  cout << "DTBtiChip # " <<
301  number() <<
302  " cell " << i+1;
303  if((*p)->curTime()!=4000)
304  cout << " --> drift time: " << (*p)->curTime() << endl;
305  else
306  cout << " --> clock time: " << (*p)->clockTime() << endl;
307  }
308  }
309  }
310  return n;
311 */
312 }
DTBtiId _id
Definition: DTBtiChip.h:176
int debug() const
Debug flag.
Definition: DTConfigBti.h:58
std::array< std::vector< const DTDigi * >, 9 > _digis
Definition: DTBtiChip.h:179
tuple d
Definition: ztail.py:151
int bti() const
Returns the bti.
Definition: DTBtiId.h:63
tuple cout
Definition: gather_cfg.py:144
DTConfigBti * config() const
Configuration set.
Definition: DTBtiChip.h:119
int DTBtiChip::nTrig ( int  step) const

Number of triggers found.

Definition at line 327 of file DTBtiChip.cc.

References _trigs, gather_cfg::cout, DTConfig::NSTEPF, and DTConfig::NSTEPL.

Referenced by doLTS(), and DTBtiCard::runBTI().

327  {
329  cout << "DTBtiChip::nTrig: step out of range: " << step;
330  cout << " 0 returned" << endl;
331  return 0;
332  }
333  return _trigs[step - DTConfig::NSTEPF].size();
334 }
std::array< std::vector< std::unique_ptr< DTBtiTrig > >, DTConfig::NSTEPL-DTConfig::NSTEPF+1 > _trigs
Definition: DTBtiChip.h:184
static const int NSTEPF
Definition: DTConfig.h:35
static const int NSTEPL
Constants: first and last step to start trigger finding.
Definition: DTConfig.h:35
tuple cout
Definition: gather_cfg.py:144
step
Definition: StallMonitor.cc:98
int DTBtiChip::number ( ) const
inline

Return DTBtiChip number.

Definition at line 89 of file DTBtiChip.h.

References _id, and DTBtiId::bti().

Referenced by add_digi_clock(), and DTBtiCard::runBTI().

89 { return _id.bti(); }
DTBtiId _id
Definition: DTBtiChip.h:176
int bti() const
Returns the bti.
Definition: DTBtiId.h:63
DTBtiChip& DTBtiChip::operator= ( DTBtiChip &&  bti)
delete

Assignment operator.

DTBtiChip& DTBtiChip::operator= ( DTBtiChip const &  bti)
delete
int DTBtiChip::reSum ( int  a,
int  b 
)
inlineprivate

Definition at line 166 of file DTBtiChip.h.

References a, and reSumAr.

166 { return reSumAr[a][b + 2]; }
int reSumAr[3][5]
Definition: DTBtiChip.h:215
double b
Definition: hdecay.h:118
double a
Definition: hdecay.h:119
int DTBtiChip::reSum23 ( int  a,
int  b 
)
inlineprivate

Definition at line 167 of file DTBtiChip.h.

References a, and reSumAr23.

167 { return reSumAr23[a][b + 2]; }
int reSumAr23[3][5]
Definition: DTBtiChip.h:216
double b
Definition: hdecay.h:118
double a
Definition: hdecay.h:119
void DTBtiChip::reSumSet ( )
private

Definition at line 96 of file DTBtiChipEquations.cc.

Referenced by DTBtiChip().

96  {
97  reSumAr[2][2 + 2] = 0;
98  reSumAr[2][1 + 2] = 0;
99  reSumAr[2][0 + 2] = 0;
100  reSumAr[2][-1 + 2] = -1;
101  reSumAr[2][-2 + 2] = -1;
102 
103  reSumAr[1][2 + 2] = 1;
104  reSumAr[1][1 + 2] = 1;
105  reSumAr[1][0 + 2] = 0;
106  reSumAr[1][-1 + 2] = 0;
107  reSumAr[1][-2 + 2] = 0;
108 
109  reSumAr[0][2 + 2] = 1;
110  reSumAr[0][1 + 2] = 0;
111  reSumAr[0][0 + 2] = 0;
112  reSumAr[0][-1 + 2] = 0;
113  reSumAr[0][-2 + 2] = -1;
114 
115  reSumAr23[2][2 + 2] = 1;
116  reSumAr23[2][1 + 2] = 1;
117  reSumAr23[2][0 + 2] = 1;
118  reSumAr23[2][-1 + 2] = 0;
119  reSumAr23[2][-2 + 2] = 0;
120 
121  reSumAr23[1][2 + 2] = 1;
122  reSumAr23[1][1 + 2] = 1;
123  reSumAr23[1][0 + 2] = 0;
124  reSumAr23[1][-1 + 2] = 0;
125  reSumAr23[1][-2 + 2] = 0;
126 
127  reSumAr23[0][2 + 2] = 1;
128  reSumAr23[0][1 + 2] = 0;
129  reSumAr23[0][0 + 2] = 0;
130  reSumAr23[0][-1 + 2] = 0;
131  reSumAr23[0][-2 + 2] = -1;
132 }
int reSumAr23[3][5]
Definition: DTBtiChip.h:216
int reSumAr[3][5]
Definition: DTBtiChip.h:215
void DTBtiChip::run ( )

Run DTBtiChip algorithm.

Definition at line 482 of file DTBtiChip.cc.

References _geom, _id, _nStepUsedHits, DTBtiId::bti(), computeEqs(), computeSums(), config(), gather_cfg::cout, currentIntStep(), currentStep(), debug, DTConfigBti::debug(), doLTS(), findTrig(), init(), init_done, DTTrigGeom::nCell(), nCellHit(), DTConfig::NSTEPF, DTConfig::NSTEPL, DTBtiId::superlayer(), superlayer(), and tick().

Referenced by DTBtiCard::runBTI().

482  {
483  // Debugging...
484  if (config()->debug() > 2) {
485  cout << "DTBtiChip::run: Processing BTI " << _id.bti() << endl;
486  cout << " in SL " << _id.superlayer() << endl;
487  }
488  // End debugging
489 
490  if (_id.bti() < 1 || _id.bti() > _geom->nCell(superlayer())) {
491  if (config()->debug() > 1)
492  cout << "DTBtiChip::run : wrong BTI number: " << _id.bti() << endl;
493  return;
494  }
495 
496  // run algorithm
497  if (!init_done)
498  init();
499  if (nCellHit() < 3)
500  return; // check that at least 3 cell have hits
501 
502  for (int ints = 0; ints < 2 * DTConfig::NSTEPL; ints++) { // 80 MHz
503  tick(); // Do a 12.5 ns step
504 
505  // In electronics equations are computed every 12.5 ns
506  // but since triggers are searched for only every 25 ns, skip
507  // also equation's computing at odd values of internal step
508  if ((currentIntStep() / 2) * 2 != currentIntStep())
509  continue;
510  //if((currentIntStep()/2)*2==currentIntStep())continue;
511 
512  if (config()->debug() > 2) {
513  cout << "DTBtiChip::run : internal step " << currentIntStep();
514  cout << " number of JTRIG hits is " << _nStepUsedHits << endl;
515  }
516  if (currentStep() >= DTConfig::NSTEPF && _nStepUsedHits > 2) {
517  // at least 3 good hits in this step -> run algorithm
518  computeSums();
519  computeEqs();
520  findTrig();
521  }
522  }
523  if (config()->LTS() > 0)
524  doLTS(); // low trigger suppression
525 }
DTBtiId _id
Definition: DTBtiChip.h:176
int debug() const
Debug flag.
Definition: DTConfigBti.h:58
int superlayer() const
Return superlayer.
Definition: DTBtiChip.h:92
void tick()
Definition: DTBtiChip.cc:527
static const int NSTEPF
Definition: DTConfig.h:35
int init_done
Definition: DTBtiChip.h:209
void doLTS()
Definition: DTBtiChip.cc:588
int currentIntStep() const
Definition: DTBtiChip.h:143
int superlayer() const
Returns the superlayer.
Definition: DTBtiId.h:61
DTTrigGeom * _geom
Definition: DTBtiChip.h:173
static const int NSTEPL
Constants: first and last step to start trigger finding.
Definition: DTConfig.h:35
int bti() const
Returns the bti.
Definition: DTBtiId.h:63
#define debug
Definition: HDRShower.cc:19
int currentStep() const
Definition: DTBtiChip.h:142
int _nStepUsedHits
Definition: DTBtiChip.h:191
void init()
Definition: DTBtiChip.cc:407
int nCellHit() const
Number of cells with hits.
Definition: DTBtiChip.cc:266
tuple cout
Definition: gather_cfg.py:144
DTConfigBti * config() const
Configuration set.
Definition: DTBtiChip.h:119
int nCell(int sl) const
Number of BTIs in a required superlayer (i.e. nCells in lay 1)
Definition: DTTrigGeom.h:88
int DTBtiChip::sector ( void  ) const
inline

Return sector number.

Definition at line 134 of file DTBtiChip.h.

References _geom, and DTTrigGeom::sector().

Referenced by geometryXMLparser.DTAlignable::index().

134 { return _geom->sector(); }
int sector() const
Return sector number.
Definition: DTTrigGeom.h:65
DTTrigGeom * _geom
Definition: DTBtiChip.h:173
void DTBtiChip::setSnap ( )
private

Definition at line 699 of file DTBtiChip.cc.

References config(), gather_cfg::cout, debug, RE23, DTConfigBti::RE43(), RE43, ST, ST2, ST23, ST3, ST4, DTConfigBti::ST43(), ST43, ST5, and ST7.

Referenced by DTBtiChip().

699  {
700  //set the internally calculated drift velocity parameters
701  ST43 = config()->ST43();
702  RE43 = config()->RE43();
703  ST23 = int(double(ST43) / 2.);
704  RE23 = (RE43 == 1) ? 2 : int(double(RE43) / 2.);
705 
706  ST = int(double(ST43) * 3. / 4. + double(RE43) * 1. / 4.);
707  ST2 = int((double(ST43) * 3. / 4. + double(RE43) * 1. / 4.) * 2.);
708  ST3 = int((double(ST43) * 3. / 4. + double(RE43) * 1. / 4.) * 3.);
709  ST4 = int((double(ST43) * 3. / 4. + double(RE43) * 1. / 4.) * 4.);
710  ST5 = int((double(ST43) * 3. / 4. + double(RE43) * 1. / 4.) * 5.);
711  ST7 = int((double(ST43) * 3. / 4. + double(RE43) * 1. / 4.) * 7.);
712 
713  if (config()->debug() > 3) {
714  cout << "Snap register dump: " << endl;
715  cout << "ST43 = " << ST43 << endl;
716  cout << "RE43 = " << RE43 << endl;
717  cout << "ST23 = " << ST23 << endl;
718  cout << "RE23 = " << RE23 << endl;
719  cout << "ST = " << ST << endl;
720  cout << "ST2 = " << ST2 << endl;
721  cout << "ST3 = " << ST3 << endl;
722  cout << "ST4 = " << ST4 << endl;
723  cout << "ST5 = " << ST5 << endl;
724  cout << "ST7 = " << ST7 << endl;
725  }
726 }
int ST43() const
ST and RE parameters for drift velocity.
Definition: DTConfigBti.h:118
int RE43() const
Definition: DTConfigBti.h:119
int RE43
Definition: DTBtiChip.h:213
int ST23
Definition: DTBtiChip.h:213
#define debug
Definition: HDRShower.cc:19
int RE23
Definition: DTBtiChip.h:213
tuple cout
Definition: gather_cfg.py:144
int ST43
Definition: DTBtiChip.h:213
DTConfigBti * config() const
Configuration set.
Definition: DTBtiChip.h:119
int DTBtiChip::station ( ) const
inline

Return station number.

Definition at line 131 of file DTBtiChip.h.

References _geom, and DTTrigGeom::station().

Referenced by geometryXMLparser.DTAlignable::index(), and geometryXMLparser.CSCAlignable::index().

131 { return _geom->station(); }
DTTrigGeom * _geom
Definition: DTBtiChip.h:173
int station() const
Return station number.
Definition: DTTrigGeom.h:62
int DTBtiChip::store ( const int  eq,
const int  code,
const int  K,
const int  X,
float  KeqAB = 0.,
float  KeqBC = 0.,
float  KeqCD = 0.,
float  KeqAC = 0.,
float  KeqBD = 0.,
float  KeqAD = 0. 
)
private

Definition at line 630 of file DTBtiChip.cc.

References _MaxKAcc, _MinKAcc, _thisStepUsedHit, addTrig(), config(), gather_cfg::cout, currentStep(), debug, h, eostools::move(), and X.

639  {
640  // remove negative position triggers
641  if (X < 0)
642  return 0;
643 
644  // accept in range triggers (acceptances defined in constructor)
645  if (K >= _MinKAcc && K <= _MaxKAcc) {
646  int trig_step = currentStep();
647 
648  /*
649  //SV test 27/I/2003 1-clock delay for critical patterns in default ACx configuration
650  int AC1 = config()->AccPattAC1(); //default 0
651  int AC2 = config()->AccPattAC2(); //default 3
652  int ACH = config()->AccPattACH(); //default 1
653  int ACL = config()->AccPattACL(); //default 2
654 
655  if(AC1==0 && AC2==3 && ACH==1 && ACL==2){
656  if(eq==1 || eq==4 || eq==7 || eq==8 || eq==9 || eq==12 || eq==15
657  || eq==19 || eq==22 || eq==23 || eq==24 || eq==25 || eq==27 )
658  trig_step = currentStep()+1;
659  }
660 */
661  //store strobe: SV no strobe defined for this setup SV 15/I/2007
662  int strobe = -1;
663 
664  // create a new trigger
665  float Keq[6] = {KeqAB, KeqBC, KeqCD, KeqAC, KeqBD, KeqAD};
666  //DTBtiTrig* trg = new DTBtiTrig(this,code,K,X,currentStep(),eq);
667  auto trg = std::make_unique<DTBtiTrig>(this, code, K, X, trig_step, eq, strobe, Keq);
668 
669  // store also the digis
670  for (auto& h : _thisStepUsedHit) {
671  if (h) {
672  const DTDigi* digi = h->hitDigi();
673  if (digi)
674  trg->addDigi(digi);
675  }
676  }
677 
678  // Debugging...
679  if (config()->debug() > 1)
680  trg->print();
681  // end debugging
682 
683  //addTrig(currentStep(),trg);
684  addTrig(trig_step, std::move(trg));
685 
686  return 1;
687  } else {
688  // remove out of range triggers (acceptances defined in constructor)
689  if (config()->debug() > 2) {
690  cout << "DTBtiChip::store, REJECTED TRIGGER at step " << currentStep();
691  cout << " allowed K range in theta view is: [";
692  cout << _MinKAcc << "," << _MaxKAcc << "]";
693  cout << "K value is " << K << endl;
694  }
695  return 0;
696  } //end else
697 } //end store
int _MinKAcc
Definition: DTBtiChip.h:195
#define X(str)
Definition: MuonsGrabber.cc:38
std::array< DTBtiHit *, 9 > _thisStepUsedHit
Definition: DTBtiChip.h:190
int _MaxKAcc
Definition: DTBtiChip.h:196
def move
Definition: eostools.py:511
Definition: DTDigi.h:17
#define debug
Definition: HDRShower.cc:19
int currentStep() const
Definition: DTBtiChip.h:142
tuple cout
Definition: gather_cfg.py:144
void addTrig(int step, std::unique_ptr< DTBtiTrig > btitrig)
Definition: DTBtiChip.cc:314
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
DTConfigBti * config() const
Configuration set.
Definition: DTBtiChip.h:119
void DTBtiChip::sum ( const int  s,
const int  a,
const int  b 
)
private

Definition at line 80 of file DTBtiChipEquations.cc.

80  {
81  //
82  // fill the sums and difs arrays
83  // a and b are the cell numbers (in the range [1,9])
84  // s is the sum number (in the range [1,25])
85  //
86 
87  if (_thisStepUsedHit[a - 1] != nullptr && _thisStepUsedHit[b - 1] != nullptr) {
88  _sums[s - 1] = (float)(_thisStepUsedHit[a - 1]->jtrig() + _thisStepUsedHit[b - 1]->jtrig());
89  _difs[s - 1] = (float)(_thisStepUsedHit[a - 1]->jtrig() - _thisStepUsedHit[b - 1]->jtrig());
90  } else {
91  _sums[s - 1] = 1000;
92  _difs[s - 1] = 1000;
93  }
94 }
std::array< float, 25 > _difs
Definition: DTBtiChip.h:192
std::array< DTBtiHit *, 9 > _thisStepUsedHit
Definition: DTBtiChip.h:190
double b
Definition: hdecay.h:118
double a
Definition: hdecay.h:119
std::array< float, 25 > _sums
Definition: DTBtiChip.h:192
int DTBtiChip::superlayer ( ) const
inline

Return superlayer.

Definition at line 92 of file DTBtiChip.h.

References _id, and DTBtiId::superlayer().

Referenced by add_digi(), geometryXMLparser.DTAlignable::index(), and run().

92 { return _id.superlayer(); }
DTBtiId _id
Definition: DTBtiChip.h:176
int superlayer() const
Returns the superlayer.
Definition: DTBtiId.h:61
void DTBtiChip::tick ( )
private

Definition at line 527 of file DTBtiChip.cc.

References _curStep, _hits, _nStepUsedHits, _thisStepUsedHit, config(), gather_cfg::cout, currentIntStep(), debug, DTConfigBti::debug(), and h.

Referenced by run().

527  {
528  //
529  // fills the DTBtiChip registers ( _thisStepUsedHit[cell] )
530  // for a given clock (Syncronizer and Shaper functionalities)
531  //
532 
533  _curStep++; // increase internal step (12.5 ns --> 80 MHz)
534 
535  // debugging
536  if (config()->debug() > 2) {
537  cout << "DTBtiChip::tick: internal step is now " << currentIntStep() << endl;
538  }
539  // end debugging
540 
541  // Loop on cells
542  _nStepUsedHits = 0;
543  for (int cell = 0; cell < 9; cell++) {
544  // decrease drift time by 12.5 ns for each hit
545  for (auto& h : _hits[cell]) {
546  h->stepDownTime();
547  }
548 
549  // loop on hits
550  _thisStepUsedHit[cell] = nullptr;
551  for (auto& h : _hits[cell]) {
552  if (h->isDrifting()) { // hit is drifting
553  break; // --> don't consider others
554  } else if (h->isInsideReg()) { // hit is already in registers
555  _thisStepUsedHit[cell] = h;
556  _nStepUsedHits++;
557  // debugging
558  if (config()->debug() > 2) {
559  if (h->curTime() != 4000)
560  cout << "DTBtiChip::tick: hit in register: time=" << h->curTime();
561  else
562  cout << "DTBtiChip::tick: hit in register! " << endl;
563  cout << " jtrig=" << h->jtrig() << endl;
564  }
565  // end debugging
566  break; // --> don't consider other triggers
567  }
568  // hit is not drifting and not in registers: it is gone out of register, but
569  // jtrig value is still=ST ; save in array and consider next one if exists
570  } // end loop on cell hits
571 
572  // debugging...
573  if (config()->debug() > 2) {
574  if (_thisStepUsedHit[cell] != nullptr) {
575  cout << "int. step=" << currentIntStep() << " cell=" << cell + 1;
576  cout << " jtrig=" << _thisStepUsedHit[cell]->jtrig();
577  if (_thisStepUsedHit[cell]->curTime() != 4000)
578  cout << " (time=" << _thisStepUsedHit[cell]->curTime() << ")" << endl;
579  else
580  cout << endl;
581  }
582  }
583  // end debugging
584 
585  } // end loop on cells
586 }
int debug() const
Debug flag.
Definition: DTConfigBti.h:58
std::array< DTBtiHit *, 9 > _thisStepUsedHit
Definition: DTBtiChip.h:190
int currentIntStep() const
Definition: DTBtiChip.h:143
int _curStep
Definition: DTBtiChip.h:187
std::array< std::vector< DTBtiHit * >, 9 > _hits
Definition: DTBtiChip.h:188
#define debug
Definition: HDRShower.cc:19
int _nStepUsedHits
Definition: DTBtiChip.h:191
tuple cout
Definition: gather_cfg.py:144
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
DTConfigBti * config() const
Configuration set.
Definition: DTBtiChip.h:119
DTBtiTrig const * DTBtiChip::trigger ( int  step,
unsigned  n 
) const

Return the requested trigger.

Definition at line 345 of file DTBtiChip.cc.

References _trigs, gather_cfg::cout, dqmiodumpmetadata::n, DTConfig::NSTEPF, DTConfig::NSTEPL, AlCaHLTBitMon_ParallelJobs::p, and findQualityFiles::size.

Referenced by doLTS().

345  {
347  cout << "DTBtiChip::trigger: step out of range: " << step;
348  cout << " empty pointer returned" << endl;
349  return nullptr;
350  }
351  if (n < 1 || n > _trigs[step - DTConfig::NSTEPF].size()) {
352  cout << "DTBtiChip::trigger: requested trigger does not exist: " << n;
353  cout << " empty pointer returned!" << endl;
354  return nullptr;
355  }
356  auto p = _trigs[step - DTConfig::NSTEPF].begin();
357  return (*(p + n - 1)).get();
358 }
std::array< std::vector< std::unique_ptr< DTBtiTrig > >, DTConfig::NSTEPL-DTConfig::NSTEPF+1 > _trigs
Definition: DTBtiChip.h:184
static const int NSTEPF
Definition: DTConfig.h:35
static const int NSTEPL
Constants: first and last step to start trigger finding.
Definition: DTConfig.h:35
tuple cout
Definition: gather_cfg.py:144
step
Definition: StallMonitor.cc:98
tuple size
Write out results.
DTBtiTrigData DTBtiChip::triggerData ( int  step,
unsigned  n 
) const

Return the data part of the requested trigger.

Definition at line 360 of file DTBtiChip.cc.

References _trigs, gather_cfg::cout, dqmiodumpmetadata::n, DTConfig::NSTEPF, DTConfig::NSTEPL, AlCaHLTBitMon_ParallelJobs::p, and findQualityFiles::size.

Referenced by DTBtiCard::runBTI().

360  {
362  cout << "DTBtiChip::triggerData: step out of range: " << step;
363  cout << " dummy trigger returned" << endl;
364  return DTBtiTrigData();
365  }
366  if (n < 1 || n > _trigs[step - DTConfig::NSTEPF].size()) {
367  cout << "DTBtiChip::triggerData: requested trig. doesn't exist: " << n;
368  cout << " dummy trigger returned!" << endl;
369  return DTBtiTrigData();
370  }
371  auto p = _trigs[step - DTConfig::NSTEPF].begin();
372  return (*(p + n - 1))->data();
373 }
std::array< std::vector< std::unique_ptr< DTBtiTrig > >, DTConfig::NSTEPL-DTConfig::NSTEPF+1 > _trigs
Definition: DTBtiChip.h:184
static const int NSTEPF
Definition: DTConfig.h:35
static const int NSTEPL
Constants: first and last step to start trigger finding.
Definition: DTConfig.h:35
tuple cout
Definition: gather_cfg.py:144
step
Definition: StallMonitor.cc:98
tuple size
Write out results.
vector< std::unique_ptr< DTBtiTrig > > const & DTBtiChip::trigList ( int  step) const

Definition at line 336 of file DTBtiChip.cc.

References _trigs, gather_cfg::cout, DTConfig::NSTEPF, and DTConfig::NSTEPL.

336  {
338  cout << "DTBtiChip::trigList: step out of range: " << step;
339  cout << " empty pointer returned" << endl;
340  //return 0;
341  }
342  return _trigs[step - DTConfig::NSTEPF];
343 }
std::array< std::vector< std::unique_ptr< DTBtiTrig > >, DTConfig::NSTEPL-DTConfig::NSTEPF+1 > _trigs
Definition: DTBtiChip.h:184
static const int NSTEPF
Definition: DTConfig.h:35
static const int NSTEPL
Constants: first and last step to start trigger finding.
Definition: DTConfig.h:35
tuple cout
Definition: gather_cfg.py:144
step
Definition: StallMonitor.cc:98
int DTBtiChip::wheel ( ) const
inline

Return wheel number.

Definition at line 128 of file DTBtiChip.h.

References _geom, and DTTrigGeom::wheel().

Referenced by geometryXMLparser.DTAlignable::index().

128 { return _geom->wheel(); }
int wheel() const
Return wheel number.
Definition: DTTrigGeom.h:59
DTTrigGeom * _geom
Definition: DTBtiChip.h:173

Member Data Documentation

std::array<int, 9> DTBtiChip::_busyStart_clock
private

Definition at line 210 of file DTBtiChip.h.

Referenced by add_digi(), add_digi_clock(), and DTBtiChip().

DTBtiCard* DTBtiChip::_card
private

Definition at line 171 of file DTBtiChip.h.

Referenced by DTBtiChip().

DTConfigBti* DTBtiChip::_config
private

Definition at line 174 of file DTBtiChip.h.

Referenced by config().

int DTBtiChip::_curStep
private

Definition at line 187 of file DTBtiChip.h.

Referenced by currentIntStep(), currentStep(), init(), init_clock(), and tick().

std::array<float, 25> DTBtiChip::_difs
private

Definition at line 192 of file DTBtiChip.h.

Referenced by init(), and init_clock().

std::array<std::vector<const DTDigi*>, 9> DTBtiChip::_digis
private

Definition at line 179 of file DTBtiChip.h.

Referenced by add_digi(), clear(), DTBtiChip(), get_CellDigis(), init(), and nCellHit().

std::array<std::vector<int>, 9> DTBtiChip::_digis_clock
private

Definition at line 181 of file DTBtiChip.h.

Referenced by add_digi_clock(), clear(), and init_clock().

DTTrigGeom* DTBtiChip::_geom
private

Definition at line 173 of file DTBtiChip.h.

Referenced by add_digi(), CMSPosition(), DTBtiChip(), geom(), localPosition(), run(), sector(), station(), and wheel().

std::array<std::vector<DTBtiHit*>, 9> DTBtiChip::_hits
private
DTBtiId DTBtiChip::_id
private
float DTBtiChip::_JTR[32][3]
private

Definition at line 208 of file DTBtiChip.h.

float DTBtiChip::_Keq[32][6]
private

Definition at line 193 of file DTBtiChip.h.

float DTBtiChip::_KTR[32][2]
private

Definition at line 207 of file DTBtiChip.h.

int DTBtiChip::_MaxKAcc
private

Definition at line 196 of file DTBtiChip.h.

Referenced by DTBtiChip(), and store().

int DTBtiChip::_MaxKcenterTraco
private

Definition at line 200 of file DTBtiChip.h.

int DTBtiChip::_MaxKleftTraco
private

Definition at line 198 of file DTBtiChip.h.

int DTBtiChip::_MaxKrightTraco
private

Definition at line 202 of file DTBtiChip.h.

int DTBtiChip::_MinKAcc
private

Definition at line 195 of file DTBtiChip.h.

Referenced by DTBtiChip(), and store().

int DTBtiChip::_MinKcenterTraco
private

Definition at line 199 of file DTBtiChip.h.

int DTBtiChip::_MinKleftTraco
private

Definition at line 197 of file DTBtiChip.h.

int DTBtiChip::_MinKrightTraco
private

Definition at line 201 of file DTBtiChip.h.

int DTBtiChip::_nStepUsedHits
private

Definition at line 191 of file DTBtiChip.h.

Referenced by run(), and tick().

std::array<float, 25> DTBtiChip::_sums
private

Definition at line 192 of file DTBtiChip.h.

Referenced by init(), and init_clock().

std::array<DTBtiHit*, 9> DTBtiChip::_thisStepUsedHit
private

Definition at line 190 of file DTBtiChip.h.

Referenced by init(), init_clock(), store(), and tick().

std::array<int, 9> DTBtiChip::_thisStepUsedTimes
private

Definition at line 189 of file DTBtiChip.h.

std::array<std::vector<std::unique_ptr<DTBtiTrig> >, DTConfig::NSTEPL - DTConfig::NSTEPF + 1> DTBtiChip::_trigs
private

Definition at line 184 of file DTBtiChip.h.

Referenced by addTrig(), clear(), DTBtiChip(), eraseTrigger(), nTrig(), trigger(), triggerData(), and trigList().

float DTBtiChip::_Xeq[32][2]
private

Definition at line 194 of file DTBtiChip.h.

float DTBtiChip::_XeqAB_patt0
private

Definition at line 205 of file DTBtiChip.h.

float DTBtiChip::_XeqAC_patt0
private

Definition at line 204 of file DTBtiChip.h.

float DTBtiChip::_XeqBD_patt0
private

Definition at line 204 of file DTBtiChip.h.

float DTBtiChip::_XeqCD_patt0
private

Definition at line 205 of file DTBtiChip.h.

int DTBtiChip::init_done
private

Definition at line 209 of file DTBtiChip.h.

Referenced by DTBtiChip(), init_clock(), and run().

int DTBtiChip::RE23
private

Definition at line 213 of file DTBtiChip.h.

Referenced by setSnap().

int DTBtiChip::RE43
private

Definition at line 213 of file DTBtiChip.h.

Referenced by setSnap().

int DTBtiChip::reSumAr[3][5]
private

Definition at line 215 of file DTBtiChip.h.

Referenced by reSum().

int DTBtiChip::reSumAr23[3][5]
private

Definition at line 216 of file DTBtiChip.h.

Referenced by reSum23().

int DTBtiChip::ST
private

Definition at line 213 of file DTBtiChip.h.

Referenced by setSnap().

int DTBtiChip::ST2
private

Definition at line 213 of file DTBtiChip.h.

Referenced by setSnap().

int DTBtiChip::ST23
private

Definition at line 213 of file DTBtiChip.h.

Referenced by setSnap().

int DTBtiChip::ST3
private

Definition at line 213 of file DTBtiChip.h.

Referenced by setSnap().

int DTBtiChip::ST4
private

Definition at line 213 of file DTBtiChip.h.

Referenced by setSnap().

int DTBtiChip::ST43
private

Definition at line 213 of file DTBtiChip.h.

Referenced by setSnap().

int DTBtiChip::ST5
private

Definition at line 213 of file DTBtiChip.h.

Referenced by setSnap().

int DTBtiChip::ST7
private

Definition at line 213 of file DTBtiChip.h.

Referenced by setSnap().