28 #ifndef StEmcDecoder_HH
29 #define StEmcDecoder_HH
39 StEmcDecoder(
unsigned int date=20330101,
unsigned int time=000000,
bool TowerMapBug =
false);
42 void SetDateTime(
const TDatime& dt) { SetDateTime(dt.GetDate(), dt.GetTime()); }
43 void SetDateTime(
unsigned int date,
unsigned int time);
52 int GetTowerBin(
int softId,
int &m,
int &e,
int &s)
const;
84 int GetSmdCoord(
int RDO,
int posInFiber,
int &det,
int &m,
int &e,
int &s,
bool print=
false)
const;
85 int GetSmdCoord(
int RDO,
int posInFiber,
int &det,
int &m,
int &e,
int &s,
int &wire,
int &A_value,
bool print=
false)
const;
86 int GetSmdRDO(
int detector,
int m,
int e,
int s,
int &RDO,
int &posInFiber)
const;
89 int GetPsdId(
int RDO,
int posInFiber,
int &softId,
bool print=
false)
const;
90 int GetPsdId(
int RDO,
int posInFiber,
int &softId,
int &PMTbox,
int &wire,
int &A_value,
bool print=
false)
const;
91 int GetPsdRDO(
int softId,
int &RDO,
int &posInFiber)
const;
99 int TowerBugFixIndex[4800];
100 int PreshowerBugFixIndex[4800];
101 int SmdBugFixIndex[18000];
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.
StEmcDecoder(unsigned int date=20330101, unsigned int time=000000, bool TowerMapBug=false)
StEmcDecoder constructor.
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.
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 # ...