StRoot
1
|
#include <StEmcDecoder.h>
Public Member Functions | |
StEmcDecoder (unsigned int date=20330101, unsigned int time=000000, bool TowerMapBug=false) | |
StEmcDecoder constructor. | |
virtual | ~StEmcDecoder () |
StEmcDecoder destructor. | |
void | SetDateTime (const TDatime &dt) |
void | SetDateTime (unsigned int date, unsigned int time) |
Sets the timestamp to be used. | |
bool | GetFixTowerMapBug (void) const |
Shows if the tower map bug is being fixed on the fly. | |
void | SetFixTowerMapBug (bool fix) |
Sets the tower map bug fix. | |
int | GetTowerBugCorrectionShift (int id_original, int &shift) const |
Returns the index shift for the tower in original map. More... | |
int | GetPreshowerBugCorrectionShift (int id_original, int &shift) const |
Returns the index shift for the preshower in original map. More... | |
int | GetSmdBugCorrectionShift (int id_original, int &shift) const |
Returns the index shift for the SMD in original map. More... | |
int | GetTowerBin (int softId, int &m, int &e, int &s) const |
Convert from softId to m,e,s for towers only. More... | |
int | GetDaqIdFromTowerId (int softId, int &RDO) const |
Get Daq Id from Software Id for towers. More... | |
int | GetCrateFromTowerId (int softId, int &crate, int &sequence) const |
Get crate number and position in crate for Software Id. | |
int | GetTDCFromTowerId (int softId, int &TDC) const |
Get TDC channel from Software Id. | |
int | GetTriggerPatchFromTowerId (int softId, int &patchId) const |
Get trigger patch that contains software Id. | |
int | GetJetPatchFromTowerId (int softId, int &jetPatch) const |
Get jet patch that contains software Id. | |
int | GetTowerIdFromBin (int m, int e, int s, int &softId) const |
Get Software Id from (m,e,s) space. | |
int | GetTowerIdFromDaqId (int RDO, int &softId) const |
Get Sofwtare Id from Daq Id for towers. More... | |
int | GetTowerIdFromCrate (int crate, int sequence, int &softId) const |
Get Software Id from Crate number and position in crate for towers. More... | |
int | GetTowerIdFromTDC (int TDC, int sequence, int &softId) const |
Get Software Id from TDC channel number and position in TDC for towers. More... | |
int | GetTowerCrateFromDaqId (int RDO, int &crate, int &sequence) const |
Get crate number from Daq Id for towers. More... | |
int | GetTowerCrateFromTDC (int TDC, int &crate) const |
Get crate number from TDC channel for towers. More... | |
int | GetTowerTDCFromCrate (int crate, int &TDC) const |
Get TDC channel from crate number for towers. More... | |
int | GetTowerTDCFromDaqId (int RDO, int &TDC) const |
Get TDC channel from Daq Id for towers. More... | |
int | GetTriggerPatchFromCrate (int crate, int sequence, int &patchId) const |
returns the trigger patch from crate and sequence in the crate More... | |
int | GetCrateAndSequenceFromTriggerPatch (int patchId, int &crate, int &sequence) const |
returns the crate number and start point for a given trigger patch More... | |
int | GetTriggerPatchFromJetPatch (int jetPatch, int sequence, int &patchId) const |
returns the trigger patch from big jet patch and the sequence in it More... | |
int | GetJetPatchAndSequenceFromTriggerPatch (int patchId, int &jetPatch, int &sequence) const |
return the big jet patch and sequence number within it from the More... | |
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 # | |
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. More... | |
int | GetSmdCoord (int RDO, int posInFiber, int &det, int &m, int &e, int &s, int &wire, int &A_value, bool print=false) const |
Get SMD detector (3==SMDE, 4==SMDP), m, e, s from RDO and position for SMD. Also returns smd-wire and A_value. More... | |
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. More... | |
int | GetPsdId (int RDO, int posInFiber, int &softId, bool print=false) const |
Get PSD id. More... | |
int | GetPsdId (int RDO, int posInFiber, int &softId, int &PMTbox, int &wire, int &A_value, bool print=false) const |
Get PSD id. Also returns PMTBox, wire number and FEE value. More... | |
int | GetPsdRDO (int softId, int &RDO, int &posInFiber) const |
Get PSD fiber and position from id. More... | |
void | PrintTowerMap (ofstream *out) const |
Print Tower MAP. | |
void | PrintSmdMap (ofstream *out) const |
Print SMD MAP. | |
void | PrintPsdMap (ofstream *out) const |
Print SMD MAP. | |
This class makes the decodification from EMC daq and electronics scheme to software scheme. This class has methods to decode the numbers in both directions and it works for SMD and towers.
The current id's definitions are:
Definition at line 36 of file StEmcDecoder.h.
int StEmcDecoder::GetCrateAndSequenceFromTriggerPatch | ( | int | PATCH, |
int & | CRATE, | ||
int & | crate_seq | ||
) | const |
returns the crate number and start point for a given trigger patch
PATCH | is the software id for towers |
CRATE | is the crate number |
crate_seq | is the position of the tower inside the crate (0 <= crate_seq <=159) |
Definition at line 262 of file StEmcDecoder.cxx.
int StEmcDecoder::GetDaqIdFromTowerId | ( | int | TowerId, |
int & | RDO | ||
) | const |
Get Daq Id from Software Id for towers.
TowerId | is the software id for towers |
RDO | is the DAQ id |
Definition at line 204 of file StEmcDecoder.cxx.
Referenced by StBemcRaw::getBemcADCRaw(), and StBemcData::make().
int StEmcDecoder::GetJetPatchAndSequenceFromTriggerPatch | ( | int | triggerPatch, |
int & | jetPatch, | ||
int & | jetPatch_seq | ||
) | const |
return the big jet patch and sequence number within it from the
jetPatch | is the jet patch id (0 <= jetPatch <= 11) |
jetPatch_seq | is the trigger patch position within the jet patch (0 <= jetPatch_seq <= 24) |
triggerPatch | is the trigger patch id (0 <= triggerPatch <=299) |
Definition at line 302 of file StEmcDecoder.cxx.
int StEmcDecoder::GetPreshowerBugCorrectionShift | ( | int | id_original, |
int & | id_shift | ||
) | const |
Returns the index shift for the preshower in original map.
GetPreshowerBugCorrectionShift method - returns the id shift with respect to the preshower index (software) in the original map
id_original | is the soft_id in the original map |
id_shift | is the shift that should be applied to the id. In this case, id_corrected = Id_original+id_shift |
Definition at line 89 of file StEmcDecoder.cxx.
Referenced by StBemcRaw::makeHit().
int StEmcDecoder::GetPsdId | ( | int | RDO, |
int | index, | ||
int & | id, | ||
bool | print = false |
||
) | const |
Get PSD id.
RDO | is the PSD fiber number |
index | is the position in the fiber |
id | is the software Id |
enables/disables some printout information |
The Pre Shower and SMD crates are identical and they share almost the same decoder.
Definition at line 426 of file StEmcDecoder.cxx.
Referenced by StBemcRaw::makeHit(), and PrintPsdMap().
int StEmcDecoder::GetPsdId | ( | int | RDO, |
int | index, | ||
int & | softId, | ||
int & | PMTBox, | ||
int & | wire, | ||
int & | A_value, | ||
bool | print = false |
||
) | const |
Get PSD id. Also returns PMTBox, wire number and FEE value.
RDO | is the PSD fiber number |
index | is the position in the fiber |
id | is the software Id |
PMT | is the PMT box number |
wire | is the equivalent mux-wire in the SMD/PSD crate |
A_value | is the A_value in the FEE card |
enables/disables some printout information |
The Pre Shower and SMD crates are identical and they share almost the same decoder.
Definition at line 443 of file StEmcDecoder.cxx.
int StEmcDecoder::GetPsdRDO | ( | int | id, |
int & | RDO, | ||
int & | index | ||
) | const |
Get PSD fiber and position from id.
id | is the software Id |
RDO | is the PSD fiber number |
index | is the position in the fiber |
Definition at line 462 of file StEmcDecoder.cxx.
Referenced by StBemcRaw::getBemcADCRaw(), StBemcData::make(), and StBemcRaw::makeHit().
int StEmcDecoder::GetSmdBugCorrectionShift | ( | int | id_original, |
int & | id_shift | ||
) | const |
Returns the index shift for the SMD in original map.
GetSmdBugCorrectionShift method - returns the id shift with respect to the SMD index (software) in the original map
id_original | is the soft_id in the original map |
id_shift | is the shift that should be applied to the id. In this case, id_corrected = Id_original+id_shift |
Definition at line 102 of file StEmcDecoder.cxx.
Referenced by StBemcRaw::makeHit().
int StEmcDecoder::GetSmdCoord | ( | int | RDO, |
int | index, | ||
int & | detector, | ||
int & | module, | ||
int & | eta, | ||
int & | sub, | ||
bool | print = false |
||
) | const |
Get SMD detector (3==SMDE, 4==SMDP), m, e, s from RDO and position for SMD.
RDO | is the SMD fiber number |
index | is the position in the fiber |
detector | is detector number (3 = SMDE, 4 = SMDP) |
module | is the module number |
eta | is the eta division for towers |
sub | is the sub division for towers |
enables/disables some printout information |
Definition at line 371 of file StEmcDecoder.cxx.
Referenced by PrintSmdMap().
int StEmcDecoder::GetSmdCoord | ( | int | RDO, |
int | index, | ||
int & | det, | ||
int & | m, | ||
int & | e, | ||
int & | s, | ||
int & | wire, | ||
int & | A_value, | ||
bool | print = false |
||
) | const |
Get SMD detector (3==SMDE, 4==SMDP), m, e, s from RDO and position for SMD. Also returns smd-wire and A_value.
RDO | is the SMD fiber number |
index | is the position in the fiber |
detector | is detector number (3 = SMDE, 4 = SMDP) |
module | is the module number |
eta | is the eta division for towers |
sub | is the sub division for towers |
wire | is the SMD-wire number |
A_value | is the A_value in the FEE card |
enables/disables some printout information |
Definition at line 389 of file StEmcDecoder.cxx.
int StEmcDecoder::GetSmdRDO | ( | int | detector, |
int | module, | ||
int | eta, | ||
int | sub, | ||
int & | RDO, | ||
int & | index | ||
) | const |
Get SMD fiber and position from detector number (3==SMDE, 4==SMDP), m, e, s.
detector | is detector number (3 = SMDE, 4 = SMDP) |
module | is the module number |
eta | is the eta division for towers |
sub | is the sub division for towers |
RDO | is the SMD fiber number |
index | is the position in the fiber |
Definition at line 341 of file StEmcDecoder.cxx.
Referenced by StBemcRaw::getBemcADCRaw(), and StBemcData::make().
int StEmcDecoder::GetTowerBin | ( | int | softId, |
int & | module, | ||
int & | eta, | ||
int & | sub | ||
) | const |
Convert from softId to m,e,s for towers only.
Copy of StEmcGeom version
TowerId | is the software id for towers |
module | is the module number |
eta | is the eta division for towers |
sub | is the sub division for towers |
Definition at line 117 of file StEmcDecoder.cxx.
Referenced by PrintTowerMap().
int StEmcDecoder::GetTowerBugCorrectionShift | ( | int | id_original, |
int & | id_shift | ||
) | const |
Returns the index shift for the tower in original map.
GetTowerBugCorrectionShift method - returns the id shift with respect to the tower index (software) in the original map
id_original | is the soft_id in the original map |
id_shift | is the shift that should be applied to the id. In this case, id_corrected = Id_original+id_shift |
Definition at line 76 of file StEmcDecoder.cxx.
Referenced by StBemcRaw::makeHit().
int StEmcDecoder::GetTowerCrateFromDaqId | ( | int | RDO, |
int & | crate, | ||
int & | crate_sequency | ||
) | const |
Get crate number from Daq Id for towers.
RDO | is the DAQ id |
crate | is the crate number |
crate_sequency | is the position of the tower inside the crate |
Definition at line 174 of file StEmcDecoder.cxx.
Referenced by StBemcRaw::getBemcADCRaw(), StBemcData::make(), and PrintTowerMap().
int StEmcDecoder::GetTowerCrateFromTDC | ( | int | TDC, |
int & | crate | ||
) | const |
Get crate number from TDC channel for towers.
TDC | is the TDC channel number |
crate | is the crate number |
Definition at line 131 of file StEmcDecoder.cxx.
int StEmcDecoder::GetTowerIdFromCrate | ( | int | crate, |
int | crate_sequency, | ||
int & | TowerId | ||
) | const |
Get Software Id from Crate number and position in crate for towers.
crate | is the crate number |
crate_sequency | is the position of the tower inside the crate |
TowerId | is the software id for towers |
Definition at line 218 of file StEmcDecoder.cxx.
int StEmcDecoder::GetTowerIdFromDaqId | ( | int | RDO, |
int & | TowerId | ||
) | const |
Get Sofwtare Id from Daq Id for towers.
RDO | is the DAQ id |
TowerId | is the software id for towers |
Definition at line 190 of file StEmcDecoder.cxx.
Referenced by StBemcRaw::convertFromDaq(), and PrintTowerMap().
int StEmcDecoder::GetTowerIdFromTDC | ( | int | TDC, |
int | tdc_sequency, | ||
int & | TowerId | ||
) | const |
Get Software Id from TDC channel number and position in TDC for towers.
TDC | is the crate number |
tdc_sequency | is the position of the tower inside the crate |
TowerId | is the software id for towers |
Definition at line 232 of file StEmcDecoder.cxx.
int StEmcDecoder::GetTowerTDCFromCrate | ( | int | crate, |
int & | TDC | ||
) | const |
Get TDC channel from crate number for towers.
crate | is the crate number |
TDC | is the TDC channel number |
Definition at line 144 of file StEmcDecoder.cxx.
Referenced by StBemcRaw::checkBtowCrates().
int StEmcDecoder::GetTowerTDCFromDaqId | ( | int | RDO, |
int & | TDC | ||
) | const |
Get TDC channel from Daq Id for towers.
RDO | is the DAQ id |
TDC | is the TDC channel number |
Definition at line 157 of file StEmcDecoder.cxx.
Referenced by PrintTowerMap().
int StEmcDecoder::GetTriggerPatchFromCrate | ( | int | CRATE, |
int | crate_seq, | ||
int & | patchId | ||
) | const |
returns the trigger patch from crate and sequence in the crate
CRATE | is the crate number |
crate_seq | is the position of the tower inside the crate (0 <= crate_seq <=159) |
patchId | is the software id for towers |
Definition at line 246 of file StEmcDecoder.cxx.
int StEmcDecoder::GetTriggerPatchFromJetPatch | ( | int | jetPatch, |
int | jetPatch_seq, | ||
int & | triggerPatch | ||
) | const |
returns the trigger patch from big jet patch and the sequence in it
jetPatch | is the jet patch id (0 <= jetPatch <= 11) |
jetPatch_seq | is the trigger patch position within the jet patch (0 <= jetPatch_seq <= 24) |
triggerPatch | is the trigger patch id (0 <= triggerPatch <=299) |
Definition at line 280 of file StEmcDecoder.cxx.