Next round of upgrades and cleanups of code. The code is now more streamlined and...
authorhdalsgaa <hdalsgaa@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 6 Aug 2009 15:07:00 +0000 (15:07 +0000)
committerhdalsgaa <hdalsgaa@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 6 Aug 2009 15:07:00 +0000 (15:07 +0000)
14 files changed:
FMD/analysis/AliFMDAnaParameters.cxx
FMD/analysis/AliFMDAnaParameters.h
FMD/analysis/AliFMDAnalysisTaskBackgroundCorrection.cxx
FMD/analysis/AliFMDAnalysisTaskBackgroundCorrection.h
FMD/analysis/AliFMDAnalysisTaskCollector.cxx
FMD/analysis/AliFMDAnalysisTaskCollector.h
FMD/analysis/AliFMDAnalysisTaskDensity.cxx
FMD/analysis/AliFMDAnalysisTaskDensity.h
FMD/analysis/AliFMDAnalysisTaskDndeta.cxx
FMD/analysis/AliFMDAnalysisTaskDndeta.h
FMD/analysis/AliFMDAnalysisTaskGenerateCorrection.cxx
FMD/analysis/AliFMDAnalysisTaskGenerateCorrection.h
FMD/analysis/AliFMDAnalysisTaskSE.cxx
FMD/analysis/AliFMDAnalysisTaskSharing.cxx

index a1cd529..fcaedcb 100644 (file)
@@ -72,7 +72,7 @@ AliFMDAnaParameters::AliFMDAnaParameters() :
   fEventSelectionEffPath("$ALICE_ROOT/FMD/Correction/EventSelectionEfficiency/eventselectionefficiency.root"),
   fProcessPrimary(kFALSE),
   fProcessHits(kFALSE),
-  fTrigger(AliPWG0Helper::kMB1)
+  fTrigger(kMB1)
 {
   
   
@@ -430,13 +430,36 @@ void AliFMDAnaParameters::GetVertex(AliESDEvent* esd, Double_t* vertexXYZ)
   return;
   
 }
+
 //____________________________________________________________________
-Bool_t AliFMDAnaParameters::IsEventTriggered(AliESDEvent* esd) { 
+Bool_t AliFMDAnaParameters::IsEventTriggered(AliESDEvent *esd) {
+  // check if the event was triggered
+  ULong64_t triggerMask = esd->GetTriggerMask();
+  
+  // definitions from p-p.cfg
+  ULong64_t spdFO = (1 << 14);
+  ULong64_t v0left = (1 << 11);
+  ULong64_t v0right = (1 << 12);
+  
+  switch (fTrigger) {
+  case kMB1: {
+    if (triggerMask & spdFO || ((triggerMask & v0left) || (triggerMask & v0right)))
+      return kTRUE;
+    break;
+  }
+  case kMB2: {
+    if (triggerMask & spdFO && ((triggerMask & v0left) || (triggerMask & v0right)))
+      return kTRUE;
+    break;
+  }
+  case kSPDFASTOR: {
+    if (triggerMask & spdFO)
+      return kTRUE;
+    break;
+  }
+  }//switch
 
-  
-  Bool_t trigger = AliPWG0Helper::IsEventTriggered(esd, AliPWG0Helper::kMB1);
-  //  Bool_t trigger = AliPWG0Helper::IsEventTriggered(esd, fTrigger);
-  return trigger;
+  return kFALSE;
 }
 
 //____________________________________________________________________
index 79885e1..3317907 100644 (file)
@@ -40,7 +40,7 @@
 #include "AliFMDAnaCalibEventSelectionEfficiency.h"
 #include <TVector2.h>
 #include <TString.h>
-#include "AliPWG0Helper.h"
+//#include "AliPWG0Helper.h"
 class AliESDEvent;
 
 /**
@@ -57,6 +57,8 @@ public:
     kEventSelectionEfficiency     = 0x4  // Event Selection Efficiency
   };
   
+  enum Trigger { kMB1 = 0, kMB2, kSPDFASTOR };
+  
   /** Singleton access
       @return  single to */
   static AliFMDAnaParameters* Instance();
@@ -93,7 +95,7 @@ public:
   Bool_t   GetProcessPrimary() {return fProcessPrimary;}
   Bool_t   GetProcessHits() {return fProcessHits;}
   void     GetVertex(AliESDEvent* esd, Double_t* vertexXYZ);
-  void     SetTriggerDefinition(AliPWG0Helper::Trigger trigger) {fTrigger = trigger;}
+  void     SetTriggerDefinition(Trigger trigger) {fTrigger = trigger;}
   Int_t    SetTriggerDefinition() {return fTrigger;}
   Bool_t   IsEventTriggered(AliESDEvent* esd);
 protected:
@@ -110,6 +112,7 @@ protected:
       fCorner2(o.fCorner2),
       fEnergyPath(o.fEnergyPath),
       fBackgroundPath(o.fBackgroundPath),
+      fEventSelectionEffPath(o.fEventSelectionEffPath),
       fProcessPrimary(o.fProcessPrimary),
       fProcessHits(o.fProcessHits),
       fTrigger(o.fTrigger)
@@ -150,7 +153,8 @@ protected:
   TString  fEventSelectionEffPath;
   Bool_t   fProcessPrimary;
   Bool_t   fProcessHits; 
-  AliPWG0Helper::Trigger  fTrigger;
+  Trigger  fTrigger;
+  
   ClassDef(AliFMDAnaParameters,0) // Manager of parameters
 };
 
index 285f2fc..14a9fb7 100644 (file)
@@ -29,8 +29,6 @@ AliFMDAnalysisTaskBackgroundCorrection::AliFMDAnalysisTaskBackgroundCorrection()
   fOutputList(0),
   fInputList(0),
   fHitList(0),
-  fArray(0),
-  fInputArray(0),
   fVertexString(0x0),
   fNevents(),
   fStandalone(kTRUE),
@@ -39,7 +37,7 @@ AliFMDAnalysisTaskBackgroundCorrection::AliFMDAnalysisTaskBackgroundCorrection()
   // Default constructor
   DefineInput (0, TList::Class());
   DefineOutput(0, TList::Class());
-  DefineOutput(1, TObjString::Class());
+
 }
 //_____________________________________________________________________
 AliFMDAnalysisTaskBackgroundCorrection::AliFMDAnalysisTaskBackgroundCorrection(const char* name, Bool_t SE):
@@ -48,8 +46,6 @@ AliFMDAnalysisTaskBackgroundCorrection::AliFMDAnalysisTaskBackgroundCorrection(c
     fOutputList(0),
     fInputList(0),
     fHitList(0),
-    fArray(),
-    fInputArray(0),
     fVertexString(0x0),
     fNevents(),
     fStandalone(kTRUE),
@@ -59,7 +55,6 @@ AliFMDAnalysisTaskBackgroundCorrection::AliFMDAnalysisTaskBackgroundCorrection(c
   if(fStandalone) {
     DefineInput (0, TList::Class());
     DefineOutput(0, TList::Class());
-    DefineOutput(1, TObjString::Class());
   }
 }
 //_____________________________________________________________________
@@ -67,9 +62,6 @@ void AliFMDAnalysisTaskBackgroundCorrection::CreateOutputObjects()
 {
   AliFMDAnaParameters* pars = AliFMDAnaParameters::Instance();
   
-  fArray.SetName("FMD");
-  fArray.SetOwner();
-  
   if(!fOutputList)
     fOutputList = new TList();
   fOutputList->SetName("BackgroundCorrectedPerEvent");
@@ -77,6 +69,12 @@ void AliFMDAnalysisTaskBackgroundCorrection::CreateOutputObjects()
     fHitList = new TList();
   fHitList->SetName("HitsList");
   
+  //if(fStandalone) {
+  fOutputVertexString = new TObjString();
+  // }
+  fOutputList->Add(fOutputVertexString);
+  
+  
   
   TH2F* hMult = 0;
   TH2F* hHits = 0;
@@ -84,18 +82,12 @@ void AliFMDAnalysisTaskBackgroundCorrection::CreateOutputObjects()
   
   for(Int_t det =1; det<=3;det++)
     {
-      TObjArray* detArray = new TObjArray();
-      detArray->SetName(Form("FMD%d",det));
-      fArray.AddAtAndExpand(detArray,det);
       Int_t nRings = (det==1 ? 1 : 2);
       for(Int_t ring = 0;ring<nRings;ring++)
        {
          Char_t ringChar = (ring == 0 ? 'I' : 'O');
          Int_t  nSec     = (ring == 0 ? 20 : 40);
          
-         TObjArray* vtxArray = new TObjArray();
-         vtxArray->SetName(Form("FMD%d%c",det,ringChar));
-         detArray->AddAtAndExpand(vtxArray,ring);
          for(Int_t i = 0; i< nVtxbins; i++) {
            TH2F* hBg = pars->GetBackgroundCorrection(det, ringChar, i);
            hMult  = new TH2F(Form("mult_FMD%d%c_vtxbin%d",det,ringChar,i),Form("mult_FMD%d%c_vtxbin%d",det,ringChar,i),
@@ -114,15 +106,10 @@ void AliFMDAnalysisTaskBackgroundCorrection::CreateOutputObjects()
            hHits->Sumw2();
            fHitList->Add(hHits);
            fOutputList->Add(hHits);
-           vtxArray->AddAtAndExpand(hMult,i);
            
          }
        } 
     }
-  if(fStandalone) {
-    fOutputVertexString = new TObjString();
-  }
-  fOutputList->Add(fOutputVertexString);
   
   
   
@@ -140,24 +127,18 @@ void AliFMDAnalysisTaskBackgroundCorrection::Exec(Option_t */*option*/)
 {
   AliFMDAnaParameters* pars = AliFMDAnaParameters::Instance();
   
-  fInputArray   = (TObjArray*)fInputList->At(0);
-  fVertexString = (TObjString*)fInputList->At(1);
-  
-  
+  fVertexString = (TObjString*)fInputList->At(0);
+   
   Int_t vtxbin   = fVertexString->GetString().Atoi();
   fOutputVertexString->SetString(Form("%d",vtxbin));
   
-  //fNevents.operator[](vtxbin)++;
   fNevents.Fill(vtxbin);
-  
   //Reset everything
   for(UShort_t det=1;det<=3;det++) {
-    TObjArray* detArray = (TObjArray*)fArray.At(det);
     Int_t nRings = (det==1 ? 1 : 2);
     for (UShort_t ir = 0; ir < nRings; ir++) {
-      TObjArray* vtxArray = (TObjArray*)detArray->At(ir);
-      
-      TH2F* hMult   = (TH2F*)vtxArray->At(vtxbin); 
+      Char_t ringChar = (ir == 0 ? 'I' : 'O');
+      TH2F* hMult = (TH2F*)fOutputList->FindObject(Form("mult_FMD%d%c_vtxbin%d",det,ringChar,vtxbin));
       hMult->Reset();
     }
     
@@ -166,21 +147,19 @@ void AliFMDAnalysisTaskBackgroundCorrection::Exec(Option_t */*option*/)
   
   
   for(UShort_t det=1;det<=3;det++) {
-    TObjArray* detInputArray = (TObjArray*)fInputArray->At(det);
-    TObjArray* detArray = (TObjArray*)fArray.At(det);
+   
     Int_t nRings = (det==1 ? 1 : 2);
     for (UShort_t ir = 0; ir < nRings; ir++) {
       Char_t ringChar = (ir == 0 ? 'I' : 'O');
-      TObjArray* vtxInputArray = (TObjArray*)detInputArray->At(ir);
-      TObjArray* vtxArray = (TObjArray*)detArray->At(ir);
-      TH2F* hMultTotal = (TH2F*)vtxArray->At(vtxbin);
-      TH2F* hMultInput = (TH2F*)vtxInputArray->At(vtxbin);
+   
+      TH2F* hMultTotal = (TH2F*)fOutputList->FindObject(Form("mult_FMD%d%c_vtxbin%d",det,ringChar,vtxbin));
+    
+      TH2F* hMultInput = (TH2F*)fInputList->FindObject(Form("FMD%d%c_vtxbin%d",det,ringChar,vtxbin));
       TH2F* hHits      = (TH2F*)fOutputList->FindObject(Form("hits_FMD%d%c_vtxbin%d",det,ringChar,vtxbin));
       
       hHits->Add(hMultInput);
       TH2F* hBg        = pars->GetBackgroundCorrection(det, ringChar, vtxbin);
       
-      //TH2F* hTmp       = (TH2F*)hMultInput->Clone("hMult_from_event");
       hMultTotal->Add(hMultInput);
       
       hMultTotal->Divide(hBg);//,"B");
@@ -199,40 +178,17 @@ void AliFMDAnalysisTaskBackgroundCorrection::Exec(Option_t */*option*/)
          hTmp->SetBinContent(i,j,multcor);
        }
        }*/
-      
-      
-      
-      // delete hTmp;
-      
     }
   }
   if(fStandalone) {
     PostData(0, fOutputList); 
-    PostData(1, fOutputVertexString);
   }
   
 }
 //_____________________________________________________________________
 void AliFMDAnalysisTaskBackgroundCorrection::Terminate(Option_t */*option*/) {
   
-  /*
-  AliFMDAnaParameters* pars = AliFMDAnaParameters::Instance();
   
-  Int_t nVtxbins = pars->GetNvtxBins();
-  
-  for(UShort_t det=1;det<=3;det++) {
-    TObjArray* detArray = (TObjArray*)fArray.At(det);
-    Int_t nRings = (det==1 ? 1 : 2);
-    for (UShort_t ir = 0; ir < nRings; ir++) {
-      TObjArray* vtxArray = (TObjArray*)detArray->At(ir);
-      for(Int_t i =0; i<nVtxbins; i++) {
-       TH2F* hMultTotal = (TH2F*)vtxArray->At(i);
-       if(fNevents.At(i))
-         hMultTotal->Scale(1/(Float_t)fNevents.At(i));
-      }
-    }
-  }
-  */
 }
 //_____________________________________________________________________
 //
index f70e2b5..20a01d7 100644 (file)
@@ -28,8 +28,6 @@ class AliFMDAnalysisTaskBackgroundCorrection : public AliAnalysisTask
       fOutputList(0),
       fInputList(0),
       fHitList(0),
-      fArray(o.fArray),
-      fInputArray(o.fInputArray),
       fVertexString(o.fVertexString),
       fNevents(o.fNevents),
       fStandalone(o.fStandalone), 
@@ -53,8 +51,6 @@ class AliFMDAnalysisTaskBackgroundCorrection : public AliAnalysisTask
     TList*        fOutputList;
     TList*        fInputList;
     TList*        fHitList;
-    TObjArray     fArray;
-    TObjArray*    fInputArray;
     TObjString*   fVertexString;
     TH1I          fNevents;
     Bool_t        fStandalone;
index 3598dd8..1317a71 100644 (file)
@@ -5,6 +5,7 @@
 #include <TChain.h>
 #include <TFile.h>
 #include <TList.h>
+#include <TMath.h>
 #include <iostream>
 
 #include "AliFMDAnalysisTaskCollector.h"
 #include "AliESDVertex.h"
 #include "AliFMDAnaParameters.h"
 //#include "AliFMDGeometry.h"
+
+
 ClassImp(AliFMDAnalysisTaskCollector)
 
+//____________________________________________________________________
+Double_t  AliFMDAnalysisTaskCollector::TripleLandau(Double_t *x, Double_t *par) {
+  
+  Double_t energy        = x[0];
+  Double_t constant = par[0];
+  Double_t mpv      = par[1];
+  Double_t sigma    = par[2];
+  Double_t alpha    = par[3];
+  Double_t beta     = par[4];
+  Double_t f = constant*(TMath::Landau(energy,mpv,sigma,kTRUE)+
+                        alpha*TMath::Landau(energy,2*mpv+2*sigma*TMath::Log(2),2*sigma,kTRUE)+
+                        beta*TMath::Landau(energy,3*mpv+3*sigma*TMath::Log(3),3*sigma,kTRUE) );
+  
+  return f;
+}
+//____________________________________________________________________
 
 AliFMDAnalysisTaskCollector::AliFMDAnalysisTaskCollector()
 : fDebug(0),
-  fChain(0x0),
-  fESD(0x0),
   fOutputList(0),
   fArray(0),
-  fEdistHist(0),
   fZvtxDist(0)
 {
   // Default constructor
-  DefineInput (0, TChain::Class());
-  DefineOutput(0, TList::Class());
+  
 }
 //____________________________________________________________________
 AliFMDAnalysisTaskCollector::AliFMDAnalysisTaskCollector(const char* name):
-    AliAnalysisTask(name, "AnalysisTaskFMD"),
+    AliAnalysisTaskSE(name),
     fDebug(0),
-    fChain(0x0),
-    fESD(0x0),
     fOutputList(0),
     fArray(0),
-    fEdistHist(0),
     fZvtxDist(0)
 {
   // Default constructor
-  DefineInput (0, TChain::Class());
-  DefineOutput(0, TList::Class());
+  
+  DefineOutput(1, TList::Class());
 }
 //____________________________________________________________________
-void AliFMDAnalysisTaskCollector::CreateOutputObjects()
+void AliFMDAnalysisTaskCollector::UserCreateOutputObjects()
 {
   // Create the output container
   printf("AnalysisTaskFMD::CreateOutPutData() \n");
@@ -86,52 +100,39 @@ void AliFMDAnalysisTaskCollector::CreateOutputObjects()
   
   fZvtxDist  = new TH1F("ZvtxDist","Vertex distribution",100,-30,30);
   fZvtxDist->SetXTitle("z vertex");
-  //fOutputList->Add(fArray);
   fOutputList->Add(fZvtxDist);
 }
-//____________________________________________________________________
-void AliFMDAnalysisTaskCollector::Init()
-{
-  // Initialization
-  printf("AnalysisTaskFMD::Init() \n");
-  
 
-}
 //____________________________________________________________________
-void AliFMDAnalysisTaskCollector::ConnectInputData(Option_t */*option*/)
+void AliFMDAnalysisTaskCollector::UserExec(Option_t */*option*/)
 {
-  fChain = (TChain*)GetInputData(0);
-  fESD = new AliESDEvent();
-  fESD->ReadFromTree(fChain);
   
-}
-//____________________________________________________________________
-void AliFMDAnalysisTaskCollector::Exec(Option_t */*option*/)
-{
-  AliESD* old = fESD->GetAliESDOld();
+  AliESDEvent* esd = (AliESDEvent*)InputEvent();
+  AliESD* old = esd->GetAliESDOld();
   if (old) {
-    fESD->CopyFromOldESD();
+    esd->CopyFromOldESD();
   }
   AliFMDAnaParameters* pars = AliFMDAnaParameters::Instance();
   
+  Bool_t trigger = pars->IsEventTriggered(esd);
+  if(!trigger)
+    return;
   Double_t vertex[3];
   
-  GetVertex(vertex);
-  //if(vertex[0] == 0 && vertex[1] == 0 && vertex[2] == 0)
-  //  return;
+  pars->GetVertex(esd,vertex);
+  if(vertex[0] == 0 && vertex[1] == 0 && vertex[2] == 0)
+    return;
+  
   fZvtxDist->Fill(vertex[2]);
   
   if(TMath::Abs(vertex[2]) > pars->GetVtxCutZ())
     return;
   
-  AliESDFMD* fmd = fESD->GetFMDData();
+  AliESDFMD* fmd = esd->GetFMDData();
   if (!fmd) return;
   
-  
-  
   for(UShort_t det=1;det<=3;det++) {
-    
-    
+      
     Int_t nRings = (det==1 ? 1 : 2);
     for (UShort_t ir = 0; ir < nRings; ir++) {
   
@@ -146,19 +147,9 @@ void AliFMDAnalysisTaskCollector::Exec(Option_t */*option*/)
          
          Float_t mult = fmd->Multiplicity(det,ring,sec,strip);
          if(mult == AliESDFMD::kInvalidMult || mult == 0) continue;
-         //AliFMDGeometry* geo = AliFMDGeometry::Instance();
-  
-         //  Double_t x,y,z;
-         //geo->Detector2XYZ(det,ring,sec,strip,x,y,z);
          
-         // Double_t r = TMath::Sqrt(x*x+y*y);
-         
-         // Double_t z_real      = z-vertex[2];
-         // Double_t theta       = TMath::ATan2(r,z_real);
-         // std::cout<<"From EtaFromStrip "<<theta<<std::endl;
-         //Double_t eta         =  -1*TMath::Log(TMath::Tan(0.5*theta));
          Float_t eta = pars->GetEtaFromStrip(det,ring,sec,strip,vertex[2]);
-         //Float_t eta = fmd->Eta(det,ring,sec,strip);
+         
          Int_t nEta = hBg->GetXaxis()->FindBin(eta);
          
          TObjArray* etaArray = (TObjArray*)fArray->At(nEta);
@@ -172,53 +163,82 @@ void AliFMDAnalysisTaskCollector::Exec(Option_t */*option*/)
     }
   }
   
-  PostData(0, fOutputList); 
+  PostData(1, fOutputList); 
   
 }
+
 //____________________________________________________________________
-void AliFMDAnalysisTaskCollector::Terminate(Option_t */*option*/)
-{
-  /*
-  for(UShort_t det=1;det<=3;det++) {
-    TObjArray* detArray = (TObjArray*)fArray->At(det);
-    Int_t nRings = (det==1 ? 1 : 2);
-    for (UShort_t ir = 0; ir < nRings; ir++) {
-      TH1F* hEdist = (TH1F*)detArray->At(ir);
-      hEdist->SetAxisRange(0.4,hEdist->GetXaxis()->GetXmax());
-      Float_t max = hEdist->GetBinCenter(hEdist->GetMaximumBin());
-      hEdist->Fit("landau","","",max-0.1,2*max);
+void AliFMDAnalysisTaskCollector::ReadFromFile(const Char_t* filename, Bool_t store, Int_t speciesOption)  {
+
+  //speciesOption:
+  //0: p+p Landau fit
+  //1: Pb+Pb triple landau convolution fit
+  
+  AliFMDAnaParameters* pars = AliFMDAnaParameters::Instance();
+  pars->Init(kTRUE,AliFMDAnaParameters::kBackgroundCorrection);
+  
+  TFile fin(filename,"UPDATE");
+  
+  TList* list = (TList*)fin.Get("energyDist");
+  
+  AliFMDAnaCalibEnergyDistribution* EnergyDist = new AliFMDAnaCalibEnergyDistribution();
+  
+  EnergyDist->SetNetaBins(pars->GetNetaBins());
+  EnergyDist->SetEtaLimits(pars->GetEtaMin(),pars->GetEtaMax());
+    
+  for(Int_t nEta = 1; nEta <= pars->GetNetaBins(); nEta++) {
+  
+    for(Int_t det = 1; det<=3; det++) {
+      Int_t nRings  =  (det == 1 ? 1 : 2);
+      for(Int_t ring = 0;ring<nRings; ring++) {
+       Char_t ringChar = (ring == 0 ? 'I' : 'O');
+       
+       TH1F* hEdist = (TH1F*)list->FindObject(Form("FMD%d%c_etabin%d",det,ringChar,nEta));
+       TF1* fitFunc = 0 ;
+       
+       if(hEdist->GetEntries() != 0) {
+         
+         hEdist->GetXaxis()->SetRangeUser(0.2,hEdist->GetXaxis()->GetXmax());
+         
+         if(speciesOption == 0)
+           fitFunc =  new TF1("FMDfitFunc","landau",hEdist->GetBinCenter(hEdist->GetMaximumBin())-0.2,3);
+         if(speciesOption == 1) {
+           fitFunc = new TF1("FMDfitFunc",TripleLandau,hEdist->GetBinCenter(hEdist->GetMaximumBin())-0.2,5,5);
+           fitFunc->SetParNames("constant","MPV","sigma","2-Mip weight","3-Mip weight");
+           fitFunc->SetParameters(10,0.8,0.1,0.05,0.01);
+           fitFunc->SetParLimits(1,0.6,1.2);
+           fitFunc->SetParLimits(3,0,1);
+           fitFunc->SetParLimits(4,0,1);
+           
+         }
+         
+         
+         hEdist->Fit(fitFunc,"","",hEdist->GetBinCenter(hEdist->GetMaximumBin())-0.2,3);
+         fitFunc->Write(Form("FMD%d%c_etabin%d_fitfunc",det,ringChar,nEta),TObject::kWriteDelete);
+         
+       }
+       
+       TH2F* hBg = pars->GetBackgroundCorrection(det,ringChar,0);
+       EnergyDist->SetEnergyDistribution(det,ringChar,hBg->GetXaxis()->GetBinCenter(nEta),hEdist);
+      }
+      
     }
-  }
-  */
-}
-//_____________________________________________________________________
-void AliFMDAnalysisTaskCollector::GetVertex(Double_t* vertexXYZ) 
-{
-  const AliESDVertex* vertex = 0;
-  vertex = fESD->GetPrimaryVertex();
-  if (!vertex || (vertexXYZ[0] == 0 && vertexXYZ[1] == 0 && vertexXYZ[2] == 0))        
-    vertex = fESD->GetPrimaryVertexSPD();
-  if (!vertex || (vertexXYZ[0] == 0 && vertexXYZ[1] == 0 && vertexXYZ[2] == 0))        
-    vertex = fESD->GetPrimaryVertexTPC();
-  
-  if (!vertex || (vertexXYZ[0] == 0 && vertexXYZ[1] == 0 && vertexXYZ[2] == 0))    
-    vertex = fESD->GetVertex();
-  
-  if (vertex && (vertexXYZ[0] != 0 || vertexXYZ[1] != 0 || vertexXYZ[2] != 0)) {
-    vertex->GetXYZ(vertexXYZ);
-    //std::cout<<vertex->GetName()<<"   "<< vertex->GetTitle() <<"   "<< vertex->GetZv()<<std::endl;
-    return;
-  }
-  else if (fESD->GetESDTZERO()) { 
-    vertexXYZ[0] = 0;
-    vertexXYZ[1] = 0;
-    vertexXYZ[2] = fESD->GetT0zVertex();
     
-    return;
   }
   
-  return;
+  fin.Write();
+  fin.Close();
+  
+  if(store) {
+    TFile fcalib("$ALICE_ROOT/FMD/Correction/EnergyDistribution/energydistributions.root","RECREATE");
+    EnergyDist->Write(AliFMDAnaParameters::GetEdistID());
+    fcalib.Close();
+  }
+
+
+
 }
+
 //____________________________________________________________________
 //
 // EOF
index f2d4242..f0bba13 100644 (file)
@@ -4,7 +4,7 @@
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
  
-#include "AliAnalysisTask.h"
+#include "AliAnalysisTaskSE.h"
 #include "TH1F.h"
 #include "TObjArray.h"
 
@@ -14,42 +14,32 @@ class AliAODEvent;
 
 
 
-/**
- * @ingroup FMD_ana
- */
-class AliFMDAnalysisTaskCollector : public AliAnalysisTask
+
+class AliFMDAnalysisTaskCollector : public AliAnalysisTaskSE
 {
  public:
     AliFMDAnalysisTaskCollector();
     AliFMDAnalysisTaskCollector(const char* name);
- AliFMDAnalysisTaskCollector(const AliFMDAnalysisTaskCollector& o) : AliAnalysisTask(),
+ AliFMDAnalysisTaskCollector(const AliFMDAnalysisTaskCollector& o) : AliAnalysisTaskSE(),
       fDebug(o.fDebug),
-      fChain(o.fChain),
-      fESD(o.fESD),
       fOutputList(o.fOutputList),
       fArray(o.fArray),
-      fEdistHist(o.fEdistHist),
       fZvtxDist(o.fZvtxDist)  {}
     
     AliFMDAnalysisTaskCollector& operator=(const AliFMDAnalysisTaskCollector&) { return *this; }
     virtual ~AliFMDAnalysisTaskCollector() {;}
     // Implementation of interface methods
-    virtual void ConnectInputData(Option_t *option = "");
-    virtual void CreateOutputObjects();
-    virtual void Init();
-    virtual void LocalInit() {Init();}
-    virtual void Exec(Option_t *option);
-    virtual void Terminate(Option_t *option);
+   
+    virtual void UserCreateOutputObjects();
+    virtual void UserExec(Option_t *option);
     virtual void SetDebugLevel(Int_t level) {fDebug = level;}
-    
+    void ReadFromFile(const Char_t* filename, Bool_t store=kFALSE, Int_t speciesOption = 0);
+   static Double_t  TripleLandau(Double_t *x, Double_t *par);
  private:
     void          GetVertex(Double_t* vertexXYZ); 
     Int_t         fDebug;        //  Debug flag
-    TChain*       fChain;        //! chained files
-    AliESDEvent*  fESD;          //! ESD
     TList*        fOutputList;
     TObjArray*    fArray;
-    TH1F*         fEdistHist;
     TH1F*         fZvtxDist;
    
     ClassDef(AliFMDAnalysisTaskCollector, 0); // Analysis task for FMD analysis
index 2d888d4..290ca06 100644 (file)
@@ -30,7 +30,6 @@ ClassImp(AliFMDAnalysisTaskDensity)
 AliFMDAnalysisTaskDensity::AliFMDAnalysisTaskDensity()
 : fDebug(0),
   fOutputList(),
-  fArray(),
   fESD(0x0),
   fVertexString(),
   fVertex(0),
@@ -47,7 +46,6 @@ AliFMDAnalysisTaskDensity::AliFMDAnalysisTaskDensity(const char* name, Bool_t SE
     AliAnalysisTask(name, "Density"),
     fDebug(0),
     fOutputList(0),
-    fArray(),
     fESD(0x0),
     fVertexString(),
     fVertex(0),
@@ -61,25 +59,16 @@ AliFMDAnalysisTaskDensity::AliFMDAnalysisTaskDensity(const char* name, Bool_t SE
     DefineOutput(0, TList::Class());
   }
   
-  /*  fFuncPos = new TF1("funcPos","pol1",0,6);
-  fFuncPos->SetParameters(0.99925,0.00298301);
-  fFuncNeg = new TF1("funcNeg","pol1",-6,0);
-  fFuncNeg->SetParameters(0.987583,-0.0101022);*/
-  
-  
 }
 //_____________________________________________________________________
 void AliFMDAnalysisTaskDensity::CreateOutputObjects()
 {
   AliFMDAnaParameters* pars = AliFMDAnaParameters::Instance();
   
-  fArray.SetName("FMD");
-  fArray.SetOwner();
   if(!fOutputList)
     fOutputList = new TList();
   fOutputList->SetName("density_list");
   
-  fOutputList->Add(&fArray);
   fOutputList->Add(&fVertexString);
   
   TH2F* hMult = 0;
@@ -88,18 +77,12 @@ void AliFMDAnalysisTaskDensity::CreateOutputObjects()
   
   for(Int_t det =1; det<=3;det++)
     {
-      TObjArray* detArray = new TObjArray();
-      detArray->SetName(Form("FMD%d",det));
-      fArray.AddAtAndExpand(detArray,det);
       Int_t nRings = (det==1 ? 1 : 2);
       for(Int_t ring = 0;ring<nRings;ring++)
        {
          Char_t ringChar = (ring == 0 ? 'I' : 'O');
          Int_t  nSec     = (ring == 0 ? 20 : 40);
          
-         TObjArray* vtxArray = new TObjArray();
-         vtxArray->SetName(Form("FMD%d%c",det,ringChar));
-         detArray->AddAtAndExpand(vtxArray,ring);
          for(Int_t i = 0; i< nVtxbins; i++) {
            TH2F* hBg = pars->GetBackgroundCorrection(det, ringChar, i);
            
@@ -109,7 +92,7 @@ void AliFMDAnalysisTaskDensity::CreateOutputObjects()
                              hBg->GetXaxis()->GetXmax(),
                              nSec, 0, 2*TMath::Pi());
            
-           vtxArray->AddAtAndExpand(hMult,i);
+           fOutputList->Add(hMult);
          }
        } 
     }
@@ -153,17 +136,13 @@ void AliFMDAnalysisTaskDensity::Exec(Option_t */*option*/)
   
   Int_t vtxbin = (Int_t)vertexBinDouble;
   
-
-  
   fVertexString.SetString(Form("%d",vtxbin));
   //Reset everything
   for(UShort_t det=1;det<=3;det++) {
-    TObjArray* detArray = (TObjArray*)fArray.At(det);
     Int_t nRings = (det==1 ? 1 : 2);
     for (UShort_t ir = 0; ir < nRings; ir++) {
-      TObjArray* vtxArray = (TObjArray*)detArray->At(ir);
-      
-      TH2F* hMult   = (TH2F*)vtxArray->At(vtxbin); 
+      Char_t   ring = (ir == 0 ? 'I' : 'O');
+      TH2F* hMult   = (TH2F*)fOutputList->FindObject(Form("FMD%d%c_vtxbin%d",det,ring,vtxbin));
       hMult->Reset();
     }
     
@@ -171,50 +150,28 @@ void AliFMDAnalysisTaskDensity::Exec(Option_t */*option*/)
   
   
   for(UShort_t det=1;det<=3;det++) {
-    TObjArray* detArray = (TObjArray*)fArray.At(det);
     Int_t nRings = (det==1 ? 1 : 2);
     for (UShort_t ir = 0; ir < nRings; ir++) {
-      TObjArray* vtxArray = (TObjArray*)detArray->At(ir);
-      
-      TH2F* hMult   = (TH2F*)vtxArray->At(vtxbin);
       
       Char_t   ring = (ir == 0 ? 'I' : 'O');
+      TH2F* hMult   = (TH2F*)fOutputList->FindObject(Form("FMD%d%c_vtxbin%d",det,ring,vtxbin));
+     
       UShort_t nsec = (ir == 0 ? 20  : 40);
       UShort_t nstr = (ir == 0 ? 512 : 256);
       
       for(UShort_t sec =0; sec < nsec;  sec++)  {
        for(UShort_t strip = 0; strip < nstr; strip++) {
          Float_t mult = fESD->Multiplicity(det,ring,sec,strip);
-         //Float_t eta = fESD->Eta(det,ring,sec,strip);
-         
+                 
          if(mult == 0 || mult == AliESDFMD::kInvalidMult) continue;
-         //Particle number cut goes here...
-         //Double_t x,y,z;
-         //geo->Detector2XYZ(det,ring,sec,strip,x,y,z);
-         // Float_t phi = TMath::ATan2(y,x);
-         // if(phi<0)
-         //  phi = phi+2*TMath::Pi();
-         
+                         
          Float_t phi = pars->GetPhiFromSector(det,ring,sec);
          Float_t eta = pars->GetEtaFromStrip(det,ring,sec,strip,vertex[2]);
-         //std::cout<<phi<<"     "<<phicalc<<std::endl;
-         //  Float_t   r     = TMath::Sqrt(TMath::Power(x,2)+TMath::Power(y,2));
-        // Float_t   theta = TMath::ATan2(r,z-vertex[2]);
-         // Float_t   etacalc   = -1*TMath::Log(TMath::Tan(0.5*theta));
-          
-          //  std::cout<<eta<<"    "<<etacalc<<std::endl;
-          //eta = etacalc;
-            
-         //  Float_t m   = pars->GetMPV(det,ring,eta);
-         //  Float_t s   = pars->GetSigma(det,ring,eta);
-         //AliFMDParameters* recopars = AliFMDParameters::Instance();
-         
+                 
          Float_t mult_cut = 0.15;//m-2*s;//0.15;//0.2;//m-3*s;// 0.2;//0.01;//m-2*s;//0.2;
          if(ring == 'I')
            mult_cut = 0.10;
          
-         //mult_cut = (5*recopars->GetPedestalWidth(det,ring,sec,strip))/(recopars->GetPulseGain(det,ring,sec,strip)*recopars->GetDACPerMIP());
-         
          Float_t nParticles = 0;
          if(fESD->GetUniqueID() == kTRUE) {
            //proton + proton
@@ -258,23 +215,16 @@ void AliFMDAnalysisTaskDensity::Exec(Option_t */*option*/)
          //std::cout<<"before "<<correction<<std::endl;
          if(fESD->GetUniqueID() == kTRUE) {
            TH1F* hDoubleHitCorrection = pars->GetDoubleHitCorrection(det,ring);
-           //if(det == 3) 
            
            if(hDoubleHitCorrection->GetBinContent(hDoubleHitCorrection->FindBin(eta)) != 0)
              correction = correction / hDoubleHitCorrection->GetBinContent(hDoubleHitCorrection->FindBin(eta));
            
-           //else
-           //  correction = correction / pars->GetDoubleHitCorrection()->GetBinContent(pars->GetDoubleHitCorrection()->FindBin(eta));
          }
          
-         // std::cout<<correction<<std::endl;
          if(correction) nParticles = nParticles / correction;
          if(nParticles > 0)
            hMult->Fill(eta,phi,nParticles);
          
-         //if(det == 1 && ring =='I' && nParticles >0)
-         //if(nParticles > 0)
-         //  std::cout<<det<<"    "<<ring<<"    "<<sec<<"    "<<strip<<"   "<<mult<<std::endl;
          
        }
       }
index f38c9f6..7b1f4f4 100644 (file)
@@ -30,7 +30,6 @@ class AliFMDAnalysisTaskDensity : public AliAnalysisTask
  AliFMDAnalysisTaskDensity(const AliFMDAnalysisTaskDensity& o) : AliAnalysisTask(),
       fDebug(o.fDebug),
       fOutputList(),
-      fArray(o.fArray),
       fESD(o.fESD),
       fVertexString(o.fVertexString),
       fVertex(o.fVertex),
@@ -56,7 +55,6 @@ class AliFMDAnalysisTaskDensity : public AliAnalysisTask
     
     Int_t         fDebug;        //  Debug flag
     TList*        fOutputList;
-    TObjArray     fArray;
     AliESDFMD*    fESD;
     TObjString    fVertexString;
     AliESDVertex* fVertex;
index 5950d4e..2a66cd6 100644 (file)
@@ -33,16 +33,11 @@ AliFMDAnalysisTaskDndeta::AliFMDAnalysisTaskDndeta()
 : fDebug(0),
   fOutputList(0),
   fInputList(0),
-// fArray(0),
-  fInputArray(0),
   fVertexString(0x0),
   fNevents(),
   fNMCevents(),
   fStandalone(kTRUE),
-//fMCevent(0),
   fLastTrackByStrip(0)
-//  fPrimary(kTRUE),
-//  fRecordHits(kFALSE)
 {
   // Default constructor
   DefineInput (0, TList::Class());
@@ -54,16 +49,11 @@ AliFMDAnalysisTaskDndeta::AliFMDAnalysisTaskDndeta(const char* name, Bool_t SE):
     fDebug(0),
     fOutputList(0),
     fInputList(0),
-    //  fArray(),
-    fInputArray(0),
     fVertexString(0x0),
     fNevents(),
     fNMCevents(),
     fStandalone(kTRUE),
-    //  fMCevent(0),
     fLastTrackByStrip(0)
-    //   fPrimary(kTRUE),
-    //  fRecordHits(kFALSE)
 {
   fStandalone = SE;
   if(fStandalone) {
@@ -78,16 +68,12 @@ void AliFMDAnalysisTaskDndeta::CreateOutputObjects()
 {
   AliFMDAnaParameters* pars = AliFMDAnaParameters::Instance();
   
-  // fArray.SetName("FMD");
-  //  fArray.SetOwner();
-  
   if(!fOutputList)
     fOutputList = new TList();
   fOutputList->SetName("BackgroundCorrected");
   
   
   TH2F* hMult = 0;
-  TH2F* hMultTrVtx = 0;
   TH1F* hHits = 0;
   TH1F* hPrimVertexBin = 0;
   
@@ -104,18 +90,13 @@ void AliFMDAnalysisTaskDndeta::CreateOutputObjects()
   
   for(Int_t det =1; det<=3;det++)
     {
-      // TObjArray* detArray = new TObjArray();
-      // detArray->SetName(Form("FMD%d",det));
-      // fArray.AddAtAndExpand(detArray,det);
       Int_t nRings = (det==1 ? 1 : 2);
       for(Int_t ring = 0;ring<nRings;ring++)
        {
          Char_t ringChar = (ring == 0 ? 'I' : 'O');
          Int_t  nSec     = (ring == 0 ? 20 : 40);
          
-         //  TObjArray* vtxArray = new TObjArray();
-         // vtxArray->SetName(Form("FMD%d%c",det,ringChar));
-         // detArray->AddAtAndExpand(vtxArray,ring);
+         
          for(Int_t i = 0; i< nVtxbins; i++) {
            TH2F* hBg = pars->GetBackgroundCorrection(det, ringChar, i);
            hMult  = new TH2F(Form("dNdeta_FMD%d%c_vtxbin%d",det,ringChar,i),Form("dNdeta_FMD%d%c_vtxbin%d",det,ringChar,i),
@@ -134,10 +115,8 @@ void AliFMDAnalysisTaskDndeta::CreateOutputObjects()
            hMult->Sumw2();
            hHits->Sumw2();
            fOutputList->Add(hMult);
-           // fOutputList->Add(hMultTrVtx);
            fOutputList->Add(hHits);
-           //vtxArray->AddAtAndExpand(hMult,i);
-           
+                   
          }
        } 
     }
@@ -167,33 +146,30 @@ void AliFMDAnalysisTaskDndeta::ConnectInputData(Option_t */*option*/)
 {
   if(fStandalone) {
     fInputList   = (TList*)GetInputData(0);
-    fVertexString = (TObjString*)GetInputData(1);
   }
 }
 //_____________________________________________________________________
 void AliFMDAnalysisTaskDndeta::Exec(Option_t */*option*/)
 {
   AliFMDAnaParameters* pars = AliFMDAnaParameters::Instance();
+  fVertexString = (TObjString*)fInputList->At(0);
+  
   Int_t vtxbin   = fVertexString->GetString().Atoi();
+  
   fNevents.Fill(vtxbin);
+  
   for(UShort_t det=1;det<=3;det++) {
-    //TObjArray* detInputArray = (TObjArray*)fInputArray->At(det);
-    // TObjArray* detArray = (TObjArray*)fArray.At(det);
     Int_t nRings = (det==1 ? 1 : 2);
     for (UShort_t ir = 0; ir < nRings; ir++) {
       Char_t ringChar = (ir == 0 ? 'I' : 'O');
-      //TObjArray* vtxInputArray = (TObjArray*)detInputArray->At(ir);
-      //TObjArray* vtxArray = (TObjArray*)detArray->At(ir);
-      // TH2F* hMultTotal = (TH2F*)vtxArray->At(vtxbin);
-      
+            
       TH2F* hMultTotal = (TH2F*)fOutputList->FindObject(Form("dNdeta_FMD%d%c_vtxbin%d",det,ringChar,vtxbin));
      
       
       TH2F* hMultInput = (TH2F*)fInputList->FindObject(Form("mult_FMD%d%c_vtxbin%d",det,ringChar,vtxbin));
       
       hMultTotal->Add(hMultInput);
-      //hMultTrVtx->Add(hMultInput);
-      
+            
     }
   }
   
@@ -214,21 +190,15 @@ void AliFMDAnalysisTaskDndeta::Terminate(Option_t */*option*/) {
   Int_t nVtxbins = pars->GetNvtxBins();
   
   for(UShort_t det=1;det<=3;det++) {
-    // TObjArray* detArray = (TObjArray*)fArray.At(det);
     Int_t nRings = (det==1 ? 1 : 2);
     for (UShort_t ir = 0; ir < nRings; ir++) {
-      // TObjArray* vtxArray = (TObjArray*)detArray->At(ir);
       Char_t ringChar = (ir == 0 ? 'I' : 'O');
       for(Int_t i =0; i<nVtxbins; i++) {
        
-       //TH2F* hMultTotal = (TH2F*)vtxArray->At(i);
-       //hMultTotal->Scale(pars->GetTriggerEfficiency(i));
        TH2F* hMultTotal = (TH2F*)fOutputList->FindObject(Form("dNdeta_FMD%d%c_vtxbin%d",det,ringChar,i));
        TH2F* hMultTrVtx = (TH2F*)hMultTotal->Clone(Form("dNdeta_FMD_TrVtx_%d%c_vtxbin%d",det,ringChar,i));
        
        hMultTotal->Scale(pars->GetEventSelectionEfficiency(i));
-       //std::cout<<pars->GetTriggerEfficiency(i)<<std::endl;
-       std::cout<<pars->GetEventSelectionEfficiency(i)<<std::endl;     
        TH1D* hMultProj   = hMultTotal->ProjectionX(Form("dNdeta_FMD%d%c_vtxbin%d_proj",det,ringChar,i),1,hMultTotal->GetNbinsY());
        TH1D* hMultProjTrVtx   = hMultTrVtx->ProjectionX(Form("dNdeta_FMD_TrVtx_%d%c_vtxbin%d_proj",det,ringChar,i),1,hMultTotal->GetNbinsY());
        fOutputList->Add(hMultTrVtx);
index 4966c66..d97a4d7 100644 (file)
@@ -23,52 +23,39 @@ class AliFMDAnalysisTaskDndeta : public AliAnalysisTask
     AliFMDAnalysisTaskDndeta(const char* name, Bool_t SE = kTRUE);
     virtual ~AliFMDAnalysisTaskDndeta() {;}
  AliFMDAnalysisTaskDndeta(const AliFMDAnalysisTaskDndeta& o) : AliAnalysisTask(),
-      fDebug(o.fDebug),
-      fOutputList(0),
-      fInputList(0),
-      //fArray(o.fArray),
-      fInputArray(o.fInputArray),
-      fVertexString(o.fVertexString),
-      fNevents(o.fNevents),
-      fNMCevents(o.fNMCevents),
-      fStandalone(o.fStandalone),
-      //fMCevent(o.fMCevent),
-      fLastTrackByStrip(o.fLastTrackByStrip)
-      // fPrimary(o.fPrimary),
-      //fRecordHits(o.fRecordHits) 
-{}
-    AliFMDAnalysisTaskDndeta& operator=(const AliFMDAnalysisTaskDndeta&) { return *this; }
-    // Implementation of interface methods
-    virtual void ConnectInputData(Option_t *option = "");
-    virtual void CreateOutputObjects();
-    virtual void Init() {}
-    virtual void LocalInit() {Init();}
-    virtual void Exec(Option_t *option);
-    virtual void Terminate(Option_t *option);
-    virtual void SetDebugLevel(Int_t level) {fDebug = level;}
-    void SetInputList(TList* inputList) {fInputList = inputList;}
-    void SetInputVertex(TObjString* vtxString) {fVertexString = vtxString;}
-    void SetOutputList(TList* outputList) {fOutputList = outputList;}
-    // void SetMCEvent(AliMCEvent* mcevent) {fMCevent = mcevent;}
-    void ProcessPrimary();
-    TList* GetOutputList() {return fOutputList;}
-    // void SetAnalyzePrimary(Bool_t prim) {fPrimary = prim;}
-    // void SetRecordHits(Bool_t recordhits) {fRecordHits = recordhits;}
+                                                              fDebug(o.fDebug),
+                                                              fOutputList(0),
+                                                              fInputList(0),
+                                                              fVertexString(o.fVertexString),
+                                                              fNevents(o.fNevents),
+                                                              fNMCevents(o.fNMCevents),
+                                                              fStandalone(o.fStandalone),
+                                                              fLastTrackByStrip(o.fLastTrackByStrip)  {}
+  AliFMDAnalysisTaskDndeta& operator=(const AliFMDAnalysisTaskDndeta&) { return *this; }
+  // Implementation of interface methods
+  virtual void ConnectInputData(Option_t *option = "");
+  virtual void CreateOutputObjects();
+  virtual void Init() {}
+  virtual void LocalInit() {Init();}
+  virtual void Exec(Option_t *option);
+  virtual void Terminate(Option_t *option);
+  virtual void SetDebugLevel(Int_t level) {fDebug = level;}
+  void SetInputList(TList* inputList) {fInputList = inputList;}
+  void SetInputVertex(TObjString* vtxString) {fVertexString = vtxString;}
+  void SetOutputList(TList* outputList) {fOutputList = outputList;}
+  void ProcessPrimary();
+  TList* GetOutputList() {return fOutputList;}
+   
  private:
-    Int_t         fDebug;        //  Debug flag
-    TList*        fOutputList;
-    TList*        fInputList;
-    //TObjArray     fArray;
-    TObjArray*    fInputArray;
-    TObjString*   fVertexString;
-    TH1I          fNevents;
-    TH1I          fNMCevents;
-    Bool_t        fStandalone;
-    // AliMCEvent*   fMCevent;
-    AliFMDFloatMap fLastTrackByStrip;
-    //Bool_t        fPrimary;
-    //Bool_t        fRecordHits;
-    ClassDef(AliFMDAnalysisTaskDndeta, 0); // Analysis task for FMD analysis
+  Int_t         fDebug;        //  Debug flag
+  TList*        fOutputList;
+  TList*        fInputList;
+  TObjString*   fVertexString;
+  TH1I          fNevents;
+  TH1I          fNMCevents;
+  Bool_t        fStandalone;
+  AliFMDFloatMap fLastTrackByStrip;
+  ClassDef(AliFMDAnalysisTaskDndeta, 0); // Analysis task for FMD analysis
 };
  
 #endif
index 7dd090c..d56831a 100644 (file)
@@ -36,7 +36,8 @@ AliAnalysisTaskSE(),
   fZvtxCut(10),
   fNvtxBins(10),
   fNbinsEta(200),
-  fBackground(0)
+  fBackground(0),
+  fEventSelectionEff(0)
 {
   // Default constructor
 }
@@ -52,7 +53,8 @@ AliFMDAnalysisTaskGenerateCorrection::AliFMDAnalysisTaskGenerateCorrection(const
   fZvtxCut(10),
   fNvtxBins(10),
   fNbinsEta(200),
-  fBackground(0)
+  fBackground(0),
+  fEventSelectionEff(0)
 {
  
   DefineOutput(1, TList::Class());
index c912aab..bc929d3 100644 (file)
@@ -7,7 +7,6 @@
 #include "TH1F.h"
 
 class AliFMDAnaCalibBackgroundCorrection;
-class AliFMDAnaCalibTriggerEfficiency;
 class AliFMDAnaCalibEventSelectionEfficiency;
 
 class AliFMDAnalysisTaskGenerateCorrection : public AliAnalysisTaskSE
@@ -26,7 +25,8 @@ class AliFMDAnalysisTaskGenerateCorrection : public AliAnalysisTaskSE
       fZvtxCut(o.fZvtxCut),
       fNvtxBins(o.fNvtxBins),
       fNbinsEta(o.fNbinsEta),
-      fBackground(o.fBackground)
+      fBackground(o.fBackground),
+      fEventSelectionEff(o.fEventSelectionEff)
       {}
     AliFMDAnalysisTaskGenerateCorrection& operator=(const AliFMDAnalysisTaskGenerateCorrection&) { return *this; }
     
@@ -52,7 +52,6 @@ class AliFMDAnalysisTaskGenerateCorrection : public AliAnalysisTaskSE
     Int_t fNvtxBins;
     Int_t fNbinsEta;
     AliFMDAnaCalibBackgroundCorrection* fBackground;
-    AliFMDAnaCalibTriggerEfficiency*    fTriggerEff;
     AliFMDAnaCalibEventSelectionEfficiency*     fEventSelectionEff;
     
     ClassDef(AliFMDAnalysisTaskGenerateCorrection, 1);
index 6b3253f..7f5d414 100644 (file)
@@ -16,8 +16,6 @@ AliAnalysisTaskSE(),
   fDensity("Density",kFALSE),
   fBackground("BackgroundCorrected",kFALSE),
   fDndeta("dNdeta",kFALSE)
-//  fPrimary(kTRUE),
-//  fRecordHits(kFALSE)
 {
   // Default constructor
 }
@@ -29,8 +27,6 @@ AliFMDAnalysisTaskSE::AliFMDAnalysisTaskSE(const char* name):
   fDensity("Density",kFALSE),
   fBackground("BackgroundCorrected",kFALSE),
   fDndeta("dNdeta",kFALSE)
-  //  fPrimary(kTRUE),
-  //  fRecordHits(kFALSE)
 {
   
   DefineOutput(1, TList::Class());
@@ -45,8 +41,6 @@ void AliFMDAnalysisTaskSE::UserCreateOutputObjects()
   AliESDFMD* fmd = new AliESDFMD();
   AliESDVertex* vertex = new AliESDVertex();
   
-  TObjString* vtxString1 = new TObjString();
-  
   TList* densitylist = new TList();
   
   TList* bgcorlist = new TList();
@@ -62,13 +56,10 @@ void AliFMDAnalysisTaskSE::UserCreateOutputObjects()
   fBackground.SetInputList(densitylist);
   fBackground.SetOutputList(bgcorlist);
   fBackground.SetHitList(fListOfHistos);
-  fBackground.SetOutputVertex(vtxString1);
-  
-  fDndeta.SetInputVertex(vtxString1);
+
   fDndeta.SetInputList(bgcorlist); 
   fDndeta.SetOutputList(fListOfHistos); 
-  //fDndeta.SetAnalyzePrimary(fPrimary);
-  //fDndeta.SetRecordHits(fRecordHits);
+  
   fSharing.CreateOutputObjects();
   fDensity.CreateOutputObjects();
   fBackground.CreateOutputObjects();
index 8f5f13d..6bf271a 100644 (file)
@@ -275,6 +275,7 @@ Float_t AliFMDAnalysisTaskSharing::GetMultiplicityOfStrip(Float_t mult,
   
   
   Float_t cutHigh = pars->GetMPV(det,ring,eta) - 3*pars->GetSigma(det,ring,eta);
+   
   // Float_t cutPart = pars->GetMPV(det,ring,eta) - 5*pars->GetSigma(det,ring,eta);
   Float_t Etotal  = mult;