Changes for Pb-Pb reco at 2.76 A TeV + some code simplification
authorcoppedis <coppedis@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 27 May 2010 14:12:30 +0000 (14:12 +0000)
committercoppedis <coppedis@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 27 May 2010 14:12:30 +0000 (14:12 +0000)
13 files changed:
ZDC/AliZDCDigitizer.cxx
ZDC/AliZDCDigitizer.h
ZDC/AliZDCQAChecker.cxx
ZDC/AliZDCQADataMakerRec.cxx
ZDC/AliZDCRawStream.cxx
ZDC/AliZDCRecoParam.cxx
ZDC/AliZDCRecoParam.h
ZDC/AliZDCRecoParamPbPb.cxx
ZDC/AliZDCRecoParamPbPb.h
ZDC/AliZDCReconstructor.cxx
ZDC/AliZDCReconstructor.h
ZDC/GlauberMCDist.root [new file with mode: 0644]
ZDC/SpectatorSignal.root [new file with mode: 0644]

index 6145813..33c6acb 100644 (file)
@@ -47,8 +47,6 @@
 
 class AliCDBStorage;
 class AliZDCPedestals;
-class AliZDCEnCalib;
-class AliZDCTowerCalib;
 
 ClassImp(AliZDCDigitizer)
 
@@ -59,9 +57,8 @@ AliZDCDigitizer::AliZDCDigitizer() :
   fIsSignalInADCGate(kFALSE),
   fFracLostSignal(0.),
   fPedData(0), 
-  fEnCalibData(0),
-  fTowCalibData(0),
-  fSpectators2Track(kFALSE)
+  fSpectators2Track(kFALSE),
+  fBeamEnergy(0.)
 {
   // Default constructor    
 
@@ -74,9 +71,8 @@ AliZDCDigitizer::AliZDCDigitizer(AliRunDigitizer* manager):
   fIsSignalInADCGate(kFALSE),
   fFracLostSignal(0.),
   fPedData(GetPedData()), 
-  fEnCalibData(GetEnCalibData()),
-  fTowCalibData(GetTowCalibData()),
-  fSpectators2Track(kFALSE)
+  fSpectators2Track(kFALSE),
+  fBeamEnergy(0.)
 {
   // Get calibration data
   if(fIsCalibration!=0) printf("\n\t AliZDCDigitizer -> Creating calibration data (pedestals)\n");
@@ -101,9 +97,8 @@ AliZDCDigitizer::AliZDCDigitizer(const AliZDCDigitizer &digitizer):
   fIsSignalInADCGate(digitizer.fIsSignalInADCGate),
   fFracLostSignal(digitizer.fFracLostSignal),
   fPedData(digitizer.fPedData),
-  fEnCalibData(digitizer.fEnCalibData),
-  fTowCalibData(digitizer.fTowCalibData),
-  fSpectators2Track(digitizer.fSpectators2Track)
+  fSpectators2Track(digitizer.fSpectators2Track),
+  fBeamEnergy(digitizer.fBeamEnergy)
 {
   // Copy constructor
 
@@ -144,37 +139,41 @@ Bool_t AliZDCDigitizer::Init()
     AliError("\t UNKNOWN beam type from GRP obj -> PMT gains not set in ZDC digitizer!!!\n");
   }
   
-  Float_t beamEnergy = grpData->GetBeamEnergy();
-  if(beamEnergy==AliGRPObject::GetInvalidFloat()){
+  fBeamEnergy = grpData->GetBeamEnergy();
+  if(fBeamEnergy==AliGRPObject::GetInvalidFloat()){
     AliWarning("GRP/GRP/Data entry:  missing value for the beam energy ! Using 0.");
     AliError("\t UNKNOWN beam type from GRP obj -> PMT gains not set in ZDC digitizer!!!\n");
-    beamEnergy = 0.;
+    fBeamEnergy = 0.;
   }
 
-  if((beamType.CompareTo("P-P")) == 0){
+  if((beamType.CompareTo("P-P")) == 0 || (beamType.CompareTo("p-p")) == 0){
     //PTM gains rescaled to beam energy for p-p
-    if(beamEnergy != 0){
+    if(fBeamEnergy != 0){
       for(Int_t j = 0; j < 5; j++){
-        fPMGain[0][j] = (661.444/beamEnergy+0.000740671)*10000000;
-        fPMGain[1][j] = (864.350/beamEnergy+0.002344)*10000000;
-        fPMGain[2][j] = (1.32312-0.000101515*beamEnergy)*10000000;
+        fPMGain[0][j] = (661.444/fBeamEnergy+0.000740671)*10000000;
+        fPMGain[1][j] = (864.350/fBeamEnergy+0.002344)*10000000;
+        fPMGain[2][j] = (1.32312-0.000101515*fBeamEnergy)*10000000;
         fPMGain[3][j] = fPMGain[0][j];
         fPMGain[4][j] = fPMGain[1][j] ;
       }
-      AliInfo(Form("    PMT gains for p-p @ %1.0f+%1.0f: ZN(%1.0f), ZP(%1.0f), ZEM(%1.0f)\n",
-       beamEnergy, beamEnergy, fPMGain[0][0], fPMGain[1][0], fPMGain[2][0]));
+      AliInfo(Form("    PMT gains for p-p @ %1.0f+%1.0f GeV: ZN(%1.0f), ZP(%1.0f), ZEM(%1.0f)\n",
+       fBeamEnergy, fBeamEnergy, fPMGain[0][0], fPMGain[1][0], fPMGain[2][0]));
     }
   }
   else if((beamType.CompareTo("A-A")) == 0){
-    // PTM gains for Pb-Pb @ 2.7_2.7 A TeV ***************
+    // PTM gains for Pb-Pb @ 2.7+2.7 A TeV ***************
+    // rescaled for Pb-Pb @ 1.38+1.38 A TeV ***************
+    Float_t scalGainFactor = fBeamEnergy/2760.;
     for(Int_t j = 0; j < 5; j++){
-      fPMGain[0][j] = 50000.;
-      fPMGain[1][j] = 100000.;
-      fPMGain[2][j] = 100000.;
-      fPMGain[3][j] = 50000.;
-      fPMGain[4][j] = 100000.;
-      fPMGain[5][j] = 100000.;
+      fPMGain[0][j] = 50000./scalGainFactor;
+      fPMGain[1][j] = 100000./scalGainFactor;
+      fPMGain[2][j] = 100000./scalGainFactor;
+      fPMGain[3][j] = 50000./scalGainFactor;
+      fPMGain[4][j] = 100000./scalGainFactor;
+      fPMGain[5][j] = 100000./scalGainFactor;
     }
+    AliInfo(Form("    PMT gains for Pb-Pb @ %1.0f+%1.0f A GeV: ZN(%1.0f), ZP(%1.0f), ZEM(%1.0f)\n",
+       fBeamEnergy, fBeamEnergy, fPMGain[0][0], fPMGain[1][0], fPMGain[2][0]));
   }
     
   // ADC Caen V965
@@ -450,27 +449,57 @@ void AliZDCDigitizer::SpectatorSignal(Int_t SpecType, Int_t numEvents,
 {
 // add signal of the spectators
   
-  TString hfn; 
-  if(SpecType == 1) {     // --- Signal for projectile spectator neutrons
-    hfn = "$ALICE_ROOT/ZDC/ZNCSignal.root";
-  } 
-  else if(SpecType == 2) { // --- Signal for projectile spectator protons
-    hfn = "$ALICE_ROOT/ZDC/ZPCSignal.root";
+  TFile *specSignalFile = TFile::Open("$ALICE_ROOT/ZDC/SpectatorSignal.root");
+  if(!specSignalFile || !specSignalFile->IsOpen()) {
+    AliError((" Opening file $ALICE_ROOT/ZDC/SpectatorSignal.root failed\n"));
+    return;
   }
-  else if(SpecType == 3) { // --- Signal for target spectator neutrons
-    hfn = "$ALICE_ROOT/ZDC/ZNASignal.root";
+
+  TNtuple* zdcSignal;
+  
+  Float_t sqrtS = 2*fBeamEnergy;
+  //
+  if(TMath::Abs(sqrtS-5500) < 100.){
+    specSignalFile->cd("energy5500");
+    //
+    if(SpecType == 1) {           // --- Signal for projectile spectator neutrons
+      specSignalFile->GetObject("energy5500/ZNCSignal;1",zdcSignal);
+      if(!zdcSignal) AliError("  PROBLEM!!! Can't retrieve ZNCSignal from SpectatorSignal.root file");
+    } 
+    else if(SpecType == 2) { // --- Signal for projectile spectator protons
+      specSignalFile->GetObject("energy5500/ZPCSignal;1",zdcSignal);
+      if(!zdcSignal) AliError("  PROBLEM!!! Can't retrieve ZPCSignal from SpectatorSignal.root file");
+    }
+    else if(SpecType == 3) { // --- Signal for target spectator neutrons
+      specSignalFile->GetObject("energy5500/ZNASignal;1",zdcSignal);
+      if(!zdcSignal) AliError("  PROBLEM!!! Can't retrieve ZNASignal from SpectatorSignal.root file");
+    }
+    else if(SpecType == 4) { // --- Signal for target spectator protons
+      specSignalFile->GetObject("energy5500/ZPASignal;1",zdcSignal);
+      if(!zdcSignal) AliError("  PROBLEM!!! Can't retrieve ZPASignal from SpectatorSignal.root file");
+    }
   }
-  else if(SpecType == 4) { // --- Signal for target spectator protons
-    hfn = "$ALICE_ROOT/ZDC/ZPASignal.root";
+  else if(TMath::Abs(sqrtS-2760) < 100.){
+    specSignalFile->cd("energy2760");
+    //
+    if(SpecType == 1) {           // --- Signal for projectile spectator neutrons
+      specSignalFile->GetObject("energy2760/ZNCSignal;1",zdcSignal);
+      if(!zdcSignal) AliError("  PROBLEM!!! Can't retrieve ZNCSignal from SpectatorSignal.root file");
+    } 
+    else if(SpecType == 2) { // --- Signal for projectile spectator protons
+      specSignalFile->GetObject("energy2760/ZPCSignal;1",zdcSignal);
+      if(!zdcSignal) AliError("  PROBLEM!!! Can't retrieve ZPCSignal from SpectatorSignal.root file");
+    }
+    else if(SpecType == 3) { // --- Signal for target spectator neutrons
+      specSignalFile->GetObject("energy2760/ZNASignal;1",zdcSignal);
+      if(!zdcSignal) AliError("  PROBLEM!!! Can't retrieve ZNASignal from SpectatorSignal.root file");
+    }
+    else if(SpecType == 4) { // --- Signal for target spectator protons
+      specSignalFile->GetObject("energy2760/ZPASignal;1",zdcSignal);
+      if(!zdcSignal) AliError("  PROBLEM!!! Can't retrieve ZPASignal from SpectatorSignal.root file");
+    }
   }
   
-  TFile* file = TFile::Open(hfn);
-  if(!file || !file->IsOpen()) {
-    AliError((Form(" Opening file %s failed\n",hfn.Data())));
-    return;
-  }
-
-  TNtuple* zdcSignal = (TNtuple*) file->Get("ZDCSignal");
   Int_t nentries = (Int_t) zdcSignal->GetEntries();
   
   Float_t *entry;
@@ -516,8 +545,8 @@ void AliZDCDigitizer::SpectatorSignal(Int_t SpecType, Int_t numEvents,
      }
   }while(iev<numEvents);
   
-  file->Close();
-  delete file;
+  specSignalFile->Close();
+  delete specSignalFile;
 }
 
 
@@ -609,32 +638,3 @@ AliZDCPedestals* AliZDCDigitizer::GetPedData() const
   return calibdata;
 }
 
-//_____________________________________________________________________________
-AliZDCEnCalib* AliZDCDigitizer::GetEnCalibData() const
-{
-
-  // Getting calibration object for ZDC set
-
-  AliCDBEntry  *entry = AliCDBManager::Instance()->Get("ZDC/Calib/EnergyCalib");
-  if(!entry) AliFatal("No calibration data loaded!");  
-
-  AliZDCEnCalib *calibdata = dynamic_cast<AliZDCEnCalib*>  (entry->GetObject());
-  if(!calibdata)  AliFatal("Wrong calibration object in calibration  file!");
-
-  return calibdata;
-}
-
-//_____________________________________________________________________________
-AliZDCTowerCalib* AliZDCDigitizer::GetTowCalibData() const
-{
-
-  // Getting calibration object for ZDC set
-
-  AliCDBEntry  *entry = AliCDBManager::Instance()->Get("ZDC/Calib/TowerCalib");
-  if(!entry) AliFatal("No calibration data loaded!");  
-
-  AliZDCTowerCalib *calibdata = dynamic_cast<AliZDCTowerCalib*>  (entry->GetObject());
-  if(!calibdata)  AliFatal("Wrong calibration object in calibration  file!");
-
-  return calibdata;
-}
index 27d1a8f..b8ffa37 100644 (file)
@@ -13,8 +13,6 @@
 #include "AliCDBManager.h"
 #include "AliCDBStorage.h"
 #include "AliZDCPedestals.h"
-#include "AliZDCEnCalib.h"
-#include "AliZDCTowerCalib.h"
 
 class AliRunDigitizer;
 
@@ -46,8 +44,6 @@ public:
   void   SetCalibrationOn() {fIsCalibration=1;}  
   AliCDBStorage    *SetStorage(const char* uri);
   AliZDCPedestals  *GetPedData() const; 
-  AliZDCEnCalib    *GetEnCalibData() const; 
-  AliZDCTowerCalib *GetTowCalibData() const; 
   
   void    SetSpectators2Track() {fSpectators2Track=kTRUE;}
 
@@ -72,11 +68,10 @@ private:
   Float_t fFracLostSignal;      // fraction of lost signal
   
   AliZDCPedestals  *fPedData;     //! pedestal calibration data
-  AliZDCEnCalib    *fEnCalibData;  //! energy and equalization calibration data
-  AliZDCTowerCalib *fTowCalibData; //! energy and equalization calibration data
   
   Bool_t  fSpectators2Track;    // should digitizer track spectators
+  Float_t fBeamEnergy;          // beam energy taken from GRP object
        
-  ClassDef(AliZDCDigitizer, 10)     // digitizer for ZDC
+  ClassDef(AliZDCDigitizer, 11)     // digitizer for ZDC
 };    
 #endif
index 9414fe3..b952601 100644 (file)
@@ -34,7 +34,7 @@ void AliZDCQAChecker::Check(Double_t *  test, AliQAv1::ALITASK_t index, TObjArra
   // Checks the QA histograms on the input list: 
   //
   const char* taskName = AliQAv1::GetAliTaskName(index);
-  printf("\n\tAliZDCQAChecker -> checking QA histos for task %s\n",taskName);
+  //printf("\n\tAliZDCQAChecker -> checking QA histos for task %s\n",taskName);
   //
   for(Int_t specie = 0; specie<AliRecoParam::kNSpecies; specie++){
     Int_t count = 0; 
index 207c768..4cccb8d 100644 (file)
@@ -170,46 +170,46 @@ void AliZDCQADataMakerRec::InitRaws()
   const Bool_t image    = kTRUE ; 
   
   // **************************** NON EXPERT HISTOS ****************************
-  TH1F * hZNCSpectrum = new TH1F("hZNCSpectrum","ZNC spectrum;Amplitude [ADC counts];Counts",100,7.,1007.);
-  TH1F * hZPCSpectrum = new TH1F("hZPCSpectrum","ZPC spectrum;Amplitude [ADC counts];Counts",100,7.,1007.);
-  TH1F * hZNASpectrum = new TH1F("hZNASpectrum","ZNA spectrum;Amplitude [ADC counts];Counts",100,7.,1007.);
-  TH1F * hZPASpectrum = new TH1F("hZPASpectrum","ZPA spectrum;Amplitude [ADC counts];Counts",100,7.,1007.);
-  TH1F * hZEM1Spectrum = new TH1F("hZEM1Spectrum","ZEM1 spectrum;Amplitude [ADC counts];Counts",100,7.,2007.);
-  TH1F * hZEM2Spectrum = new TH1F("hZEM2Spectrum","ZEM2 spectrum;Amplitude [ADC counts];Counts",100,7.,2007.);
+  TH1F * hZNCSpectrum = new TH1F("hZNCSpectrum","ZNC spectrum;Amplitude [ADC counts];Counts",100,0.,1200.);
+  TH1F * hZPCSpectrum = new TH1F("hZPCSpectrum","ZPC spectrum;Amplitude [ADC counts];Counts",100,0.,1200.);
+  TH1F * hZNASpectrum = new TH1F("hZNASpectrum","ZNA spectrum;Amplitude [ADC counts];Counts",100,0.,1200.);
+  TH1F * hZPASpectrum = new TH1F("hZPASpectrum","ZPA spectrum;Amplitude [ADC counts];Counts",100,0.,1200.);
+  TH1F * hZEM1Spectrum = new TH1F("hZEM1Spectrum","ZEM1 spectrum;Amplitude [ADC counts];Counts",100,0.,1200.);
+  TH1F * hZEM2Spectrum = new TH1F("hZEM2Spectrum","ZEM2 spectrum;Amplitude [ADC counts];Counts",100,0.,1200.);
   Add2RawsList(hZNCSpectrum, 0, !expert, image);
   Add2RawsList(hZNASpectrum, 1, !expert, image);
   Add2RawsList(hZPCSpectrum, 2, !expert, image);
   Add2RawsList(hZPASpectrum, 3, !expert, image);
   Add2RawsList(hZEM1Spectrum, 4, !expert, image);
   Add2RawsList(hZEM2Spectrum, 5, !expert, image);
-    
-  // **************************** EXPERT HISTOS ****************************
-  TH1F * hRawSumQZNC = new TH1F("hRawSumQZNC", "Raw sumQ ZNC;Amplitude [ADC counts];Counts",100, 7., 1007.);
-  TH1F * hRawSumQZNA = new TH1F("hRawSumQZNA", "Raw sumQ ZNA;Amplitude [ADC counts];Counts",100, 7., 1007.);
-  TH1F * hRawSumQZPC = new TH1F("hRawSumQZPC", "Raw sumQ ZPC;Amplitude [ADC counts];Counts",100, 7., 1007.);
-  TH1F * hRawSumQZPA = new TH1F("hRawSumQZPA", "Raw sumQ ZPA;Amplitude [ADC counts];Counts",100, 7., 1007.);
-  Add2RawsList(hRawSumQZNC, 10, expert, !image);
-  Add2RawsList(hRawSumQZNA, 11, expert, !image);
-  Add2RawsList(hRawSumQZPC, 12, expert, !image);
-  Add2RawsList(hRawSumQZPA, 13, expert, !image);
   //
-  TH1F * hRawPMCZNC = new TH1F("hRawPMCZNC", "Raw ZNC PMC;Amplitude [ADC counts];Counts",100, 7., 1007.);
-  TH1F * hRawPMCZNA = new TH1F("hRawPMCZNA", "Raw ZNA PMC;Amplitude [ADC counts];Counts",100, 7., 1007.);
-  TH1F * hRawPMCZPC = new TH1F("hRawPMCZPC", "Raw ZPC PMC;Amplitude [ADC counts];Counts",100, 7., 1007.);
-  TH1F * hRawPMCZPA = new TH1F("hRawPMCZPA", "Raw ZPA PMC;Amplitude [ADC counts];Counts",100, 7., 1007.);
-  Add2RawsList(hRawPMCZNC, 6, expert, !image);
-  Add2RawsList(hRawPMCZNA, 7, expert, !image);
-  Add2RawsList(hRawPMCZPC, 8, expert, !image);
-  Add2RawsList(hRawPMCZPA, 9, expert, !image);
-  
   TH2F * hZNCpmCvsPMq = new TH2F("hZNCpmCvsPMq", "ZNC;PMC [ADC counts];Sum(PMQ) [ADC counts]",50,7.,1407.,50,7., 1407.);
   TH2F * hZPCpmCvsPMq = new TH2F("hZPCpmCvsPMq", "ZPC;PMC [ADC counts];Sum(PMQ) [ADC counts]",50,7.,1407.,50,7., 1407.);
   TH2F * hZNApmCvsPMq = new TH2F("hZNApmCvsPMq", "ZNA;PMC [ADC counts];Sum(PMQ) [ADC counts]",50,7.,1407.,50,7., 1407.);
   TH2F * hZPApmCvsPMq = new TH2F("hZPApmCvsPMq", "ZPA;PMC [ADC counts];Sum(PMQ) [ADC counts]",50,7.,1407.,50,7., 1407.);
-  Add2RawsList(hZNCpmCvsPMq, 10, !expert, image);
-  Add2RawsList(hZPCpmCvsPMq, 11, !expert, image);
-  Add2RawsList(hZNApmCvsPMq, 12, !expert, image);
-  Add2RawsList(hZPApmCvsPMq, 13, !expert, image);
+  Add2RawsList(hZNCpmCvsPMq, 6, !expert, image);
+  Add2RawsList(hZPCpmCvsPMq, 7, !expert, image);
+  Add2RawsList(hZNApmCvsPMq, 8, !expert, image);
+  Add2RawsList(hZPApmCvsPMq, 9, !expert, image);
+    
+  // **************************** EXPERT HISTOS ****************************
+  TH1F * hRawPMCZNC = new TH1F("hRawPMCZNC", "Raw ZNC PMC;Amplitude [ADC counts];Counts",100, 0., 1200.);
+  TH1F * hRawPMCZNA = new TH1F("hRawPMCZNA", "Raw ZNA PMC;Amplitude [ADC counts];Counts",100, 0., 1200.);
+  TH1F * hRawPMCZPC = new TH1F("hRawPMCZPC", "Raw ZPC PMC;Amplitude [ADC counts];Counts",100, 0., 1200.);
+  TH1F * hRawPMCZPA = new TH1F("hRawPMCZPA", "Raw ZPA PMC;Amplitude [ADC counts];Counts",100, 0., 1200.);
+  Add2RawsList(hRawPMCZNC, 10, expert, !image);
+  Add2RawsList(hRawPMCZNA, 11, expert, !image);
+  Add2RawsList(hRawPMCZPC, 12, expert, !image);
+  Add2RawsList(hRawPMCZPA, 13, expert, !image);
+  TH1F * hRawSumQZNC = new TH1F("hRawSumQZNC", "Raw sumQ ZNC;Amplitude [ADC counts];Counts",100, 0., 1200.);
+  TH1F * hRawSumQZNA = new TH1F("hRawSumQZNA", "Raw sumQ ZNA;Amplitude [ADC counts];Counts",100, 0., 1200.);
+  TH1F * hRawSumQZPC = new TH1F("hRawSumQZPC", "Raw sumQ ZPC;Amplitude [ADC counts];Counts",100, 0., 1200.);
+  TH1F * hRawSumQZPA = new TH1F("hRawSumQZPA", "Raw sumQ ZPA;Amplitude [ADC counts];Counts",100, 0., 1200.);
+  Add2RawsList(hRawSumQZNC, 14, expert, !image);
+  Add2RawsList(hRawSumQZNA, 15, expert, !image);
+  Add2RawsList(hRawSumQZPC, 16, expert, !image);
+  Add2RawsList(hRawSumQZPA, 17, expert, !image);
+
 }
 
 //____________________________________________________________________________
@@ -463,7 +463,7 @@ void AliZDCQADataMakerRec::MakeRaws(AliRawReader *rawReader)
            if(quad!=0) zncSumQ += pedSubVal;
            else{
              zncpmC = pedSubVal;
-             GetRawsData(10)->Fill(pedSubVal);
+             GetRawsData(10)->Fill(zncpmC);
            }
          }
         }
@@ -476,7 +476,7 @@ void AliZDCQADataMakerRec::MakeRaws(AliRawReader *rawReader)
            if(quad!=0) zpcSumQ += pedSubVal;
            else{
              zpcpmC = pedSubVal;
-             GetRawsData(12)->Fill(pedSubVal);
+             GetRawsData(12)->Fill(zpcpmC);
            }
          }
         }
@@ -504,7 +504,7 @@ void AliZDCQADataMakerRec::MakeRaws(AliRawReader *rawReader)
            if(quad!=0) znaSumQ += pedSubVal;
            else{
              znapmC = pedSubVal;
-             GetRawsData(11)->Fill(pedSubVal);
+             GetRawsData(11)->Fill(znapmC);
            }
          }
         }
@@ -517,7 +517,7 @@ void AliZDCQADataMakerRec::MakeRaws(AliRawReader *rawReader)
            if(quad!=0) zpaSumQ += pedSubVal;
            else{
              zpapmC = pedSubVal;
-             GetRawsData(13)->Fill(pedSubVal);
+             GetRawsData(13)->Fill(zpapmC);
            }
          }
         }
@@ -525,23 +525,23 @@ void AliZDCQADataMakerRec::MakeRaws(AliRawReader *rawReader)
        //
       if(isZNCFired){
         GetRawsData(0)->Fill(zncSignal);
-        GetRawsData(6)->Fill(zncSumQ);
-        GetRawsData(10)->Fill(zncpmC); 
+        GetRawsData(6)->Fill(zncSumQ, zncpmC);
+        GetRawsData(14)->Fill(zncSumQ); 
       }
       if(isZPCFired){
         GetRawsData(2)->Fill(zpcSignal);
-        GetRawsData(8)->Fill(zncSumQ);
-        GetRawsData(11)->Fill(zpcpmC); 
+        GetRawsData(8)->Fill(zpcSumQ, zpcpmC);
+        GetRawsData(15)->Fill(zpcSumQ); 
       }
       if(isZNAFired){ 
         GetRawsData(1)->Fill(znaSignal);
-        GetRawsData(7)->Fill(znaSumQ);
-        GetRawsData(12)->Fill(znapmC); 
+        GetRawsData(7)->Fill(znaSumQ, znapmC);
+        GetRawsData(16)->Fill(znaSumQ); 
       }
       if(isZPAFired){ 
         GetRawsData(3)->Fill(zpaSignal);
-        GetRawsData(9)->Fill(znaSumQ);
-        GetRawsData(13)->Fill(zpapmC); 
+        GetRawsData(9)->Fill(znaSumQ, zpapmC);
+        GetRawsData(17)->Fill(znaSumQ); 
       }
        
     } //IsADCDataWord && signal ADCs
@@ -620,7 +620,7 @@ void AliZDCQADataMakerRec::MakeESDs(AliESDEvent * esd)
      ||((beamType.CompareTo("PP"))==0) || ((beamType.CompareTo("P-P"))==0)){
     zdcESD->GetZNCentroidInpp(centr_ZNC, centr_ZNA);
   }
-  else if((beamType.CompareTo("A-A")) == 0){
+  else if((beamType.CompareTo("A-A")) == 0 || (beamType.CompareTo("Pb-Pb")) == 0){
     Float_t beamEne = esd->GetBeamEnergy();
     zdcESD->GetZNCentroidInPbPb(beamEne, centr_ZNC, centr_ZNA);
   }
index 02344cd..c0d2a87 100644 (file)
@@ -375,7 +375,7 @@ Bool_t AliZDCRawStream::Next()
   //
   fIsHeaderMapping = kFALSE; fIsChMapping = kFALSE; 
   fIsADCHeader = kFALSE; fIsADCDataWord = kFALSE; fIsADCEOB = kFALSE;
-  fIsADDChannel = kFALSE; fIsADDTDCHeader= kFALSE; fIsADDTDCdatum=kFALSE;
+  fIsZDCTDCdatum = kFALSE; fIsADDChannel = kFALSE; fIsADDTDCdatum=kFALSE;
   fIsUnderflow = kFALSE; fIsOverflow = kFALSE; fIsScalerWord = kFALSE;
   fSector[0] = fSector[1] = -1;
   for(Int_t kl=0; kl<4; kl++) fCPTInput[kl] = 0;
@@ -861,6 +861,7 @@ Bool_t AliZDCRawStream::Next()
       fIsADCDataWord=kFALSE; fIsScalerWord=kFALSE;
       if(((fBuffer & 0xf0000000)==0x00000000) && (((fBuffer & 0x08000000) >> 27) == 0)){ // TDC datum
         fADCChannel = (Int_t) ((fBuffer & 0x3e00000) >> 21);
+       fIsZDCTDCdatum = kTRUE;
        fZDCTDCdatum = (Int_t) (fBuffer & 0x1fffff);
         // Ch. debug
         //printf("  AliZDCRawStream -> ZDC TDC mod. %d ch. %d datum %d\n",fADCModule,fADCChannel,fZDCTDCdatum);
@@ -878,6 +879,7 @@ Bool_t AliZDCRawStream::Next()
       fIsADCDataWord=kFALSE; fIsScalerWord=kFALSE;
       if(((fBuffer & 0xf0000000)==0x00000000) && (((fBuffer & 0x08000000) >> 27) == 0)){ // TDC datum
         fADCChannel = (Int_t) ((fBuffer & 0x3e00000) >> 21);
+       fIsADDTDCdatum = kTRUE;
        fADDTDCdatum = (Int_t) (fBuffer & 0x1fffff);
         // Ch. debug
         //printf("  AliZDCRawStream -> ADD TDC mod. %d ch. %d datum %d\n",fADCModule,fADCChannel,fADDTDCdatum);
index cec1413..b531c1d 100644 (file)
@@ -29,14 +29,24 @@ ClassImp(AliZDCRecoParam)
 
 //_____________________________________________________________________________
 AliZDCRecoParam::AliZDCRecoParam() :
-  AliDetectorRecoParam()
+  AliDetectorRecoParam(),
+  fBeamEnergy(0)
 {
   //
   //Default constructor
 }
+
 //_____________________________________________________________________________
 AliZDCRecoParam::~AliZDCRecoParam()
 {
   // destructor
 
 }
+
+//_____________________________________________________________________________
+void AliZDCRecoParam::SetGlauberMCDist(Float_t beamEnergy)
+{
+  // Implemented in AliZDCRecoParamPbPb
+  fBeamEnergy = beamEnergy;
+  printf("Setting beam energy = %1.0f\n");
+}
index be9a2b0..a5b6d37 100644 (file)
@@ -20,19 +20,25 @@ class AliZDCRecoParam : public AliDetectorRecoParam {
  public:
   AliZDCRecoParam();
   virtual ~AliZDCRecoParam();
-
+  
+  virtual Float_t GetBeamEnergy() {return fBeamEnergy;}
   virtual TH1D*   GethNpartDist() const = 0;   
   virtual TH1D*   GethbDist()     const = 0;   
   virtual Float_t GetClkCenter()  const = 0;
       
   virtual void PrintParameters() const {;} 
   
+  virtual void SetGlauberMCDist(Float_t beamEnergy);
+  virtual void SetBeamEnergy(Float_t beamEnergy) {fBeamEnergy = beamEnergy;}
+  
  protected:
   
   AliZDCRecoParam(const AliZDCRecoParam&);
   AliZDCRecoParam& operator =(const AliZDCRecoParam&);
+  
+  Float_t fBeamEnergy;    // beam energy
    
- ClassDef(AliZDCRecoParam, 2)
+ ClassDef(AliZDCRecoParam, 3)
 
 };
 
index 838ded0..32192cf 100644 (file)
@@ -89,39 +89,78 @@ AliZDCRecoParamPbPb::~AliZDCRecoParamPbPb()
 }
 
 //_____________________________________________________________________________
-void AliZDCRecoParamPbPb::SetGlauberMCDist()
+void AliZDCRecoParamPbPb::SetGlauberMCDist(Float_t beamEnergy)
 {
   // Setting Glauber MC distributions
   // from histos file stored in $ALICE_ROOT/ZDC
-  TFile * fileHistos = TFile::Open("$ALICE_ROOT/ZDC/GlauberMCHistos.root");
+  TH1::AddDirectory(0);
+  TH2::AddDirectory(0);
+  
+  TFile *fileGlauberMC =  TFile::Open("$ALICE_ROOT/ZDC/GlauberMCDist.root");
+  if(!fileGlauberMC) {
+    AliError((" Opening file $ALICE_ROOT/ZDC/SpectatorSignal.root failed\n"));
+    return;
+  }
+  
+  Float_t sqrtS = 2*beamEnergy;
+  //
+  if(TMath::Abs(sqrtS-5500) < 100.){
+    AliDebug(2, " ZDC -> Looking for energy5500 in file $ALICE_ROOT/ZDC/GlauberMCDist.root");
+    fileGlauberMC->cd("energy5500");
+    fileGlauberMC->GetObject("energy5500/hNpartGlauber;1", fhNpartDist);
+    if(!fhNpartDist) AliError("  PROBLEM!!! Can't get Glauber MC Npart distribution from file GlauberMCDist.root\n");
+    fileGlauberMC->GetObject("energy5500/hbGlauber;1", fhbDist);
+    if(!fhbDist) AliError("  PROBLEM!!! Can't get Glauber MC b distribution from file GlauberMCDist.root\n");
+  }
+  else if(TMath::Abs(sqrtS-2760) < 100.){
+    AliDebug(2, " ZDC -> Looking for energy2760 in file $ALICE_ROOT/ZDC/GlauberMCDist.root");
+    fileGlauberMC->cd("energy2760");
+    fileGlauberMC->GetObject("energy2760/hNpartGlauber;1", fhNpartDist);
+    if(!fhNpartDist) AliError("  PROBLEM!!! Can't get Glauber MC Npart distribution from file GlauberMCDist.root\n");
+    fileGlauberMC->GetObject("energy2760/hbGlauber;1", fhbDist);
+    if(!fhbDist) AliError("  PROBLEM!!! Can't get Glauber MC b distribution from file GlauberMCDist.root\n");
+  }
+  else AliError(Form(" No AliZDCRecoParam provided for Pb-Pb @ sqrt(s) = %1.0f GeV\n", sqrtS));
   //
-  fhNpartDist = (TH1D*) fileHistos->Get("hDist");
   fhNpartDist->SetDirectory(0);
-  fhbDist = (TH1D*) fileHistos->Get("hbDist");
   fhbDist->SetDirectory(0);
   
-  fileHistos->Close();
+  fileGlauberMC->Close();
 }
 
 //_____________________________________________________________________________
-AliZDCRecoParamPbPb *AliZDCRecoParamPbPb::GetHighFluxParam() 
+AliZDCRecoParamPbPb *AliZDCRecoParamPbPb::GetHighFluxParam(Float_t beamEnergy) 
 {
   // Create high flux reco parameter
   TH1::AddDirectory(0);
   TH2::AddDirectory(0);
   //
-  TFile * fileHistos = TFile::Open("$ALICE_ROOT/ZDC/GlauberMCHistos.root");
-  fileHistos->cd();
-  //
-  TH1D* hDist = (TH1D*) fileHistos->Get("hDist");
-  hDist->SetDirectory(0);
+  TFile *fileGlauberMC =  TFile::Open("$ALICE_ROOT/ZDC/GlauberMCDist.root");
+  if(!fileGlauberMC) printf(" AliZDCRecoParamPbPb::GetHighFluxParam() ERROR opening file $ALICE_ROOT/ZDC/SpectatorSignal.root\n");
+  
+  TH1D *hNpartDist, *hbDist;
+  if(TMath::Abs(beamEnergy-5500)<100.){
+    fileGlauberMC->cd("energy5500");
+    fileGlauberMC->GetObject("energy5500/hNpartGlauber;1", hNpartDist);
+    if(!hNpartDist) printf("  AliZDCRecoParamPbPb::GetHighFluxParam() PROBLEM!!! Can't get Glauber MC Npart distribution from file GlauberMCDist.root\n");
+    fileGlauberMC->GetObject("energy5500/hbGlauber;1", hbDist);
+    if(!hbDist) printf("  AliZDCRecoParamPbPb::GetHighFluxParam() PROBLEM!!! Can't get Glauber MC b distribution from file GlauberMCDist.root\n");
+  }
+  else if(TMath::Abs(beamEnergy-2760)<100.){
+    fileGlauberMC->cd("energy2760");
+    fileGlauberMC->GetObject("energy2760/hNpartGlauber;1", hNpartDist);
+    if(!hNpartDist) printf("  PROBLEM!!! Can't get Glauber MC Npart distribution from file GlauberMCDist.root\n");
+    fileGlauberMC->GetObject("energy2760/hbGlauber;1", hbDist);
+    if(!hbDist) printf("  AliZDCRecoParamPbPb::GetHighFluxParam() PROBLEM!!! Can't get Glauber MC b distribution from file GlauberMCDist.root\n");
+  }
+  else printf(" No AliZDCRecoParam provided for Pb-Pb @ sqrt(s) = %1.0f GeV\n", beamEnergy);
   //
-  TH1D* hbDist = (TH1D*) fileHistos->Get("hbDist");
+  hNpartDist->SetDirectory(0);
   hbDist->SetDirectory(0);
-  
-  AliZDCRecoParamPbPb* zdcRecoParam = new AliZDCRecoParamPbPb(hDist, hbDist, 0.1);
+
+  AliZDCRecoParamPbPb* zdcRecoParam = new AliZDCRecoParamPbPb(hNpartDist, hbDist, 0.1);
   //
-  fileHistos->Close();
+  fileGlauberMC->Close();
              
   return zdcRecoParam;
   
index 33a6cea..2f0e50d 100644 (file)
@@ -26,16 +26,16 @@ class AliZDCRecoParamPbPb : public AliZDCRecoParam {
 
 
   // make reco parameters for A-A collisions
-  static AliZDCRecoParamPbPb *GetHighFluxParam();
+  static AliZDCRecoParamPbPb *GetHighFluxParam(Float_t beamEnergy);
   
   TH1D* GethNpartDist()  const {return fhNpartDist;} 
   TH1D* GethbDist()     const {return fhbDist;}
   Float_t GetClkCenter() const {return fClkCenter;}
+  
   void SetNpartDist(TH1D *hDist) {fhNpartDist = hDist;}    
   void SetbDist(TH1D *hbDist) {fhbDist = hbDist;}    
   void SetClkCenter(Float_t xValue) {fClkCenter = xValue;}    
-  void SetGlauberMCDist(); 
+  void SetGlauberMCDist(Float_t beamEnergy); 
     
   //void Print(Option_t *) const; 
   
@@ -43,9 +43,9 @@ class AliZDCRecoParamPbPb : public AliZDCRecoParam {
   
   // *** PARAMETERS FOR Pb-Pb COLLISIONS
   // --- Correlation E_ZDC vs. E_ZEM
-  TH1D *  fhNpartDist;  // Npart distribution from Glauber MC
-  TH1D *  fhbDist;     // b distribution from Glauber MC
-  Float_t fClkCenter;   // clock center: value of x-axis 
+  TH1D *  fhNpartDist;    // Npart distribution from Glauber MC
+  TH1D *  fhbDist;       // b distribution from Glauber MC
+  Float_t fClkCenter;     // clock center: value of x-axis 
  
  ClassDef(AliZDCRecoParamPbPb, 3)
 
index 81d5887..b40ce9f 100644 (file)
@@ -106,7 +106,7 @@ void AliZDCReconstructor::Init()
      ||((beamType.CompareTo("PP"))==0) || ((beamType.CompareTo("P-P"))==0)){
     fRecoMode=1;
   }
-  else if((beamType.CompareTo("A-A")) == 0){
+  else if((beamType.CompareTo("A-A")) == 0 || (beamType.CompareTo("AA")) == 0){
     fRecoMode=2;
   }
     
@@ -114,7 +114,8 @@ void AliZDCReconstructor::Init()
   if(fBeamEnergy<0.01) AliWarning(" Beam energy value missing -> E_beam = 0");
     
   if(fIsCalibrationMB==kFALSE)  
-    printf("\n\n ***** ZDC reconstruction initialized for %s @ %1.0f GeV *****\n\n",beamType.Data(), fBeamEnergy);
+    printf("\n\n ***** ZDC reconstruction initialized for %s @ %1.0f + %1.0f GeV *****\n\n",
+       beamType.Data(), fBeamEnergy, fBeamEnergy);
   
 }
 
@@ -924,9 +925,10 @@ void AliZDCReconstructor::ReconstructEventPbPb(TTree *clustersTree,
   
   if(fIsCalibrationMB == kFALSE){
     // ******  Reconstruction parameters ------------------ 
-    if (!fgRecoParam) fgRecoParam = const_cast<AliZDCRecoParam*>(GetRecoParam()); 
     if(!fgMBCalibData) fgMBCalibData = const_cast<AliZDCMBCalib*>(GetMBCalibData()); 
+    if(!fgRecoParam) fgRecoParam = const_cast<AliZDCRecoParam*>(GetRecoParam()); 
+    fgRecoParam->SetGlauberMCDist(fBeamEnergy);
+     
     TH2F *hZDCvsZEM  = fgMBCalibData->GethZDCvsZEM();
     TH2F *hZDCCvsZEM = fgMBCalibData->GethZDCCvsZEM();
     TH2F *hZDCAvsZEM = fgMBCalibData->GethZDCAvsZEM();
@@ -1310,35 +1312,3 @@ AliZDCMBCalib* AliZDCReconstructor::GetMBCalibData() const
 
   return calibdata;
 }
-
-//_____________________________________________________________________________
-AliZDCRecoParampp* AliZDCReconstructor::GetppRecoParamFromOCDB() const
-{
-
-  // Getting reconstruction parameters from OCDB
-
-  AliCDBEntry  *entry = AliCDBManager::Instance()->Get("ZDC/Calib/RecoParampp");
-  if(!entry) AliFatal("No RecoParam data found in OCDB!");  
-  
-  AliZDCRecoParampp *param = dynamic_cast<AliZDCRecoParampp*> (entry->GetObject());
-  if(!param)  AliFatal("No RecoParam object in OCDB entry!");
-  
-  return param;
-
-}
-
-//_____________________________________________________________________________
-AliZDCRecoParamPbPb* AliZDCReconstructor::GetPbPbRecoParamFromOCDB() const
-{
-
-  // Getting reconstruction parameters from OCDB
-
-  AliCDBEntry  *entry = AliCDBManager::Instance()->Get("ZDC/Calib/RecoParamPbPb");
-  if(!entry) AliFatal("No RecoParam data found in OCDB!");  
-  
-  AliZDCRecoParamPbPb *param = dynamic_cast<AliZDCRecoParamPbPb*> (entry->GetObject());
-  if(!param)  AliFatal("No RecoParam object in OCDB entry!");
-  
-  return param;
-
-}
index 180edfc..66a414f 100644 (file)
@@ -65,8 +65,6 @@ public:
   AliZDCEnCalib       *GetEnergyCalibData() const; 
   AliZDCTowerCalib    *GetTowerCalibData() const; 
   AliZDCMBCalib       *GetMBCalibData() const; 
-  AliZDCRecoParampp   *GetppRecoParamFromOCDB() const;  
-  AliZDCRecoParamPbPb *GetPbPbRecoParamFromOCDB() const;  
   
 private:
   AliZDCReconstructor(const AliZDCReconstructor&); //Not implemented
diff --git a/ZDC/GlauberMCDist.root b/ZDC/GlauberMCDist.root
new file mode 100644 (file)
index 0000000..ed5bcdc
Binary files /dev/null and b/ZDC/GlauberMCDist.root differ
diff --git a/ZDC/SpectatorSignal.root b/ZDC/SpectatorSignal.root
new file mode 100644 (file)
index 0000000..9ffbde1
Binary files /dev/null and b/ZDC/SpectatorSignal.root differ