StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StEmcDecoder.cxx
1 #include "StEmcDecoder.h"
2 #include <time.h>
3 #include <stdlib.h>
4 #include <Stiostream.h>
5 #include <stdio.h>
6 #ifdef IN_PANITKIN
7 #include <TFile.h>
8 #endif
9 #include "StMessMgr.h"
10 
11 #include "StEmcMappingDb.h"
12 
13 ClassImp(StEmcDecoder)
14 
15 StEmcDecoder::StEmcDecoder(unsigned date, unsigned time, bool TowerMapBug) {
16  mapping = StEmcMappingDb::instance();
17 
18  mTowerMapBug = TowerMapBug; // unused
19 
20  // tower swap fixes applied only at analysis level
21  for(int i=0;i<4800;i++) TowerBugFixIndex[i] = i+1;
22  if(date >= 20040101 && date < 20050101) {
23  #include "TowerBug2004.txt"
24  }
25  if(date >= 20050101 && date < 20060101) {
26  #include "TowerBug2005.txt"
27  }
28  for(int i=0;i<4800;i++) {
29  int id = i+1;
30  if(TowerBugFixIndex[i]!=id) {
31  int newId = TowerBugFixIndex[i];
32  TowerBugFixIndex[newId-1] = id;
33  }
34  }
35 
36  // preshower swap fixes applied only at analysis level
37  for(int i=0; i<4800; i++) PreshowerBugFixIndex[i] = i+1;
38  if(date >= 20060101 && date < 20071101) {
39  #include "PreshowerBug2007.txt"
40  }
41  for(int i=0; i<4800; i++) {
42  int id = i+1;
43  if(PreshowerBugFixIndex[i] != id) {
44  int newId = PreshowerBugFixIndex[i];
45  PreshowerBugFixIndex[newId-1] = id;
46  }
47  }
48 
49  // SMD eta swap fixes applied only at analysis level
50  for(int i=0;i<18000;i++) SmdBugFixIndex[i] = i+1;
51  if(date >= 20100101 && date < 20110101) {
52  #include "SmdBug2010.txt"
53  }
54 }
55 
57 
58 void StEmcDecoder::SetDateTime(unsigned int date, unsigned int time) {
59  if (mapping) mapping->SetDateTime(date, time);
60 }
61 
63  return mTowerMapBug;
64 }
65 
67  mTowerMapBug = fix;
68 }
69 //--------------------------------------------------------
76 int StEmcDecoder::GetTowerBugCorrectionShift(int id_original,int& id_shift) const
77 {
78  int id_new = TowerBugFixIndex[id_original - 1];
79  id_shift = id_new-id_original;
80  return 1;
81 }
82 //--------------------------------------------------------
89 int StEmcDecoder::GetPreshowerBugCorrectionShift(int id_original,int& id_shift) const
90 {
91  int id_new = PreshowerBugFixIndex[id_original - 1];
92  id_shift = id_new-id_original;
93  return 1;
94 }
95 //--------------------------------------------------------
102 int StEmcDecoder::GetSmdBugCorrectionShift(int id_original,int& id_shift) const
103 {
104  int id_new = SmdBugFixIndex[id_original - 1];
105  id_shift = id_new-id_original;
106  return 1;
107 }
108 //--------------------------------------------------------
116 int StEmcDecoder::
117 GetTowerBin(const int TowerId,int &module,int &eta,int &sub) const {
118  if(TowerId<1 || TowerId>4800) return 0;
119  if (!mapping) return 0;
120  if (!mapping->bemc()) return 0;
121  module = mapping->bemc(TowerId).m;
122  eta = mapping->bemc(TowerId).e;
123  sub = mapping->bemc(TowerId).s;
124  return 1;
125 }
126 
131 int StEmcDecoder::GetTowerCrateFromTDC(int TDC, int& crate) const {
132  if(TDC<0 || TDC>29) return 0;
133  if (!mapping) return 0;
134  if (!mapping->bemc()) return 0;
135  short id = mapping->softIdFromTDC(kBarrelEmcTowerId, TDC, 0);
136  crate = mapping->bemc(id).crate;
137  return 1;
138 }
139 
144 int StEmcDecoder::GetTowerTDCFromCrate(int crate, int& TDC) const {
145  if(crate<1 || crate>30) return 0;
146  if (!mapping) return 0;
147  if (!mapping->bemc()) return 0;
148  short id = mapping->softIdFromCrate(kBarrelEmcTowerId, crate, 0);
149  TDC = mapping->bemc(id).TDC;
150  return 1;
151 }
152 
157 int StEmcDecoder::GetTowerTDCFromDaqId(int RDO, int& TDC) const {
158  if (!mapping) return 0;
159  if (!mapping->bemc()) return 0;
160  short id;
161  if((id = mapping->softIdFromDaqId(kBarrelEmcTowerId, RDO))) {
162  TDC = mapping->bemc(id).TDC;
163  return 1;
164  }
165  return 0;
166 }
167 
173 int StEmcDecoder::
174 GetTowerCrateFromDaqId(int RDO, int& crate, int& crate_sequency) const {
175  if (!mapping) return 0;
176  if (!mapping->bemc()) return 0;
177  short id;
178  if((id = mapping->softIdFromDaqId(kBarrelEmcTowerId, RDO))) {
179  crate = mapping->bemc(id).crate;
180  crate_sequency = mapping->bemc(id).crateChannel;
181  return 1;
182  }
183  return 0;
184 }
185 
190 int StEmcDecoder::GetTowerIdFromDaqId(int RDO,int& TowerId) const {
191  if (!mapping) return 0;
192  short id;
193  if((id = mapping->softIdFromDaqId(kBarrelEmcTowerId, RDO))) {
194  TowerId = id;
195  return 1;
196  }
197  return 0;
198 }
199 
204 int StEmcDecoder::GetDaqIdFromTowerId(int TowerId,int& RDO) const {
205  if(TowerId<1 || TowerId >4800) return 0;
206  if (!mapping) return 0;
207  if (!mapping->bemc()) return 0;
208  RDO = mapping->bemc(TowerId).daqID;
209  return 1;
210 }
211 
217 int StEmcDecoder::
218 GetTowerIdFromCrate(int crate,int crate_sequency, int& TowerId) const {
219  if(crate < 1 || crate > 30) return 0;
220  if(crate_sequency < 0 || crate_sequency > 159) return 0;
221  if (!mapping) return 0;
222  TowerId = mapping->softIdFromCrate(kBarrelEmcTowerId, crate, crate_sequency);
223  return 1;
224 }
225 
231 int StEmcDecoder::
232 GetTowerIdFromTDC(int TDC,int tdc_sequency, int& TowerId) const {
233  if(TDC < 0 || TDC > 29) return 0;
234  if(tdc_sequency < 0 || tdc_sequency > 159) return 0;
235  if (!mapping) return 0;
236  TowerId = mapping->softIdFromTDC(kBarrelEmcTowerId, TDC, tdc_sequency);
237  return 1;
238 }
239 
245 int StEmcDecoder::
246 GetTriggerPatchFromCrate(int CRATE,int crate_seq, int& patchId) const {
247  if(CRATE < 1 || CRATE > 30) return 0;
248  if(crate_seq < 0 || crate_seq > 159) return 0;
249  if (!mapping) return 0;
250  if (!mapping->bemc()) return 0;
251  short id = mapping->softIdFromCrate(kBarrelEmcTowerId, CRATE, crate_seq);
252  patchId = mapping->bemc(id).triggerPatch;
253  return 1;
254 }
255 
261 int StEmcDecoder::
262 GetCrateAndSequenceFromTriggerPatch(int PATCH,int& CRATE,int& crate_seq) const {
263  if(PATCH<0 || PATCH>299) return 0;
264  if (!mapping) return 0;
265  if (!mapping->bemc()) return 0;
266  for(int id=1; id<=4800; id++) {
267  if(mapping->bemc(id).triggerPatch == PATCH) {
268  CRATE = mapping->bemc(id).crate;
269  crate_seq = (PATCH%10)*16;
270  }
271  }
272  return 1;
273 }
274 
280 int StEmcDecoder::GetTriggerPatchFromJetPatch(int jetPatch, int jetPatch_seq,
281  int &triggerPatch) const
282 {
283  if(jetPatch<0 || jetPatch>11) return 0;
284  if (!mapping) return 0;
285  if (!mapping->bemc()) return 0;
286  for(int id=1; id<=4800; id++) {
287  if(mapping->bemc(id).jetPatch == jetPatch) {
288  triggerPatch = mapping->bemc(id).triggerPatch;
289  }
290  }
291  // if (jetPatch<0 || jetPatch>=12 || jetPatch_seq<0 || jetPatch_seq>=25)
292  // return 0;
293  // triggerPatch = TriggerPatchFromJetPatchAndSeq[(jetPatch * 25) + jetPatch_seq];
294  return 1;
295 }
296 
303  int &jetPatch, int &jetPatch_seq) const
304 {
305  if (triggerPatch<0 || triggerPatch>299) return 0;
306  if (!mapping) return 0;
307  if (!mapping->bemc()) return 0;
308  for(int id=1; id<=4800; id++) {
309  if(mapping->bemc(id).triggerPatch == triggerPatch) {
310  jetPatch = mapping->bemc(id).jetPatch;
311  }
312  }
313  // jetPatch_seq = JetPatchSeqFromTriggerPatch[triggerPatch];
314  return 1;
315 }
316 
317 int StEmcDecoder::GetDSMFromTriggerPatch(int patchId, int &dsmModule) const {
318  if(patchId < 0 || patchId >= 300) return 0;
319  dsmModule = patchId/10;
320  return 1;
321 }
322 
323 int StEmcDecoder::
324 GetTriggerPatchesFromDSM(int dsmModule, int *triggerPatches) const {
325  if(dsmModule < 0 || dsmModule >= 30) return 0;
326  for(int i=0; i<10; i++) {
327  triggerPatches[i] = dsmModule*10 + i;
328  }
329  return 1;
330 }
331 
332 //--------------------------------------------------------
341 int StEmcDecoder::GetSmdRDO(int detector, int module, int eta, int sub,
342  int& RDO, int& index) const
343 {
344  if (!mapping) return 0;
345  if(detector == 3) {
346  if (!mapping->bsmde()) return 0;
347  int id = mapping->softIdFromMES(kBarrelSmdEtaStripId, module, eta, sub);
348  RDO = mapping->bsmde(id).rdo;
349  index = mapping->bsmde(id).rdoChannel;
350  return 1;
351  }
352  else if(detector == 4) {
353  if (!mapping->bsmdp()) return 0;
354  int id = mapping->softIdFromMES(kBarrelSmdPhiStripId, module, eta, sub);
355  RDO = mapping->bsmdp(id).rdo;
356  index = mapping->bsmdp(id).rdoChannel;
357  return 1;
358  }
359  return 0;
360 }
361 
371 int StEmcDecoder::GetSmdCoord(int RDO, int index, int& detector, int& module,
372  int& eta, int& sub, bool print) const
373 {
374  int wire, A_value;
375  return GetSmdCoord(RDO,index,detector,module,eta,sub,wire,A_value,print);
376 }
377 
389 int StEmcDecoder::GetSmdCoord(int RDO, int index, int& det, int& m, int& e,
390  int& s, int& wire, int& A_value, bool print) const
391 {
392  if (!mapping) return 0;
393  short id;
394  if((id = mapping->softIdFromRDO(kBarrelSmdEtaStripId, RDO, index))) {
395  if (!mapping->bsmde()) return 0;
396  det = 3;
397  m = mapping->bsmde(id).m;
398  e = mapping->bsmde(id).e;
399  s = mapping->bsmde(id).s;
400  wire = mapping->bsmde(id).wire;
401  A_value = mapping->bsmde(id).feeA;
402  return 1;
403  }
404  else if((id = mapping->softIdFromRDO(kBarrelSmdPhiStripId, RDO, index))) {
405  if (!mapping->bsmdp()) return 0;
406  det = 4;
407  m = mapping->bsmdp(id).m;
408  e = mapping->bsmdp(id).e;
409  s = mapping->bsmdp(id).s;
410  wire = mapping->bsmdp(id).wire;
411  A_value = mapping->bsmdp(id).feeA;
412  return 1;
413  }
414  return 0;
415 }
416 
426 int StEmcDecoder::GetPsdId(int RDO, int index, int& id, bool print) const {
427  int wire, A_value, PMT;
428  return GetPsdId(RDO, index, id, PMT, wire, A_value, print);
429 }
430 
443 int StEmcDecoder::GetPsdId(int RDO,int index, int& softId, int& PMTBox,
444  int& wire, int& A_value, bool print) const
445 {
446  if (!mapping) return 0;
447  if (!mapping->bprs()) return 0;
448  if((softId = mapping->softIdFromRDO(kBarrelEmcPreShowerId, RDO, index))) {
449  PMTBox = mapping->bprs(softId).PMTbox;
450  wire = mapping->bprs(softId).wire;
451  A_value = mapping->bprs(softId).feeA;
452  return 1;
453  }
454  return 0;
455 }
456 
462 int StEmcDecoder::GetPsdRDO(int id, int& RDO,int& index) const {
463  if(id<1 || id>4800) return 0;
464  if (!mapping) return 0;
465  if (!mapping->bprs()) return 0;
466  RDO = mapping->bprs(id).rdo;
467  index = mapping->bprs(id).rdoChannel;
468  return 1;
469 }
470 
471 void StEmcDecoder::PrintTowerMap(ofstream *out) const {
472  *out <<"TDC channels connections\n";
473  *out <<"-----------------------------------------------------------\n";
474  // for(int i=0;i<30;i++)
475  // *out <<" TDC channel "<<i<<" connected to crate "<<TDC_Crate[i]<<endl;
476  *out <<endl;
477  *out <<"Tower MAP\n";
478  *out <<"-----------------------------------------------------------\n";
479  for(int daq =0;daq<4800;daq++)
480  {
481  int towerId,tdc,crate,position,m,e,s;
482  GetTowerIdFromDaqId(daq,towerId);
483  GetTowerTDCFromDaqId(daq,tdc);
484  GetTowerCrateFromDaqId(daq,crate,position);
485  GetTowerBin(towerId,m,e,s);
486  *out <<" daq id = "<<daq<<" TDC channel = "<<tdc<<" Crate = "<<crate
487  <<" position in crate = "<<position<<" software id = "<<towerId
488  <<" m = "<<m<<" e = "<<e<<" s = "<<s<<endl;
489  }
490  *out <<endl;
491 }
492 
493 void StEmcDecoder::PrintSmdMap(ofstream *out) const {
494  *out <<"Modules connected to SMD crate\n";
495  *out <<"-----------------------------------------------------------\n";
496 
497  for(int i=0;i<8;i++)
498  {
499  *out <<"SMD CRATE number "<<i+1<<endl;
500  // for(int j=0;j<15;j++)
501  // *out <<" channel "<<j<<" is connected to module "
502  // <<SmdModules[i][j]<<endl;
503  }
504  *out <<"\nSMD MAP\n";
505  *out <<"-----------------------------------------------------------\n";
506 
507  for(int i=0;i<8;i++)
508  {
509  *out <<"SMD CRATE number "<<i+1<<endl;
510  for(int index =0;index<4800;index++)
511  {
512  int det,m,e,s;
513  int status = GetSmdCoord(i,index,det,m,e,s);
514  *out <<" RDO = "<<i<<" index = "<<index;
515  if(status == 1)
516  *out <<" detector = "<<det<<" mod = "<<m<<" eta = "<<e
517  <<" sub = "<<s<<endl;
518  else
519  *out <<" dummy connection\n";
520  }
521  }
522  *out <<endl;
523 }
524 
525 void StEmcDecoder::PrintPsdMap(ofstream *out) const {
526  *out <<"PMT Boxes connected to PSD crate\n";
527  *out <<"-----------------------------------------------------------\n";
528 
529  for(int i=0;i<4;i++)
530  {
531  *out <<"PSD CRATE number "<<i+1<<endl;
532  // for(int j=0;j<15;j++)
533  // *out <<" channel "<<j<<" is connected to PMT Box "
534  // <<PsdModules[i][j]<<endl;
535  }
536  *out <<"\nPSD MAP\n";
537  *out <<"-----------------------------------------------------------\n";
538 
539  for(int i=0;i<4;i++)
540  {
541  *out <<"PSD CRATE number "<<i+1<<endl;
542  for(int index =0;index<4800;index++)
543  {
544  int id;
545  int status = GetPsdId(i,index,id);
546  *out <<" RDO = "<<i<<" index = "<<index;
547  if(status == 1)
548  *out <<" id = "<<id<<endl;
549  else
550  *out <<" dummy connection\n";
551  }
552  }
553  *out <<endl;
554 }
555 
556 int StEmcDecoder::GetCrateFromTowerId(int softId, int &crate, int &seq) const {
557  if(softId<1 || softId>4800) return 0;
558  if (!mapping) return 0;
559  if (!mapping->bemc()) return 0;
560  crate = mapping->bemc(softId).crate;
561  seq = mapping->bemc(softId).crateChannel;
562  return 1;
563 }
564 
565 int StEmcDecoder::GetTDCFromTowerId(int softId, int &TDC) const {
566  if(softId<1 || softId>4800) return 0;
567  if (!mapping) return 0;
568  if (!mapping->bemc()) return 0;
569  TDC = mapping->bemc(softId).TDC;
570  return 1;
571 }
572 
573 int StEmcDecoder::GetTriggerPatchFromTowerId(int softId, int &patchId) const {
574  if(softId<1 || softId>4800) return 0;
575  if (!mapping) return 0;
576  if (!mapping->bemc()) return 0;
577  patchId = mapping->bemc(softId).triggerPatch;
578  return 1;
579 }
580 
581 int StEmcDecoder::GetJetPatchFromTowerId(int softId, int &jetPatch) const {
582  if(softId<1 || softId>4800) return 0;
583  if (!mapping) return 0;
584  if (!mapping->bemc()) return 0;
585  jetPatch = mapping->bemc(softId).jetPatch;
586  return 1;
587 }
588 
589 int StEmcDecoder::GetTowerIdFromBin(int m, int e, int s, int &softId) const {
590  if( (m<1) || (m>120) ) return 0;
591  if( (e<1) || (e>20) ) return 0;
592  if( (s<1) || (s>2) ) return 0;
593  if (!mapping) return 0;
594  softId = mapping->softIdFromMES(kBarrelEmcTowerId, m, e, s);
595  return 1;
596 }
597 
598 // $Id: StEmcDecoder.cxx,v 1.5 2010/12/22 22:57:21 stevens4 Exp $
599 //
600 // $Log: StEmcDecoder.cxx,v $
601 // Revision 1.5 2010/12/22 22:57:21 stevens4
602 // Patch for BSMDE mapping problem in P10ih and P10ij productions (RT #2043)
603 //
604 // Revision 1.4 2010/01/28 13:45:06 mattheww
605 // update from Oleksandr to protect against NULL pointers
606 //
607 // Revision 1.3 2009/02/17 22:00:52 mattheww
608 // fix bug in GetTowerIdFromTDC
609 //
610 // Revision 1.2 2009/02/01 17:34:52 kocolosk
611 // more caching and optimization.
612 //
613 // Last StEmcMapping commit was bad and left header, implementation
614 // inconsistent. This commit fixes the AutoBuild.
615 //
616 // Revision 1.1 2009/01/08 02:16:18 kocolosk
617 // move StEmcMappingDb/StEmcDecoder to StEmcUtil/database
618 //
619 // Revision 2.59 2009/01/02 03:34:33 kocolosk
620 // use default date==20330101 like St_db_Maker to suppress spurious error msgs
621 //
622 // Revision 2.58 2008/12/15 20:25:18 kocolosk
623 // GetCrateAndSequenceFromTriggerPatch calculated the sequence incorrectly
624 //
625 // Revision 2.57 2008/12/05 19:05:32 kocolosk
626 // new DB-backed implementation of StEmcDecoder
627 //
628 // Revision 2.56 2008/11/14 23:25:33 mattheww
629 // Fixed a lot of BPRS swaps
630 //
631 // Revision 2.55 2008/11/07 22:34:16 mattheww
632 // corrected swap logic for BPRS
633 //
634 // Revision 2.54 2008/11/03 19:55:57 mattheww
635 // fixed a typo causing a mismapping
636 //
637 // Revision 2.53 2007/10/10 22:12:35 kocolosk
638 // SMD module date correction: 20070101, not 20071001
639 //
640 // Revision 2.52 2007/10/10 18:52:13 kocolosk
641 // SMD crate mapping fix for Run 7 and beyond from Oleg
642 //
643 // Revision 2.51 2007/10/09 18:02:24 kocolosk
644 // two extra support functions for TP <=> DSM module mapping
645 //
646 // Revision 2.50 2007/09/11 13:30:13 kocolosk
647 // removed ClassImp that was left in by accident
648 //
649 // Revision 2.49 2007/09/11 02:41:37 kocolosk
650 // added code to fix preshower swaps in 2006 and beyond
651 //
652 // Revision 2.48 2007/08/07 19:44:07 perev
653 // Gene scalers added
654 //
655 // Revision 2.47 2007/06/01 17:47:41 jml
656 // Attempt to fix panitkin plot compile
657 //
658 // Revision 2.46 2007/04/09 23:35:13 kocolosk
659 // 2.45 didn't get it quite right ... thanks to Oleksandr who identified the correct fix for east side JP mapping
660 //
661 // Revision 2.45 2007/04/09 13:23:23 kocolosk
662 // fixed TP -> JP mapping in East barrel
663 //
664 // Revision 2.44 2007/04/04 17:35:11 kocolosk
665 // Added methods GetCrateFromTowerId, GetTDCFromTowerId, GetTDCFromTowerId, GetTriggerPatchFromTowerId, GetJetPatchFromTowerId, and GetTowerIdFromBin. Also implemented const-correctness and used meaningful argument names in method declarations to improve readability.
666 //
int GetSmdBugCorrectionShift(int id_original, int &shift) const
Returns the index shift for the SMD in original map.
int GetTriggerPatchFromCrate(int crate, int sequence, int &patchId) const
returns the trigger patch from crate and sequence in the crate
virtual ~StEmcDecoder()
StEmcDecoder destructor.
int GetJetPatchFromTowerId(int softId, int &jetPatch) const
Get jet patch that contains software Id.
int GetTowerBin(int softId, int &m, int &e, int &s) const
Convert from softId to m,e,s for towers only.
int GetTowerCrateFromTDC(int TDC, int &crate) const
Get crate number from TDC channel for towers.
void PrintPsdMap(ofstream *out) const
Print SMD MAP.
int GetTowerIdFromBin(int m, int e, int s, int &softId) const
Get Software Id from (m,e,s) space.
void PrintTowerMap(ofstream *out) const
Print Tower MAP.
void PrintSmdMap(ofstream *out) const
Print SMD MAP.
bool GetFixTowerMapBug(void) const
Shows if the tower map bug is being fixed on the fly.
int GetTriggerPatchFromJetPatch(int jetPatch, int sequence, int &patchId) const
returns the trigger patch from big jet patch and the sequence in it
int GetSmdCoord(int RDO, int posInFiber, int &det, int &m, int &e, int &s, bool print=false) const
Get SMD detector (3==SMDE, 4==SMDP), m, e, s from RDO and position for SMD.
int GetTowerTDCFromDaqId(int RDO, int &TDC) const
Get TDC channel from Daq Id for towers.
int GetTowerCrateFromDaqId(int RDO, int &crate, int &sequence) const
Get crate number from Daq Id for towers.
int GetTowerIdFromCrate(int crate, int sequence, int &softId) const
Get Software Id from Crate number and position in crate for towers.
int GetPreshowerBugCorrectionShift(int id_original, int &shift) const
Returns the index shift for the preshower in original map.
int GetTowerIdFromDaqId(int RDO, int &softId) const
Get Sofwtare Id from Daq Id for towers.
int GetCrateAndSequenceFromTriggerPatch(int patchId, int &crate, int &sequence) const
returns the crate number and start point for a given trigger patch
int GetPsdRDO(int softId, int &RDO, int &posInFiber) const
Get PSD fiber and position from id.
int GetCrateFromTowerId(int softId, int &crate, int &sequence) const
Get crate number and position in crate for Software Id.
int GetTowerIdFromTDC(int TDC, int sequence, int &softId) const
Get Software Id from TDC channel number and position in TDC for towers.
void SetDateTime(int date, int time)
St_db_Maker-compatible interface.
int GetJetPatchAndSequenceFromTriggerPatch(int patchId, int &jetPatch, int &sequence) const
return the big jet patch and sequence number within it from the
int GetTriggerPatchFromTowerId(int softId, int &patchId) const
Get trigger patch that contains software Id.
int GetTowerBugCorrectionShift(int id_original, int &shift) const
Returns the index shift for the tower in original map.
int GetPsdId(int RDO, int posInFiber, int &softId, bool print=false) const
Get PSD id.
int GetTowerTDCFromCrate(int crate, int &TDC) const
Get TDC channel from crate number for towers.
int GetSmdRDO(int detector, int m, int e, int s, int &RDO, int &posInFiber) const
Get SMD fiber and position from detector number (3==SMDE, 4==SMDP), m, e, s.
int GetDaqIdFromTowerId(int softId, int &RDO) const
Get Daq Id from Software Id for towers.
int GetTDCFromTowerId(int softId, int &TDC) const
Get TDC channel from Software Id.
void SetFixTowerMapBug(bool fix)
Sets the tower map bug fix.
int GetDSMFromTriggerPatch(int patchId, int &dsmModule) const
dsmModule is set to the DSM module containing this trigger patch (0-299)
int GetTriggerPatchesFromDSM(int dsmModule, int *triggerPatches) const
triggerPatches is an int[10]; contents will be set to the TPs of the supplied DSM # ...