CMS 3D CMS Logo

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, EnergyCorrector::c, DTTrigGeom::cellH(), DTTrigGeom::cellPitch(), DTConfigBti::CH(), DTConfigBti::CL(), CMSPosition(), DTTrigGeom::CMSPosition(), config(), gather_cfg::cout, edmIntegrityCheck::d, DTConfigBti::DEADpar(), debug, runTauDisplay::gp, h, init_done, DTConfigBti::KAccTheta(), gen::n, PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), reSumSet(), setSnap(), DTConfigBti::ST(), DTTrigGeom::statId(), DTBtiId::superlayer(), lumiQTWidget::t, funct::tan(), theta(), DTBtiCard::useAcceptParamFlag(), and PV3DBase< T, PVType, FrameType >::z().

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

Copy constructor.

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

Destructor.

Definition at line 215 of file DTBtiChip.cc.

References clear().

215  {
216  clear();
217 }
void clear()
delete hits and triggers
Definition: DTBtiChip.cc:413

Member Function Documentation

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

Definition at line 678 of file DTBtiChipSelTrig.cc.

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

Referenced by currentIntStep().

679 {
680  if(k>=0&&k<78){
681  if(config()->debug()>4)
682  cout<<"DTBtiChip::acceptMask -> Setting acceptance for k="<<k<<endl;
683 
684  if(accep==0){ //code 00
685  if(k>=1)
686  BitArrPtr->set(k-1);
687  BitArrPtr->set(k);
688  BitArrPtr->set(k+1);
689  }
690  if(accep==1){ //code 01
691  BitArrPtr->set(k);
692  BitArrPtr->set(k+1);
693  BitArrPtr->set(k+2);
694  }
695  if(accep==2){ //code 10
696  if(k>1)
697  BitArrPtr->set(k-2);
698  if(k>=1)
699  BitArrPtr->set(k-1);
700  BitArrPtr->set(k);
701  }
702  if(accep==3){ //code 11
703  if(k>1)
704  BitArrPtr->set(k-2);
705  if(k>=1)
706  BitArrPtr->set(k-1);
707  BitArrPtr->set(k);
708  BitArrPtr->set(k+1);
709  BitArrPtr->set(k+2);
710  }
711  }
712 
713 
714  if(config()->debug()>4)
715  cout<<"DTBtiChip::acceptMask -> END "<<endl;
716 
717 }
int k[5][pyjets_maxn]
#define debug
Definition: HDRShower.cc:19
DTConfigBti * config() const
Configuration set.
Definition: DTBtiChip.h:121
void set(const int i)
Definition: BitArray.h:230
void DTBtiChip::add_digi ( int  cell,
const DTDigi digi 
)

Add a digi to the DTBtiChip.

Definition at line 220 of file DTBtiChip.cc.

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

Referenced by DTBtiCard::loadBTI().

220  {
221 
222  if(_id.bti()<1 || _id.bti() >_geom->nCell(superlayer()))return;
223  if(cell<1 || cell>9){
224  cout << "DTBtiChip::add_digi : wrong cell number: " << cell;
225  cout << ". Digi not added!" << endl;
226  return;
227  }
228 
229  int DEAD = config()->DEADpar();
230  float stepTimeTdc = DTBtiHit::_stepTimeTdc;
231 
232 
233  if( int(digi->countsTDC()/stepTimeTdc) - _busyStart_clock[cell-1] > DEAD ){
234  _busyStart_clock[cell-1] = int(digi->countsTDC()/stepTimeTdc);
235  _digis[cell-1].push_back(digi);
236 
237  // debugging
238  if(config()->debug()>1){
239  cout << "DTBtiChip::add_digi: DTBtiChip # " <<_id.bti() <<
240  " cell " << cell << " --> drift time (tdc units)= " << digi->countsTDC()<< endl;
241  digi->print();
242  }
243  }
244  else {
245  // debugging
246  if(config()->debug()>1)
247  cout << "DTBtiChip::add_digi: DTBtiChip # " <<_id.bti() <<
248  " cell " << cell << " in dead time -> digi not added! " << endl;
249  }
250 
251 }
DTBtiId _id
Definition: DTBtiChip.h:176
int superlayer() const
Return superlayer.
Definition: DTBtiChip.h:94
int DEADpar() const
Wire DEAD time parameter.
Definition: DTConfigBti.h:127
void print() const
Print content of digi.
Definition: DTDigi.cc:87
std::array< int, 9 > _busyStart_clock
Definition: DTBtiChip.h:210
static const float _stepTimeTdc
Definition: DTBtiHit.h:114
DTTrigGeom * _geom
Definition: DTBtiChip.h:173
uint32_t countsTDC() const
Get raw TDC count.
Definition: DTDigi.cc:65
std::array< std::vector< const DTDigi * >, 9 > _digis
Definition: DTBtiChip.h:179
int bti() const
Returns the bti.
Definition: DTBtiId.h:75
#define debug
Definition: HDRShower.cc:19
DTConfigBti * config() const
Configuration set.
Definition: DTBtiChip.h:121
int nCell(int sl) const
Number of BTIs in a required superlayer (i.e. nCells in lay 1)
Definition: DTTrigGeom.h:89
void DTBtiChip::add_digi_clock ( int  cell,
int  clock_digi 
)

Add a clock digi to the DTBtiChip.

Definition at line 255 of file DTBtiChip.cc.

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

255  {
256 
257  if(cell<1 || cell>9){
258  cout << "DTBtiChip::add_digi_clock : wrong cell number: " << cell;
259  cout << ". Digi not added!" << endl;
260  return;
261  }
262 
263  int DEAD = config()->DEADpar();
264 
265  if( digi - _busyStart_clock[cell-1] > DEAD ){
266  _busyStart_clock[cell-1] = digi;
267  _digis_clock[cell-1].push_back(digi);
268  // debugging
269  if(config()->debug()>1)
270  cout << "DTBtiChip::add_digi_clock: DTBtiChip # " <<number() <<
271  " cell " << cell << " --> clock time = " << digi << endl;
272  }
273  else{
274  // debugging
275  if(config()->debug()>1)
276  cout << "DTBtiChip::add_digi_clock: DTBtiChip # " << number() <<
277  " cell " << cell << " in dead time -> digi not added! " << endl;
278  }
279 }
int DEADpar() const
Wire DEAD time parameter.
Definition: DTConfigBti.h:127
std::array< std::vector< int >, 9 > _digis_clock
Definition: DTBtiChip.h:181
std::array< int, 9 > _busyStart_clock
Definition: DTBtiChip.h:210
int number() const
Return DTBtiChip number.
Definition: DTBtiChip.h:91
#define debug
Definition: HDRShower.cc:19
DTConfigBti * config() const
Configuration set.
Definition: DTBtiChip.h:121
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 333 of file DTBtiChip.cc.

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

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

333  {
335  if(config()->debug()>3)
336  cout << "DTBtiChip: adding trigger..." <<endl;
337  _trigs[step-DTConfig::NSTEPF].emplace_back(std::move(btitrig));
338  } else {
339  if(config()->debug()>3){
340  cout << "DTBtiChip::addTrig: step " << step ;
341  cout << " outside range. Trigger not added" << endl;
342  }
343  }
344 }
static const int NSTEPF
Definition: DTConfig.h:36
std::array< std::vector< std::unique_ptr< DTBtiTrig > >, DTConfig::NSTEPL-DTConfig::NSTEPF+1 > _trigs
Definition: DTBtiChip.h:184
static const int NSTEPL
Constants: first and last step to start trigger finding.
Definition: DTConfig.h:36
#define debug
Definition: HDRShower.cc:19
step
Definition: StallMonitor.cc:94
DTConfigBti * config() const
Configuration set.
Definition: DTBtiChip.h:121
def move(src, dest)
Definition: eostools.py:511
void DTBtiChip::clear ( void  )

delete hits and triggers

Definition at line 413 of file DTBtiChip.cc.

References _digis, _digis_clock, _hits, _trigs, EnergyCorrector::c, config(), gather_cfg::cout, edmIntegrityCheck::d, debug, h, and lumiQTWidget::t.

Referenced by get_CellDigis(), and ~DTBtiChip().

413  {
414 
415  if(config()->debug()>3)
416  cout << "DTBtiChip::clear()" << endl;
417 
418  for(auto& d: _digis) {
419  d.clear();
420  }
421  for(auto& c: _digis_clock) {
422  c.clear();
423  }
424  for(auto& h: _hits) {
425  h.clear();
426  }
427 
428  for(auto& t: _trigs) {
429  t.clear();
430  }
431 }
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
std::array< std::vector< int >, 9 > _digis_clock
Definition: DTBtiChip.h:181
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
std::array< std::vector< DTBtiHit * >, 9 > _hits
Definition: DTBtiChip.h:188
#define debug
Definition: HDRShower.cc:19
DTConfigBti * config() const
Configuration set.
Definition: DTBtiChip.h:121
GlobalPoint DTBtiChip::CMSPosition ( ) const
inline

Position in CMS frame.

Definition at line 100 of file DTBtiChip.h.

References _geom, _id, DTTrigGeom::CMSPosition(), nCellHit(), nTrig(), trigger(), triggerData(), and trigList().

Referenced by DTBtiChip().

100 { 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:188
void DTBtiChip::computeEqs ( )
private

Definition at line 145 of file DTBtiChipEquations.cc.

References begin, looper::config, gather_cfg::cout, relativeConstraints::empty, objects.autophobj::float, mps_fire::i, and createfilelist::int.

Referenced by currentIntStep(), and run().

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

Definition at line 39 of file DTBtiChipEquations.cc.

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

Referenced by currentIntStep(), and run().

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

Configuration set.

testing DTConfigBti

Definition at line 121 of file DTBtiChip.h.

References _config.

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

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

Definition at line 148 of file DTBtiChip.h.

References _curStep, and objects.autophobj::float.

Referenced by run(), and store().

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

Definition at line 625 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 currentIntStep(), and run().

625  {
626 
627  if(config()->debug()>2)
628  cout<<"Do LTS"<<endl;
629  int lts = config()->LTS();
630  int nbxlts = config()->SET();
631 
632  // Do LTS only on the requested SL
633  //if (superlayer()==2 && lts==1) return;
634  //if (superlayer()!=2 && lts==2) return;
635  //new DTConfig: do LTS only is LTS!=0 --> somewhat redundant !
636  if (lts==0) return;
637 
638  // loop on steps
639  for(int is=DTConfig::NSTEPF; is<=DTConfig::NSTEPL; is++) {
640  if(nTrig(is)>0) { // non empty step
641  if( trigger(is,1)->code()==8 ) { // HTRIG at this step
642  // do LTS on nbxLTS[superlayer] following steps
643  for(int js=is+1;(js<=is+nbxlts&&js<=DTConfig::NSTEPL);js++){
644  if(nTrig(js)>0) { // non empty step
645  DTBtiTrig const* tr = trigger(js,1);
646  if( tr->code()<8 && (lts==1 || lts==3)) {
647  if(config()->debug()>3)
648  cout<<"LTS: erasing trigger!"<<endl;
649  eraseTrigger(js,1); // delete trigger
650  }
651  }
652  }
653  // do LTS on previous step
654  if(is>DTConfig::NSTEPF && nTrig(is-1)>0) { // non empty step
655  DTBtiTrig const* tr = trigger(is-1,1);
656  if( tr->code()<8 && (lts==2 || lts==3) ) {
657  if(config()->debug()>3)
658  cout<<"LTS: erasing trigger!"<<endl;
659  eraseTrigger(is-1,1); // delete trigger
660  }
661  }
662 
663  }
664  }
665  }
666 }
int debug() const
Debug flag.
Definition: DTConfigBti.h:62
void eraseTrigger(int step, unsigned n)
Definition: DTBtiChip.cc:399
static const int NSTEPF
Definition: DTConfig.h:36
DTBtiTrig const * trigger(int step, unsigned n) const
Return the requested trigger.
Definition: DTBtiChip.cc:367
int code() const
Return trigger code.
Definition: DTBtiTrig.h:142
int nTrig(int step) const
Number of triggers found.
Definition: DTBtiChip.cc:347
static const int NSTEPL
Constants: first and last step to start trigger finding.
Definition: DTConfig.h:36
int SET() const
SET.
Definition: DTConfigBti.h:81
#define debug
Definition: HDRShower.cc:19
DTConfigBti * config() const
Configuration set.
Definition: DTBtiChip.h:121
int LTS() const
LTS.
Definition: DTConfigBti.h:78
void DTBtiChip::eraseTrigger ( int  step,
unsigned  n 
)
private

Definition at line 399 of file DTBtiChip.cc.

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

Referenced by currentIntStep(), and doLTS().

399  {
401  cout << "DTBtiChip::eraseTrigger: step out of range: " << step ;
402  cout << " trigger not deleted!" << endl;
403  }
404  if(n<1 || n>_trigs[step-DTConfig::NSTEPF].size()) {
405  cout << "DTBtiChip::trigger: requested trigger does not exist: " << n;
406  cout << " trigger not deleted!" << endl;
407  }
408  auto p = _trigs[step-DTConfig::NSTEPF].begin()+n-1;
409  _trigs[step-DTConfig::NSTEPF].erase(p);
410 }
size
Write out results.
static const int NSTEPF
Definition: DTConfig.h:36
std::array< std::vector< std::unique_ptr< DTBtiTrig > >, DTConfig::NSTEPL-DTConfig::NSTEPF+1 > _trigs
Definition: DTBtiChip.h:184
static const int NSTEPL
Constants: first and last step to start trigger finding.
Definition: DTConfig.h:36
step
Definition: StallMonitor.cc:94
void DTBtiChip::findTrig ( )
private

Definition at line 40 of file DTBtiChipSelTrig.cc.

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

Referenced by currentIntStep(), and run().

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

Return trigger geometry.

Definition at line 125 of file DTBtiChip.h.

References _geom.

125 { 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 76 of file DTBtiChip.h.

References _digis, addTrig(), clear(), and run().

76 { 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 128 of file DTBtiChip.h.

References _id.

Referenced by DTBtiTrig::DTBtiTrig().

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

Definition at line 434 of file DTBtiChip.cc.

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

Referenced by run(), and sector().

434  {
435 
436  if(config()->debug()>3)
437  cout << "DTBtiChip::init() -> initializing bti chip" << endl;
438 
439  _curStep=0;
440  for(int i=0;i<25;i++) {
441  _sums[i] = 1000;
442  _difs[i] = 1000;
443  }
444 
445  for(int cell=0;cell<9;cell++) {
446  int WEN = config()->WENflag(cell+1);
447  if( WEN==1 ){
448  _thisStepUsedHit[cell]=nullptr;
449  vector<const DTDigi*>::const_iterator p;
450  for(p=_digis[cell].begin();p<_digis[cell].end();p++){
451  DTBtiHit* hit = new DTBtiHit(*p,config());
452  //int clockTime = (int)(fabs(((*p)->time()+config()->SetupTime())/12.5));
453  //DTBtiHit* hit = new DTBtiHit(clockTime,config());
454  _hits[cell].push_back(hit);
455  }
456 
457  //debugging
458  if(config()->debug()>2){
459  vector<DTBtiHit*>::const_iterator p1;
460  for(p1=_hits[cell].begin();p1<_hits[cell].end();p1++){
461  cout << " Filling hit in cell " << cell+1;
462  if((*p1)->curTime()!=4000)
463  cout << " raw time in trigger: " << (*p1)->curTime() << endl;
464  cout << " time (clock units): " << (*p1)->clockTime() << endl;
465  }
466  }
467  // end debugging
468  }
469  }
470 }
std::array< float, 25 > _difs
Definition: DTBtiChip.h:192
std::array< std::vector< const DTDigi * >, 9 > _digis
Definition: DTBtiChip.h:179
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
#define begin
Definition: vmac.h:32
double p1[4]
Definition: TauolaWrapper.h:89
std::array< DTBtiHit *, 9 > _thisStepUsedHit
Definition: DTBtiChip.h:190
DTConfigBti * config() const
Configuration set.
Definition: DTBtiChip.h:121
int WENflag(int wire) const
Wire mask flag.
Definition: DTConfigBti.h:102
void DTBtiChip::init_clock ( )

Definition at line 474 of file DTBtiChip.cc.

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

Referenced by sector().

474  {
475 
476  if(config()->debug()>3)
477  cout << "DTBtiChip::init_clock() -> initializing bti chip" << endl;
478 
479  init_done = 1;
480  _curStep=0;
481 
482  for(int i=0;i<25;i++) {
483  _sums[i] = 1000;
484  _difs[i] = 1000;
485  }
486 
487  for(int cell=0;cell<9;cell++) {
488  int WEN = config()->WENflag(cell+1);
489  if( WEN==1 ){
490  _thisStepUsedHit[cell]=nullptr;
491  for(unsigned int i=0; i<_digis_clock[cell].size(); i++){
492  const int clockTime = (_digis_clock[cell])[i];
493  DTBtiHit* hit = new DTBtiHit(clockTime,config());
494  _hits[cell].push_back(hit);
495  }
496 
497  //debugging
498  if(config()->debug()>2){
499  vector<DTBtiHit*>::const_iterator p1;
500  for(p1=_hits[cell].begin();p1<_hits[cell].end();p1++){
501  cout << " Filling hit in cell " << cell+1;
502  if((*p1)->curTime()!=4000)
503  cout << " time: " << (*p1)->curTime() << endl;
504  else
505  cout << " time (clock units): " << (*p1)->clockTime() << endl;
506  }
507  }
508  // end debugging
509  }
510  }
511 }
std::array< std::vector< int >, 9 > _digis_clock
Definition: DTBtiChip.h:181
int init_done
Definition: DTBtiChip.h:209
std::array< float, 25 > _difs
Definition: DTBtiChip.h:192
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
#define begin
Definition: vmac.h:32
double p1[4]
Definition: TauolaWrapper.h:89
std::array< DTBtiHit *, 9 > _thisStepUsedHit
Definition: DTBtiChip.h:190
DTConfigBti * config() const
Configuration set.
Definition: DTBtiChip.h:121
int WENflag(int wire) const
Wire mask flag.
Definition: DTConfigBti.h:102
int DTBtiChip::keepTrig ( const int  eq,
const int  acp,
const int  code 
)
private

Definition at line 722 of file DTBtiChipSelTrig.cc.

References funct::abs(), looper::config, gather_cfg::cout, debug, BitArray< N >::element(), mps_fire::i, createfilelist::int, BitArray< N >::print(), BitArray< N >::set(), and heppy_batch::val.

Referenced by currentIntStep().

722  {
723 
724  if(config()->debug()>4){
725  cout << "DTBtiChip::keepTrig called with arguments: ";
726  cout << eq << ", " << acp << ", " << code << endl;
727  }
728 
729  int const KCen = 40; // Arrays will start from 0 --> use 40 instead of 41
730  BitArray<80> val0, val1, val2, val3, val4, val5;
731  int mm[6];
732 
733  int i=0;
734  for(i=0;i<6;i++){
735  mm[i]=0;
736  int mk = (int)(2*_Keq[eq][i]);
737  if(abs(mk) > config()->KCut() )
738  continue;
739  mm[i]=(int)(_Keq[eq][i]*2)+KCen;
740  // if(_Keq[eq][i]<0){
741  // mm[i]=_Keq[eq][i]*2-0.5+KCen;
742  // } else {
743  // mm[i]=_Keq[eq][i]*2+KCen;
744  // }
745  }
746 
747  if(mm[0]>0 && (code==8 || code==3 || code==4) ){
748  val0.set(mm[0]-1);
749  val0.set(mm[0]);
750  val0.set(mm[0]+1);
751  if(acp==2 && (code==8 || code==3) ) {
752  val0.set(mm[0]-2);
753  val0.set(mm[0]+2);
754  }
755  }
756 
757  if(mm[1]>0 && (code==8 || code==1 || code==4) ){
758  val1.set(mm[1]-1);
759  val1.set(mm[1]);
760  val1.set(mm[1]+1);
761  if(acp==2 && code==8 ) {
762  val1.set(mm[1]-2);
763  val1.set(mm[1]+2);
764  }
765  }
766 
767  if(mm[2]>0 && (code==8 || code==1 || code==2) ){
768  val2.set(mm[2]-1);
769  val2.set(mm[2]);
770  val2.set(mm[2]+1);
771  if(acp==2 && (code==8 || code==2) ) {
772  val2.set(mm[2]-2);
773  val2.set(mm[2]+2);
774  }
775  }
776 
777  if(mm[3]>0 && (code==8 || code==2 || code==4) ){
778  val3.set(mm[3]-1);
779  val3.set(mm[3]);
780  val3.set(mm[3]+1);
781  }
782 
783  if(mm[4]>0 && (code==8 || code==1 || code==3) ){
784  val4.set(mm[4]-1);
785  val4.set(mm[4]);
786  val4.set(mm[4]+1);
787  }
788 
789  if(mm[5]>0 && (code==8 || code==2 || code==3) ){
790  val5.set(mm[5]);
791  }
792 
793  // debugging
794  if(config()->debug()>4){
795  cout << " dump of val arrays: " << endl;
796  // cout << val0.to_string() << endl;
797  // cout << val1.to_string() << endl;
798  // cout << val2.to_string() << endl;
799  // cout << val3.to_string() << endl;
800  // cout << val4.to_string() << endl;
801  // cout << val5.to_string() << endl;
802  val0.print();
803  cout << endl;
804  val1.print();
805  cout << endl;
806  val2.print();
807  cout << endl;
808  val3.print();
809  cout << endl;
810  val4.print();
811  cout << endl;
812  val5.print();
813  cout << endl;
814  }
815  // end debugging
816 
817  int KMax = 0;
818  int LKMax = -1;
819  for(i=0;i<80;i++){
820  int val = val0.element(i)+val1.element(i)+val2.element(i)+
821  val3.element(i)+val4.element(i)+val5.element(i);
822  // int val = val0.test(i)+val1.test(i)+val2.test(i)+
823  // val3.test(i)+val4.test(i)+val5.test(i);
824  if(val>KMax) {
825  KMax=val;
826  LKMax=i;
827  }
828  }
829 
830  // Note that all bits in val are shifted by one w.r.t. FORTRAN version
831  // The output K will be the same because of the different value of Kcen
832 
833  if (KMax==6 && code==8) {
834  store(eq,8,LKMax-KCen,int(_Xeq[eq][1]));
835  return 1;
836  } else if (KMax==3 && code!=8) {
837  if(code==1 || code==4) {
838  store(eq,code,LKMax-KCen,int(_Xeq[eq][0]));
839  } else {
840  store(eq,code,LKMax-KCen,int(_Xeq[eq][1]));
841  }
842  return 1;
843  }
844  return 0;
845  // return value is ITFL of FORTRAN version
846 }
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:669
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:69
float _Keq[32][6]
Definition: DTBtiChip.h:193
#define debug
Definition: HDRShower.cc:19
int element(const int pos) const
Definition: BitArray.h:210
std::ostream & print(std::ostream &o=std::cout) const
Definition: BitArray.h:345
DTConfigBti * config() const
Configuration set.
Definition: DTBtiChip.h:121
void set(const int i)
Definition: BitArray.h:230
int DTBtiChip::keepTrigPatt ( int  flag,
const int  eq,
const int  pattType,
int  hlflag 
)
private

Definition at line 327 of file DTBtiChipSelTrig.cc.

References funct::abs(), looper::config, gather_cfg::cout, debug, BitArray< N >::element(), Vispa.Plugins.EdmBrowser.EdmDataAccessor::eq(), mps_fire::i, createfilelist::int, BitArray< N >::print(), BitArray< N >::reset(), BitArray< N >::set(), heppy_batch::val, and X.

Referenced by currentIntStep().

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

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

Definition at line 97 of file DTBtiChip.h.

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

97 { 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:541
bool DTBtiChip::matchEq ( float  eqA,
float  eqB,
int  AC 
)
private

Referenced by currentIntStep().

int DTBtiChip::nCellHit ( ) const

Number of cells with hits.

Definition at line 283 of file DTBtiChip.cc.

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

Referenced by CMSPosition(), and run().

283  {
284  int n=0;
285  int i=0;
286  for(auto const& d: _digis) {
287  if( !d.empty() ) n++;
288  }
289  if(config()->debug()>2) {
290  cout << n << " cells with hits found:" << endl;
291  }
292  if(config()->debug()>2) {
293  for(i=0;i<9;i++) {
294  for(auto const&d: _digis[i]) {
295  cout << "DTBtiChip # " <<
296  _id.bti() <<
297  " cell " << i+1;
298  cout << " --> drift time (tdc units): " << d->countsTDC() << endl;
299  d->print();
300  }
301  }
302  }
303  return n;
304 /*
305  //SV 2/IV/03 counting hits from _hits
306  int n=0;
307  int i=0;
308  for(i=0;i<9;i++) {
309  if( _hits[i].size() >0 ) n++;
310  }
311  if(config()->debug()>2) {
312  cout << n << " cells with hits found:" << endl;
313  }
314  if(config()->debug()>2) {
315  for(i=0;i<9;i++) {
316  vector<const DTBtiHit*>::const_iterator p;
317  for(p=_hits[i].begin();p<_hits[i].end();p++) {
318  cout << "DTBtiChip # " <<
319  number() <<
320  " cell " << i+1;
321  if((*p)->curTime()!=4000)
322  cout << " --> drift time: " << (*p)->curTime() << endl;
323  else
324  cout << " --> clock time: " << (*p)->clockTime() << endl;
325  }
326  }
327  }
328  return n;
329 */
330 }
DTBtiId _id
Definition: DTBtiChip.h:176
int debug() const
Debug flag.
Definition: DTConfigBti.h:62
std::array< std::vector< const DTDigi * >, 9 > _digis
Definition: DTBtiChip.h:179
int bti() const
Returns the bti.
Definition: DTBtiId.h:75
DTConfigBti * config() const
Configuration set.
Definition: DTBtiChip.h:121
int DTBtiChip::nTrig ( int  step) const

Number of triggers found.

Definition at line 347 of file DTBtiChip.cc.

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

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

347  {
349  cout << "DTBtiChip::nTrig: step out of range: " << step ;
350  cout << " 0 returned" << endl;
351  return 0;
352  }
353  return _trigs[step-DTConfig::NSTEPF].size();
354 }
static const int NSTEPF
Definition: DTConfig.h:36
std::array< std::vector< std::unique_ptr< DTBtiTrig > >, DTConfig::NSTEPL-DTConfig::NSTEPF+1 > _trigs
Definition: DTBtiChip.h:184
static const int NSTEPL
Constants: first and last step to start trigger finding.
Definition: DTConfig.h:36
step
Definition: StallMonitor.cc:94
int DTBtiChip::number ( ) const
inline

Return DTBtiChip number.

Definition at line 91 of file DTBtiChip.h.

References _id, and DTBtiId::bti().

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

91 { return _id.bti(); }
DTBtiId _id
Definition: DTBtiChip.h:176
int bti() const
Returns the bti.
Definition: DTBtiId.h:75
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 165 of file DTBtiChip.h.

References a, and reSumAr.

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

Definition at line 166 of file DTBtiChip.h.

References a, and reSumAr23.

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

Definition at line 103 of file DTBtiChipEquations.cc.

Referenced by currentIntStep(), and DTBtiChip().

103  {
104 
105  reSumAr[2][ 2 +2]=0;
106  reSumAr[2][ 1 +2]=0;
107  reSumAr[2][ 0 +2]=0;
108  reSumAr[2][-1 +2]=-1;
109  reSumAr[2][-2 +2]=-1;
110 
111  reSumAr[1][ 2 +2]=1;
112  reSumAr[1][ 1 +2]=1;
113  reSumAr[1][ 0 +2]=0;
114  reSumAr[1][-1 +2]=0;
115  reSumAr[1][-2 +2]=0;
116 
117  reSumAr[0][ 2 +2]=1;
118  reSumAr[0][ 1 +2]=0;
119  reSumAr[0][ 0 +2]=0;
120  reSumAr[0][-1 +2]=0;
121  reSumAr[0][-2 +2]=-1;
122 
123  reSumAr23[2][ 2 +2]=1;
124  reSumAr23[2][ 1 +2]=1;
125  reSumAr23[2][ 0 +2]=1;
126  reSumAr23[2][-1 +2]=0;
127  reSumAr23[2][-2 +2]=0;
128 
129  reSumAr23[1][ 2 +2]=1;
130  reSumAr23[1][ 1 +2]=1;
131  reSumAr23[1][ 0 +2]=0;
132  reSumAr23[1][-1 +2]=0;
133  reSumAr23[1][-2 +2]=0;
134 
135  reSumAr23[0][ 2 +2]=1;
136  reSumAr23[0][ 1 +2]=0;
137  reSumAr23[0][ 0 +2]=0;
138  reSumAr23[0][-1 +2]=0;
139  reSumAr23[0][-2 +2]=-1;
140  }
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 515 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 get_CellDigis(), and DTBtiCard::runBTI().

515  {
516 
517  // Debugging...
518  if(config()->debug()>2){
519  cout << "DTBtiChip::run: Processing BTI " << _id.bti() << endl;
520  cout << " in SL " << _id.superlayer() << endl;
521  }
522  // End debugging
523 
524  if(_id.bti()<1 || _id.bti() >_geom->nCell(superlayer())) {
525  if(config()->debug()>1)
526  cout << "DTBtiChip::run : wrong BTI number: " << _id.bti() << endl;
527  return;
528  }
529 
530  // run algorithm
531  if(!init_done)
532  init();
533  if( nCellHit()<3 ) return; // check that at least 3 cell have hits
534 
535  for(int ints=0; ints<2*DTConfig::NSTEPL; ints++) { // 80 MHz
536  tick(); // Do a 12.5 ns step
537 
538  // In electronics equations are computed every 12.5 ns
539  // but since triggers are searched for only every 25 ns, skip
540  // also equation's computing at odd values of internal step
541  if((currentIntStep()/2)*2!=currentIntStep())continue;
542  //if((currentIntStep()/2)*2==currentIntStep())continue;
543 
544 
545  if(config()->debug()>2){
546  cout << "DTBtiChip::run : internal step " << currentIntStep();
547  cout << " number of JTRIG hits is " << _nStepUsedHits << endl;
548  }
550  // at least 3 good hits in this step -> run algorithm
551  computeSums();
552  computeEqs();
553  findTrig();
554  }
555  }
556  if( config()->LTS()>0 ) doLTS(); // low trigger suppression
557 }
DTBtiId _id
Definition: DTBtiChip.h:176
int debug() const
Debug flag.
Definition: DTConfigBti.h:62
int superlayer() const
Return superlayer.
Definition: DTBtiChip.h:94
void tick()
Definition: DTBtiChip.cc:560
static const int NSTEPF
Definition: DTConfig.h:36
int init_done
Definition: DTBtiChip.h:209
void doLTS()
Definition: DTBtiChip.cc:625
int currentIntStep() const
Definition: DTBtiChip.h:149
int superlayer() const
Returns the superlayer.
Definition: DTBtiId.h:73
DTTrigGeom * _geom
Definition: DTBtiChip.h:173
static const int NSTEPL
Constants: first and last step to start trigger finding.
Definition: DTConfig.h:36
int bti() const
Returns the bti.
Definition: DTBtiId.h:75
#define debug
Definition: HDRShower.cc:19
int currentStep() const
Definition: DTBtiChip.h:148
int _nStepUsedHits
Definition: DTBtiChip.h:191
void init()
Definition: DTBtiChip.cc:434
int nCellHit() const
Number of cells with hits.
Definition: DTBtiChip.cc:283
DTConfigBti * config() const
Configuration set.
Definition: DTBtiChip.h:121
int nCell(int sl) const
Number of BTIs in a required superlayer (i.e. nCells in lay 1)
Definition: DTTrigGeom.h:89
int DTBtiChip::sector ( void  ) const
inline

Return sector number.

Definition at line 137 of file DTBtiChip.h.

References _geom, init(), init_clock(), DTTrigGeom::sector(), and tick().

Referenced by geometryXMLparser.DTAlignable::index().

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

Definition at line 736 of file DTBtiChip.cc.

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

Referenced by currentIntStep(), and DTBtiChip().

736  {
737 
738  //set the internally calculated drift velocity parameters
739  ST43 = config()->ST43();
740  RE43 = config()->RE43();
741  ST23 = int(double(ST43)/2.);
742  RE23 = (RE43==1) ? 2 : int(double(RE43)/2.);
743 
744 
745  ST = int( double(ST43) * 3./4. + double(RE43) * 1./4. );
746  ST2 = int( (double(ST43) * 3./4. + double(RE43) * 1./4.)*2. );
747  ST3 = int( (double(ST43) * 3./4. + double(RE43) * 1./4.)*3. );
748  ST4 = int( (double(ST43) * 3./4. + double(RE43) * 1./4.)*4. );
749  ST5 = int( (double(ST43) * 3./4. + double(RE43) * 1./4.)*5. );
750  ST7 = int( (double(ST43) * 3./4. + double(RE43) * 1./4.)*7. );
751 
752  if(config()->debug()>3){
753  cout << "Snap register dump: " << endl;
754  cout << "ST43 = " << ST43 << endl;
755  cout << "RE43 = " << RE43 << endl;
756  cout << "ST23 = " << ST23 << endl;
757  cout << "RE23 = " << RE23 << endl;
758  cout << "ST = " << ST << endl;
759  cout << "ST2 = " << ST2 << endl;
760  cout << "ST3 = " << ST3 << endl;
761  cout << "ST4 = " << ST4 << endl;
762  cout << "ST5 = " << ST5 << endl;
763  cout << "ST7 = " << ST7 << endl;
764  }
765 }
int ST43() const
ST and RE parameters for drift velocity.
Definition: DTConfigBti.h:123
int RE43() const
Definition: DTConfigBti.h:124
int RE43
Definition: DTBtiChip.h:213
int ST23
Definition: DTBtiChip.h:213
#define debug
Definition: HDRShower.cc:19
int RE23
Definition: DTBtiChip.h:213
int ST43
Definition: DTBtiChip.h:213
DTConfigBti * config() const
Configuration set.
Definition: DTBtiChip.h:121
int DTBtiChip::station ( ) const
inline

Return station number.

Definition at line 134 of file DTBtiChip.h.

References _geom, and DTTrigGeom::station().

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

134 { return _geom->station(); }
DTTrigGeom * _geom
Definition: DTBtiChip.h:173
int station() const
Return station number.
Definition: DTTrigGeom.h:63
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 669 of file DTBtiChip.cc.

References _MaxKAcc, _MinKAcc, _thisStepUsedHit, addTrig(), config(), gather_cfg::cout, currentStep(), debug, Vispa.Plugins.EdmBrowser.EdmDataAccessor::eq(), h, eostools::move(), generateDummyData::trg(), and X.

Referenced by currentIntStep().

671  {
672 
673  // remove negative position triggers
674  if(X<0)return 0;
675 
676 
677  // accept in range triggers (acceptances defined in constructor)
678  if(K>=_MinKAcc && K<=_MaxKAcc)
679  {
680  int trig_step = currentStep();
681 
682 /*
683  //SV test 27/I/2003 1-clock delay for critical patterns in default ACx configuration
684  int AC1 = config()->AccPattAC1(); //default 0
685  int AC2 = config()->AccPattAC2(); //default 3
686  int ACH = config()->AccPattACH(); //default 1
687  int ACL = config()->AccPattACL(); //default 2
688 
689  if(AC1==0 && AC2==3 && ACH==1 && ACL==2){
690  if(eq==1 || eq==4 || eq==7 || eq==8 || eq==9 || eq==12 || eq==15
691  || eq==19 || eq==22 || eq==23 || eq==24 || eq==25 || eq==27 )
692  trig_step = currentStep()+1;
693  }
694 */
695  //store strobe: SV no strobe defined for this setup SV 15/I/2007
696  int strobe=-1;
697 
698  // create a new trigger
699  float Keq[6] = {KeqAB,KeqBC,KeqCD,KeqAC,KeqBD,KeqAD};
700  //DTBtiTrig* trg = new DTBtiTrig(this,code,K,X,currentStep(),eq);
701  auto trg = std::make_unique<DTBtiTrig>(this,code,K,X,trig_step,eq,strobe,Keq);
702 
703  // store also the digis
704  for(auto& h: _thisStepUsedHit) {
705  if(h) {
706  const DTDigi* digi = h->hitDigi();
707  if(digi)
708  trg->addDigi(digi);
709  }
710  }
711 
712  // Debugging...
713  if(config()->debug()>1)
714  trg->print();
715  // end debugging
716 
717  //addTrig(currentStep(),trg);
718  addTrig(trig_step,std::move(trg));
719 
720  return 1;
721  }
722  else{
723  // remove out of range triggers (acceptances defined in constructor)
724  if(config()->debug()>2){
725  cout << "DTBtiChip::store, REJECTED TRIGGER at step "<< currentStep();
726  cout << " allowed K range in theta view is: [";
727  cout << _MinKAcc << ","<< _MaxKAcc << "]";
728  cout << "K value is " << K << endl;
729  }
730  return 0;
731  }//end else
732 }//end store
int _MinKAcc
Definition: DTBtiChip.h:195
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
#define X(str)
Definition: MuonsGrabber.cc:48
int _MaxKAcc
Definition: DTBtiChip.h:196
def trg(schema, nls)
Definition: DTDigi.h:17
#define debug
Definition: HDRShower.cc:19
int currentStep() const
Definition: DTBtiChip.h:148
std::array< DTBtiHit *, 9 > _thisStepUsedHit
Definition: DTBtiChip.h:190
void addTrig(int step, std::unique_ptr< DTBtiTrig > btitrig)
Definition: DTBtiChip.cc:333
DTConfigBti * config() const
Configuration set.
Definition: DTBtiChip.h:121
def move(src, dest)
Definition: eostools.py:511
void DTBtiChip::sum ( const int  s,
const int  a,
const int  b 
)
private

Definition at line 82 of file DTBtiChipEquations.cc.

References objects.autophobj::float.

Referenced by currentIntStep().

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

Return superlayer.

Definition at line 94 of file DTBtiChip.h.

References _id, and DTBtiId::superlayer().

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

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

Definition at line 560 of file DTBtiChip.cc.

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

Referenced by run(), and sector().

560  {
561  //
562  // fills the DTBtiChip registers ( _thisStepUsedHit[cell] )
563  // for a given clock (Syncronizer and Shaper functionalities)
564  //
565 
566  _curStep++; // increase internal step (12.5 ns --> 80 MHz)
567 
568  // debugging
569  if(config()->debug()>2){
570  cout << "DTBtiChip::tick: internal step is now " << currentIntStep()<< endl;
571  }
572  // end debugging
573 
574  // Loop on cells
575  _nStepUsedHits=0;
576  for(int cell=0;cell<9;cell++) {
577 
578  // decrease drift time by 12.5 ns for each hit
579  for(auto& h: _hits[cell]) {
580  h->stepDownTime();
581  }
582 
583  // loop on hits
584  _thisStepUsedHit[cell]=nullptr;
585  for(auto& h: _hits[cell]) {
586  if ( h->isDrifting() ) { // hit is drifting
587  break; // --> don't consider others
588  } else if( h->isInsideReg() ) { // hit is already in registers
589  _thisStepUsedHit[cell]=h;
590  _nStepUsedHits++;
591  // debugging
592  if(config()->debug()>2){
593  if(h->curTime() != 4000)
594  cout << "DTBtiChip::tick: hit in register: time=" << h->curTime();
595  else
596  cout << "DTBtiChip::tick: hit in register! " << endl;
597  cout << " jtrig=" << h->jtrig() << endl;
598 
599  }
600  // end debugging
601  break; // --> don't consider other triggers
602  }
603  // hit is not drifting and not in registers: it is gone out of register, but
604  // jtrig value is still=ST ; save in array and consider next one if exists
605  } // end loop on cell hits
606 
607  // debugging...
608  if(config()->debug()>2){
609  if(_thisStepUsedHit[cell]!=nullptr){
610  cout << "int. step=" << currentIntStep() << " cell=" << cell+1;
611  cout << " jtrig=" << _thisStepUsedHit[cell]->jtrig();
612  if( _thisStepUsedHit[cell]->curTime() != 4000 )
613  cout << " (time=" << _thisStepUsedHit[cell]->curTime() << ")" << endl;
614  else
615  cout << endl;
616  }
617  }
618  // end debugging
619 
620  } // end loop on cells
621 
622 }
int debug() const
Debug flag.
Definition: DTConfigBti.h:62
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
int currentIntStep() const
Definition: DTBtiChip.h:149
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
std::array< DTBtiHit *, 9 > _thisStepUsedHit
Definition: DTBtiChip.h:190
DTConfigBti * config() const
Configuration set.
Definition: DTBtiChip.h:121
DTBtiTrig const * DTBtiChip::trigger ( int  step,
unsigned  n 
) const

Return the requested trigger.

Definition at line 367 of file DTBtiChip.cc.

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

Referenced by CMSPosition(), and doLTS().

367  {
369  cout << "DTBtiChip::trigger: step out of range: " << step ;
370  cout << " empty pointer returned" << endl;
371  return nullptr;
372  }
373  if(n<1 || n>_trigs[step-DTConfig::NSTEPF].size()) {
374  cout << "DTBtiChip::trigger: requested trigger does not exist: " << n;
375  cout << " empty pointer returned!" << endl;
376  return nullptr;
377  }
378  auto p = _trigs[step-DTConfig::NSTEPF].begin();
379  return (*(p+n-1)).get();
380 }
size
Write out results.
static const int NSTEPF
Definition: DTConfig.h:36
std::array< std::vector< std::unique_ptr< DTBtiTrig > >, DTConfig::NSTEPL-DTConfig::NSTEPF+1 > _trigs
Definition: DTBtiChip.h:184
static const int NSTEPL
Constants: first and last step to start trigger finding.
Definition: DTConfig.h:36
step
Definition: StallMonitor.cc:94
DTBtiTrigData DTBtiChip::triggerData ( int  step,
unsigned  n 
) const

Return the data part of the requested trigger.

Definition at line 383 of file DTBtiChip.cc.

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

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

383  {
385  cout << "DTBtiChip::triggerData: step out of range: " << step ;
386  cout << " dummy trigger returned" << endl;
387  return DTBtiTrigData();
388  }
389  if(n<1 || n>_trigs[step-DTConfig::NSTEPF].size()) {
390  cout << "DTBtiChip::triggerData: requested trig. doesn't exist: " << n;
391  cout << " dummy trigger returned!" << endl;
392  return DTBtiTrigData();
393  }
394  auto p = _trigs[step-DTConfig::NSTEPF].begin();
395  return (*(p+n-1))->data();
396 }
size
Write out results.
static const int NSTEPF
Definition: DTConfig.h:36
std::array< std::vector< std::unique_ptr< DTBtiTrig > >, DTConfig::NSTEPL-DTConfig::NSTEPF+1 > _trigs
Definition: DTBtiChip.h:184
static const int NSTEPL
Constants: first and last step to start trigger finding.
Definition: DTConfig.h:36
step
Definition: StallMonitor.cc:94
vector< std::unique_ptr< DTBtiTrig > > const & DTBtiChip::trigList ( int  step) const

Definition at line 357 of file DTBtiChip.cc.

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

Referenced by CMSPosition().

357  {
359  cout << "DTBtiChip::trigList: step out of range: " << step ;
360  cout << " empty pointer returned" << endl;
361  //return 0;
362  }
363  return _trigs[step-DTConfig::NSTEPF];
364 }
static const int NSTEPF
Definition: DTConfig.h:36
std::array< std::vector< std::unique_ptr< DTBtiTrig > >, DTConfig::NSTEPL-DTConfig::NSTEPF+1 > _trigs
Definition: DTBtiChip.h:184
static const int NSTEPL
Constants: first and last step to start trigger finding.
Definition: DTConfig.h:36
step
Definition: StallMonitor.cc:94
int DTBtiChip::wheel ( ) const
inline

Return wheel number.

Definition at line 131 of file DTBtiChip.h.

References _geom, and DTTrigGeom::wheel().

Referenced by geometryXMLparser.DTAlignable::index().

131 { return _geom->wheel(); }
int wheel() const
Return wheel number.
Definition: DTTrigGeom.h:60
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().