- adding total Et and Et/ZDC correlation histograms for PHOS and EMCAL
authorodjuvsla <odjuvsla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 3 Nov 2010 11:02:44 +0000 (11:02 +0000)
committerodjuvsla <odjuvsla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 3 Nov 2010 11:02:44 +0000 (11:02 +0000)
HLT/global/physics/AliHLTMultiplicityCorrelations.cxx
HLT/global/physics/AliHLTMultiplicityCorrelations.h
HLT/global/physics/AliHLTMultiplicityCorrelationsComponent.cxx
HLT/global/physics/AliHLTMultiplicityCorrelationsComponent.h

index d820823..44bf349 100644 (file)
@@ -61,7 +61,10 @@ AliHLTMultiplicityCorrelations::AliHLTMultiplicityCorrelations() :
   fTpcBinning(200),fTpcBinningMin(0.),fTpcBinningMax(8000.),
   fZdcBinning(280),fZdcBinningMin(0.),fZdcBinningMax(140.),
   fZemBinning(100),fZemBinningMin(0.),fZemBinningMax(5.),
-  fZnpBinning(200),fZnpBinningMin(0.),fZnpBinningMax(100.) {
+  fZnpBinning(200),fZnpBinningMin(0.),fZnpBinningMax(100.),
+  fProcessPhos(true), fProcessEmcal(true),
+  fPhosTotalEt(0.0), fEmcalTotalEt(0.0),
+  fCaloBinning(100),fCaloBinningMin(0.),fCaloBinningMax(100.){
   // see header file for class documentation
   // or
   // refer to README to build package
@@ -121,7 +124,10 @@ Int_t AliHLTMultiplicityCorrelations::ProcessEvent( AliESDEvent *esd ) {
   // -- TPC .. To be done before the others
   if (fESDEvent->GetNumberOfTracks() > 0)
     iResult = ProcessTPC();
-
+  
+  // -- CALO, process with or without clusters, we want the zero-bin
+  iResult = ProcessCALO();
+  
   // -- VZERO
   if (fESDVZERO)
     iResult = ProcessVZERO();
@@ -188,6 +194,7 @@ Int_t AliHLTMultiplicityCorrelations::SetupHistograms() {
   iResult = SetupVZERO();
   iResult = SetupZDC();
   iResult = SetupTPC();
+  iResult = SetupCALO();
   iResult = SetupCorrelations();
 
   return iResult;
@@ -537,12 +544,47 @@ Int_t AliHLTMultiplicityCorrelations::SetupCorrelations() {
                          fVzeroBinning,fVzeroBinningMin,fVzeroBinningMax, fTpcBinning,fTpcBinningMin,fTpcBinningMax));
 
   // ----------------------------------------------------
+  //   ZDC vs CALO
+  // ----------------------------------------------------
+  fHistList->Add(new TH2F("fCorrZdcTotEvsPhosTotEt", 
+                         "Total E_{ZDC} vs Total E_{T} in PHOS C;Total E_{ZDC} (TeV);E_{T} (GeV)", 
+                         fZdcBinning,fZdcBinningMin,fZdcBinningMax, fCaloBinning,fCaloBinningMin,fCaloBinningMax));
+  fHistList->Add(new TH2F("fCorrZdcTotEvsEmcalTotEt", 
+                         "Total E_{ZDC} vs Total E_{T} in EMCAL C;Total E_{ZDC} (TeV);E_{T} (GeV)", 
+                         fZdcBinning,fZdcBinningMin,fZdcBinningMax, fCaloBinning,fCaloBinningMin,fCaloBinningMax));
+  fHistList->Add(new TH2F("fCorrZdcTotEvsTotEt", 
+                         "Total E_{ZDC} vs Total E_{T} in calorimeters C;Total E_{ZDC} (TeV);E_{T} (GeV)", 
+                         fZdcBinning,fZdcBinningMin,fZdcBinningMax, fCaloBinning,fCaloBinningMin,fCaloBinningMax));
+                         
+  // ----------------------------------------------------
   //  
   // ----------------------------------------------------
 
   return 0;
 }
 
+//##################################################################################
+Int_t AliHLTMultiplicityCorrelations::SetupCALO()
+{
+  // Calo histos
+  if(fProcessPhos)
+  {
+    fHistList->Add(new TH1F("fPhosEt",  "Total E_{T} in PHOS:E (GeV)",   
+                           fCaloBinning,fCaloBinningMin,fCaloBinningMax));
+  }
+  if(fProcessEmcal)
+  {
+    fHistList->Add(new TH1F("fEmcalEt",  "Total E_{T} in EMCAL:E (GeV)",   
+                           fCaloBinning,fCaloBinningMin,fCaloBinningMax));
+  }
+  if(fProcessPhos || fProcessEmcal)
+  {
+    fHistList->Add(new TH1F("fTotalEt",  "Total E_{T} in calorimeters:E (GeV)",   
+                           fCaloBinning,fCaloBinningMin,fCaloBinningMax));
+  }
+  return 0;
+}
+
 /*
  * ---------------------------------------------------------------------------------
  *                               Process - private
@@ -806,5 +848,51 @@ Int_t AliHLTMultiplicityCorrelations::ProcessZDC() {
     (static_cast<TH2F*>(fHistList->FindObject("fCorrZdcbVzeroFC")))->Fill(fESDZDC->GetImpactParamSideC(), fVzeroMultFlaggedC);
   }
 
+  // -- ZDC - CALO correlations
+  if (fProcessPhos || fProcessEmcal) {
+    (static_cast<TH2F*>(fHistList->FindObject("fCorrZdcTotEvsTotEt")))->Fill(zdcE, fPhosTotalEt + fEmcalTotalEt);
+    if(fProcessPhos)
+    {
+      (static_cast<TH2F*>(fHistList->FindObject("fCorrZdcTotEvsPhosTotEt")))->Fill(zdcE, fPhosTotalEt);
+    }
+    if(fProcessEmcal)
+    {
+      (static_cast<TH2F*>(fHistList->FindObject("fCorrZdcTotEvsEmcalTotEt")))->Fill(zdcE, fEmcalTotalEt);
+    }
+  }
+
   return iResult;
 }
+
+//##################################################################################
+Int_t AliHLTMultiplicityCorrelations::ProcessCALO()
+{
+  // CALO 
+  
+  TH1F* hPhosEt = static_cast<TH1F*>(fHistList->FindObject("fPhosEt")); // PHOS Tot E_T
+  TH1F* hEmcalEt = static_cast<TH1F*>(fHistList->FindObject("fEmcalEt")); // EMCAL Tot E_T
+  TH1F* hTotalEt = static_cast<TH1F*>(fHistList->FindObject("fTotalEt")); // CALO Tot E_T
+  
+  fPhosTotalEt = 0;
+  fEmcalTotalEt = 0;
+  
+  for(Int_t cl = 0; cl < fESDEvent->GetNumberOfCaloClusters(); cl++)
+  {
+    
+    AliESDCaloCluster *cluster = fESDEvent->GetCaloCluster(cl);
+    if(cluster->IsPHOS() && fProcessPhos)
+    {
+      fPhosTotalEt += cluster->E();
+    }
+    if(cluster->IsEMCAL() && fProcessEmcal)
+    {
+      fEmcalTotalEt += cluster->E();
+    }
+  }
+
+  if(hPhosEt)hPhosEt->Fill(fPhosTotalEt);
+  if(hEmcalEt)hEmcalEt->Fill(fEmcalTotalEt);
+  if(hTotalEt)hTotalEt->Fill(fPhosTotalEt + fEmcalTotalEt);
+  
+  return 0;
+}
index 4535c92..06bf097 100644 (file)
@@ -96,6 +96,11 @@ public:
     fZnpBinning = i; fZnpBinningMin = f1; fZnpBinningMax = f2;
   }
 
+  /** Set Binning of CALO */
+  void SetBinningCalo(Int_t i=1, Float_t f1=0., Float_t f2=1.) {
+    fCaloBinning = i; fCaloBinningMin = f1; fCaloBinningMax = f2;
+  }
+
   /*
    * ---------------------------------------------------------------------------------
    *                                 Getter - public
@@ -150,6 +155,9 @@ public:
 
   /** Setup correlation histograms */
   Int_t SetupCorrelations();
+  
+  /** Setup CALO histograms */
+  Int_t SetupCALO();
 
   /*
    * ---------------------------------------------------------------------------------
@@ -165,6 +173,11 @@ public:
 
   /** Process current event - ZDC and correlations */
   Int_t ProcessZDC();
+  
+  /** Process current event - CALO */
+  Int_t ProcessCALO();
+  
+  
 
   /*
    * ---------------------------------------------------------------------------------
@@ -246,6 +259,19 @@ public:
   Float_t fZnpBinningMin;
   Float_t fZnpBinningMax;
   
+  /** CALO flags */
+  Bool_t fProcessPhos; 
+  Bool_t fProcessEmcal;
+  
+  /** CALO variables */
+  Float_t fPhosTotalEt;
+  Float_t fEmcalTotalEt;
+  
+  /** Binnning CALO */
+  Int_t   fCaloBinning;
+  Float_t fCaloBinningMin;
+  Float_t fCaloBinningMax;
+  
   ClassDef(AliHLTMultiplicityCorrelations, 1);
 };
 #endif
index eb9b52a..c9f7d83 100644 (file)
@@ -425,6 +425,21 @@ Int_t AliHLTMultiplicityCorrelationsComponent::ScanConfigurationArgument(Int_t a
     fCorrObj->SetBinningZem(binning, min, max);
     return 4;
   }
+  // binningZem
+  if (argument.CompareTo("-binningCalo")==0) {
+    if (++ii>=argc) return -EPROTO;
+    argument=argv[ii];
+    Int_t binning = argument.Atoi();
+    if (++ii>=argc) return -EPROTO;
+    argument=argv[ii];
+    Float_t min = argument.Atof();
+    if (++ii>=argc) return -EPROTO;
+    argument=argv[ii];
+    Float_t max = argument.Atof();
+
+    fCorrObj->SetBinningCalo(binning, min, max);
+    return 4;
+  }
 
   // unknown argument
   return -EINVAL;
index 0428cb6..e93560c 100644 (file)
@@ -70,6 +70,8 @@ class AliHLTMultiplicityCorrelations;
  *       bins (Int_t), minBin (Float_t), maxBin (Float_t)
  * \li -binningZem    <i> bins min max  </i> <br>
  *       bins (Int_t), minBin (Float_t), maxBin (Float_t)
+ * \li -binningCalo    <i> bins min max  </i> <br>
+ *       bins (Int_t), minBin (Float_t), maxBin (Float_t)
  *
  * <h2>Default CDB entries:</h2>
  * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->