]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Fixes
authorcholm <cholm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 25 Nov 2010 16:22:09 +0000 (16:22 +0000)
committercholm <cholm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 25 Nov 2010 16:22:09 +0000 (16:22 +0000)
PWG2/FORWARD/analysis2/AliFMDDensityCalculator.cxx
PWG2/FORWARD/analysis2/AliFMDDensityCalculator.h
PWG2/FORWARD/analysis2/AliForwardMultiplicity.cxx

index 93f62bdfc9b79a462f604b3aee7c033c48a9a859..5da0a2f443e71ee89d9a96f55097ede69e6d3b86 100644 (file)
@@ -16,14 +16,20 @@ ClassImp(AliFMDDensityCalculator)
 AliFMDDensityCalculator::AliFMDDensityCalculator()
   : TNamed(), 
     fRingHistos(),
-    fMultCut(0.3)
+    fMultCut(0.3),
+    fSumOfWeights(0),
+    fWeightedSum(0),
+    fCorrections(0)
 {}
 
 //____________________________________________________________________
 AliFMDDensityCalculator::AliFMDDensityCalculator(const char* title)
   : TNamed("fmdDensityCalculator", title), 
     fRingHistos(), 
-    fMultCut(0.3)
+    fMultCut(0.3),
+    fSumOfWeights(0),
+    fWeightedSum(0),
+    fCorrections(0)
 {
   fRingHistos.SetName(GetName());
   fRingHistos.Add(new RingHistos(1, 'I'));
@@ -31,6 +37,13 @@ AliFMDDensityCalculator::AliFMDDensityCalculator(const char* title)
   fRingHistos.Add(new RingHistos(2, 'O'));
   fRingHistos.Add(new RingHistos(3, 'I'));
   fRingHistos.Add(new RingHistos(3, 'O'));
+  fSumOfWeights = new TH1D("sumOfWeights", "Sum of Landau weights",
+                          200, 0, 20);
+  fWeightedSum  = new TH1D("weightedSum", "Weighted sum of Landau propability",
+                          200, 0, 20);
+  fCorrections  = new TH1D("corrections", "Distribution of corrections", 
+                          100, 0, 10);
+
 }
 
 //____________________________________________________________________
@@ -38,7 +51,10 @@ AliFMDDensityCalculator::AliFMDDensityCalculator(const
                                                 AliFMDDensityCalculator& o)
   : TNamed(o), 
     fRingHistos(), 
-    fMultCut(o.fMultCut)
+    fMultCut(o.fMultCut),
+    fSumOfWeights(o.fSumOfWeights),
+    fWeightedSum(o.fWeightedSum),
+    fCorrections(o.fCorrections)
 {
   TIter    next(&o.fRingHistos);
   TObject* obj = 0;
@@ -112,6 +128,7 @@ AliFMDDensityCalculator::Calculate(const AliESDFMD&        fmd,
          rh->fEvsN->Fill(mult,n);
 
          Float_t c = Correction(d,r,s,t,vtxbin,eta,lowFlux);
+         fCorrections->Fill(c);
          if (c > 0) n /= c;
          rh->fEvsM->Fill(mult,n);
 
@@ -155,6 +172,8 @@ AliFMDDensityCalculator::NParticles(Float_t  mult,
                  2*w2 * TMath::Landau(mult,mpv2,2*w,kTRUE) + 
                  3*w3 * TMath::Landau(mult,mpv3,3*w,kTRUE));
   
+  fWeightedSum->Fill(wsum);
+  fSumOfWeights->Fill(sum);
   return (sum > 0) ? wsum / sum : 1;
 }
 
@@ -236,6 +255,9 @@ AliFMDDensityCalculator::DefineOutput(TList* dir)
   TList* d = new TList;
   d->SetName(GetName());
   dir->Add(d);
+  d->Add(fWeightedSum);
+  d->Add(fSumOfWeights);
+  d->Add(fCorrections);
   TIter    next(&fRingHistos);
   RingHistos* o = 0;
   while ((o = static_cast<RingHistos*>(next()))) {
index 5c1058afe40433977ef1164e862c0aea41ef9025..e2ec51265982b20763c8f67a9811774e00beb55e 100644 (file)
@@ -5,6 +5,7 @@
 #include "AliForwardUtil.h"
 class AliESDFMD;
 class TH2D;
+class TH1D;
 
 /** 
  * This class calculates the inclusive charged particle density
@@ -185,6 +186,9 @@ protected:
 
   TList    fRingHistos;    // List of histogram containers
   Double_t fMultCut;       // Low cut on scaled energy loss
+  TH1D*    fSumOfWeights;
+  TH1D*    fWeightedSum;
+  TH1D*    fCorrections;
 
   ClassDef(AliFMDDensityCalculator,1); // Calculate Nch density 
 };
index 43595eec91a9953afeb5b5a9940f1f6a862b9084..566a494fddc14171b48a38cc3d470c153d292ddd 100644 (file)
@@ -220,7 +220,7 @@ AliForwardMultiplicity::UserExec(Option_t*)
   // Read trigger information from the ESD and store in AOD object
   UInt_t triggers = 0;
   if (!AliForwardUtil::ReadTriggers(esd, triggers, fHTriggers)) { 
-    if (am->GetDebugLevel() > 1
+    if (am->GetDebugLevel() > 2
       AliWarning("Failed to read triggers from ESD");
     return;
   }
@@ -232,19 +232,16 @@ AliForwardMultiplicity::UserExec(Option_t*)
   // Check if this is a high-flux event 
   const AliMultiplicity* testmult = esd->GetMultiplicity();
   if (!testmult) {
-    if (am->GetDebugLevel() > 1
+    if (am->GetDebugLevel() > 3
       AliWarning("No central multiplicity object found");
     return;
   }
   Bool_t lowFlux = testmult->GetNumberOfTracklets() < fLowFluxCut;
-  if (am->GetDebugLevel() > 1) 
-    AliInfo(Form("Event has %d SPD tracklets, cut is %d, this is a %s event",
-                testmult, fLowFluxCut, (lowFlux ? "low" : "high")));
 
   // Get the FMD ESD data 
   AliESDFMD* esdFMD = esd->GetFMDData();
   if (!esdFMD) { 
-    if (am->GetDebugLevel() > 1
+    if (am->GetDebugLevel() > 3
       AliWarning("No FMD data found in ESD");
     return;
   }
@@ -255,7 +252,7 @@ AliForwardMultiplicity::UserExec(Option_t*)
 
   fHEventsTr->Fill(vz);
   if (!vzOk) { 
-    if (am->GetDebugLevel() > 1
+    if (am->GetDebugLevel() > 3
       AliWarning("Failed to read vertex from ESD");
     return;
   }
@@ -265,13 +262,17 @@ AliForwardMultiplicity::UserExec(Option_t*)
   Int_t ivz = fHEventsTr->GetXaxis()->FindBin(vz)-1;
   fAODFMD.SetIpZ(vz);
   if (ivz < 0 || ivz >= fHEventsTr->GetXaxis()->GetNbins()) { 
-    if (am->GetDebugLevel() > 1
+    if (am->GetDebugLevel() > 3
       AliWarning(Form("Vertex @ %f outside of range [%f,%f]", 
                      vz, fHEventsTr->GetXaxis()->GetXmin(), 
                      fHEventsTr->GetXaxis()->GetXmax()));
     return;
   }
-  if (am->GetDebugLevel() > 2) 
+  if (am->GetDebugLevel() > 1) 
+    AliInfo(Form("Event has %d SPD tracklets, cut is %d, this is a %s event",
+                testmult->GetNumberOfTracklets(), 
+                fLowFluxCut, (lowFlux ? "low" : "high")));
+  if (am->GetDebugLevel() > 1) 
     AliInfo(Form("Events vertex @ %f (bin %d), in range", vz, ivz));