CMS 3D CMS Logo

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

#include <DTBtiChip.h>

Public Member Functions

void add_digi (int cell, const DTDigi *digi)
 Add a digi to the DTBtiChip. More...
 
void add_digi_clock (int cell, int clock_digi)
 Add a clock digi to the DTBtiChip. More...
 
void addTrig (int step, 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 (const DTBtiChip &bti)
 Copy constructor. More...
 
DTTrigGeomgeom () const
 Return trigger geometry. More...
 
std::vector< const DTDigi * > get_CellDigis (int cell)
 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= (const DTBtiChip &bti)
 Assignment operator. More...
 
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...
 
DTBtiTrigtrigger (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< DTBtiTrig * > 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

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

Copy constructor.

Definition at line 212 of file DTBtiChip.cc.

References _difs, _digis, _hits, _JTR, _Keq, _KTR, _MaxKAcc, _MinKAcc, _sums, _thisStepUsedHit, _thisStepUsedTimes, _trigs, _Xeq, i, j, DTConfig::NSTEPF, DTConfig::NSTEPL, AlCaHLTBitMon_ParallelJobs::p, p1, reSumSet(), and setSnap().

212  :
213  _geom(bti._geom), _id(bti._id),
215 
216  setSnap();
217  reSumSet();
218 
219  int i=0;
220  for(i=0;i<DTConfig::NSTEPL - DTConfig::NSTEPF;i++) {
221  _trigs[i].reserve(2);
222  vector<DTBtiTrig*>::const_iterator p;
223  for(p=bti._trigs[i].begin();p<bti._trigs[i].end();p++){
224  _trigs[i].push_back(*p);
225  }
226  }
227  for(i=0;i<9;i++) {
228  _digis[i].reserve(10);
229  vector<const DTDigi*>::const_iterator p;
230  for(p=bti._digis[i].begin();p<bti._digis[i].end();p++){
231  _digis[i].push_back(*p);
232  }
233  _hits[i].reserve(10);
234  vector<DTBtiHit*>::const_iterator p1;
235  for(p1=bti._hits[i].begin();p1<bti._hits[i].end();p1++){
236  _hits[i].push_back(*p1);
237  }
240  }
241  for(i=0;i<25;i++){
242  _sums[i] = bti._sums[i];
243  _difs[i] = bti._difs[i];
244  }
245  for(i=0;i<26;i++){
246  int j = 0;
247  for(j=0;j<6;j++){
248  _Keq[i][j] = bti._Keq[i][j];
249  }
250  for(j=0;j<3;j++){
251  _JTR[i][j] = bti._JTR[i][j];
252  }
253  for(j=0;j<2;j++){
254  _Xeq[i][j] = bti._Xeq[i][j];
255  _KTR[i][j] = bti._KTR[i][j];
256  }
257  }
258  _MinKAcc = bti._MinKAcc;
259  _MaxKAcc = bti._MaxKAcc;
260 
261 
262 
263 }
DTBtiId _id
Definition: DTBtiChip.h:172
int i
Definition: DBlmapReader.cc:9
std::vector< const DTDigi * > _digis[9]
Definition: DTBtiChip.h:175
int _MinKAcc
Definition: DTBtiChip.h:191
float _JTR[32][3]
Definition: DTBtiChip.h:204
DTBtiHit * _thisStepUsedHit[9]
Definition: DTBtiChip.h:186
std::vector< DTBtiHit * > _hits[9]
Definition: DTBtiChip.h:184
int _thisStepUsedTimes[9]
Definition: DTBtiChip.h:185
static const int NSTEPF
Definition: DTConfig.h:36
float _Xeq[32][2]
Definition: DTBtiChip.h:190
float _difs[25]
Definition: DTBtiChip.h:188
int _MaxKAcc
Definition: DTBtiChip.h:192
DTTrigGeom * _geom
Definition: DTBtiChip.h:169
int j
Definition: DBlmapReader.cc:9
static const int NSTEPL
Constants: first and last step to start trigger finding.
Definition: DTConfig.h:36
float _Keq[32][6]
Definition: DTBtiChip.h:189
int _curStep
Definition: DTBtiChip.h:183
float _KTR[32][2]
Definition: DTBtiChip.h:203
double p1[4]
Definition: TauolaWrapper.h:89
int _nStepUsedHits
Definition: DTBtiChip.h:187
std::vector< DTBtiTrig * > _trigs[DTConfig::NSTEPL-DTConfig::NSTEPF+1]
Definition: DTBtiChip.h:180
float _sums[25]
Definition: DTBtiChip.h:188
void setSnap()
Definition: DTBtiChip.cc:852
DTBtiChip::~DTBtiChip ( )

Destructor.

Definition at line 267 of file DTBtiChip.cc.

References clear().

267  {
268  clear();
269 }
void clear()
delete hits and triggers
Definition: DTBtiChip.cc:522

Member Function Documentation

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

Definition at line 678 of file DTBtiChipSelTrig.cc.

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

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 }
#define debug
Definition: HDRShower.cc:19
tuple cout
Definition: gather_cfg.py:145
DTConfigBti * config() const
Configuration set.
Definition: DTBtiChip.h:117
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 327 of file DTBtiChip.cc.

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

Referenced by DTBtiCard::loadBTI().

327  {
328 
329  if(_id.bti()<1 || _id.bti() >_geom->nCell(superlayer()))return;
330  if(cell<1 || cell>9){
331  cout << "DTBtiChip::add_digi : wrong cell number: " << cell;
332  cout << ". Digi not added!" << endl;
333  return;
334  }
335 
336  int DEAD = config()->DEADpar();
337  float stepTimeTdc = DTBtiHit::_stepTimeTdc;
338 
339 
340  if( int(digi->countsTDC()/stepTimeTdc) - _busyStart_clock[cell-1] > DEAD ){
341  _busyStart_clock[cell-1] = int(digi->countsTDC()/stepTimeTdc);
342  _digis[cell-1].push_back(digi);
343 
344  // debugging
345  if(config()->debug()>1){
346  cout << "DTBtiChip::add_digi: DTBtiChip # " <<_id.bti() <<
347  " cell " << cell << " --> drift time (tdc units)= " << digi->countsTDC()<< endl;
348  digi->print();
349  }
350  }
351  else {
352  // debugging
353  if(config()->debug()>1)
354  cout << "DTBtiChip::add_digi: DTBtiChip # " <<_id.bti() <<
355  " cell " << cell << " in dead time -> digi not added! " << endl;
356  }
357 
358 }
DTBtiId _id
Definition: DTBtiChip.h:172
std::vector< const DTDigi * > _digis[9]
Definition: DTBtiChip.h:175
int superlayer() const
Return superlayer.
Definition: DTBtiChip.h:90
int DEADpar() const
Wire DEAD time parameter.
Definition: DTConfigBti.h:127
void print() const
Print content of digi.
Definition: DTDigi.cc:87
static const float _stepTimeTdc
Definition: DTBtiHit.h:114
DTTrigGeom * _geom
Definition: DTBtiChip.h:169
uint32_t countsTDC() const
Get raw TDC count.
Definition: DTDigi.cc:65
int bti() const
Returns the bti.
Definition: DTBtiId.h:75
#define debug
Definition: HDRShower.cc:19
int _busyStart_clock[9]
Definition: DTBtiChip.h:206
tuple cout
Definition: gather_cfg.py:145
DTConfigBti * config() const
Configuration set.
Definition: DTBtiChip.h:117
int nCell(int sl) const
Number of BTIs in a required superlayer (i.e. nCells in lay 1)
Definition: DTTrigGeom.h:90
void DTBtiChip::add_digi_clock ( int  cell,
int  clock_digi 
)

Add a clock digi to the DTBtiChip.

Definition at line 362 of file DTBtiChip.cc.

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

362  {
363 
364  if(cell<1 || cell>9){
365  cout << "DTBtiChip::add_digi_clock : wrong cell number: " << cell;
366  cout << ". Digi not added!" << endl;
367  return;
368  }
369 
370  int DEAD = config()->DEADpar();
371 
372  if( digi - _busyStart_clock[cell-1] > DEAD ){
373  _busyStart_clock[cell-1] = digi;
374  _digis_clock[cell-1].push_back(digi);
375  // debugging
376  if(config()->debug()>1)
377  cout << "DTBtiChip::add_digi_clock: DTBtiChip # " <<number() <<
378  " cell " << cell << " --> clock time = " << digi << endl;
379  }
380  else{
381  // debugging
382  if(config()->debug()>1)
383  cout << "DTBtiChip::add_digi_clock: DTBtiChip # " << number() <<
384  " cell " << cell << " in dead time -> digi not added! " << endl;
385  }
386 }
int DEADpar() const
Wire DEAD time parameter.
Definition: DTConfigBti.h:127
std::vector< int > _digis_clock[9]
Definition: DTBtiChip.h:177
int number() const
Return DTBtiChip number.
Definition: DTBtiChip.h:87
#define debug
Definition: HDRShower.cc:19
int _busyStart_clock[9]
Definition: DTBtiChip.h:206
tuple cout
Definition: gather_cfg.py:145
DTConfigBti * config() const
Configuration set.
Definition: DTBtiChip.h:117
void DTBtiChip::addTrig ( int  step,
DTBtiTrig btitrig 
)

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

Definition at line 441 of file DTBtiChip.cc.

References _trigs, config(), gather_cfg::cout, debug, DTConfig::NSTEPF, DTConfig::NSTEPL, and relval_parameters_module::step.

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

441  {
443  if(config()->debug()>3)
444  cout << "DTBtiChip: adding trigger..." <<endl;
445  _trigs[step-DTConfig::NSTEPF].push_back(btitrig);
446  } else {
447  if(config()->debug()>3){
448  cout << "DTBtiChip::addTrig: step " << step ;
449  cout << " outside range. Trigger not added" << endl;
450  }
451  }
452 }
static const int NSTEPF
Definition: DTConfig.h:36
static const int NSTEPL
Constants: first and last step to start trigger finding.
Definition: DTConfig.h:36
#define debug
Definition: HDRShower.cc:19
std::vector< DTBtiTrig * > _trigs[DTConfig::NSTEPL-DTConfig::NSTEPF+1]
Definition: DTBtiChip.h:180
tuple cout
Definition: gather_cfg.py:145
DTConfigBti * config() const
Configuration set.
Definition: DTBtiChip.h:117
void DTBtiChip::clear ( void  )

delete hits and triggers

Definition at line 522 of file DTBtiChip.cc.

References _digis, _digis_clock, _hits, _trigs, begin, EnergyCorrector::c, config(), gather_cfg::cout, debug, DTConfig::NSTEPF, DTConfig::NSTEPL, AlCaHLTBitMon_ParallelJobs::p, and p1.

Referenced by ~DTBtiChip().

522  {
523 
524  if(config()->debug()>3)
525  cout << "DTBtiChip::clear()" << endl;
526 
527  for(int c=0;c<9;c++) {
528 
529  _digis[c].clear();
530  _digis_clock[c].clear();
531 
532  vector<DTBtiHit*>::iterator p;
533  for(p=_hits[c].begin();p<_hits[c].end();p++){
534  delete (*p);
535  }
536  _hits[c].clear();
537  }
538 
539  vector<DTBtiTrig*>::iterator p1;
540  for(int is=0;is<DTConfig::NSTEPL-DTConfig::NSTEPF+1;is++){
541  for(p1=_trigs[is].begin();p1<_trigs[is].end();p1++){
542  delete (*p1);
543  }
544  _trigs[is].clear();
545  }
546 }
std::vector< const DTDigi * > _digis[9]
Definition: DTBtiChip.h:175
std::vector< DTBtiHit * > _hits[9]
Definition: DTBtiChip.h:184
static const int NSTEPF
Definition: DTConfig.h:36
std::vector< int > _digis_clock[9]
Definition: DTBtiChip.h:177
static const int NSTEPL
Constants: first and last step to start trigger finding.
Definition: DTConfig.h:36
#define debug
Definition: HDRShower.cc:19
#define begin
Definition: vmac.h:30
double p1[4]
Definition: TauolaWrapper.h:89
std::vector< DTBtiTrig * > _trigs[DTConfig::NSTEPL-DTConfig::NSTEPF+1]
Definition: DTBtiChip.h:180
tuple cout
Definition: gather_cfg.py:145
DTConfigBti * config() const
Configuration set.
Definition: DTBtiChip.h:117
GlobalPoint DTBtiChip::CMSPosition ( ) const
inline

Position in CMS frame.

Definition at line 96 of file DTBtiChip.h.

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

Referenced by DTBtiChip().

96 { return _geom->CMSPosition(_id); }
DTBtiId _id
Definition: DTBtiChip.h:172
DTTrigGeom * _geom
Definition: DTBtiChip.h:169
GlobalPoint CMSPosition(const DTBtiId obj) const
CMS position of a BTI.
Definition: DTTrigGeom.h:182
void DTBtiChip::computeEqs ( )
private

Definition at line 145 of file DTBtiChipEquations.cc.

References begin, mps_alisetup::config, gather_cfg::cout, i, j, and findQualityFiles::size.

Referenced by 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]==0){
181  if(_hits[3-1].size()==0 )
182  TshiftB = 0;
183  if(_hits[3-1].size()>0 && (*(_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]==0){
190  if(_hits[2-1].size()==0 )
191  TshiftC = 0;
192  if(_hits[2-1].size()>0 && (*(_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 i
Definition: DBlmapReader.cc:9
int debug() const
Debug flag.
Definition: DTConfigBti.h:62
float _XeqBD_patt0
Definition: DTBtiChip.h:200
float _XeqCD_patt0
Definition: DTBtiChip.h:201
DTBtiHit * _thisStepUsedHit[9]
Definition: DTBtiChip.h:186
std::vector< DTBtiHit * > _hits[9]
Definition: DTBtiChip.h:184
float ST() const
Max drift time in 12.5 ns steps.
Definition: DTConfigBti.h:65
float _Xeq[32][2]
Definition: DTBtiChip.h:190
int reSum(int a, int b)
Definition: DTBtiChip.h:161
float _difs[25]
Definition: DTBtiChip.h:188
int j
Definition: DBlmapReader.cc:9
int PTMSflag(int patt) const
Pattern mask flag.
Definition: DTConfigBti.h:99
int jtrig() const
position in registers
Definition: DTBtiHit.h:93
int RE43
Definition: DTBtiChip.h:209
float _Keq[32][6]
Definition: DTBtiChip.h:189
int ST23
Definition: DTBtiChip.h:209
int reSum23(int a, int b)
Definition: DTBtiChip.h:162
float _XeqAC_patt0
Definition: DTBtiChip.h:200
int currentStep() const
Definition: DTBtiChip.h:144
float _XeqAB_patt0
Definition: DTBtiChip.h:201
#define begin
Definition: vmac.h:30
int RE23
Definition: DTBtiChip.h:209
tuple cout
Definition: gather_cfg.py:145
int ST43
Definition: DTBtiChip.h:209
DTConfigBti * config() const
Configuration set.
Definition: DTBtiChip.h:117
tuple size
Write out results.
float _sums[25]
Definition: DTBtiChip.h:188
void DTBtiChip::computeSums ( )
private

Definition at line 39 of file DTBtiChipEquations.cc.

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

Referenced by 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
tuple cout
Definition: gather_cfg.py:145
DTConfigBti * config() const
Configuration set.
Definition: DTBtiChip.h:117
DTConfigBti* DTBtiChip::config ( void  ) const
inline

Configuration set.

testing DTConfigBti

Definition at line 117 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().

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

Definition at line 145 of file DTBtiChip.h.

References _curStep.

Referenced by run(), and tick().

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

Definition at line 144 of file DTBtiChip.h.

References _curStep.

Referenced by run(), and store().

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

Definition at line 741 of file DTBtiChip.cc.

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

Referenced by run().

741  {
742 
743  if(config()->debug()>2)
744  cout<<"Do LTS"<<endl;
745  int lts = config()->LTS();
746  int nbxlts = config()->SET();
747 
748  // Do LTS only on the requested SL
749  //if (superlayer()==2 && lts==1) return;
750  //if (superlayer()!=2 && lts==2) return;
751  //new DTConfig: do LTS only is LTS!=0 --> somewhat redundant !
752  if (lts==0) return;
753 
754  // loop on steps
755  for(int is=DTConfig::NSTEPF; is<=DTConfig::NSTEPL; is++) {
756  if(nTrig(is)>0) { // non empty step
757  if( trigger(is,1)->code()==8 ) { // HTRIG at this step
758  // do LTS on nbxLTS[superlayer] following steps
759  for(int js=is+1;(js<=is+nbxlts&&js<=DTConfig::NSTEPL);js++){
760  if(nTrig(js)>0) { // non empty step
761  DTBtiTrig* tr = trigger(js,1);
762  if( tr->code()<8 && (lts==1 || lts==3)) {
763  if(config()->debug()>3)
764  cout<<"LTS: erasing trigger!"<<endl;
765  eraseTrigger(js,1); // delete trigger
766  }
767  }
768  }
769  // do LTS on previous step
770  if(is>DTConfig::NSTEPF && nTrig(is-1)>0) { // non empty step
771  DTBtiTrig* tr = trigger(is-1,1);
772  if( tr->code()<8 && (lts==2 || lts==3) ) {
773  if(config()->debug()>3)
774  cout<<"LTS: erasing trigger!"<<endl;
775  eraseTrigger(is-1,1); // delete trigger
776  }
777  }
778 
779  }
780  }
781  }
782 }
int debug() const
Debug flag.
Definition: DTConfigBti.h:62
void eraseTrigger(int step, unsigned n)
Definition: DTBtiChip.cc:507
static const int NSTEPF
Definition: DTConfig.h:36
int code() const
Return trigger code.
Definition: DTBtiTrig.h:142
int nTrig(int step) const
Number of triggers found.
Definition: DTBtiChip.cc:455
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
tuple cout
Definition: gather_cfg.py:145
DTBtiTrig * trigger(int step, unsigned n) const
Return the requested trigger.
Definition: DTBtiChip.cc:475
DTConfigBti * config() const
Configuration set.
Definition: DTBtiChip.h:117
int LTS() const
LTS.
Definition: DTConfigBti.h:78
void DTBtiChip::eraseTrigger ( int  step,
unsigned  n 
)
private

Definition at line 507 of file DTBtiChip.cc.

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

Referenced by doLTS().

507  {
508  if(step<DTConfig::NSTEPF||step>DTConfig::NSTEPL){
509  cout << "DTBtiChip::eraseTrigger: step out of range: " << step ;
510  cout << " trigger not deleted!" << endl;
511  }
512  if(n<1 || n>_trigs[step-DTConfig::NSTEPF].size()) {
513  cout << "DTBtiChip::trigger: requested trigger does not exist: " << n;
514  cout << " trigger not deleted!" << endl;
515  }
516  vector<DTBtiTrig*>::iterator p = _trigs[step-DTConfig::NSTEPF].begin()+n-1;
517  if(&(*p))delete (*p);
518  _trigs[step-DTConfig::NSTEPF].erase(p);
519 }
static const int NSTEPF
Definition: DTConfig.h:36
static const int NSTEPL
Constants: first and last step to start trigger finding.
Definition: DTConfig.h:36
std::vector< DTBtiTrig * > _trigs[DTConfig::NSTEPL-DTConfig::NSTEPF+1]
Definition: DTBtiChip.h:180
tuple cout
Definition: gather_cfg.py:145
tuple size
Write out results.
void DTBtiChip::findTrig ( )
private

Definition at line 40 of file DTBtiChipSelTrig.cc.

References mps_alisetup::config, gather_cfg::cout, debug, and i.

Referenced by 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 i
Definition: DBlmapReader.cc:9
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)
tuple cout
Definition: gather_cfg.py:145
bool RONflag() const
Redundant patterns flag RONDTBti/src/DTBtiChipEquations.cc:
Definition: DTConfigBti.h:96
DTConfigBti * config() const
Configuration set.
Definition: DTBtiChip.h:117
DTTrigGeom* DTBtiChip::geom ( ) const
inline

Return trigger geometry.

Definition at line 121 of file DTBtiChip.h.

References _geom.

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

get digi vector - SV 28/XI/02

Definition at line 72 of file DTBtiChip.h.

References _digis.

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

Return the DTBtiChip Id.

Definition at line 124 of file DTBtiChip.h.

References _id.

Referenced by DTBtiTrig::DTBtiTrig().

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

Definition at line 549 of file DTBtiChip.cc.

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

Referenced by run().

549  {
550 
551  if(config()->debug()>3)
552  cout << "DTBtiChip::init() -> initializing bti chip" << endl;
553 
554  _curStep=0;
555  for(int i=0;i<25;i++) {
556  _sums[i] = 1000;
557  _difs[i] = 1000;
558  }
559 
560  for(int cell=0;cell<9;cell++) {
561  int WEN = config()->WENflag(cell+1);
562  if( WEN==1 ){
563  _thisStepUsedHit[cell]=0;
564  vector<const DTDigi*>::const_iterator p;
565  for(p=_digis[cell].begin();p<_digis[cell].end();p++){
566  DTBtiHit* hit = new DTBtiHit(*p,config());
567  //int clockTime = (int)(fabs(((*p)->time()+config()->SetupTime())/12.5));
568  //DTBtiHit* hit = new DTBtiHit(clockTime,config());
569  _hits[cell].push_back(hit);
570  }
571 
572  //debugging
573  if(config()->debug()>2){
574  vector<DTBtiHit*>::const_iterator p1;
575  for(p1=_hits[cell].begin();p1<_hits[cell].end();p1++){
576  cout << " Filling hit in cell " << cell+1;
577  if((*p1)->curTime()!=4000)
578  cout << " raw time in trigger: " << (*p1)->curTime() << endl;
579  cout << " time (clock units): " << (*p1)->clockTime() << endl;
580  }
581  }
582  // end debugging
583  }
584  }
585 }
int i
Definition: DBlmapReader.cc:9
std::vector< const DTDigi * > _digis[9]
Definition: DTBtiChip.h:175
DTBtiHit * _thisStepUsedHit[9]
Definition: DTBtiChip.h:186
std::vector< DTBtiHit * > _hits[9]
Definition: DTBtiChip.h:184
float _difs[25]
Definition: DTBtiChip.h:188
int _curStep
Definition: DTBtiChip.h:183
#define debug
Definition: HDRShower.cc:19
#define begin
Definition: vmac.h:30
double p1[4]
Definition: TauolaWrapper.h:89
tuple cout
Definition: gather_cfg.py:145
DTConfigBti * config() const
Configuration set.
Definition: DTBtiChip.h:117
int WENflag(int wire) const
Wire mask flag.
Definition: DTConfigBti.h:102
float _sums[25]
Definition: DTBtiChip.h:188
void DTBtiChip::init_clock ( )

Definition at line 589 of file DTBtiChip.cc.

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

589  {
590 
591  if(config()->debug()>3)
592  cout << "DTBtiChip::init_clock() -> initializing bti chip" << endl;
593 
594  init_done = 1;
595  _curStep=0;
596 
597  for(int i=0;i<25;i++) {
598  _sums[i] = 1000;
599  _difs[i] = 1000;
600  }
601 
602  for(int cell=0;cell<9;cell++) {
603  int WEN = config()->WENflag(cell+1);
604  if( WEN==1 ){
605  _thisStepUsedHit[cell]=0;
606  for(unsigned int i=0; i<_digis_clock[cell].size(); i++){
607  const int clockTime = (_digis_clock[cell])[i];
608  DTBtiHit* hit = new DTBtiHit(clockTime,config());
609  _hits[cell].push_back(hit);
610  }
611 
612  //debugging
613  if(config()->debug()>2){
614  vector<DTBtiHit*>::const_iterator p1;
615  for(p1=_hits[cell].begin();p1<_hits[cell].end();p1++){
616  cout << " Filling hit in cell " << cell+1;
617  if((*p1)->curTime()!=4000)
618  cout << " time: " << (*p1)->curTime() << endl;
619  else
620  cout << " time (clock units): " << (*p1)->clockTime() << endl;
621  }
622  }
623  // end debugging
624  }
625  }
626 }
int i
Definition: DBlmapReader.cc:9
DTBtiHit * _thisStepUsedHit[9]
Definition: DTBtiChip.h:186
std::vector< DTBtiHit * > _hits[9]
Definition: DTBtiChip.h:184
int init_done
Definition: DTBtiChip.h:205
float _difs[25]
Definition: DTBtiChip.h:188
std::vector< int > _digis_clock[9]
Definition: DTBtiChip.h:177
int _curStep
Definition: DTBtiChip.h:183
#define debug
Definition: HDRShower.cc:19
#define begin
Definition: vmac.h:30
double p1[4]
Definition: TauolaWrapper.h:89
tuple cout
Definition: gather_cfg.py:145
DTConfigBti * config() const
Configuration set.
Definition: DTBtiChip.h:117
int WENflag(int wire) const
Wire mask flag.
Definition: DTConfigBti.h:102
float _sums[25]
Definition: DTBtiChip.h:188
int DTBtiChip::keepTrig ( const int  eq,
const int  acp,
const int  code 
)
private

Definition at line 722 of file DTBtiChipSelTrig.cc.

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

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 i
Definition: DBlmapReader.cc:9
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:785
float _Xeq[32][2]
Definition: DTBtiChip.h:190
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:189
#define debug
Definition: HDRShower.cc:19
int element(const int pos) const
Definition: BitArray.h:210
tuple cout
Definition: gather_cfg.py:145
std::ostream & print(std::ostream &o=std::cout) const
Definition: BitArray.h:345
DTConfigBti * config() const
Configuration set.
Definition: DTBtiChip.h:117
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(), mps_alisetup::config, gather_cfg::cout, debug, BitArray< N >::element(), prop_logic::eq(), i, BitArray< N >::print(), BitArray< N >::reset(), BitArray< N >::set(), and X.

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 i
Definition: DBlmapReader.cc:9
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:785
#define X(str)
Definition: MuonsGrabber.cc:48
int AccPattAC1() const
Acceptance pattern AC1.
Definition: DTConfigBti.h:84
float _Xeq[32][2]
Definition: DTBtiChip.h:190
void reset()
Definition: BitArray.h:221
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
float _Keq[32][6]
Definition: DTBtiChip.h:189
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
tuple cout
Definition: gather_cfg.py:145
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:117
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 93 of file DTBtiChip.h.

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

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

Number of cells with hits.

Definition at line 390 of file DTBtiChip.cc.

References _digis, _id, begin, DTBtiId::bti(), config(), gather_cfg::cout, debug, i, gen::n, AlCaHLTBitMon_ParallelJobs::p, and findQualityFiles::size.

Referenced by run().

390  {
391  int n=0;
392  int i=0;
393  for(i=0;i<9;i++) {
394  if( _digis[i].size() >0 ) n++;
395  }
396  if(config()->debug()>2) {
397  cout << n << " cells with hits found:" << endl;
398  }
399  if(config()->debug()>2) {
400  for(i=0;i<9;i++) {
401  vector<const DTDigi*>::const_iterator p;
402  for(p=_digis[i].begin();p<_digis[i].end();p++) {
403  cout << "DTBtiChip # " <<
404  _id.bti() <<
405  " cell " << i+1;
406  cout << " --> drift time (tdc units): " << (*p)->countsTDC() << endl;
407  (*p)->print();
408  }
409  }
410  }
411  return n;
412 /*
413  //SV 2/IV/03 counting hits from _hits
414  int n=0;
415  int i=0;
416  for(i=0;i<9;i++) {
417  if( _hits[i].size() >0 ) n++;
418  }
419  if(config()->debug()>2) {
420  cout << n << " cells with hits found:" << endl;
421  }
422  if(config()->debug()>2) {
423  for(i=0;i<9;i++) {
424  vector<const DTBtiHit*>::const_iterator p;
425  for(p=_hits[i].begin();p<_hits[i].end();p++) {
426  cout << "DTBtiChip # " <<
427  number() <<
428  " cell " << i+1;
429  if((*p)->curTime()!=4000)
430  cout << " --> drift time: " << (*p)->curTime() << endl;
431  else
432  cout << " --> clock time: " << (*p)->clockTime() << endl;
433  }
434  }
435  }
436  return n;
437 */
438 }
DTBtiId _id
Definition: DTBtiChip.h:172
int i
Definition: DBlmapReader.cc:9
std::vector< const DTDigi * > _digis[9]
Definition: DTBtiChip.h:175
int bti() const
Returns the bti.
Definition: DTBtiId.h:75
#define debug
Definition: HDRShower.cc:19
#define begin
Definition: vmac.h:30
tuple cout
Definition: gather_cfg.py:145
DTConfigBti * config() const
Configuration set.
Definition: DTBtiChip.h:117
tuple size
Write out results.
int DTBtiChip::nTrig ( int  step) const

Number of triggers found.

Definition at line 455 of file DTBtiChip.cc.

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

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

455  {
456  if(step<DTConfig::NSTEPF||step>DTConfig::NSTEPL){
457  cout << "DTBtiChip::nTrig: step out of range: " << step ;
458  cout << " 0 returned" << endl;
459  return 0;
460  }
461  return _trigs[step-DTConfig::NSTEPF].size();
462 }
static const int NSTEPF
Definition: DTConfig.h:36
static const int NSTEPL
Constants: first and last step to start trigger finding.
Definition: DTConfig.h:36
std::vector< DTBtiTrig * > _trigs[DTConfig::NSTEPL-DTConfig::NSTEPF+1]
Definition: DTBtiChip.h:180
tuple cout
Definition: gather_cfg.py:145
int DTBtiChip::number ( ) const
inline

Return DTBtiChip number.

Definition at line 87 of file DTBtiChip.h.

References _id, and DTBtiId::bti().

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

87 { return _id.bti(); }
DTBtiId _id
Definition: DTBtiChip.h:172
int bti() const
Returns the bti.
Definition: DTBtiId.h:75
DTBtiChip & DTBtiChip::operator= ( const DTBtiChip bti)

Assignment operator.

Definition at line 275 of file DTBtiChip.cc.

References _curStep, _difs, _digis, _geom, _hits, _id, _JTR, _Keq, _KTR, _MaxKAcc, _MinKAcc, _nStepUsedHits, _sums, _thisStepUsedHit, _thisStepUsedTimes, _trigs, _Xeq, i, j, DTConfig::NSTEPF, DTConfig::NSTEPL, AlCaHLTBitMon_ParallelJobs::p, and p1.

275  {
276  if(this != &bti){
277  _geom = bti._geom;
278  _id = bti._id;
279  _curStep = bti._curStep;
281  int i=0;
282  for(i=0;i<DTConfig::NSTEPL - DTConfig::NSTEPF;i++) {
283  _trigs[i].reserve(2);
284  vector<DTBtiTrig*>::const_iterator p;
285  for(p=bti._trigs[i].begin();p<bti._trigs[i].end();p++){
286  _trigs[i].push_back(*p);
287  }
288  }
289  for(i=0;i<9;i++) {
290  _digis[i].reserve(10);
291  vector<const DTDigi*>::const_iterator p;
292  for(p=bti._digis[i].begin();p<bti._digis[i].end();p++){
293  _digis[i].push_back(*p);
294  }
295  _hits[i].reserve(10);
296  vector<DTBtiHit*>::const_iterator p1;
297  for(p1=bti._hits[i].begin();p1<bti._hits[i].end();p1++){
298  _hits[i].push_back(*p1);
299  }
302  }
303  for(i=0;i<25;i++){
304  _sums[i] = bti._sums[i];
305  _difs[i] = bti._difs[i];
306  }
307  for(i=0;i<26;i++){
308  int j = 0;
309  for(j=0;j<6;j++){
310  _Keq[i][j] = bti._Keq[i][j];
311  }
312  for(j=0;j<3;j++){
313  _JTR[i][j] = bti._JTR[i][j];
314  }
315  for(j=0;j<2;j++){
316  _Xeq[i][j] = bti._Xeq[i][j];
317  _KTR[i][j] = bti._KTR[i][j];
318  }
319  }
320  _MinKAcc = bti._MinKAcc;
321  _MaxKAcc = bti._MaxKAcc;
322  }
323  return *this;
324 }
DTBtiId _id
Definition: DTBtiChip.h:172
int i
Definition: DBlmapReader.cc:9
std::vector< const DTDigi * > _digis[9]
Definition: DTBtiChip.h:175
int _MinKAcc
Definition: DTBtiChip.h:191
float _JTR[32][3]
Definition: DTBtiChip.h:204
DTBtiHit * _thisStepUsedHit[9]
Definition: DTBtiChip.h:186
std::vector< DTBtiHit * > _hits[9]
Definition: DTBtiChip.h:184
int _thisStepUsedTimes[9]
Definition: DTBtiChip.h:185
static const int NSTEPF
Definition: DTConfig.h:36
float _Xeq[32][2]
Definition: DTBtiChip.h:190
float _difs[25]
Definition: DTBtiChip.h:188
int _MaxKAcc
Definition: DTBtiChip.h:192
DTTrigGeom * _geom
Definition: DTBtiChip.h:169
int j
Definition: DBlmapReader.cc:9
static const int NSTEPL
Constants: first and last step to start trigger finding.
Definition: DTConfig.h:36
float _Keq[32][6]
Definition: DTBtiChip.h:189
int _curStep
Definition: DTBtiChip.h:183
float _KTR[32][2]
Definition: DTBtiChip.h:203
double p1[4]
Definition: TauolaWrapper.h:89
int _nStepUsedHits
Definition: DTBtiChip.h:187
std::vector< DTBtiTrig * > _trigs[DTConfig::NSTEPL-DTConfig::NSTEPF+1]
Definition: DTBtiChip.h:180
float _sums[25]
Definition: DTBtiChip.h:188
int DTBtiChip::reSum ( int  a,
int  b 
)
inlineprivate

Definition at line 161 of file DTBtiChip.h.

References a, and reSumAr.

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

Definition at line 162 of file DTBtiChip.h.

References a, and reSumAr23.

162 { return reSumAr23[a][b+2];}
int reSumAr23[3][5]
Definition: DTBtiChip.h:212
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 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:212
int reSumAr[3][5]
Definition: DTBtiChip.h:211
void DTBtiChip::run ( void  )

Run DTBtiChip algorithm.

Definition at line 630 of file DTBtiChip.cc.

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

Referenced by DTBtiCard::runBTI().

630  {
631 
632  // Debugging...
633  if(config()->debug()>2){
634  cout << "DTBtiChip::run: Processing BTI " << _id.bti() << endl;
635  cout << " in SL " << _id.superlayer() << endl;
636  }
637  // End debugging
638 
639  if(_id.bti()<1 || _id.bti() >_geom->nCell(superlayer())) {
640  if(config()->debug()>1)
641  cout << "DTBtiChip::run : wrong BTI number: " << _id.bti() << endl;
642  return;
643  }
644 
645  // run algorithm
646  if(!init_done)
647  init();
648  if( nCellHit()<3 ) return; // check that at least 3 cell have hits
649 
650  for(int ints=0; ints<2*DTConfig::NSTEPL; ints++) { // 80 MHz
651  tick(); // Do a 12.5 ns step
652 
653  // In electronics equations are computed every 12.5 ns
654  // but since triggers are searched for only every 25 ns, skip
655  // also equation's computing at odd values of internal step
656  if((currentIntStep()/2)*2!=currentIntStep())continue;
657  //if((currentIntStep()/2)*2==currentIntStep())continue;
658 
659 
660  if(config()->debug()>2){
661  cout << "DTBtiChip::run : internal step " << currentIntStep();
662  cout << " number of JTRIG hits is " << _nStepUsedHits << endl;
663  }
665  // at least 3 good hits in this step -> run algorithm
666  computeSums();
667  computeEqs();
668  findTrig();
669  }
670  }
671  if( config()->LTS()>0 ) doLTS(); // low trigger suppression
672 }
DTBtiId _id
Definition: DTBtiChip.h:172
int debug() const
Debug flag.
Definition: DTConfigBti.h:62
int superlayer() const
Return superlayer.
Definition: DTBtiChip.h:90
void tick()
Definition: DTBtiChip.cc:675
static const int NSTEPF
Definition: DTConfig.h:36
int init_done
Definition: DTBtiChip.h:205
void doLTS()
Definition: DTBtiChip.cc:741
int currentIntStep() const
Definition: DTBtiChip.h:145
int superlayer() const
Returns the superlayer.
Definition: DTBtiId.h:73
DTTrigGeom * _geom
Definition: DTBtiChip.h:169
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:144
int _nStepUsedHits
Definition: DTBtiChip.h:187
void init()
Definition: DTBtiChip.cc:549
int nCellHit() const
Number of cells with hits.
Definition: DTBtiChip.cc:390
tuple cout
Definition: gather_cfg.py:145
DTConfigBti * config() const
Configuration set.
Definition: DTBtiChip.h:117
int nCell(int sl) const
Number of BTIs in a required superlayer (i.e. nCells in lay 1)
Definition: DTTrigGeom.h:90
int DTBtiChip::sector ( void  ) const
inline

Return sector number.

Definition at line 133 of file DTBtiChip.h.

References _geom, and DTTrigGeom::sector().

Referenced by geometryXMLparser.DTAlignable::index().

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

Definition at line 852 of file DTBtiChip.cc.

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

Referenced by DTBtiChip().

852  {
853 
854  //set the internally calculated drift velocity parameters
855  ST43 = config()->ST43();
856  RE43 = config()->RE43();
857  ST23 = int(double(ST43)/2.);
858  RE23 = (RE43==1) ? 2 : int(double(RE43)/2.);
859 
860 
861  ST = int( double(ST43) * 3./4. + double(RE43) * 1./4. );
862  ST2 = int( (double(ST43) * 3./4. + double(RE43) * 1./4.)*2. );
863  ST3 = int( (double(ST43) * 3./4. + double(RE43) * 1./4.)*3. );
864  ST4 = int( (double(ST43) * 3./4. + double(RE43) * 1./4.)*4. );
865  ST5 = int( (double(ST43) * 3./4. + double(RE43) * 1./4.)*5. );
866  ST7 = int( (double(ST43) * 3./4. + double(RE43) * 1./4.)*7. );
867 
868  if(config()->debug()>3){
869  cout << "Snap register dump: " << endl;
870  cout << "ST43 = " << ST43 << endl;
871  cout << "RE43 = " << RE43 << endl;
872  cout << "ST23 = " << ST23 << endl;
873  cout << "RE23 = " << RE23 << endl;
874  cout << "ST = " << ST << endl;
875  cout << "ST2 = " << ST2 << endl;
876  cout << "ST3 = " << ST3 << endl;
877  cout << "ST4 = " << ST4 << endl;
878  cout << "ST5 = " << ST5 << endl;
879  cout << "ST7 = " << ST7 << endl;
880  }
881 }
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:209
int ST23
Definition: DTBtiChip.h:209
#define debug
Definition: HDRShower.cc:19
int RE23
Definition: DTBtiChip.h:209
tuple cout
Definition: gather_cfg.py:145
int ST43
Definition: DTBtiChip.h:209
DTConfigBti * config() const
Configuration set.
Definition: DTBtiChip.h:117
int DTBtiChip::station ( ) const
inline

Return station number.

Definition at line 130 of file DTBtiChip.h.

References _geom, and DTTrigGeom::station().

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

130 { return _geom->station(); }
DTTrigGeom * _geom
Definition: DTBtiChip.h:169
int station() const
Return station number.
Definition: DTTrigGeom.h:64
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 785 of file DTBtiChip.cc.

References _MaxKAcc, _MinKAcc, _thisStepUsedHit, DTBtiTrig::addDigi(), addTrig(), EnergyCorrector::c, config(), gather_cfg::cout, currentStep(), debug, DTBtiHit::hitDigi(), DTBtiTrig::print(), and generateDummyData::trg().

787  {
788 
789  // remove negative position triggers
790  if(X<0)return 0;
791 
792 
793  // accept in range triggers (acceptances defined in constructor)
794  if(K>=_MinKAcc && K<=_MaxKAcc)
795  {
796  int trig_step = currentStep();
797 
798 /*
799  //SV test 27/I/2003 1-clock delay for critical patterns in default ACx configuration
800  int AC1 = config()->AccPattAC1(); //default 0
801  int AC2 = config()->AccPattAC2(); //default 3
802  int ACH = config()->AccPattACH(); //default 1
803  int ACL = config()->AccPattACL(); //default 2
804 
805  if(AC1==0 && AC2==3 && ACH==1 && ACL==2){
806  if(eq==1 || eq==4 || eq==7 || eq==8 || eq==9 || eq==12 || eq==15
807  || eq==19 || eq==22 || eq==23 || eq==24 || eq==25 || eq==27 )
808  trig_step = currentStep()+1;
809  }
810 */
811  //store strobe: SV no strobe defined for this setup SV 15/I/2007
812  int strobe=-1;
813 
814  // create a new trigger
815  float Keq[6] = {KeqAB,KeqBC,KeqCD,KeqAC,KeqBD,KeqAD};
816  //DTBtiTrig* trg = new DTBtiTrig(this,code,K,X,currentStep(),eq);
817  DTBtiTrig* trg = new DTBtiTrig(this,code,K,X,trig_step,eq,strobe,Keq);
818 
819  // store also the digis
820  for(int c=0; c<9; c++) {
821  if(_thisStepUsedHit[c]) {
822  const DTDigi* digi = _thisStepUsedHit[c]->hitDigi();
823  if(digi)
824  trg->addDigi(digi);
825  }
826  }
827 
828  //addTrig(currentStep(),trg);
829  addTrig(trig_step,trg);
830 
831  // Debugging...
832  if(config()->debug()>1)
833  trg->print();
834  // end debugging
835 
836  return 1;
837  }
838  else{
839  // remove out of range triggers (acceptances defined in constructor)
840  if(config()->debug()>2){
841  cout << "DTBtiChip::store, REJECTED TRIGGER at step "<< currentStep();
842  cout << " allowed K range in theta view is: [";
843  cout << _MinKAcc << ","<< _MaxKAcc << "]";
844  cout << "K value is " << K << endl;
845  }
846  return 0;
847  }//end else
848 }//end store
int _MinKAcc
Definition: DTBtiChip.h:191
DTBtiHit * _thisStepUsedHit[9]
Definition: DTBtiChip.h:186
void print() const
Print.
Definition: DTBtiTrig.h:112
void addDigi(const DTDigi *digi)
Add a digi to the list.
Definition: DTBtiTrig.h:69
#define X(str)
Definition: MuonsGrabber.cc:48
int _MaxKAcc
Definition: DTBtiChip.h:192
const DTDigi * hitDigi() const
Return the associated DTDigi.
Definition: DTBtiHit.h:70
Definition: DTDigi.h:17
void addTrig(int step, DTBtiTrig *btitrig)
Definition: DTBtiChip.cc:441
#define debug
Definition: HDRShower.cc:19
int currentStep() const
Definition: DTBtiChip.h:144
tuple cout
Definition: gather_cfg.py:145
DTConfigBti * config() const
Configuration set.
Definition: DTBtiChip.h:117
void DTBtiChip::sum ( const int  s,
const int  a,
const int  b 
)
private

Definition at line 82 of file DTBtiChipEquations.cc.

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]!=0 && _thisStepUsedHit[b-1]!=0 ){
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 }
DTBtiHit * _thisStepUsedHit[9]
Definition: DTBtiChip.h:186
float _difs[25]
Definition: DTBtiChip.h:188
int jtrig() const
position in registers
Definition: DTBtiHit.h:93
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
float _sums[25]
Definition: DTBtiChip.h:188
int DTBtiChip::superlayer ( ) const
inline

Return superlayer.

Definition at line 90 of file DTBtiChip.h.

References _id, and DTBtiId::superlayer().

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

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

Definition at line 675 of file DTBtiChip.cc.

References _curStep, _hits, _nStepUsedHits, _thisStepUsedHit, begin, config(), gather_cfg::cout, currentIntStep(), DTBtiHit::curTime(), debug, DTConfigBti::debug(), DTBtiHit::jtrig(), and AlCaHLTBitMon_ParallelJobs::p.

Referenced by run().

675  {
676  //
677  // fills the DTBtiChip registers ( _thisStepUsedHit[cell] )
678  // for a given clock (Syncronizer and Shaper functionalities)
679  //
680 
681  _curStep++; // increase internal step (12.5 ns --> 80 MHz)
682 
683  // debugging
684  if(config()->debug()>2){
685  cout << "DTBtiChip::tick: internal step is now " << currentIntStep()<< endl;
686  }
687  // end debugging
688 
689  // Loop on cells
690  _nStepUsedHits=0;
691  for(int cell=0;cell<9;cell++) {
692 
693  // decrease drift time by 12.5 ns for each hit
694  vector<DTBtiHit*>::const_iterator p;
695  for(p=_hits[cell].begin();p<_hits[cell].end();p++){
696  (*p)->stepDownTime();
697  }
698 
699  // loop on hits
700  _thisStepUsedHit[cell]=0;
701  for(p=_hits[cell].begin();p<_hits[cell].end();p++){
702  if ( (*p)->isDrifting() ) { // hit is drifting
703  break; // --> don't consider others
704  } else if( (*p)->isInsideReg() ) { // hit is already in registers
705  _thisStepUsedHit[cell]=(*p);
706  _nStepUsedHits++;
707  // debugging
708  if(config()->debug()>2){
709  if((*p)->curTime() != 4000)
710  cout << "DTBtiChip::tick: hit in register: time=" << (*p)->curTime();
711  else
712  cout << "DTBtiChip::tick: hit in register! " << endl;
713  cout << " jtrig=" << (*p)->jtrig() << endl;
714 
715  }
716  // end debugging
717  break; // --> don't consider other triggers
718  }
719  // hit is not drifting and not in registers: it is gone out of register, but
720  // jtrig value is still=ST ; save in array and consider next one if exists
721  } // end loop on cell hits
722 
723  // debugging...
724  if(config()->debug()>2){
725  if(_thisStepUsedHit[cell]!=0){
726  cout << "int. step=" << currentIntStep() << " cell=" << cell+1;
727  cout << " jtrig=" << _thisStepUsedHit[cell]->jtrig();
728  if( _thisStepUsedHit[cell]->curTime() != 4000 )
729  cout << " (time=" << _thisStepUsedHit[cell]->curTime() << ")" << endl;
730  else
731  cout << endl;
732  }
733  }
734  // end debugging
735 
736  } // end loop on cells
737 
738 }
int debug() const
Debug flag.
Definition: DTConfigBti.h:62
DTBtiHit * _thisStepUsedHit[9]
Definition: DTBtiChip.h:186
std::vector< DTBtiHit * > _hits[9]
Definition: DTBtiChip.h:184
int currentIntStep() const
Definition: DTBtiChip.h:145
int jtrig() const
position in registers
Definition: DTBtiHit.h:93
int _curStep
Definition: DTBtiChip.h:183
#define debug
Definition: HDRShower.cc:19
float curTime() const
Return the current time.
Definition: DTBtiHit.h:77
#define begin
Definition: vmac.h:30
int _nStepUsedHits
Definition: DTBtiChip.h:187
tuple cout
Definition: gather_cfg.py:145
DTConfigBti * config() const
Configuration set.
Definition: DTBtiChip.h:117
DTBtiTrig * DTBtiChip::trigger ( int  step,
unsigned  n 
) const

Return the requested trigger.

Definition at line 475 of file DTBtiChip.cc.

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

Referenced by doLTS().

475  {
476  if(step<DTConfig::NSTEPF||step>DTConfig::NSTEPL){
477  cout << "DTBtiChip::trigger: step out of range: " << step ;
478  cout << " empty pointer returned" << endl;
479  return 0;
480  }
481  if(n<1 || n>_trigs[step-DTConfig::NSTEPF].size()) {
482  cout << "DTBtiChip::trigger: requested trigger does not exist: " << n;
483  cout << " empty pointer returned!" << endl;
484  return 0;
485  }
486  vector<DTBtiTrig*>::const_iterator p = _trigs[step-DTConfig::NSTEPF].begin();
487  return (*(p+n-1));
488 }
static const int NSTEPF
Definition: DTConfig.h:36
static const int NSTEPL
Constants: first and last step to start trigger finding.
Definition: DTConfig.h:36
std::vector< DTBtiTrig * > _trigs[DTConfig::NSTEPL-DTConfig::NSTEPF+1]
Definition: DTBtiChip.h:180
tuple cout
Definition: gather_cfg.py:145
tuple size
Write out results.
DTBtiTrigData DTBtiChip::triggerData ( int  step,
unsigned  n 
) const

Return the data part of the requested trigger.

Definition at line 491 of file DTBtiChip.cc.

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

Referenced by DTBtiCard::runBTI().

491  {
492  if(step<DTConfig::NSTEPF||step>DTConfig::NSTEPL){
493  cout << "DTBtiChip::triggerData: step out of range: " << step ;
494  cout << " dummy trigger returned" << endl;
495  return DTBtiTrigData();
496  }
497  if(n<1 || n>_trigs[step-DTConfig::NSTEPF].size()) {
498  cout << "DTBtiChip::triggerData: requested trig. doesn't exist: " << n;
499  cout << " dummy trigger returned!" << endl;
500  return DTBtiTrigData();
501  }
502  vector<DTBtiTrig*>::const_iterator p = _trigs[step-DTConfig::NSTEPF].begin();
503  return (*(p+n-1))->data();
504 }
static const int NSTEPF
Definition: DTConfig.h:36
static const int NSTEPL
Constants: first and last step to start trigger finding.
Definition: DTConfig.h:36
std::vector< DTBtiTrig * > _trigs[DTConfig::NSTEPL-DTConfig::NSTEPF+1]
Definition: DTBtiChip.h:180
tuple cout
Definition: gather_cfg.py:145
tuple size
Write out results.
vector< DTBtiTrig * > DTBtiChip::trigList ( int  step) const

Definition at line 465 of file DTBtiChip.cc.

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

465  {
466  if(step<DTConfig::NSTEPF||step>DTConfig::NSTEPL){
467  cout << "DTBtiChip::trigList: step out of range: " << step ;
468  cout << " empty pointer returned" << endl;
469  //return 0;
470  }
471  return _trigs[step-DTConfig::NSTEPF];
472 }
static const int NSTEPF
Definition: DTConfig.h:36
static const int NSTEPL
Constants: first and last step to start trigger finding.
Definition: DTConfig.h:36
std::vector< DTBtiTrig * > _trigs[DTConfig::NSTEPL-DTConfig::NSTEPF+1]
Definition: DTBtiChip.h:180
tuple cout
Definition: gather_cfg.py:145
int DTBtiChip::wheel ( ) const
inline

Return wheel number.

Definition at line 127 of file DTBtiChip.h.

References _geom, and DTTrigGeom::wheel().

Referenced by geometryXMLparser.DTAlignable::index().

127 { return _geom->wheel(); }
int wheel() const
Return wheel number.
Definition: DTTrigGeom.h:61
DTTrigGeom * _geom
Definition: DTBtiChip.h:169

Member Data Documentation

int DTBtiChip::_busyStart_clock[9]
private

Definition at line 206 of file DTBtiChip.h.

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

DTBtiCard* DTBtiChip::_card
private

Definition at line 167 of file DTBtiChip.h.

Referenced by DTBtiChip().

DTConfigBti* DTBtiChip::_config
private

Definition at line 170 of file DTBtiChip.h.

Referenced by config().

int DTBtiChip::_curStep
private

Definition at line 183 of file DTBtiChip.h.

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

float DTBtiChip::_difs[25]
private

Definition at line 188 of file DTBtiChip.h.

Referenced by DTBtiChip(), init(), init_clock(), and operator=().

std::vector<const DTDigi*> DTBtiChip::_digis[9]
private

Definition at line 175 of file DTBtiChip.h.

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

std::vector<int > DTBtiChip::_digis_clock[9]
private

Definition at line 177 of file DTBtiChip.h.

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

DTTrigGeom* DTBtiChip::_geom
private
std::vector<DTBtiHit*> DTBtiChip::_hits[9]
private

Definition at line 184 of file DTBtiChip.h.

Referenced by clear(), DTBtiChip(), init(), init_clock(), operator=(), and tick().

DTBtiId DTBtiChip::_id
private
float DTBtiChip::_JTR[32][3]
private

Definition at line 204 of file DTBtiChip.h.

Referenced by DTBtiChip(), and operator=().

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

Definition at line 189 of file DTBtiChip.h.

Referenced by DTBtiChip(), and operator=().

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

Definition at line 203 of file DTBtiChip.h.

Referenced by DTBtiChip(), and operator=().

int DTBtiChip::_MaxKAcc
private

Definition at line 192 of file DTBtiChip.h.

Referenced by DTBtiChip(), operator=(), and store().

int DTBtiChip::_MaxKcenterTraco
private

Definition at line 196 of file DTBtiChip.h.

int DTBtiChip::_MaxKleftTraco
private

Definition at line 194 of file DTBtiChip.h.

int DTBtiChip::_MaxKrightTraco
private

Definition at line 198 of file DTBtiChip.h.

int DTBtiChip::_MinKAcc
private

Definition at line 191 of file DTBtiChip.h.

Referenced by DTBtiChip(), operator=(), and store().

int DTBtiChip::_MinKcenterTraco
private

Definition at line 195 of file DTBtiChip.h.

int DTBtiChip::_MinKleftTraco
private

Definition at line 193 of file DTBtiChip.h.

int DTBtiChip::_MinKrightTraco
private

Definition at line 197 of file DTBtiChip.h.

int DTBtiChip::_nStepUsedHits
private

Definition at line 187 of file DTBtiChip.h.

Referenced by operator=(), run(), and tick().

float DTBtiChip::_sums[25]
private

Definition at line 188 of file DTBtiChip.h.

Referenced by DTBtiChip(), init(), init_clock(), and operator=().

DTBtiHit* DTBtiChip::_thisStepUsedHit[9]
private

Definition at line 186 of file DTBtiChip.h.

Referenced by DTBtiChip(), init(), init_clock(), operator=(), store(), and tick().

int DTBtiChip::_thisStepUsedTimes[9]
private

Definition at line 185 of file DTBtiChip.h.

Referenced by DTBtiChip(), and operator=().

std::vector<DTBtiTrig*> DTBtiChip::_trigs[DTConfig::NSTEPL-DTConfig::NSTEPF+1]
private
float DTBtiChip::_Xeq[32][2]
private

Definition at line 190 of file DTBtiChip.h.

Referenced by DTBtiChip(), and operator=().

float DTBtiChip::_XeqAB_patt0
private

Definition at line 201 of file DTBtiChip.h.

float DTBtiChip::_XeqAC_patt0
private

Definition at line 200 of file DTBtiChip.h.

float DTBtiChip::_XeqBD_patt0
private

Definition at line 200 of file DTBtiChip.h.

float DTBtiChip::_XeqCD_patt0
private

Definition at line 201 of file DTBtiChip.h.

int DTBtiChip::init_done
private

Definition at line 205 of file DTBtiChip.h.

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

int DTBtiChip::RE23
private

Definition at line 209 of file DTBtiChip.h.

Referenced by setSnap().

int DTBtiChip::RE43
private

Definition at line 209 of file DTBtiChip.h.

Referenced by setSnap().

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

Definition at line 211 of file DTBtiChip.h.

Referenced by reSum().

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

Definition at line 212 of file DTBtiChip.h.

Referenced by reSum23().

int DTBtiChip::ST
private

Definition at line 209 of file DTBtiChip.h.

Referenced by setSnap().

int DTBtiChip::ST2
private

Definition at line 209 of file DTBtiChip.h.

Referenced by setSnap().

int DTBtiChip::ST23
private

Definition at line 209 of file DTBtiChip.h.

Referenced by setSnap().

int DTBtiChip::ST3
private

Definition at line 209 of file DTBtiChip.h.

Referenced by setSnap().

int DTBtiChip::ST4
private

Definition at line 209 of file DTBtiChip.h.

Referenced by setSnap().

int DTBtiChip::ST43
private

Definition at line 209 of file DTBtiChip.h.

Referenced by setSnap().

int DTBtiChip::ST5
private

Definition at line 209 of file DTBtiChip.h.

Referenced by setSnap().

int DTBtiChip::ST7
private

Definition at line 209 of file DTBtiChip.h.

Referenced by setSnap().