]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Moved calibration and cleaning to RawDigiProducer
authorprsnko <prsnko@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 15 Jan 2008 20:09:23 +0000 (20:09 +0000)
committerprsnko <prsnko@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 15 Jan 2008 20:09:23 +0000 (20:09 +0000)
PHOS/AliPHOSClusterizerv1.cxx
PHOS/AliPHOSClusterizerv1.h
PHOS/AliPHOSDigitizer.cxx
PHOS/AliPHOSOnlineMonitor.cxx
PHOS/AliPHOSRawDecoder.cxx
PHOS/AliPHOSRawDecoderv1.cxx
PHOS/AliPHOSRawDecoderv2.cxx
PHOS/AliPHOSReconstructor.cxx

index 086f09db0c864ba4986f4223e0fd9e1bd323c87c..c3fcae525579f0714f80fa8e74420b541c20f76e 100644 (file)
 
 /* History of cvs commits:
  *
- * $Log$
+ * $Log: AliPHOSClusterizerv1.cxx,v $
+ * Revision 1.118  2007/12/11 21:23:26  kharlov
+ * Added possibility to swith off unfolding
+ *
  * Revision 1.117  2007/10/18 08:42:05  kharlov
  * Bad channels cleaned before clusterization
  *
 #include "AliCDBStorage.h"
 #include "AliCDBEntry.h"
 #include "AliPHOSRecoParam.h"
-#include "AliPHOSCalibData.h"
 #include "AliPHOSReconstructor.h"
+#include "AliPHOSCalibData.h"
 
 ClassImp(AliPHOSClusterizerv1)
   
@@ -192,12 +195,9 @@ AliPHOSClusterizerv1::AliPHOSClusterizerv1() :
   AliPHOSClusterizer(),
   fDefaultInit(0),            fEmcCrystals(0),          fToUnfold(0),
   fWrite(0),                  fNumberOfEmcClusters(0),  fNumberOfCpvClusters(0),
-  fADCchanelEmc(0),         fADCpedestalEmc(0),
-  fADCchanelCpv(0),           fADCpedestalCpv(0),       fEmcClusteringThreshold(0),
-  fCpvClusteringThreshold(0), fEmcMinE(0),              fCpvMinE(0),
+  fEmcClusteringThreshold(0), fCpvClusteringThreshold(0), 
   fEmcLocMaxCut(0),           fW0(0),                   fCpvLocMaxCut(0),
-  fW0CPV(0),                  fEmcTimeGate(0),
-  fIsOldRCUFormat(0)
+  fW0CPV(0),                  fEmcTimeGate(0)
 {
   // default ctor (to be used mainly by Streamer)
   
@@ -210,12 +210,9 @@ AliPHOSClusterizerv1::AliPHOSClusterizerv1(AliPHOSGeometry *geom) :
   AliPHOSClusterizer(geom),
   fDefaultInit(0),            fEmcCrystals(0),          fToUnfold(0),
   fWrite(0),                  fNumberOfEmcClusters(0),  fNumberOfCpvClusters(0),
-  fADCchanelEmc(0),         fADCpedestalEmc(0),
-  fADCchanelCpv(0),           fADCpedestalCpv(0),       fEmcClusteringThreshold(0),
-  fCpvClusteringThreshold(0), fEmcMinE(0),              fCpvMinE(0),
+  fEmcClusteringThreshold(0), fCpvClusteringThreshold(0), 
   fEmcLocMaxCut(0),           fW0(0),                   fCpvLocMaxCut(0),
-  fW0CPV(0),                  fEmcTimeGate(0),
-  fIsOldRCUFormat(0)
+  fW0CPV(0),                  fEmcTimeGate(0)
 {
   // ctor with the indication of the file where header Tree and digits Tree are stored
   
@@ -230,58 +227,6 @@ AliPHOSClusterizerv1::AliPHOSClusterizerv1(AliPHOSGeometry *geom) :
   // dtor
 
 }
-
-//____________________________________________________________________________
-Float_t  AliPHOSClusterizerv1::CalibrateEMC(Float_t amp, Int_t absId)
-{  
-  // Convert EMC measured amplitude into real energy.
-  // Calibration parameters are taken from calibration data base for raw data,
-  // or from digitizer parameters for simulated data.
-
-  if(fgCalibData){
-    Int_t relId[4];
-    fGeom->AbsToRelNumbering(absId,relId) ;
-    Int_t   module = relId[0];
-    Int_t   column = relId[3];
-    Int_t   row    = relId[2];
-    if(absId <= fEmcCrystals) { // this is EMC 
-      fADCchanelEmc   = fgCalibData->GetADCchannelEmc (module,column,row);
-      return amp*fADCchanelEmc ;        
-    }
-  }
-  else{ //simulation
-    if(absId <= fEmcCrystals) // this is EMC 
-      return fADCpedestalEmc + amp*fADCchanelEmc ;        
-  }
-  return 0;
-}
-
-//____________________________________________________________________________
-Float_t  AliPHOSClusterizerv1::CalibrateCPV(Int_t amp, Int_t absId)
-{  
-  // Convert digitized CPV amplitude into charge.
-  // Calibration parameters are taken from calibration data base for raw data,
-  // or from digitizer parameters for simulated data.
-
-  if(fgCalibData){
-    Int_t relId[4];
-    fGeom->AbsToRelNumbering(absId,relId) ;
-    Int_t   module = relId[0];
-    Int_t   column = relId[3];
-    Int_t   row    = relId[2];
-    if(absId > fEmcCrystals) { // this is CPV
-      fADCchanelCpv   = fgCalibData->GetADCchannelCpv (module,column,row);
-      fADCpedestalCpv = fgCalibData->GetADCpedestalCpv(module,column,row);
-      return fADCpedestalCpv + amp*fADCchanelCpv ;              
-    }     
-  }
-  else{ //simulation
-    if(absId > fEmcCrystals) // this is CPV
-      return fADCpedestalCpv+ amp*fADCchanelCpv ;       
-  }
-  return 0;
-}
-
 //____________________________________________________________________________
 void AliPHOSClusterizerv1::Digits2Clusters(Option_t *option)
 {
@@ -408,24 +353,6 @@ Bool_t AliPHOSClusterizerv1::FindFit(AliPHOSEmcRecPoint * emcRP, AliPHOSDigit **
 
 }
 
-//____________________________________________________________________________
-void AliPHOSClusterizerv1::GetCalibrationParameters() 
-{
-  // Set calibration parameters:
-  // if calibration database exists, they are read from database,
-  // otherwise, reconstruction stops in the constructor of AliPHOSCalibData
-  //
-  // It is a user responsilibity to open CDB before reconstruction, for example: 
-  // AliCDBStorage* storage = AliCDBManager::Instance()->GetStorage("local://CalibDB");
-
-  if (!fgCalibData) 
-    fgCalibData = new AliPHOSCalibData(-1); //use AliCDBManager's run number
-  if (fgCalibData->GetCalibDataEmc() == 0)
-    AliFatal("Calibration parameters for PHOS EMC not found. Stop reconstruction.\n");
-  if (fgCalibData->GetCalibDataCpv() == 0)
-    AliFatal("Calibration parameters for PHOS CPV not found. Stop reconstruction.\n");
-
-}
 
 //____________________________________________________________________________
 void AliPHOSClusterizerv1::Init()
@@ -438,7 +365,10 @@ void AliPHOSClusterizerv1::Init()
   if(!gMinuit) 
     gMinuit = new TMinuit(100);
 
-  GetCalibrationParameters() ;
+  if (!fgCalibData) 
+    fgCalibData = new AliPHOSCalibData(-1); //use AliCDBManager's run number
+  if (fgCalibData->GetCalibDataEmc() == 0)
+    AliFatal("Calibration parameters for PHOS EMC not found. Stop reconstruction.\n");
 
 }
 
@@ -461,9 +391,6 @@ void AliPHOSClusterizerv1::InitParameters()
   fEmcLocMaxCut            = parEmc->GetLocalMaxCut();
   fCpvLocMaxCut            = parCpv->GetLocalMaxCut();
 
-  fEmcMinE                 = parEmc->GetMinE();
-  fCpvMinE                 = parCpv->GetMinE();
-
   fW0                      = parEmc->GetLogWeight();
   fW0CPV                   = parCpv->GetLogWeight();
 
@@ -472,8 +399,6 @@ void AliPHOSClusterizerv1::InitParameters()
   fToUnfold                = parEmc->ToUnfold() ;
     
   fWrite                   = kTRUE ;
-
-  fIsOldRCUFormat          = kFALSE;
 }
 
 //____________________________________________________________________________
@@ -518,41 +443,6 @@ Int_t AliPHOSClusterizerv1::AreNeighbours(AliPHOSDigit * d1, AliPHOSDigit * d2)c
 
   return rv ; 
 }
-//____________________________________________________________________________
-void AliPHOSClusterizerv1::CleanDigits(TClonesArray * digits)
-{
-  // Remove digits with amplitudes below threshold.
-  // remove digits in bad channels
-
-  Bool_t isBadMap = 0 ;
-  if(fgCalibData->GetNumOfEmcBadChannels()){
-    isBadMap=1 ;
-  }
-  
-  Int_t inBadList=0 ;
-  for(Int_t i=0; i<digits->GetEntriesFast(); i++){
-    AliPHOSDigit * digit = static_cast<AliPHOSDigit*>(digits->At(i)) ;
-    if ( (IsInEmc(digit) && CalibrateEMC(digit->GetEnergy(),digit->GetId()) < fEmcMinE) ||
-        (IsInCpv(digit) && CalibrateCPV(digit->GetAmp()   ,digit->GetId()) < fCpvMinE) ){
-      digits->RemoveAt(i) ;
-      continue ;
-    }
-    if(isBadMap){ //check bad map now
-      Int_t relid[4] ;
-      fGeom->AbsToRelNumbering(digit->GetId(), relid) ; 
-      if(fgCalibData->IsBadChannelEmc(relid[0],relid[2],relid[3])){
-       digits->RemoveAt(i) ;
-      }
-    }
-  }
-
-  digits->Compress() ;
-  for (Int_t i = 0 ; i < digits->GetEntriesFast() ; i++) { 
-    AliPHOSDigit *digit = static_cast<AliPHOSDigit*>( digits->At(i) ) ; 
-    digit->SetIndexInList(i) ;     
-  }
-}
-
 //____________________________________________________________________________
 Bool_t AliPHOSClusterizerv1::IsInEmc(AliPHOSDigit * digit) const
 {
@@ -591,10 +481,11 @@ void AliPHOSClusterizerv1::WriteRecPoints()
   Int_t index ;
   //Evaluate position, dispersion and other RecPoint properties..
   Int_t nEmc = fEMCRecPoints->GetEntriesFast();
+  Float_t emcMinE= AliPHOSReconstructor::GetRecoParamEmc()->GetMinE(); //Minimal digit energy
   for(index = 0; index < nEmc; index++){
     AliPHOSEmcRecPoint * rp =
       dynamic_cast<AliPHOSEmcRecPoint *>( fEMCRecPoints->At(index) );
-    rp->Purify(fEmcMinE) ;
+    rp->Purify(emcMinE) ;
     if(rp->GetMultiplicity()==0){
       fEMCRecPoints->RemoveAt(index) ;
       delete rp ;
@@ -641,9 +532,6 @@ void AliPHOSClusterizerv1::MakeClusters()
   // Steering method to construct the clusters stored in a list of Reconstructed Points
   // A cluster is defined as a list of neighbour digits
 
-  //Remove digits below threshold
-  CleanDigits(fDigitsArr) ;
-
   TClonesArray * digitsC =  static_cast<TClonesArray*>( fDigitsArr->Clone() ) ;
  
   // Clusterization starts  
@@ -660,10 +548,8 @@ void AliPHOSClusterizerv1::MakeClusters()
     TArrayI clusterdigitslist(1500) ;   
     Int_t index ;
 
-    if (( IsInEmc (digit) &&
-         CalibrateEMC(digit->GetEnergy(),digit->GetId()) > fEmcClusteringThreshold ) || 
-        ( IsInCpv (digit) &&
-         CalibrateCPV(digit->GetAmp()   ,digit->GetId()) > fCpvClusteringThreshold ) ) {
+    if (( IsInEmc(digit) &&  digit->GetEnergy() > fEmcClusteringThreshold ) || 
+        ( IsInCpv(digit) &&  digit->GetEnergy() > fCpvClusteringThreshold ) ) {
       Int_t iDigitInCluster = 0 ; 
       
       if  ( IsInEmc(digit) ) {   
@@ -674,7 +560,7 @@ void AliPHOSClusterizerv1::MakeClusters()
         fEMCRecPoints->AddAt(new  AliPHOSEmcRecPoint(""), fNumberOfEmcClusters) ;
         clu = dynamic_cast<AliPHOSEmcRecPoint *>( fEMCRecPoints->At(fNumberOfEmcClusters) ) ; 
        fNumberOfEmcClusters++ ; 
-       clu->AddDigit(*digit, CalibrateEMC(digit->GetEnergy(),digit->GetId())) ;
+       clu->AddDigit(*digit, digit->GetEnergy()) ;
         clusterdigitslist[iDigitInCluster] = digit->GetIndexInList() ;
         iDigitInCluster++ ;
         digitsC->Remove(digit) ; 
@@ -689,7 +575,7 @@ void AliPHOSClusterizerv1::MakeClusters()
 
         clu =  dynamic_cast<AliPHOSCpvRecPoint *>( fCPVRecPoints->At(fNumberOfCpvClusters) ) ;  
         fNumberOfCpvClusters++ ; 
-        clu->AddDigit(*digit, CalibrateCPV(digit->GetAmp(),digit->GetId()) ) ;        
+        clu->AddDigit(*digit, digit->GetEnergy())  ;        
         clusterdigitslist[iDigitInCluster] = digit->GetIndexInList()  ;        
         iDigitInCluster++ ; 
         digitsC->Remove(digit) ; 
@@ -722,11 +608,7 @@ void AliPHOSClusterizerv1::MakeClusters()
           case 0 :   // not a neighbour
             break ;
           case 1 :   // are neighbours 
-           if (IsInEmc (digitN))
-             clu->AddDigit(*digitN, CalibrateEMC( digitN->GetEnergy(), digitN->GetId() ) );
-           else
-             clu->AddDigit(*digitN, CalibrateCPV( digitN->GetAmp()   , digitN->GetId() ) );
-
+           clu->AddDigit(*digitN, digitN->GetEnergy());
             clusterdigitslist[iDigitInCluster] = digitN->GetIndexInList() ; 
             iDigitInCluster++ ; 
             digitsC->Remove(digitN) ;
@@ -777,6 +659,7 @@ void AliPHOSClusterizerv1::MakeUnfolding()
       
       if( nMax > 1 ) {     // if cluster is very flat (no pronounced maximum) then nMax = 0       
         UnfoldCluster(emcRecPoint, nMax, maxAt, maxAtEnergy) ;
+
         fEMCRecPoints->Remove(emcRecPoint); 
         fEMCRecPoints->Compress() ;
         index-- ;
@@ -859,6 +742,7 @@ void  AliPHOSClusterizerv1::UnfoldCluster(AliPHOSEmcRecPoint * iniEmc,
   Float_t * fitparameters = new Float_t[nPar] ;
 
   Bool_t rv = FindFit(iniEmc, maxAt, maxAtEnergy, nPar, fitparameters) ;
+
   if( !rv ) {
     // Fit failed, return and remove cluster
     iniEmc->SetNExMax(-1) ;
@@ -900,7 +784,6 @@ void  AliPHOSClusterizerv1::UnfoldCluster(AliPHOSEmcRecPoint * iniEmc,
     }
   }
   
-
   // Now create new RecPoints and fill energy lists with efit corrected to fluctuations
   // so that energy deposited in each cell is distributed betwin new clusters proportionally
   // to its contribution to efit
@@ -915,7 +798,7 @@ void  AliPHOSClusterizerv1::UnfoldCluster(AliPHOSEmcRecPoint * iniEmc,
     epar = fitparameters[iparam+2] ;
     iparam += 3 ;    
 //    fGeom->GetIncidentVector(fVtx,iniEmc->GetPHOSMod(),xpar,zpar,vIncid) ;
-    
+
     AliPHOSEmcRecPoint * emcRP = 0 ;  
 
     if(iniEmc->IsEmc()){ //create new entries in fEMCRecPoints...
index 9f9406fe0437ea11fa0f4fa303c50c304d2c2db4..05207a9e1ab708871af93d8b76a5c7da0bea76bd 100644 (file)
@@ -7,7 +7,10 @@
 
 /* History of cvs commits:
  *
- * $Log$
+ * $Log: AliPHOSClusterizerv1.h,v $
+ * Revision 1.54  2007/10/01 20:24:08  kharlov
+ * Memory leaks fixed
+ *
  * Revision 1.53  2007/08/28 12:55:07  policheh
  * Loaders removed from the reconstruction code (C.Cheshkov)
  *
@@ -76,9 +79,6 @@ public:
   virtual Int_t   AreNeighbours(AliPHOSDigit * d1, AliPHOSDigit * d2)const ; 
                                // Checks if digits are in neighbour cells 
 
-  virtual Float_t CalibrateCPV(Int_t   amp, Int_t absId) ;  // Tranforms CPV Amp to energy 
-  virtual Float_t CalibrateEMC(Float_t amp, Int_t absId) ;  // Tranforms EMC Amp to energy 
-
   virtual void    GetNumberOfClustersFound(int * numb )const{  numb[0] = fNumberOfEmcClusters ; 
                                                                numb[1] = fNumberOfCpvClusters ; }
 
@@ -95,8 +95,6 @@ public:
 
   void Print(const Option_t * = "")const ;
 
-  void SetEmcMinE(Float_t e){fEmcMinE = e ;}
-  void SetCpvMinE(Float_t e){fCpvMinE = e ;}
   virtual void SetEmcClusteringThreshold(Float_t cluth)  { fEmcClusteringThreshold = cluth ; }
   virtual void SetEmcLocalMaxCut(Float_t cut)            { fEmcLocMaxCut = cut ; }
   virtual void SetEmcLogWeight(Float_t w)                { fW0 = w ; }
@@ -114,9 +112,6 @@ public:
   //  void Unload() ; 
   virtual const char * Version() const { return "clu-v1"; }  
 
-  virtual void SetOldRCUFormat(Bool_t rcuFormat = kFALSE)
-    { fIsOldRCUFormat = rcuFormat; };
-
 protected:
 
   void           WriteRecPoints() ;
@@ -124,7 +119,6 @@ protected:
   virtual Bool_t IsInEmc (AliPHOSDigit * digit)const ;     // Tells if id digit is in EMC
   virtual Bool_t IsInCpv (AliPHOSDigit * digit)const ;     // Tells if id digit is in CPV
   void           CleanDigits(TClonesArray * digits) ;
-  void           GetCalibrationParameters(void);
   void           SetDistancesToBadChannels();
 
 private:
@@ -152,16 +146,8 @@ private:
   Int_t   fNumberOfEmcClusters ;     // number of EMC clusters found
   Int_t   fNumberOfCpvClusters ;     // number of CPV clusters found
  
-  //Calibration parameters
-  Float_t fADCchanelEmc ;           // width of one ADC channel in GeV
-  Float_t fADCpedestalEmc ;         //
-  Float_t fADCchanelCpv ;           // width of one ADC channel in CPV 'popugais'
-  Float_t fADCpedestalCpv ;         // 
-
   Float_t fEmcClusteringThreshold ;  // minimum energy to start EMC cluster
   Float_t fCpvClusteringThreshold ;  // minimum energy to start CPV cluster
-  Float_t fEmcMinE ;                 // minimum energy of digit to be included into cluster
-  Float_t fCpvMinE ;                 // minimum energy of digit to be included into cluster
   Float_t fEmcLocMaxCut ;            // minimum energy difference to distinguish local maxima in a cluster
   Float_t fW0 ;                      // logarithmic weight for the cluster center of gravity calculation
   Float_t fCpvLocMaxCut ;            // minimum energy difference to distinguish local maxima in a CPV cluster
@@ -169,9 +155,8 @@ private:
   //  Int_t fRecPointsInRun ;            //! Total number of recpoints in one run
   Float_t fEmcTimeGate ;             // Maximum time difference between the digits in ont EMC cluster
 
-  Bool_t  fIsOldRCUFormat;           // assume old RCU raw data format
 
-  ClassDef(AliPHOSClusterizerv1,5)   // Clusterizer implementation version 1
+  ClassDef(AliPHOSClusterizerv1,6)   // Clusterizer implementation version 1
 
 };
 
index 86d465962fbe248fe1dc3ee91fd09f1183cba517..6a1c0b721d7530d5b3e7c2e4590fe87e27e79086 100644 (file)
 
 /* History of cvs commits:
  *
- * $Log$
+ * $Log: AliPHOSDigitizer.cxx,v $
+ * Revision 1.104  2007/12/18 09:08:18  hristov
+ * Splitting of the QA maker into simulation and reconstruction dependent parts (Yves)
+ *
  * Revision 1.103  2007/11/07 11:25:06  schutz
  * Comment out the QA checking before starting digitization
  *
@@ -515,7 +518,9 @@ void AliPHOSDigitizer::Digitize(Int_t event)
   //remove digits below thresholds
   for(i = 0 ; i < nEMC ; i++){
     digit = dynamic_cast<AliPHOSDigit*>( digits->At(i) ) ;
-    DecalibrateEMC(digit);
+//By default no decalibration should be applyed
+//    DecalibrateEMC(digit);
+
     if(digit->GetEnergy() < fEMCDigitThreshold)
       digits->RemoveAt(i) ;
     else
index d0b8f3c4b5ed5a7d4d987d0cde97def8d71bcf73..cd93d5cf65535c7e0f129bb4980719c4ef70ec57 100644 (file)
@@ -628,7 +628,7 @@ void  AliPHOSOnlineMonitor::Go(){
   if(fReconstruct){ //We will need calibation parameters
     clu = new AliPHOSClusterizerv1(gime->PHOSGeometry()) ;
     clu->SetWriting(0) ; //Do not write to file
-    clu->SetEmcMinE(0.05) ;  //Minimal energy of the digit
+//    clu->SetEmcMinE(0.05) ;  //Minimal energy of the digit
     clu->SetEmcLocalMaxCut(0.05) ; //Height of local maximum over environment
     clu->SetEmcClusteringThreshold(0.2) ; //Minimal energy to start cluster
 //    clu->SetUnfolding(kFALSE) ; //Do not unfold
index 2f214264de1402a132dd3f066e926c58751d67a0..b6942da68ece6dbc8e551016e94c24e4ba54c402 100644 (file)
@@ -172,9 +172,6 @@ Bool_t AliPHOSRawDecoder::NextDigit()
         else
           return kFALSE;
        
-       if(fLowGainFlag)
-        fEnergy *= fPulseGenerator->GetRawFormatHighLowGainFactor(); // *16 
-
        if (fEnergy < baseLine) fEnergy = 0;
 
        pedMean = 0;
index 3488751548da4c7d4d75a744a2a37780800589e4..f773d9e2d71cd85009571a6cdb83071326fdfea8 100644 (file)
@@ -308,8 +308,6 @@ Bool_t AliPHOSRawDecoderv1::NextDigit()
          fEnergy=0 ; //bad sample
          fTime=-999.;
        }
-       if(fLowGainFlag)
-         fEnergy *= fPulseGenerator->GetRawFormatHighLowGainFactor(); // *16 
        
         fTime*=fPulseGenerator->GetRawFormatTimeTrigger() ; 
 
index 8db22e81a8da9419ef3c1177e3b811eff0e6c136..52e0b0a1a5a03f12561aa3e5a09e065a69949192 100644 (file)
@@ -182,17 +182,17 @@ Bool_t AliPHOSRawDecoderv2::NextDigit()
          fOverflow = kTRUE ;
       }
 
-      if(fOverflow)
-        return kTRUE ; //do not calculate energy and time for overflowed channels
-
+//    if(fEnergy>1020.){
 //    printf("fE=%f \n",fEnergy) ;
-//    if(fEnergy>20.){
 //    cs->cd() ;
 //    h->Draw() ;
 //    cs->Update() ;
 //    getchar() ;
 //    }
 
+      if(fOverflow)
+        return kTRUE ; //do not calculate energy and time for overflowed channels
+
       if(fEnergy<baseLine){ //do not evaluate time, drop this sample
         fEnergy=0. ;
         fTime=-999.;
@@ -252,8 +252,6 @@ Bool_t AliPHOSRawDecoderv2::NextDigit()
       else{
         fTime=-999. ;
       }
-      if(fLowGainFlag)
-        fEnergy *= fPulseGenerator->GetRawFormatHighLowGainFactor(); // *16 
 
       fTime*=fPulseGenerator->GetRawFormatTimeTrigger() ;
 
index 22568e4f49396007200371bb6bb94bdeb4adff6f..0b2f9c72e2019f6bad1a08ed35f6bdfcaac22841 100644 (file)
@@ -374,31 +374,13 @@ void  AliPHOSReconstructor::ConvertDigits(AliRawReader* rawReader, TTree* digits
   Int_t bufsize = 32000;
   digitsTree->Branch("PHOS", &digits, bufsize);
 
-  AliPHOSRawDigiProducer pr;
+  AliPHOSRawDigiProducer pr(fgkRecoParamEmc,fgkRecoParamCpv);
   pr.MakeDigits(digits,dc);
 
   delete dc ;
 
-  //ADC counts -> GeV
-  for(Int_t i=0; i<digits->GetEntries(); i++) {
-    AliPHOSDigit* digit = (AliPHOSDigit*)digits->At(i);
-    digit->SetEnergy(digit->GetEnergy()/AliPHOSPulseGenerator::GeV2ADC());
-  }
-  
-  // Clean up digits below the noise threshold
-  // Assuming the digit noise to be 4 MeV, we suppress digits within
-  // 3-sigma of the noise.
-  // This parameter should be passed via AliPHOSRecoParamEmc later
-
-  const Double_t emcDigitThreshold = 0.012;
-  for(Int_t i=0; i<digits->GetEntries(); i++) {
-    AliPHOSDigit* digit = (AliPHOSDigit*)digits->At(i);
-    if(digit->GetEnergy() < emcDigitThreshold)
-      digits->RemoveAt(i) ;
-  }
-  digits->Compress() ;  
-
   //!!!!for debug!!!
+/*
   Int_t modMax=-111;
   Int_t colMax=-111;
   Int_t rowMax=-111;
@@ -419,7 +401,7 @@ void  AliPHOSReconstructor::ConvertDigits(AliRawReader* rawReader, TTree* digits
 
   AliDebug(1,Form("Digit with max. energy:  modMax %d colMax %d rowMax %d  eMax %f\n\n",
                  modMax,colMax,rowMax,eMax));
-
+*/
   digitsTree->Fill();
   digits->Delete();
   delete digits;