Int_t relId[4];
geom->AbsToRelNumbering(digit->GetId(), relId);
- Int_t module = relId[0];
+ Int_t module = 5-relId[0];
// Begin FIXME
if (relId[1] != 0)
// PHOS EMCA has 4 DDL per module. Splitting is based on the (row,column) numbers.
- // PHOS internal convention: 1<module<5.
- Int_t iDDL = 4 * (module - 1) + iRCU;
+ // here module already in PHOS online convention: 0<module<4 and inverse order.
+ Int_t iDDL = 4 * module + iRCU;
// new DDL
if (iDDL != prevDDL) {
// calculate the time response function
} else {
Double_t energy = 0 ;
- module = relId[0];
if (digit->GetId() <= geom->GetNModules() * geom->GetNCristalsInModule()) {
energy=digit->GetEnergy();
- if(energy>eMax) {eMax=energy; modMax=module; colMax=col; rowMax=row;}
+ if(energy>eMax) {eMax=energy; modMax=relId[0]; colMax=col; rowMax=row;}
}
else {
energy = 0; // CPV raw data format is now know yet
{
//Makes the job.
//TClonesArray *digits and raw data fitter should be provided by calling function.
+printf("Make Digits! \n") ;
+
+ fitter->SetAmpOffset(4) ;
digits->Clear();
while (fRawStream->NextDDL()) {
while (fRawStream->NextChannel()) {
- relId[0] = fRawStream->GetModule() + 1; // counts from 1 to 5
+ relId[0] = 5 - fRawStream->GetModule() ; // counts from 1 to 5
relId[1] = 0;
relId[2] = fRawStream->GetCellX() + 1; // counts from 1 to 64
relId[3] = fRawStream->GetCellZ() + 1; // counts from 1 to 56
if(caloFlag!=0 && caloFlag!=1) continue; //TRU data!
fitter->SetChannelGeo(relId[0],relId[2],relId[3],caloFlag);
+
if(fitter->GetAmpOffset()==0 && fitter->GetAmpThreshold()==0) {
short value = fRawStream->GetAltroCFG1();
bool ZeroSuppressionEnabled = (value >> 15) & 0x1;