Integrate CPV to AliReconstruction
authorkharlov <Yuri.Kharlov@cern.ch>
Sat, 10 Jan 2015 19:39:36 +0000 (22:39 +0300)
committerkharlov <Yuri.Kharlov@cern.ch>
Sat, 10 Jan 2015 19:39:36 +0000 (22:39 +0300)
13 files changed:
PHOS/PHOSUtils/AliPHOSCPVGeometry.cxx
PHOS/PHOSbase/AliPHOSClusterizerv1.cxx
PHOS/PHOSbase/AliPHOSCpvRawStream.cxx
PHOS/PHOSbase/AliPHOSRawDigiProducer.cxx
PHOS/PHOSbase/AliPHOSReconstructor.cxx
PHOS/PHOSbase/AliPHOSReconstructor.h
PHOS/PHOSbase/CMakeLists.txt
PHOS/PHOSbase/PHOSbaseLinkDef.h
PHOS/PHOSrec/AliPHOSAodCluster.h [changed mode: 0755->0644]
PHOS/PHOSrec/AliPHOSCpvRawDigiProducer.cxx [deleted file]
PHOS/PHOSrec/AliPHOSCpvRawDigiProducer.h [deleted file]
PHOS/PHOSrec/CMakeLists.txt
PHOS/PHOSrec/PHOSrecLinkDef.h

index 34d326c..874dd89 100644 (file)
@@ -36,9 +36,9 @@ ClassImp(AliPHOSCPVGeometry)
 AliPHOSCPVGeometry::AliPHOSCPVGeometry()
   : fNumberOfCPVLayers(1),
     fNumberOfCPVPadsPhi(128),
-    fNumberOfCPVPadsZ(56),
+    fNumberOfCPVPadsZ(60),
     fCPVPadSizePhi(1.13),
-    fCPVPadSizeZ(2.26),
+    fCPVPadSizeZ(2.1093),
     fNumberOfCPVChipsPhi(8),
     fNumberOfCPVChipsZ(8),
     fCPVGasThickness(1.3),
index 840ffd0..b2ca2a5 100644 (file)
@@ -255,10 +255,12 @@ void AliPHOSClusterizerv1::Digits2Clusters(Option_t *option)
 
   MakeClusters() ;
     
-  AliDebug(2,Form(" ---- Printing clusters (%d)\n",
-                 fEMCRecPoints->GetEntries()));
-  if(AliLog::GetGlobalDebugLevel()>1)
+  AliDebug(2,Form("Number of EMC clusters: %d, CPV clusters: %d\n",
+                 fEMCRecPoints->GetEntriesFast(), fCPVRecPoints->GetEntriesFast()));
+  if(AliLog::GetGlobalDebugLevel()>1) {
     fEMCRecPoints->Print();
+    fCPVRecPoints->Print();
+  }
 
   if(fToUnfold)             
     MakeUnfolding();
@@ -595,6 +597,7 @@ void AliPHOSClusterizerv1::MakeClusters()
     Int_t index ;
 
     //is this digit so energetic that start cluster?
+    AliDebug(2,Form("Digit %d, energy=%f, ID=%d",i,digit->GetEnergy(),digit->GetId()));
     if (( IsInEmc(digit) &&  Calibrate(digit->GetEnergy(),digit->GetId()) > fEmcClusteringThreshold ) || 
         ( IsInCpv(digit) &&  Calibrate(digit->GetEnergy(),digit->GetId()) > fCpvClusteringThreshold ) ) {
       Int_t iDigitInCluster = 0 ; 
index 384d58d..dad82f8 100644 (file)
@@ -88,11 +88,11 @@ AliPHOSCpvRawStream::AliPHOSCpvRawStream() :
   // Default constructor
   //
   Int_t kNDDL = AliPHOSCpvParam::kNDDL;
-  fNumOfErr = new Int_t*[kNDDL];     // Store the number of errors for a given error type and a given DD                                               
+  fNumOfErr = new Int_t*[kNDDL]; // Store the number of errors for a given error type and a given DDL
   for(Int_t iddl=0; iddl<kNDDL; iddl++) {
     fNumOfErr[iddl] = new Int_t [kSumErr];
     for(Int_t ierr=0; ierr < kSumErr; ierr++) {
-      fNumOfErr[iddl][ierr]=0;       // reset errors                                                                                                   
+      fNumOfErr[iddl][ierr]=0;   // reset errors
     }
   }
 
@@ -151,15 +151,16 @@ Bool_t AliPHOSCpvRawStream::Turbo()
     if (!GetWord(1)) return kFALSE;
     //std::cout<<"i've passed getWord(1)"<<std::endl;
     if (fPosition/4 <= 5) continue; // Skip first 5 words 
-
-        row = ((fWord >> kbit22) & 0x1f) - 1;
-        _3G = ((fWord >> kbit18) & 0xf) - 1; // 3GASSIPLEX info in raw word is between bits: 18...21    
-        pad = (fWord >> kbit12) & 0x3f;      // pad info in raw word is between bits: 12...17
-       //std::cout<<"row = "<<row<<", 3Gassiplex = "<<_3G<<", pad info = "<<pad<<std::endl;
-
+    
+    row = ((fWord >> kbit22) & 0x1f) - 1;
+    _3G = ((fWord >> kbit18) & 0xf) - 1; // 3GASSIPLEX info in raw word is between bits: 18...21    
+    pad = (fWord >> kbit12) & 0x3f;      // pad info in raw word is between bits: 12...17
+    //std::cout<<"row = "<<row<<", 3Gassiplex = "<<_3G<<", pad info = "<<pad<<std::endl;
+    
     Int_t charge, abs, eType;
     if(!AliPHOSCpvParam::DecodeRawWord(fDDLNumber,fWord,abs,charge,eType)) {
-      if(eType > 0){ fNumOfErr[fDDLNumber][eType]++;
+      if (eType > 0) {
+       fNumOfErr[fDDLNumber][eType]++;
        //std::cout<<"AliPHOSCpvRawStream::Turbo(): I cannot decode word!"<<std::endl;
        //cout<<"DDL = "<<  fDDLNumber << "; word = "<< fWord <<"; abs = " << abs 
        //    <<"; charge = "<< charge <<"; etype = "<< eType << endl;
index 6607464..5f69699 100644 (file)
@@ -168,8 +168,6 @@ void AliPHOSRawDigiProducer::MakeDigits(TClonesArray *digits, TClonesArray *tmpD
   //Makes the job.
   //TClonesArray *digits, *tmpDigLG and raw data fitter should be provided by calling function.
 
-  digits->Clear();
   Int_t iDigit=0 ;
   Int_t relId[4], absId=-1, caloFlag=-1;
   
@@ -193,10 +191,10 @@ void AliPHOSRawDigiProducer::MakeDigits(TClonesArray *digits, TClonesArray *tmpD
   while (fRawStream->NextDDL()) {
     while (fRawStream->NextChannel()) {
       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
-      caloFlag = fRawStream->GetCaloFlag();   // 0=LG, 1=HG, 2=TRU
+      relId[1] = 0;                            // 0=EMC
+      relId[2] = fRawStream->GetCellX()  + 1;  // counts from 1 to 64
+      relId[3] = fRawStream->GetCellZ()  + 1;  // counts from 1 to 56
+      caloFlag = fRawStream->GetCaloFlag();    // 0=LG, 1=HG, 2=TRU
       
       if(caloFlag!=0 && caloFlag!=1) continue; //TRU data!
       
index 6841990..2160232 100644 (file)
@@ -54,6 +54,7 @@
 #include "AliPHOSRawFitterv3.h"
 #include "AliPHOSRawFitterv4.h"
 #include "AliPHOSRawDigiProducer.h"
+#include "AliPHOSCpvRawDigiProducer.h"
 #include "AliPHOSPulseGenerator.h"
 #include "AliPHOSTriggerRawDigit.h"
 #include "AliPHOSTriggerRawDigiProducer.h"
@@ -408,45 +409,18 @@ void  AliPHOSReconstructor::ConvertDigits(AliRawReader* rawReader, TTree* digits
   // Works on a single-event basis
   rawReader->Reset() ; 
 
-  AliPHOSRawFitterv0 * fitter ;
-
-  const TObjArray* maps = AliPHOSRecoParam::GetMappings();
-  if(!maps) AliFatal("Cannot retrieve ALTRO mappings!!");
-
-  AliAltroMapping *mapping[20];
-  for(Int_t i = 0; i < 20; i++) {
-    mapping[i] = (AliAltroMapping*)maps->At(i);
-  }
-
-  if      (strcmp(GetRecoParam()->EMCFitterVersion(),"v0")==0) 
-    fitter=new AliPHOSRawFitterv0();
-  else if (strcmp(GetRecoParam()->EMCFitterVersion(),"v1")==0) 
-    fitter=new AliPHOSRawFitterv1();
-  else if (strcmp(GetRecoParam()->EMCFitterVersion(),"v2")==0) 
-    fitter=new AliPHOSRawFitterv2();
-  else if (strcmp(GetRecoParam()->EMCFitterVersion(),"v3")==0) 
-    fitter=new AliPHOSRawFitterv3();
-  else
-    fitter=new AliPHOSRawFitterv4();
-
-  fitter->SubtractPedestals(GetRecoParam()->EMCSubtractPedestals());
-  fitter->SetAmpOffset     (GetRecoParam()->GetGlobalAltroOffset());
-  fitter->SetAmpThreshold  (GetRecoParam()->GetGlobalAltroThreshold());
-
+  // Create a new array of PHOS and CPV digits and fill it in PHOS and CPV raw data decoders
   TClonesArray *digits = new TClonesArray("AliPHOSDigit",1);
   digits->SetName("DIGITS");
   Int_t bufsize = 32000;
   digitsTree->Branch("PHOS", &digits, bufsize);
 
-  AliPHOSRawDigiProducer rdp(rawReader,mapping);
+  ConvertDigitsEMC(rawReader,digits);
+  ConvertDigitsCPV(rawReader,digits);
 
-  rdp.SetEmcMinAmp(GetRecoParam()->GetEMCRawDigitThreshold()); // in ADC
-  rdp.SetCpvMinAmp(GetRecoParam()->GetCPVMinE());
-  rdp.SetSampleQualityCut(GetRecoParam()->GetEMCSampleQualityCut());
-  rdp.MakeDigits(digits,fTmpDigLG,fitter);
-
-  delete fitter ;
+  AliDebug(2,Form("Number of created digits = %d",digits->GetEntriesFast()));
 
+  // Create a new array of PHOS trigger digits and fill it from raw data
   TClonesArray *tdigits = new TClonesArray("AliPHOSTriggerRawDigit",1);
   tdigits->SetName("TDIGITS");
   digitsTree->Branch("TPHOS", &tdigits, bufsize);  
@@ -491,6 +465,56 @@ void  AliPHOSReconstructor::ConvertDigits(AliRawReader* rawReader, TTree* digits
   delete tdigits;
 }
 //==================================================================================
+void  AliPHOSReconstructor::ConvertDigitsEMC(AliRawReader* rawReader, TClonesArray* digits) const
+{
+  // Converts CPV raw data to PHOS EMC digits
+  // Works on a single-event basis
+  AliPHOSRawFitterv0 * fitter ;
+
+  const TObjArray* maps = AliPHOSRecoParam::GetMappings();
+  if(!maps) AliFatal("Cannot retrieve ALTRO mappings!!");
+
+  AliAltroMapping *mapping[20];
+  for(Int_t i = 0; i < 20; i++) {
+    mapping[i] = (AliAltroMapping*)maps->At(i);
+  }
+
+  if      (strcmp(GetRecoParam()->EMCFitterVersion(),"v0")==0) 
+    fitter=new AliPHOSRawFitterv0();
+  else if (strcmp(GetRecoParam()->EMCFitterVersion(),"v1")==0) 
+    fitter=new AliPHOSRawFitterv1();
+  else if (strcmp(GetRecoParam()->EMCFitterVersion(),"v2")==0) 
+    fitter=new AliPHOSRawFitterv2();
+  else if (strcmp(GetRecoParam()->EMCFitterVersion(),"v3")==0) 
+    fitter=new AliPHOSRawFitterv3();
+  else
+    fitter=new AliPHOSRawFitterv4();
+
+  fitter->SubtractPedestals(GetRecoParam()->EMCSubtractPedestals());
+  fitter->SetAmpOffset     (GetRecoParam()->GetGlobalAltroOffset());
+  fitter->SetAmpThreshold  (GetRecoParam()->GetGlobalAltroThreshold());
+
+  AliPHOSRawDigiProducer rdp(rawReader,mapping);
+
+  rdp.SetEmcMinAmp(GetRecoParam()->GetEMCRawDigitThreshold()); // in ADC
+  rdp.SetCpvMinAmp(GetRecoParam()->GetCPVMinE());
+  rdp.SetSampleQualityCut(GetRecoParam()->GetEMCSampleQualityCut());
+  rdp.MakeDigits(digits,fTmpDigLG,fitter);
+
+  delete fitter ;
+}
+//==================================================================================
+void  AliPHOSReconstructor::ConvertDigitsCPV(AliRawReader* rawReader, TClonesArray* digits) const
+{
+  // Converts CPV raw data to PHOS CPV digits
+  // Works on a single-event basis
+  AliPHOSCpvRawDigiProducer rdp(rawReader);
+  rdp.SetCpvMinAmp(GetRecoParam()->GetCPVMinE());
+  rdp.SetTurbo(kTRUE);
+  rdp.MakeDigits(digits);
+
+}
+//==================================================================================
 Float_t AliPHOSReconstructor::Calibrate(Float_t amp, Int_t absId)const{
   // Calibrate EMC digit, i.e. multiply its Amp by a factor read from CDB
 
index a2c881b..64cd6df 100644 (file)
@@ -83,7 +83,9 @@ public:
   virtual void               Reconstruct(TTree* digitsTree, TTree* clustersTree) const;
 
   virtual Bool_t             HasDigitConversion() const {return kTRUE;};
-  virtual void               ConvertDigits(AliRawReader* rawReader, TTree* digitsTree) const;
+  virtual void               ConvertDigits   (AliRawReader* rawReader, TTree* digitsTree) const;
+  virtual void               ConvertDigitsEMC(AliRawReader* rawReader, TClonesArray* digits) const;
+  virtual void               ConvertDigitsCPV(AliRawReader* rawReader, TClonesArray* digits) const;
   virtual Float_t            Calibrate(Float_t amp, Int_t absId) const ;
   virtual Float_t            CalibrateT(Float_t time, Int_t absId, Bool_t isLG) const ;
 
index daf03a9..4d980bd 100644 (file)
@@ -41,6 +41,7 @@ set(SRCS
     AliPHOSCpvRecPoint.cxx
     AliPHOSCpv3GConnection.cxx
     AliPHOSCpvParam.cxx
+    AliPHOSCpvRawDigiProducer.cxx
     AliPHOSCpvRawStream.cxx
     AliPHOSDigit.cxx
     AliPHOSDigitizer.cxx
index 0c48a69..611df56 100644 (file)
@@ -56,6 +56,7 @@
 #pragma link C++ class AliPHOSTriggerRawReader+;
 #pragma link C++ class AliPHOSTRURawReader+;
 
+#pragma link C++ class AliPHOSCpvRawDigiProducer+;
 #pragma link C++ class AliPHOSCpvRawStream+;
 #pragma link C++ class AliPHOSCpvParam+;
 #pragma link C++ class AliPHOSCpv3GConnection+;
old mode 100755 (executable)
new mode 100644 (file)
diff --git a/PHOS/PHOSrec/AliPHOSCpvRawDigiProducer.cxx b/PHOS/PHOSrec/AliPHOSCpvRawDigiProducer.cxx
deleted file mode 100644 (file)
index de755b7..0000000
+++ /dev/null
@@ -1,211 +0,0 @@
-/**************************************************************************
- * Copyright(c) 2007, ALICE Experiment at CERN, All rights reserved.      *
- *                                                                        *
- * Author: The ALICE Off-line Project.                                    *
- * Contributors are mentioned in the code where appropriate.              *
- *                                                                        *
- * Permission to use, copy, modify and distribute this software and its   *
- * documentation strictly for non-commercial purposes is hereby granted   *
- * without fee, provided that the above copyright notice appears in all   *
- * copies and that both the copyright notice and this permission notice   *
- * appear in the supporting documentation. The authors make no claims     *
- * about the suitability of this software for any purpose. It is          *
- * provided "as is" without express or implied warranty.                  *
- **************************************************************************/
-
-// --- ROOT system ---
-#include "TClonesArray.h"
-
-// --- AliRoot header files ---
-#include "AliPHOSCpvRawDigiProducer.h"
-#include "AliPHOSDigit.h"
-#include "AliPHOSCpvRawStream.h"
-#include "AliLog.h"
-#include<iostream>
-using namespace std;
-
-ClassImp(AliPHOSCpvRawDigiProducer);
-
-//--------------------------------------------------------------------------------------
-AliPHOSCpvRawDigiProducer::AliPHOSCpvRawDigiProducer():
-  TObject(),
-  fTurbo(kFALSE),
-  fCpvMinE(10.),
-  fRawStream(0),
-  fhErrors(0),
-  fPedFilesRLoaded(kFALSE)
-{
-  CreateErrHist();
-  // create a 2d array to store the pedestals                                        
-  for (Int_t iDDL=0;iDDL<AliPHOSCpvParam::kNDDL;iDDL++){
-    ped[0][iDDL] = new Int_t *[AliPHOSCpvParam::kPadPcX];
-    ped[1][iDDL] = new Int_t *[AliPHOSCpvParam::kPadPcX];
-    for(Int_t ix=0; ix<AliPHOSCpvParam::kPadPcX; ix++) {
-      ped[0][iDDL][ix] = new Int_t [AliPHOSCpvParam::kPadPcY];
-      ped[1][iDDL][ix] = new Int_t [AliPHOSCpvParam::kPadPcY];
-    }
-  }
-}
-//-------------------------------------------------------------------------------------
-AliPHOSCpvRawDigiProducer::AliPHOSCpvRawDigiProducer(AliRawReader *& rawReader):
-  TObject(),
-  fTurbo(kFALSE),
-  fCpvMinE(10.),
-  fRawStream(0),
-  fhErrors(0),
-  fPedFilesRLoaded(kFALSE)
-{
-  fRawStream = new AliPHOSCpvRawStream(rawReader);
-  fRawStream->SetTurbo(fTurbo);
-  CreateErrHist();
-  // create a 2d array to store the pedestals                                               
-  for (Int_t iDDL=0;iDDL<AliPHOSCpvParam::kNDDL;iDDL++) {
-    ped[0][iDDL] = new Int_t *[AliPHOSCpvParam::kPadPcX];
-    ped[1][iDDL] = new Int_t *[AliPHOSCpvParam::kPadPcX];
-    for(Int_t ix=0; ix<AliPHOSCpvParam::kPadPcX; ix++) {
-      ped[0][iDDL][ix] = new Int_t [AliPHOSCpvParam::kPadPcY];
-      ped[1][iDDL][ix] = new Int_t [AliPHOSCpvParam::kPadPcY];
-    }
-  }
-}
-//--------------------------------------------------------------------------------------
-AliPHOSCpvRawDigiProducer::~AliPHOSCpvRawDigiProducer()
-{
-  if(fRawStream) delete fRawStream;
-  if(fhErrors) delete fhErrors; 
-  for(Int_t iDDL = 0;iDDL<AliPHOSCpvParam::kNDDL;iDDL++) {
-    for(Int_t ix=0; ix<AliPHOSCpvParam::kPadPcX; ix++) { 
-      delete [] ped[0][iDDL][ix];
-      delete [] ped[1][iDDL][ix];
-    }
-    delete [] ped[0][iDDL];
-    delete [] ped[1][iDDL];
-  }
-}
-//--------------------------------------------------------------------------------------
-Bool_t AliPHOSCpvRawDigiProducer::LoadPedFiles() {
-  // read pedestals from file                                             
-  for(Int_t iDDL = 0;iDDL<AliPHOSCpvParam::kNDDL;iDDL++)
-    for(Int_t iCC=0; iCC<AliPHOSCpvParam::kNRows; iCC++) {
-      FILE * pedFile;
-      pedFile = fopen(Form("thr%d_%02d.dat",iDDL,iCC),"r");
-      if(!pedFile) {
-       Printf("AliPHOSCpvRawDigiProducer::LoadPedFiles: Error, file thr%d_%02d.dat could not be open",iDDL,iCC);
-       continue;
-       //return kFALSE;
-      }
-      Int_t i3g = 0, iPad = 0;
-      Int_t lineCnt = 0;
-      while(!feof(pedFile)) {
-       Int_t abs = AliPHOSCpvParam::Abs(iDDL,iCC,i3g,iPad);
-       if(iPad<48&&i3g<10){
-         if(AliPHOSCpvParam::A2DDL(abs)!=iDDL)
-           cout<<"AliPHOSCpvRawDigiProducer::LoadPedFiles(): wrong connection table! abs = "
-               <<abs<<", DDL = "<<iDDL<<", A2DDL = "<<AliPHOSCpvParam::A2DDL(abs)<<endl;
-         if(AliPHOSCpvParam::A2CC(abs)!=iCC)
-           cout<<"AliPHOSCpvRawDigiProducer::LoadPedFiles(): wrong connection table! abs = "
-               <<abs<<", CC = "<< iCC <<", A2CC = "<<AliPHOSCpvParam::A2CC(abs)<<endl;
-         if(AliPHOSCpvParam::A23G(abs)!=i3g)
-           cout<<"AliPHOSCpvRawDigiProducer::LoadPedFiles(): wrong connection table! abs = "
-               <<abs<<", 3G = "<< i3g <<", A23G = "<<AliPHOSCpvParam::A23G(abs)<<endl;
-         if(AliPHOSCpvParam::A2Pad(abs)!=iPad)
-           cout<<"AliPHOSCpvRawDigiProducer::LoadPedFiles(): wrong connection table! abs = "
-               <<abs<<", Pad = "<< iPad <<", A2Pad = "<<AliPHOSCpvParam::A2Pad(abs)<<endl;
-       }
-       Int_t thr;
-       fscanf(pedFile,"%x",&thr);
-       if(AliPHOSCpvParam::IsValidAbs(abs)) {
-         Int_t s = thr & 0x1ff;
-         Int_t p = thr >> 9;
-         ped[0][iDDL][AliPHOSCpvParam::A2X(abs)][AliPHOSCpvParam::A2Y(abs)] = p-s;
-         ped[1][iDDL][AliPHOSCpvParam::A2X(abs)][AliPHOSCpvParam::A2Y(abs)] = s;
-         int testAbs = AliPHOSCpvParam::XY2A(iDDL,AliPHOSCpvParam::A2X(abs),AliPHOSCpvParam::A2Y(abs));
-         if(abs!=testAbs)
-           cout<<"AliPHOSCpvRawDigiProducer::LoadPedFiles(): wrong connection table! abs = "
-               <<abs<<", testAbs = "<<testAbs<<endl;
-         //Printf("ped[%d][%d] = %d, pad = %d, abs = %d",AliPHOSCpvParam::A2X(abs),AliPHOSCpvParam::A2Y(abs), p + s, iPad, abs);
-       }
-       iPad++;
-       if(iPad == 64) {iPad = 0; i3g++;}
-       lineCnt++;
-      }
-      if(lineCnt < AliPHOSCpvParam::kN3GAdd * 64) return kFALSE;
-      fclose(pedFile);
-    }
-  fPedFilesRLoaded = kTRUE;
-  return kTRUE;
-}
-//--------------------------------------------------------------------------------------
-void AliPHOSCpvRawDigiProducer::SetTurbo(Bool_t turbo) 
-{
-  fTurbo = turbo;
-  if(fRawStream) fRawStream->SetTurbo(fTurbo);
-}
-//--------------------------------------------------------------------------------------
-Bool_t AliPHOSCpvRawDigiProducer::LoadNewEvent(AliRawReader *& rawReader)
-{
-  if(fRawStream) delete fRawStream;
-  fRawStream = new AliPHOSCpvRawStream(rawReader);
-  if(fRawStream) {
-    fRawStream->SetTurbo(fTurbo);
-    return kTRUE;
-  }
-  fhErrors->Fill(0);
-  return kFALSE;
-}
-//--------------------------------------------------------------------------------------
-void AliPHOSCpvRawDigiProducer::MakeDigits(TClonesArray *& digits) const
-{
-  // returns histogram of error types
-
-  if(digits) 
-    digits->Clear();
-  digits = new TClonesArray("AliPHOSDigit", AliPHOSCpvParam::kNDDL * AliPHOSCpvParam::kNRows * AliPHOSCpvParam::kN3GAdd * AliPHOSCpvParam::kNPadAdd);
-  Int_t iDigit = 0;
-  while(fRawStream->Next()) {
-    for(Int_t iPad=0;iPad<fRawStream->GetNPads();iPad++) {
-      Int_t charge = fRawStream->GetChargeArray()[iPad];
-      Int_t aPad   = fRawStream->GetPadArray()[iPad];
-      //cout<<"AliPHOSCpvRawDigiProducer::MakeDigits(): I've got pad "<<aPad<< "with amplitude "<<charge<<endl;
-      if(fPedFilesRLoaded) {
-       Int_t ix   = AliPHOSCpvParam::A2X(aPad);
-       Int_t iy   = AliPHOSCpvParam::A2Y(aPad);
-       Int_t iddl = AliPHOSCpvParam::A2DDL(aPad);
-       if (charge>ped[0][iddl][ix][iy]+ped[1][iddl][ix][iy]){
-         charge -=ped[0][iddl][ix][iy];
-       }
-       else charge=0;
-       if(charge < fCpvMinE) charge = 0;
-      }
-      // if(charge) new((*digits)[iDigit++]) AliPHOSDigit(AliPHOSCpvParam::A2X(aPad),AliPHOSCpvParam::A2Y(aPad),charge);
-      // Check what is aPad! YK 31.12.2014
-      if(charge) new((*digits)[iDigit++]) AliPHOSDigit(-1,aPad,charge,0);
-      
-    }
-  } // while(fRawStream->Next())
-  //cout<<"AliPHOSCpvRawDigiProducer::MakeDigits(): I've created "<<iDigit<<" digits."<<endl;
-  // fill histogram of errors
-  for(Int_t iDDL=0; iDDL<AliPHOSCpvParam::kNDDL; iDDL++) {
-    Int_t nErrors = AliPHOSCpvRawStream::GetNErrors();
-    for(Int_t iType=0; iType<nErrors; iType++) { // iType - type of error
-      fhErrors -> Fill(iType+1,fRawStream -> GetErrors(iDDL,iType));
-    }
-  }
-}
-//--------------------------------------------------------------------------------------
-void AliPHOSCpvRawDigiProducer::CreateErrHist()
-{
-  Int_t nErrors = AliPHOSCpvRawStream::GetNErrors();
-  const char * errNames[nErrors];
-  for(Int_t i=0; i<nErrors; i++) {
-    errNames[i] = AliPHOSCpvRawStream::GetErrName(i);
-  }
-  fhErrors = new TH1I("errorTypes","Errors occured during processing",nErrors+1,0,nErrors+1);
-  TAxis* x = fhErrors->GetXaxis();
-  x->SetBinLabel(1, "Can't get event");
-  for(Int_t i=0; i<nErrors; i++) {
-    x->SetBinLabel(i+2,errNames[i]);
-  }
-
-}
-//--------------------------------------------------------------------------------------
diff --git a/PHOS/PHOSrec/AliPHOSCpvRawDigiProducer.h b/PHOS/PHOSrec/AliPHOSCpvRawDigiProducer.h
deleted file mode 100644 (file)
index 4eafd5d..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-#ifndef ALIPHOSCPVRAWDIGIPRODUCER_H
-#define ALIPHOSCPVRAWDIGIPRODUCER_H
-
-// This class produces CPV digits from raw data stream of one event
-// Raw data is supplied by the object AliRawReader,
-// then AliPHOSCpvRawDigiProducer decodes CPV data and converts is to AliPHOSDigits.
-//!
-// Author: Mikhail Stolpovskiy, mikhail.stolpovskiy@cern.ch
-// modified by Sergey.Evdokimov@cern.ch 30 July 2014
-
-#include "TObject.h"
-#include "TH1I.h"
-
-#include "AliAltroMapping.h"
-#include "AliRawReaderDate.h"
-#include "AliPHOSCpvParam.h"
-
-class AliPHOSDigit ;
-class AliPHOSCpvRawStream;
-
-class AliPHOSCpvRawDigiProducer: public TObject {
-
-public:
-
-  AliPHOSCpvRawDigiProducer() ;
-  AliPHOSCpvRawDigiProducer(AliRawReader *& rawReader); // creates an AliPHOSCpvRawStream(rawReader) object to read data
-  virtual ~AliPHOSCpvRawDigiProducer(); 
-
-  Bool_t LoadPedFiles(); //returns true if ok. Must be called when you process a phys run
-                         //If ped files are loaded, then MakeDigits returns digits with 
-                         //substruct pedestals from ADCs
-
-  Bool_t LoadNewEvent(AliRawReader *& rawReader); // returns true, if ok
-  void   SetTurbo(Bool_t turbo);                  // if turbo==true then do read without error checking
-  Bool_t GetTurbo() const {return fTurbo;}
-
-  void MakeDigits(TClonesArray *& digits) const;    // digits is an array of AliPHOSCpvPHOSDigit objects
-  TH1I * GetErrorsHist() const { return fhErrors; } // takes histogram of errors from AliPHOSCpvRawStream
-
-  void SetCpvMinAmp(Int_t cpvMin) { fCpvMinE=cpvMin; }               // thresholds would be ped + fCpvMinE
-
-protected:
-  void CreateErrHist();             // initialize histogram of errors
-private:
-  Bool_t fTurbo;                    // if true, then read without error checking
-  Int_t  fCpvMinE ;                 // minimum energy of digit (ADC)
-  AliPHOSCpvRawStream * fRawStream; //! Raw data stream 
-
-  TH1I * fhErrors;         // ! histogram of errors
-
-  Int_t ** ped[2][AliPHOSCpvParam::kNDDL]; // pedestals    ped[0][iddl][x][y] = pedestal; ped[1][iddl][x][y] = N*sigma (N was used while creating ped files)
-  Bool_t fPedFilesRLoaded;
-
-  ClassDef(AliPHOSCpvRawDigiProducer,1);
-};
-
-#endif
index 9ceb5cd..d75afb4 100644 (file)
@@ -37,7 +37,6 @@ include_directories(${ROOT_INCLUDE_DIRS}
 set(SRCS
     AliPHOSAodCluster.cxx
     AliPHOSClusterizerv2.cxx
-    AliPHOSCpvRawDigiProducer.cxx
     AliPHOSEsdCluster.cxx
     AliPHOSEvalRecPoint.cxx
     AliPHOSGridFile.cxx
index 9d54ebd..16a16e4 100644 (file)
@@ -16,5 +16,4 @@
 #pragma link C++ class AliPHOSEsdCluster+;
 #pragma link C++ class AliPHOSAodCluster+;
 #pragma link C++ class AliPHOSQADataMakerRec+;
-#pragma link C++ class AliPHOSCpvRawDigiProducer+;
 #endif