]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Accounted different btw. online and offline module numbering
authorprsnko <prsnko@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 10 Nov 2009 21:54:06 +0000 (21:54 +0000)
committerprsnko <prsnko@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 10 Nov 2009 21:54:06 +0000 (21:54 +0000)
PHOS/AliPHOS.cxx
PHOS/AliPHOSRawDigiProducer.cxx

index 596e95e77edef22b0ab9f8c8fc4ca766a2a0009a..81c258cd9518afd6237707b7c99787dca0868cc3 100644 (file)
@@ -492,7 +492,7 @@ void AliPHOS::Digits2Raw()
 
     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) 
@@ -518,8 +518,8 @@ void AliPHOS::Digits2Raw()
     
     
     // 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) {
@@ -548,10 +548,9 @@ void AliPHOS::Digits2Raw()
     // 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
index 75df9a05c80454bf2e69ec63047ca9f064603d29..f55fc3be902c622a03a155819def912c18413bed 100644 (file)
@@ -148,6 +148,9 @@ void AliPHOSRawDigiProducer::MakeDigits(TClonesArray *digits, AliPHOSRawFitterv0
 {
   //Makes the job.
   //TClonesArray *digits and raw data fitter should be provided by calling function.
+printf("Make Digits! \n") ;
+
+  fitter->SetAmpOffset(4) ;
 
   digits->Clear();
  
@@ -173,7 +176,7 @@ void AliPHOSRawDigiProducer::MakeDigits(TClonesArray *digits, AliPHOSRawFitterv0
   
   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
@@ -182,6 +185,7 @@ void AliPHOSRawDigiProducer::MakeDigits(TClonesArray *digits, AliPHOSRawFitterv0
       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;