CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DTBtiCard.cc
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
3 // Class: DTBtiCard
4 //
5 // Description: Contains active DTBtiChips
6 //
7 //
8 // Author List:
9 // C. Grandi
10 // Modifications:
11 // S. Vanini
12 // 22/VI/04 SV: last trigger code update - digi offset subtracted from digi time
13 // III/05 SV : NEWGEO : trigger in new geometry !
14 // 05/II/07 SV : new DTConfig update
15 // 30/III/07 SV : config with DTConfigManager every single chip
16 //----------------------------------------------------------------
17 
18 //-----------------------
19 // This Class's Header --
20 //-----------------------
22 
23 //-------------------------------
24 // Collaborating Class Headers --
25 //-------------------------------
30 
34 
39 
45 
46 //---------------
47 // C++ Headers --
48 //---------------
49 #include <iostream>
50 #include <cmath>
51 #include <utility>
52 #include <vector>
53 
54 
55 using namespace edm;
56 
57 
58 //----------------
59 // Constructors --
60 //----------------
61 
63  DTGeomSupplier(geom) {
64 
65  //_configBti = new DTConfigBti(bti_pset);
66  //_configBti->print();
67 
68  //DTChamberId sid = ChamberId();
69  //_conf_bti_map = conf_manager->getDTConfigBtiMap(sid);
70  //_debug = conf_manager->getDTTPGDebug();
71 
72  //_finedelay = conf_manager->getDTConfigTrigUnit(sid)->MCSetupTime();
73  //_MCdelay = conf_manager->getDTConfigTrigUnit(sid)->MCDigiOffset();
74 
75 
76 
77 }
78 
79 //--------------
80 // Destructor --
81 //--------------
82 
84 
85  localClear();
86  //delete _conf_Bti;
87 
88 }
89 
90 //--------------
91 // Operations --
92 //--------------
93 
94 void
96 
98  localClear();
99 
100 }
101 
102 void
104 
105  DTChamberId sid = ChamberId();
106  _conf_bti_map = conf->getDTConfigBtiMap(sid);
107  _debug = conf->getDTTPGDebug();
109 
110  // get bti acceptance flag
111  _flag_acc = conf->useAcceptParam();
112 
113 }
114 
115 
116 void
118 // Clear the maps
119  for(int i=0; i<3; i++){
120  for(BTI_iter p=_btimap[i].begin();p!=_btimap[i].end();p++){
121  delete (*p).second;
122  }
123  _btimap[i].clear();
124  }
125 
126  //clear digis
127  std::vector<DTDigi*>::const_iterator p;
128  for(p=_digis.begin();p<_digis.end();p++)
129  delete (*p);
130  _digis.clear();
131 }
132 
133 // void
134 // //DTBtiCard::loadBTI() {
135 // DTBtiCard::loadBTI(const DTDigiCollection dtDigis) {
136 
137 // localClear();
138 
139 // int ndigis = stat()->ndigis();
140 
141 
142 // // /*
143 // // //SV version for tb2003 data
144 // // // loop over chambers, superlayers and layers
145 // // DTBXSetUp* setup = Singleton<DTBXSetUp>::instance();
146 // // DTDetectorMap* detMap = setup->chamberMap();
147 // // std::vector<DTChamber*> chambers = detMap->chambers();
148 // // DTDetectorMap::ChamIter stat;
149 // // for ( stat = chambers.begin(); stat != chambers.end(); stat++ ) {
150 // // */
151 
152 // // // Get DTDigi's from DTChamber (stat is DTChamber*)
153 // // // Loop over all Digis and make a local copy
154 // // // Store a pointer to them in the relevant DTBtiChip's
155 
156 // if(ndigis){
157 
158 // if(debug()){
159 // std::cout << "====================================================" << std::endl;
160 // std::cout << ndigis << " DIGIS in wheel " << wheel() <<
161 // " station " << station() <<
162 // " sector " << sector() << std::endl;
163 // }
164 
165 
166 // std::vector<DTDigi> digi_container = stat()->digis();
167 // std::vector<DTDigi>::const_iterator digi_iter;
168 
169 // for(digi_iter=digi_container.begin(); digi_iter<digi_container.end(); digi_iter++){
170 
171 // /*Testbeam 2004 specific code
172 // //digi.time in ns; digi.countsTDC in tdcunits
173 // //float tdrift = (*digi_iter).time()-1.0*DTDigiParameters::offset;
174 // //TB2004 version: no offset subtraction because digi are already t0 off!!!!
175 // //tdrift must be float, otherwise DTDigi constructor assumes tdcunits!
176 // //add chamber specific delay
177 // int tdctime = (*digi_iter).countsTDC();
178 // int mcdelay = (stat()->id().station()==1) ? config()->SetupTimeMB1() : config()->SetupTimeMB
179 // 3();
180 // tdctime += mcdelay;
181 // */
182 // float tdrift = (*digi_iter).time()-1.0*DTDigiParameters::offset;
183 // DTWireId idwire( wheel(), station(), sector(), (*digi_iter).slayer(),
184 // (*digi_iter).layer(), (*digi_iter).wire() );
185 
186 
187 // /*
188 // //NEWGEO TEST: sw testpulse for testing new geometry in wire 1 of each sl
189 // for(int l=0;l<12;l++){
190 // int sl = int(l/4.) + 1;
191 // if(station()!=4 || sl!=2){
192 // int lay = int(fmod(l,4.)) + 1;
193 // int wire = 2*sector();
194 // if(geom()->posFE(sl)==0 || station()==1 || sl==2)
195 // wire += lay==4? 1:2;
196 // else if(geom()->posFE(sl)==1)
197 // wire += lay==3? 3:2;
198 
199 // //int wire = 1;
200 // //tmax=400ns, straight tracks in middle : 200ns (float for ns, int for tdc_counts)
201 // //float tdrift = 187.5;
202 // float tdrift = 200.0;
203 // DTWireId idwire( wheel(), station(), sector(), sl, lay, wire);
204 // */
205 
206 // DTDigi* pdigi = new DTDigi(idwire,tdrift);
207 // _digis.push_back(const_cast<DTDigi*>(pdigi));
208 
209 // if(debug())
210 // pdigi->print();
211 
212 // int sln = pdigi->slayer();
213 // int layn = pdigi->layer();
214 // int tube = pdigi->wire();
215 
216 // // map in FE channel number:
217 // int nch = geom()->mapTubeInFEch(sln,layn,tube);
218 
219 // // assign ch numbers to btis: depends on layer staggering!
220 // int nbti = nch + geom()->layerFEStaggering(sln,layn);
221 
222 // if(debug()){
223 // std::cout << "FE ch " << nch;
224 // std::cout << " of bti " << nbti;
225 // std::cout << " staggering " << geom()->layerFEStaggering(sln,layn);
226 // std::cout << " now nbti is " << nch;
227 // std::cout << " SL phi offset " << geom()->phiSLOffset() << std::endl;
228 // }
229 
230 // switch(layn) {
231 // case 1:
232 // if(activeGetBTI(sln, nbti )) activeGetBTI(sln, nbti )->add_digi(4, pdigi);
233 // if(activeGetBTI(sln, nbti-1)) activeGetBTI(sln, nbti-1)->add_digi(8, pdigi);
234 // break;
235 // case 2:
236 // if(activeGetBTI(sln, nbti )) activeGetBTI(sln, nbti )->add_digi(2, pdigi);
237 // if(activeGetBTI(sln, nbti-1)) activeGetBTI(sln, nbti-1)->add_digi(6, pdigi);
238 // break;
239 // case 3:
240 // if(activeGetBTI(sln, nbti )) activeGetBTI(sln, nbti )->add_digi(3, pdigi);
241 // if(activeGetBTI(sln, nbti-1)) activeGetBTI(sln, nbti-1)->add_digi(7, pdigi);
242 // break;
243 // case 4:
244 // if(activeGetBTI(sln, nbti )) activeGetBTI(sln, nbti )->add_digi(1, pdigi);
245 // if(activeGetBTI(sln, nbti-1)) activeGetBTI(sln, nbti-1)->add_digi(5, pdigi);
246 // if(activeGetBTI(sln, nbti-2)) activeGetBTI(sln, nbti-2)->add_digi(9, pdigi);
247 // break;
248 // }
249 // }//end loop on digi
250 
251 // if(debug())
252 // std::cout << "====================================================" << std::endl;
253 
254 // }//end if(ndigis)
255 // }
256 
257 void
259 
260  localClear();
261 
262  if(debug()){
263  std::cout << "DTBtiCard::loadBTI called for wheel=" << wheel() ;
264  std::cout << ", station=" << station();
265  std::cout << ", sector=" << sector() << std::endl;
266  }
267 
269  for (detUnitIt=dtDigis.begin();
270  detUnitIt!=dtDigis.end();
271  ++detUnitIt){
272 
273  const DTLayerId& id = (*detUnitIt).first;
274  const DTDigiCollection::Range& range = (*detUnitIt).second;
275 
276  // DTLayerId print-out
277  if(debug()){
278  std::cout<<"--------------"<<std::endl;
279  std::cout<<"id: "<<id;
280  }
281 
282  // Loop over the digis of this DetUnit
283  for (DTDigiCollection::const_iterator digiIt = range.first;
284  digiIt!=range.second;
285  ++digiIt){
286 
287  int tube = (*digiIt).wire();
288  const DTWireId tubeid(id,tube);
289  float tdrift = (*digiIt).time() - _pedestals->getOffset(tubeid);
290 
291  if ( debug() ){
292  std::cout << " digi time : " << (*digiIt).time();
293  std::cout << " pedestal offset : " << _pedestals->getOffset(tubeid) << std::endl;
294  std::cout << " drift time after subtraction : " << tdrift << std::endl;
295  }
296 
297 
298  if(tdrift<500 && tdrift>-500){
299  if(debug())
300  (*digiIt).print();
301 
302  // get bti number for access to the configuration for this bti chip : SV
303  // FIX: for the moment take first bti configuration!!!!! ok fixed
304  DTSuperLayerId slnum = id.superlayerId();
305  //DTChamberId dtcham =id.chamberId();
306  int sln = slnum.superlayer();
307  int layn = id.layer();
308  //int tube = (*digiIt).wire();
309 
310  // map in FE channel number: SL theta tubes are numbered inversely w.r.t. hardware setup in new geometry 19/06/06
311  // assign ch numbers to btis: in new geometry does not depend on layer staggering anymore! Same staggering anywhere.
312  //int nch = geom()->mapTubeInFEch(sln,layn,tube);
313  // int nbti = nch + geom()->layerFEStaggering(sln,layn);
314 
315  int nch = geom()->mapTubeInFEch(sln,layn,tube);
316  int nbti = nch ;
317 
318  if(debug()){
319  std::cout << "FE ch " << nch;
320  std::cout << " of bti " << nbti;
321 // std::cout << " staggering " << geom()->layerFEStaggering(sln,layn);
322  std::cout << " now nbti is " << nch << std::endl;
323 // std::cout << " SL phi offset " << geom()->phiSLOffset() << std::endl;
324  }
325 
326  // FIXED get configuration for the nbti chip Identifier, and from it MCdelay + finedelay
327  //DTChamberId sid = geom()->statId();
328  //DTBtiId _id = DTBtiId(sid, sln, nbti);
329 
330  DTDigi* pdigi = new DTDigi((*digiIt).wire(),tdrift);
331  _digis.push_back(pdigi);
332 
333 
334  switch(layn) {
335  case 1:
336  if(activeGetBTI(sln, nbti )) activeGetBTI(sln, nbti )->add_digi(4, pdigi);
337  if(activeGetBTI(sln, nbti-1)) activeGetBTI(sln, nbti-1)->add_digi(8, pdigi);
338  break;
339  case 2:
340  if(activeGetBTI(sln, nbti )) activeGetBTI(sln, nbti )->add_digi(2, pdigi);
341  if(activeGetBTI(sln, nbti-1)) activeGetBTI(sln, nbti-1)->add_digi(6, pdigi);
342  break;
343  case 3:
344  if(activeGetBTI(sln, nbti )) activeGetBTI(sln, nbti )->add_digi(3, pdigi);
345  if(activeGetBTI(sln, nbti-1)) activeGetBTI(sln, nbti-1)->add_digi(7, pdigi);
346  break;
347  case 4:
348  if(activeGetBTI(sln, nbti )) activeGetBTI(sln, nbti )->add_digi(1, pdigi);
349  if(activeGetBTI(sln, nbti-1)) activeGetBTI(sln, nbti-1)->add_digi(5, pdigi);
350  if(activeGetBTI(sln, nbti-2)) activeGetBTI(sln, nbti-2)->add_digi(9, pdigi);
351  break;
352  }
353  }//end loop on digi
354  // }//end loop on lay
355  // }//end loop on sl
356  }
357  }
358 }
359 
360 void
362 
363  int nbtisig = _btimap[0].size()+_btimap[1].size()+_btimap[2].size();
364 
365  if(debug()){
366  std::cout << "DTBtiCard::runBTI called for wheel=" << wheel() ;
367  std::cout << ", station=" << station();
368  std::cout << ", sector=" << sector();
369  std::cout << ", " << nbtisig
370  << " BTIs with signal" << std::endl;
371  }
372 
373  if( nbtisig){
374 
375  if(debug()){
376  std::cout << "====================================================" << std::endl;
377  std::cout << " BTI triggers " << std::endl;
378  }
379 
380 
381  // run DTBtiChip algorithm on all non-empty BTI
382  for(int sl=1;sl<=3;sl++){
383  if(_btimap[sl-1].size()>0){
384  BTI_iter pbti;
385  for(pbti=_btimap[sl-1].begin(); pbti!=_btimap[sl-1].end(); pbti++) {
386  DTBtiChip* bti = (*pbti).second;
387  if(bti->number()<200)
388  bti->run();
390  if(bti->nTrig(step)>0) {
391  _cache.push_back( bti->triggerData(step,1) );
392  //localPosition(&(bti->triggerData(step,1)));
393  //localDirection(&(bti->triggerData(step,1)));
394  }
395  }
396  }
397  }
398  }
399 
400  if(debug())
401  std::cout << "====================================================" << std::endl;
402  }//end if(nbtisig)
403 }
404 
405 DTBtiChip*
407 
408  DTBtiChip* bti=0;
409  //check if BTi is out of range before all
410  if( n<1 || n>geom()->nCell(sl) ){
411  if(debug()){
412  std::cout << "DTBtiCard::activeGetBTI :";
413  std::cout << " invalid bti number: " << n;
414  std::cout << " not in range [1," << geom()->nCell(sl) << "]";
415  std::cout << " dummy BTI returned!" << std::endl;
416  }
417  sl = 1;
418  n = 999;
419  return bti;
420  }
421 
422  // get configuration for this chip Identifier
423  DTChamberId sid = geom()->statId();
424  DTBtiId _id = DTBtiId(sid, sl, n);
425 
426  //debug this chip
427  int _debug_bti = config_bti(_id)->debug();
428 
429  if(_debug_bti==3){
430  std::cout << "DTBtiCard::activeGetBTI :";
431  std::cout << " bti number: " << n << std::endl;
432  }
433 
434  if( sl<1 || sl>3){
435  if(_debug_bti>1){
436  std::cout << "DTBtiCard::activeGetBTI :";
437  std::cout << " invalid superlayer number: " << sl;
438  std::cout << " dummy BTI returned!" << std::endl;
439  }
440  sl = 1;
441  n = 999;
442  return bti;
443  }
444 
445  BTI_iter pbti = _btimap[sl-1].find(n);
446  if( pbti!=_btimap[sl-1].end() ) {
447  bti = (*pbti).second;
448  } else {
449  bti = new DTBtiChip(this, geom(),sl,n, config_bti(_id));
450  _btimap[sl-1][n]=bti;
451  }
452  return bti;
453 }
454 
455 DTBtiChip*
456 DTBtiCard::getBTI(int sl, int n) const {
457  if(sl<1||sl>3||n==999){
458  std::cout << "DTBtiCard::getBTI :";
459  std::cout << " invalid superlayer number: " << sl;
460  std::cout << " 0 returned!" << std::endl;
461  return 0;
462  }
463  BTI_const_iter pbti = _btimap[sl-1].find(n);
464  if( pbti==_btimap[sl-1].end() ){
465  return 0;
466  }
467  return (*pbti).second;
468 }
469 
470 std::vector<DTBtiChip*>
472 
473  std::vector<DTBtiChip*> blist;
474 
475  if(size()<1)return blist;
476 
477  if(sl<1||sl>3){
478  std::cout << "DTBtiCard::btiList :";
479  std::cout << " invalid superlayer number: " << sl;
480  std::cout << " empty list returned" << std::endl;
481  return blist;
482  }
483 
484  for(BTI_const_iter p=_btimap[sl-1].begin();p!=_btimap[sl-1].end();p++){
485  blist.push_back((*p).second);
486  }
487  return blist;
488 
489 }
490 
491 DTBtiTrig*
493  DTBtiId btiid = td.parentId();
494  if(!(btiid.wheel()==wheel() &&
495  btiid.sector()==sector() &&
496  btiid.station()==station()) ) return 0;
497  std::cout << "DTBtiCard::trigger: trigger not belonging to this card! ";
498  std::cout << "card=(" << wheel() << "," << station() << "," << sector() << ") ";
499  std::cout << "trig=(" << btiid.wheel() << "," << btiid.station() << ","
500  << btiid.sector() << ")";
501  // get the appropriate BTI
502  DTBtiChip* bti = activeGetBTI(btiid.superlayer(), btiid.bti());
503  // create a new trigger in the BTI
504  DTBtiTrig* trig = new DTBtiTrig(bti,td);
505  // add the trigger to the BTI
506  bti->addTrig(td.step(),trig);
507  // return the trigger
508  return trig;
509 }
510 
511 /*
512 LocalPoint
513 DTBtiCard::localPosition(const DTTrigData* tr) const {
514 //OBSOLETE!!!!!
515  //@@ patch for Sun 4.2 compiler
516  DTBtiTrigData* trig = dynamic_cast<DTBtiTrigData*>(const_cast<DTTrigData*>(tr));
517  // const DTBtiTrigData* trig = dynamic_cast<const DTBtiTrigData*>(tr);
518  if(!trig) {
519  std::cout << "DTBtiCard::localPosition called with wrong argument!" << std::endl;
520  return LocalPoint(0,0,0);
521  }
522  float x = geom()->localPosition(trig->parentId()).x();
523  float y = geom()->localPosition(trig->parentId()).y();
524  float z = geom()->localPosition(trig->parentId()).z();
525 
526  //FE position
527  int FE = geom()->posFE(trig->parentId().superlayer());
528 
529  //trigger position in the BTI frame
530  float xt = 0;
531  float yt = 0;
532  float xtrig = (float)trig->X() * geom()->cellPitch() / (config()->ST());
533  if(trig->btiSL()==2)
534  yt = - xtrig;
535  else
536  xt = + xtrig;
537 
538  if(FE==1){//FE in negative y
539  xt = - xt;
540  yt = - yt;
541  }
542 
543  std::cout << "DTBtiCard::localPosition of BTI in ("<<x<<","<<y<<","<<z<<")"<<std::endl;
544  std::cout << " called for trig ";
545  trig->print();
546  std::cout << "in Local Point ("<<x+xt<<","<<y+yt<<","<<z<<")"<<std::endl;
547 
548  return LocalPoint(x+xt,y+yt,z);
549 }
550 */
551 
552 LocalPoint
554 //NEWGEO!!!
555  const DTBtiTrigData* trig = dynamic_cast<const DTBtiTrigData*>(tr);
556  if(!trig) {
557  std::cout << "DTBtiCard::localPosition called with wrong argument!" << std::endl;
558  return LocalPoint(0,0,0);
559  }
560 
561  //BTI position in chamber frame
562  float x = geom()->localPosition(trig->parentId()).x();
563  float y = geom()->localPosition(trig->parentId()).y();
564  float z = geom()->localPosition(trig->parentId()).z();
565 
566  //FE position
567  //int FE = geom()->posFE(trig->parentId().superlayer());
568 
569  //trigger position in the BTI frame
570  float xt = 0;
571  float yt = 0;
572 
573  DTBtiId _btiid = trig->parentId();
574  float xtrig = (float)trig->X() * geom()->cellPitch() / (config_bti(_btiid)->ST());
575  if(trig->btiSL()==2)
576  yt = - xtrig;
577  else
578  xt = + xtrig;
579 
580 // 17/07/06 Should be obsolete in CMSSW
581 // if(FE==1){//FE in negative y
582 // xt = - xt;
583 // yt = - yt;
584 // }
585 
586 
587 
588  if(debug()){
589  std::cout << "DTBtiCard::localPosition of BTI in ("<<x<<","<<y<<","<<z<<")"<<std::endl;
590  std::cout << " called for trig ";
591  trig->print();
592  std::cout << "in Local Point ("<<x+xt<<","<<y+yt<<","<<z<<")"<<std::endl;
593  }
594 
595  return LocalPoint(x+xt,y+yt,z);
596 }
597 
598 
601 //NEWGEO
602  const DTBtiTrigData* trig = dynamic_cast<const DTBtiTrigData*>(tr);
603  //this method is only for check purpose
604  if(!trig) {
605  std::cout << "DTBtiCard::localDirection called with wrong argument!" << std::endl;
606  return LocalVector(0,0,0);
607  }
608 
609  //FE position
610  //int FE = geom()->posFE(trig->parentId().superlayer());
611 
612  // psi in BTI frame
613  DTBtiId _btiid = trig->parentId();
614  float psi = atan((float)(trig->K() - config_bti(_btiid)->ST())*geom()->cellPitch()
615  /(2*geom()->cellH() * config_bti(_btiid)->ST()));
616  // (xd,yd,zd) in chamber frame
617  float xd=0;
618  float yd=0;
619  float zd=-cos(psi);
620  if(trig->btiSL()==2)
621  yd = sin(psi);
622  else
623  xd = -sin(psi);
624 
625 // 17/07/06 Ths should be obsolete in CMSSW
626 // if(FE==1){//FE in negative y
627 // xd = - xd;
628 // yd = - yd;
629 // }
630 
631  if(debug()){
632  //BTI position in chamber frame
633  float xb = geom()->localPosition(trig->parentId()).x();
634  float yb = geom()->localPosition(trig->parentId()).y();
635  float zb = geom()->localPosition(trig->parentId()).z();
636 
637  std::cout << "DTBtiCard::localDirection of BTI in ("<<xb<<","<<yb<<","<<zb<<")"<<std::endl;
638  std::cout << " called for trig ";
639  trig->print();
640  std::cout << "in Local Direction ("<<xd<<","<<yd<<","<<zd<<")"<<std::endl;
641  }
642 
643  return LocalVector(xd,yd,zd);
644 }
645 
646 /*
647 
648 LocalVector
649 DTBtiCard::localDirection(const DTTrigData* tr) const {
650 //OBSOLETE!!!!
651  //@@ patch for Sun 4.2 compiler
652  const DTBtiTrigData* trig = dynamic_cast<const DTBtiTrigData*>(const_cast<DTTrigData*>(tr));
653  // const DTBtiTrigData* trig = dynamic_cast<const DTBtiTrigData*>(tr);
654  if(!trig) {
655  std::cout << "DTBtiCard::localDirection called with wrong argument!" << std::endl;
656  return LocalVector(0,0,0);
657  }
658  float x1,r,x,y,z;
659  x1 = -(float)trig->K() * geom()->cellPitch() /
660  (float)(config()->ST());
661  z = - 2 * geom()->cellH();
662  r = sqrt(x1*x1+z*z);
663  if(trig->btiSL()!=2) {
664  x = x1/r;
665  y = 0;
666  } else {
667  x = 0;
668  y = x1/r;
669  }
670  z /= r;
671  return LocalVector(x,y,z);
672 }
673 */
674 
675 DTConfigBti*
677 {
678  //loop on map to find bti
679  ConfBtiMap::const_iterator biter = _conf_bti_map.find(btiid);
680  if (biter == _conf_bti_map.end()){
681  std::cout << "DTBtiCard::config_bti : BTI (" << btiid.wheel()
682  << "," << btiid.sector()
683  << "," << btiid.station()
684  << "," << btiid.superlayer()
685  << "," << btiid.bti()
686  << ") not found, return 0" << std::endl;
687  return 0;
688  }
689 
690  return const_cast<DTConfigBti*>(&(*biter).second);
691 
692 }
BTIContainer _btimap[3]
Definition: DTBtiCard.h:130
DTConfigBti * config_bti(DTBtiId &btiid) const
Return bti chip configuration.
Definition: DTBtiCard.cc:676
int i
Definition: DBlmapReader.cc:9
std::vector< DTDigi * > _digis
Definition: DTBtiCard.h:133
int debug() const
Debug flag.
Definition: DTConfigBti.h:62
DTTrigGeom * geom() const
Associated geometry.
my_collection _cache
Definition: DTCache.h:56
Local3DVector LocalVector
Definition: LocalVector.h:12
int mapTubeInFEch(int nsl, int nlay, int ntube) const
Staggering of first wire of layer respect to default: obsolete 19/6/06.
Definition: DTTrigGeom.cc:144
ConfBtiMap _conf_bti_map
Definition: DTBtiCard.h:131
int sector() const
Return sector number.
float cellPitch() const
Width of a cell (cm) i.e. distance between ywo wires.
Definition: DTTrigGeom.h:78
LocalVector localDirection(const DTTrigData *) const
NEWGEO Local direction in chamber of a trigger-data object.
Definition: DTBtiCard.cc:600
std::vector< DTBtiChip * > btiList(int)
Returns the active BTI list in a given superlayer.
Definition: DTBtiCard.cc:471
DTBtiTrig * storeTrigger(DTBtiTrigData)
Definition: DTBtiCard.cc:492
LocalPoint localPosition(const DTTrigData *) const
NEWGEO Local position in chamber of a trigger-data object.
Definition: DTBtiCard.cc:553
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
DTBtiCard(DTTrigGeom *)
Constructor.
Definition: DTBtiCard.cc:62
DTBtiId parentId() const
Return parent BTI identifier.
void clearCache()
Clear all BTI stuff (map &amp; cache)
Definition: DTBtiCard.cc:95
float ST() const
Max drift time in 12.5 ns steps.
Definition: DTConfigBti.h:65
static const int NSTEPF
Definition: DTConfig.h:36
DTBtiChip * activeGetBTI(int sl, int n)
Returns the required DTBtiChip. Create it if it doesn&#39;t exist.
Definition: DTBtiCard.cc:406
float float float z
int station() const
Return station number.
const DTConfigPedestals * _pedestals
Definition: DTBtiCard.h:136
std::map< std::string, int, std::less< std::string > > psi
bool _debug
Definition: DTBtiCard.h:135
void setConfig(const DTConfigManager *conf)
Set configuration.
Definition: DTBtiCard.cc:103
bool debug() const
Return TU debug flag.
Definition: DTBtiCard.h:76
int X() const
Return trigger X parameter.
void run()
Run DTBtiChip algorithm.
Definition: DTBtiChip.cc:630
int wheel() const
Returns wheel number.
Definition: DTBtiId.h:67
int superlayer() const
Returns the superlayer.
Definition: DTBtiId.h:73
DTBtiTrigData triggerData(int step, unsigned n) const
Return the data part of the requested trigger.
Definition: DTBtiChip.cc:491
int sector() const
Returns sector number.
Definition: DTBtiId.h:71
int wheel() const
Return wheel number.
float cellH() const
Height of a cell (cm)
Definition: DTTrigGeom.h:75
DTBtiChip * getBTI(int sl, int n) const
Returns the required BTI. Return 0 if it doesn&#39;t exist.
Definition: DTBtiCard.cc:456
int station() const
Returns station number.
Definition: DTBtiId.h:69
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
tuple pdigi
Definition: redigi_cff.py:10
float getOffset(const DTWireId &wire) const
Get wire by wire delay.
const std::map< DTBtiId, DTConfigBti > & getDTConfigBtiMap(DTChamberId) const
Get desired BTI configuration map for a given DTChamber.
BTIContainer::const_iterator BTI_const_iter
Definition: DTBtiCard.h:52
int nTrig(int step) const
Number of triggers found.
Definition: DTBtiChip.cc:455
DTChamberId ChamberId() const
Identifier of the associated chamber.
static const int NSTEPL
Constants: first and last step to start trigger finding.
Definition: DTConfig.h:36
Definition: DTDigi.h:17
bool getDTTPGDebug() const
Get global debug flag.
tuple conf
Definition: dbtoconf.py:185
int superlayer() const
Return the superlayer number (deprecated method name)
int number() const
Return DTBtiChip number.
Definition: DTBtiChip.h:87
int bti() const
Returns the bti.
Definition: DTBtiId.h:75
void addTrig(int step, DTBtiTrig *btitrig)
Definition: DTBtiChip.cc:441
BTIContainer::iterator BTI_iter
Definition: DTBtiCard.h:53
DTChamberId statId() const
Identifier of the associated chamber.
Definition: DTTrigGeom.h:55
int btiSL() const
Return parent BTI superlayer.
std::vector< DTDigi >::const_iterator const_iterator
const_iterator begin() const
Get first cache element.
Definition: DTCache.h:40
int K() const
Return trigger K parameter.
LocalPoint localPosition(const DTBtiId) const
Local position in chamber of a BTI.
Definition: DTTrigGeom.cc:523
void print() const
Print.
Local3DPoint LocalPoint
Definition: LocalPoint.h:11
void loadBTI(const DTDigiCollection dtDigis)
store digi&#39;s in DTBtiChip&#39;s
Definition: DTBtiCard.cc:258
std::pair< const_iterator, const_iterator > Range
tuple cout
Definition: gather_cfg.py:121
void add_digi(int cell, const DTDigi *digi)
Add a digi to the DTBtiChip.
Definition: DTBtiChip.cc:327
Definition: DDAxes.h:10
bool useAcceptParam() const
Use Bti acceptance parameters (LL,LH,CL,CH,RL,RH)
bool _flag_acc
Definition: DTBtiCard.h:138
void runBTI()
run DTBtiChip algorithm
Definition: DTBtiCard.cc:361
const_iterator end() const
Get last cache element.
Definition: DTCache.h:43
void clearCache()
Clear cache vector.
Definition: DTCache.h:49
const DTConfigPedestals * getDTConfigPedestals() const
Get desired Pedestals configuration.
void localClear()
clear the BTI maps
Definition: DTBtiCard.cc:117
~DTBtiCard()
Destructor.
Definition: DTBtiCard.cc:83
int nCell(int sl) const
Number of BTIs in a required superlayer (i.e. nCells in lay 1)
Definition: DTTrigGeom.h:90
int size() const
Get cache vector&#39;s size.
Definition: DTCache.h:46
int step() const
Return trigger step.