Implemented correction for trigger efficiency and vertex reconstruction as well as...
authorhdalsgaa <hdalsgaa@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 5 Aug 2009 10:16:39 +0000 (10:16 +0000)
committerhdalsgaa <hdalsgaa@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 5 Aug 2009 10:16:39 +0000 (10:16 +0000)
FMD/analysis/AliFMDAnaParameters.cxx
FMD/analysis/AliFMDAnaParameters.h
FMD/analysis/AliFMDAnalysisTaskDensity.cxx
FMD/analysis/AliFMDAnalysisTaskDndeta.cxx
FMD/analysis/AliFMDAnalysisTaskDndeta.h
FMD/analysis/AliFMDAnalysisTaskSE.cxx
FMD/analysis/AliFMDAnalysisTaskSE.h
FMD/analysis/AliFMDAnalysisTaskSharing.cxx
FMD/analysis/AliFMDAnalysisTaskSharing.h
FMD/analysis/FMDanalysisLinkDef.h
FMD/libFMDanalysis.pkg

index 5fe8313..a1cd529 100644 (file)
@@ -32,6 +32,8 @@
 #include <TH2D.h>
 #include <TF1.h>
 #include <TMath.h>
+#include "AliESDEvent.h"
+#include "AliESDVertex.h"
 
 //====================================================================
 ClassImp(AliFMDAnaParameters)
@@ -43,6 +45,7 @@ ClassImp(AliFMDAnaParameters)
 //const char* AliFMDAnaParameters::fgkEnergyDists = "FMD/Correction/EnergyDistribution";
 const char* AliFMDAnaParameters::fgkBackgroundID = "background";
 const char* AliFMDAnaParameters::fgkEnergyDistributionID = "energydistributions";
+const char* AliFMDAnaParameters::fgkEventSelectionEffID  = "eventselectionefficiency";
 //____________________________________________________________________
 AliFMDAnaParameters* AliFMDAnaParameters::fgInstance = 0;
 
@@ -61,10 +64,15 @@ AliFMDAnaParameters::AliFMDAnaParameters() :
   fIsInit(kFALSE),
   fBackground(0),
   fEnergyDistribution(0),
+  fEventSelectionEfficiency(0),
   fCorner1(4.2231, 26.6638),
   fCorner2(1.8357, 27.9500),
   fEnergyPath("$ALICE_ROOT/FMD/Correction/EnergyDistribution/energydistributions.root"),
-  fBackgroundPath("$ALICE_ROOT/FMD/Correction/Background/background.root")
+  fBackgroundPath("$ALICE_ROOT/FMD/Correction/Background/background.root"),
+  fEventSelectionEffPath("$ALICE_ROOT/FMD/Correction/EventSelectionEfficiency/eventselectionefficiency.root"),
+  fProcessPrimary(kFALSE),
+  fProcessHits(kFALSE),
+  fTrigger(AliPWG0Helper::kMB1)
 {
   
   
@@ -81,7 +89,7 @@ void AliFMDAnaParameters::Init(Bool_t forceReInit, UInt_t what)
   if (fIsInit) return;
   if (what & kBackgroundCorrection)       InitBackground();
   if (what & kEnergyDistributions)        InitEnergyDists();
-  
+  if (what & kEventSelectionEfficiency)   InitEventSelectionEff();
   
   fIsInit = kTRUE;
 }
@@ -98,6 +106,7 @@ void AliFMDAnaParameters::InitBackground() {
   if (!fBackground) AliFatal("Invalid background object from CDB");
   
 }
+
 //____________________________________________________________________
 
 void AliFMDAnaParameters::InitEnergyDists() {
@@ -111,6 +120,20 @@ void AliFMDAnaParameters::InitEnergyDists() {
   if (!fEnergyDistribution) AliFatal("Invalid background object from CDB");
   
 }
+
+//____________________________________________________________________
+
+void AliFMDAnaParameters::InitEventSelectionEff() {
+  
+  //AliCDBEntry*   background = GetEntry(fgkBackgroundCorrection);
+  TFile* fin = TFile::Open(fEventSelectionEffPath.Data());
+  
+  if (!fin) return;
+  
+  fEventSelectionEfficiency = dynamic_cast<AliFMDAnaCalibEventSelectionEfficiency*>(fin->Get(fgkEventSelectionEffID));
+  if (!fEventSelectionEfficiency) AliFatal("Invalid background object from CDB");
+  
+}
 //____________________________________________________________________
 Float_t AliFMDAnaParameters::GetVtxCutZ() {
   
@@ -266,6 +289,15 @@ TH1F* AliFMDAnaParameters::GetDoubleHitCorrection(Int_t det,
   return fBackground->GetDoubleHitCorrection(det,ring);
 }
 //_____________________________________________________________________
+Float_t AliFMDAnaParameters::GetEventSelectionEfficiency(Int_t vtxbin) {
+  if(!fIsInit) {
+    AliWarning("Not initialized yet. Call Init() to remedy");
+    return 0;
+  }
+  return fEventSelectionEfficiency->GetCorrection(vtxbin);
+
+}
+//_____________________________________________________________________
 Float_t AliFMDAnaParameters::GetMaxR(Char_t ring) const{
   Float_t radius = 0;
   if(ring == 'I')
@@ -368,27 +400,45 @@ Float_t AliFMDAnaParameters::GetEtaFromStrip(UShort_t det, Char_t ring, UShort_t
   Float_t   eta   = -1*TMath::Log(TMath::Tan(0.5*theta));
   
   return eta;
-}/*
-//____________________________________________________________________
-AliCDBEntry* AliFMDAnaParameters::GetEntry(const char* path, Bool_t fatal) const
+}
+
+//_____________________________________________________________________
+
+void AliFMDAnaParameters::GetVertex(AliESDEvent* esd, Double_t* vertexXYZ) 
 {
-  // Get an entry from the CDB or via preprocessor 
-  AliCDBEntry* entry = 0;
-  AliCDBManager* cdb = AliCDBManager::Instance();
-  entry              = cdb->Get(path);
-  
-  if (!entry) { 
-    TString msg(Form("No %s found in CDB, perhaps you need to "
-                    "use AliFMDCalibFaker?", path));
-    if (fatal) { AliFatal(msg.Data()); }
-    else       AliLog::Message(AliLog::kWarning, msg.Data(), "FMD", 
-                              "AliFMDParameters", "GetEntry", __FILE__, 
-                              __LINE__);
-    return 0;
+  const AliESDVertex* vertex = 0;
+  vertex = esd->GetPrimaryVertex();
+  if(!vertex || (vertexXYZ[0] == 0 && vertexXYZ[1] == 0 && vertexXYZ[2] == 0))        
+    vertex = esd->GetPrimaryVertexSPD();
+  if(!vertex || (vertexXYZ[0] == 0 && vertexXYZ[1] == 0 && vertexXYZ[2] == 0))        
+    vertex = esd->GetPrimaryVertexTPC();
+  if(!vertex || (vertexXYZ[0] == 0 && vertexXYZ[1] == 0 && vertexXYZ[2] == 0))    
+    vertex = esd->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;
   }
-  return entry;
+  else if (esd->GetESDTZERO()) { 
+    vertexXYZ[0] = 0;
+    vertexXYZ[1] = 0;
+    vertexXYZ[2] = esd->GetT0zVertex();
+    
+    return;
+  }
+  
+  return;
+  
+}
+//____________________________________________________________________
+Bool_t AliFMDAnaParameters::IsEventTriggered(AliESDEvent* esd) { 
+
+  
+  Bool_t trigger = AliPWG0Helper::IsEventTriggered(esd, AliPWG0Helper::kMB1);
+  //  Bool_t trigger = AliPWG0Helper::IsEventTriggered(esd, fTrigger);
+  return trigger;
 }
- */
+
 //____________________________________________________________________
 Float_t 
 AliFMDAnaParameters::GetStripLength(Char_t ring, UShort_t strip)  
index 8b646d3..79885e1 100644 (file)
 #include "TH1F.h"
 #include "AliFMDAnaCalibBackgroundCorrection.h"
 #include "AliFMDAnaCalibEnergyDistribution.h"
+#include "AliFMDAnaCalibEventSelectionEfficiency.h"
 #include <TVector2.h>
 #include <TString.h>
-//____________________________________________________________________
-//
-//  Singleton class to handle various parameters (not geometry) of the
-//  FMD
-//  Should get ata fromm Conditions DB.
-//
+#include "AliPWG0Helper.h"
+class AliESDEvent;
 
 /**
  * @ingroup FMD_ana
@@ -55,15 +52,16 @@ public:
   /** Enumeration of things to initialize */ 
   enum What { 
     /** Pulser gain */ 
-    kBackgroundCorrection = 0x1, // Background Correction 
-    kEnergyDistributions  = 0x2 // Energy Distributions
+    kBackgroundCorrection         = 0x1, // Background Correction 
+    kEnergyDistributions          = 0x2, // Energy Distributions
+    kEventSelectionEfficiency     = 0x4  // Event Selection Efficiency
   };
   
   /** Singleton access
       @return  single to */
   static AliFMDAnaParameters* Instance();
   
-  void Init(Bool_t forceReInit=kTRUE, UInt_t what=kBackgroundCorrection|kEnergyDistributions);
+  void Init(Bool_t forceReInit=kTRUE, UInt_t what=kBackgroundCorrection|kEnergyDistributions|kEventSelectionEfficiency);
   Float_t GetVtxCutZ();
   Int_t GetNvtxBins();
   Int_t GetNetaBins();
@@ -77,8 +75,11 @@ public:
   // static const char* GetEdistPath()      { return fgkEnergyDists;}
   static const char* GetBackgroundID() { return fgkBackgroundID;}
   static const char* GetEdistID()      { return fgkEnergyDistributionID;}
+  static const char* GetEventSelectionEffID()      { return fgkEventSelectionEffID;}
   TH2F* GetBackgroundCorrection(Int_t det, Char_t ring, Int_t vtxbin);
   TH1F* GetDoubleHitCorrection(Int_t det, Char_t ring);
+  
+  Float_t GetEventSelectionEfficiency(Int_t vtxbin);
   Float_t GetPhiFromSector(UShort_t det, Char_t ring, UShort_t sec) const;
   Float_t GetEtaFromStrip(UShort_t det, Char_t ring, UShort_t sec, UShort_t strip, Float_t zvtx) const;
   Float_t  GetStripLength(Char_t ring, UShort_t strip)  ;
@@ -87,8 +88,14 @@ public:
   Float_t  GetMinR(Char_t ring) const;
   void     SetBackgroundPath(const Char_t* bgpath) {fBackgroundPath.Form(bgpath);}
   void     SetEnergyPath(const Char_t* epath) {fEnergyPath.Form(epath);}
-  
-  
+  void     SetProcessPrimary(Bool_t prim=kTRUE) {fProcessPrimary = prim;}
+  void     SetProcessHits(Bool_t hits=kTRUE) {fProcessHits = hits;}
+  Bool_t   GetProcessPrimary() {return fProcessPrimary;}
+  Bool_t   GetProcessHits() {return fProcessHits;}
+  void     GetVertex(AliESDEvent* esd, Double_t* vertexXYZ);
+  void     SetTriggerDefinition(AliPWG0Helper::Trigger trigger) {fTrigger = trigger;}
+  Int_t    SetTriggerDefinition() {return fTrigger;}
+  Bool_t   IsEventTriggered(AliESDEvent* esd);
 protected:
   
   AliFMDAnaParameters();
@@ -98,10 +105,14 @@ protected:
       fIsInit(o.fIsInit),
       fBackground(o.fBackground),
       fEnergyDistribution(o.fEnergyDistribution),
+      fEventSelectionEfficiency(o.fEventSelectionEfficiency),
       fCorner1(o.fCorner1),
       fCorner2(o.fCorner2),
       fEnergyPath(o.fEnergyPath),
-      fBackgroundPath(o.fBackgroundPath)
+      fBackgroundPath(o.fBackgroundPath),
+      fProcessPrimary(o.fProcessPrimary),
+      fProcessHits(o.fProcessHits),
+      fTrigger(o.fTrigger)
   {}
   AliFMDAnaParameters& operator=(const AliFMDAnaParameters&) { return *this; }
   virtual ~AliFMDAnaParameters() {}
@@ -111,6 +122,8 @@ protected:
   //  AliCDBEntry* GetEntry(const char* path, Bool_t fatal=kTRUE) const ;
   void InitBackground();
   void InitEnergyDists();
+  void InitEventSelectionEff();
+  
   TH1F* GetEnergyDistribution(Int_t det, Char_t ring, Float_t eta);
   TObjArray* GetBackgroundArray();
   
@@ -120,17 +133,24 @@ protected:
   Bool_t fIsInit;
   //TObjArray*  fBackgroundArray;
   // TObjArray*  fEdistArray;
-  AliFMDAnaCalibBackgroundCorrection* fBackground;
-  AliFMDAnaCalibEnergyDistribution* fEnergyDistribution;
+  AliFMDAnaCalibBackgroundCorrection*         fBackground;
+  AliFMDAnaCalibEnergyDistribution*           fEnergyDistribution;
+  AliFMDAnaCalibEventSelectionEfficiency*     fEventSelectionEfficiency;
+  
   //static const char* fgkBackgroundCorrection;
   //static const char* fgkEnergyDists;
   static const char* fgkBackgroundID;
   static const char* fgkEnergyDistributionID ;
+  static const char* fgkEventSelectionEffID ;
+  
   TVector2 fCorner1;
   TVector2 fCorner2;
-  TString fEnergyPath;
-  TString fBackgroundPath;
-
+  TString  fEnergyPath;
+  TString  fBackgroundPath;
+  TString  fEventSelectionEffPath;
+  Bool_t   fProcessPrimary;
+  Bool_t   fProcessHits; 
+  AliPWG0Helper::Trigger  fTrigger;
   ClassDef(AliFMDAnaParameters,0) // Manager of parameters
 };
 
index 82223ad..2d888d4 100644 (file)
@@ -316,37 +316,6 @@ Float_t AliFMDAnalysisTaskDensity::GetAcceptanceCorrection(Char_t ring, UShort_t
   return correction;
 }
 //_____________________________________________________________________
-/*Float_t AliFMDAnalysisTaskDensity::GetPhiFromSector(UShort_t det, Char_t ring, UShort_t sec)
-{
-  Int_t nsec = (ring == 'I' ? 20 : 40);
-  Float_t basephi = 0;
-  if(det == 1) 
-    basephi = 1.72787594; 
-  if(det == 2 && ring == 'I')
-    basephi = 0.15707963;
-  if(det == 2 && ring == 'O')
-    basephi = 0.078539818;
-  if(det == 3 && ring == 'I')
-    basephi = 2.984513044;
-  if(det == 3 && ring == 'O')
-    basephi = 3.06305289;
-  
-  Float_t step = 2*TMath::Pi() / nsec;
-  Float_t phi = 0;
-  if(det == 3)
-    phi = basephi - sec*step;
-  else
-    phi = basephi + sec*step;
-  
-  if(phi < 0) 
-    phi = phi +2*TMath::Pi();
-  if(phi > 2*TMath::Pi() )
-    phi = phi - 2*TMath::Pi();
-  
-  return phi;
-}
-
-*/
 //
 //EOF
 //
index b5d5fe4..5950d4e 100644 (file)
@@ -33,16 +33,16 @@ AliFMDAnalysisTaskDndeta::AliFMDAnalysisTaskDndeta()
 : fDebug(0),
   fOutputList(0),
   fInputList(0),
-  fArray(0),
+// fArray(0),
   fInputArray(0),
   fVertexString(0x0),
   fNevents(),
   fNMCevents(),
   fStandalone(kTRUE),
-  fMCevent(0),
-  fLastTrackByStrip(0),
-  fPrimary(kTRUE),
-  fRecordHits(kFALSE)
+//fMCevent(0),
+  fLastTrackByStrip(0)
+//  fPrimary(kTRUE),
+//  fRecordHits(kFALSE)
 {
   // Default constructor
   DefineInput (0, TList::Class());
@@ -54,16 +54,16 @@ AliFMDAnalysisTaskDndeta::AliFMDAnalysisTaskDndeta(const char* name, Bool_t SE):
     fDebug(0),
     fOutputList(0),
     fInputList(0),
-    fArray(),
+    //  fArray(),
     fInputArray(0),
     fVertexString(0x0),
     fNevents(),
     fNMCevents(),
     fStandalone(kTRUE),
-    fMCevent(0),
-    fLastTrackByStrip(0),
-    fPrimary(kTRUE),
-    fRecordHits(kFALSE)
+    //  fMCevent(0),
+    fLastTrackByStrip(0)
+    //   fPrimary(kTRUE),
+    //  fRecordHits(kFALSE)
 {
   fStandalone = SE;
   if(fStandalone) {
@@ -78,8 +78,8 @@ void AliFMDAnalysisTaskDndeta::CreateOutputObjects()
 {
   AliFMDAnaParameters* pars = AliFMDAnaParameters::Instance();
   
-  fArray.SetName("FMD");
-  fArray.SetOwner();
+  // fArray.SetName("FMD");
+  //  fArray.SetOwner();
   
   if(!fOutputList)
     fOutputList = new TList();
@@ -87,6 +87,7 @@ void AliFMDAnalysisTaskDndeta::CreateOutputObjects()
   
   
   TH2F* hMult = 0;
+  TH2F* hMultTrVtx = 0;
   TH1F* hHits = 0;
   TH1F* hPrimVertexBin = 0;
   
@@ -103,18 +104,18 @@ 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);
+      // 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);
+         //  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),
@@ -133,8 +134,9 @@ void AliFMDAnalysisTaskDndeta::CreateOutputObjects()
            hMult->Sumw2();
            hHits->Sumw2();
            fOutputList->Add(hMult);
+           // fOutputList->Add(hMultTrVtx);
            fOutputList->Add(hHits);
-           vtxArray->AddAtAndExpand(hMult,i);
+           //vtxArray->AddAtAndExpand(hMult,i);
            
          }
        } 
@@ -171,28 +173,31 @@ void AliFMDAnalysisTaskDndeta::ConnectInputData(Option_t */*option*/)
 //_____________________________________________________________________
 void AliFMDAnalysisTaskDndeta::Exec(Option_t */*option*/)
 {
+  AliFMDAnaParameters* pars = AliFMDAnaParameters::Instance();
   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);
+    // 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);
+      //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);
       
     }
   }
   
-  if(fMCevent && fPrimary)
+  if(pars->GetProcessPrimary())
     ProcessPrimary();
   
   if(fStandalone) {
@@ -209,15 +214,26 @@ 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);
+    // 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);
+      // 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);
+       
+       //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);
        fOutputList->Add(hMultProj);
+       fOutputList->Add(hMultProjTrVtx);
       }
     }
   }
@@ -226,15 +242,20 @@ void AliFMDAnalysisTaskDndeta::Terminate(Option_t */*option*/) {
 //_____________________________________________________________________
 void AliFMDAnalysisTaskDndeta::ProcessPrimary() {
   
+  AliMCEventHandler* eventHandler = dynamic_cast<AliMCEventHandler*> (AliAnalysisManager::GetAnalysisManager()->GetMCtruthEventHandler());
+  AliMCEvent* mcEvent = eventHandler->MCEvent();
+  if(!mcEvent)
+    return;
+  
   fLastTrackByStrip.Reset(-1);
   
   AliFMDAnaParameters* pars = AliFMDAnaParameters::Instance();
   
   AliMCParticle* particle = 0;
-  AliStack* stack = fMCevent->Stack();
+  AliStack* stack = mcEvent->Stack();
   
   TH1F* hPrimary = (TH1F*)fOutputList->FindObject("hMultvsEta");
-  AliHeader* header            = fMCevent->Header();
+  AliHeader* header            = mcEvent->Header();
   AliGenEventHeader* genHeader = header->GenEventHeader();
   
   TArrayF vertex;
@@ -249,11 +270,11 @@ void AliFMDAnalysisTaskDndeta::ProcessPrimary() {
   
   // we loop over the primaries only unless we need the hits (diagnostics running slowly)
   Int_t nTracks = stack->GetNprimary();
-  if(fRecordHits)
+  if(pars->GetProcessHits())
     nTracks = stack->GetNtrack();
   
   for(Int_t i = 0 ;i<nTracks;i++) {
-    particle = fMCevent->GetTrack(i);
+    particle = mcEvent->GetTrack(i);
     if(!particle)
       continue;
    
@@ -269,7 +290,7 @@ void AliFMDAnalysisTaskDndeta::ProcessPrimary() {
       }
     
     }
-    if(fRecordHits) {
+    if(pars->GetProcessPrimary()) {
       for(Int_t j=0; j<particle->GetNumberOfTrackReferences();j++) {
       
       AliTrackReference* ref = particle->GetTrackReference(j);
index 479c747..4966c66 100644 (file)
@@ -26,16 +26,17 @@ class AliFMDAnalysisTaskDndeta : public AliAnalysisTask
       fDebug(o.fDebug),
       fOutputList(0),
       fInputList(0),
-      fArray(o.fArray),
+      //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) {}
+      //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 = "");
@@ -48,25 +49,25 @@ class AliFMDAnalysisTaskDndeta : public AliAnalysisTask
     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 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;}
+    // void SetAnalyzePrimary(Bool_t prim) {fPrimary = prim;}
+    // void SetRecordHits(Bool_t recordhits) {fRecordHits = recordhits;}
  private:
     Int_t         fDebug;        //  Debug flag
     TList*        fOutputList;
     TList*        fInputList;
-    TObjArray     fArray;
+    //TObjArray     fArray;
     TObjArray*    fInputArray;
     TObjString*   fVertexString;
     TH1I          fNevents;
     TH1I          fNMCevents;
     Bool_t        fStandalone;
-    AliMCEvent*   fMCevent;
+    // AliMCEvent*   fMCevent;
     AliFMDFloatMap fLastTrackByStrip;
-    Bool_t        fPrimary;
-    Bool_t        fRecordHits;
+    //Bool_t        fPrimary;
+    //Bool_t        fRecordHits;
     ClassDef(AliFMDAnalysisTaskDndeta, 0); // Analysis task for FMD analysis
 };
  
index dfb6492..6b3253f 100644 (file)
@@ -4,6 +4,7 @@
 #include "AliESDFMD.h"
 #include "AliMCEventHandler.h"
 #include "AliAnalysisManager.h"
+#include "AliFMDAnaParameters.h"
 
 ClassImp(AliFMDAnalysisTaskSE)
 
@@ -14,9 +15,9 @@ AliAnalysisTaskSE(),
   fSharing("Sharing",kFALSE),
   fDensity("Density",kFALSE),
   fBackground("BackgroundCorrected",kFALSE),
-  fDndeta("dNdeta",kFALSE),
-  fPrimary(kTRUE),
-  fRecordHits(kFALSE)
+  fDndeta("dNdeta",kFALSE)
+//  fPrimary(kTRUE),
+//  fRecordHits(kFALSE)
 {
   // Default constructor
 }
@@ -27,9 +28,9 @@ AliFMDAnalysisTaskSE::AliFMDAnalysisTaskSE(const char* name):
   fSharing("Sharing",kFALSE),
   fDensity("Density",kFALSE),
   fBackground("BackgroundCorrected",kFALSE),
-  fDndeta("dNdeta",kFALSE),
-  fPrimary(kTRUE),
-  fRecordHits(kFALSE)
+  fDndeta("dNdeta",kFALSE)
+  //  fPrimary(kTRUE),
+  //  fRecordHits(kFALSE)
 {
   
   DefineOutput(1, TList::Class());
@@ -66,8 +67,8 @@ void AliFMDAnalysisTaskSE::UserCreateOutputObjects()
   fDndeta.SetInputVertex(vtxString1);
   fDndeta.SetInputList(bgcorlist); 
   fDndeta.SetOutputList(fListOfHistos); 
-  fDndeta.SetAnalyzePrimary(fPrimary);
-  fDndeta.SetRecordHits(fRecordHits);
+  //fDndeta.SetAnalyzePrimary(fPrimary);
+  //fDndeta.SetRecordHits(fRecordHits);
   fSharing.CreateOutputObjects();
   fDensity.CreateOutputObjects();
   fBackground.CreateOutputObjects();
@@ -86,6 +87,7 @@ void AliFMDAnalysisTaskSE::UserExec(Option_t */*option*/)
 {
   // Execute analysis for current event
   //
+  //  AliFMDAnaParameters* pars = AliFMDAnaParameters::Instance();
   AliESDEvent* fESD = (AliESDEvent*)InputEvent();
   fSharing.SetInputESD(fESD);
   
@@ -94,12 +96,6 @@ void AliFMDAnalysisTaskSE::UserExec(Option_t */*option*/)
     fDensity.Exec("");
     if(fDensity.GetEventStatus()) {
       fBackground.Exec("");  
-      //AliMCEvent* mcevent =  MCEvent();
-      if(fPrimary) {
-       AliMCEventHandler* eventHandler = dynamic_cast<AliMCEventHandler*> (AliAnalysisManager::GetAnalysisManager()->GetMCtruthEventHandler());
-       AliMCEvent* mcevent = eventHandler->MCEvent();
-       fDndeta.SetMCEvent(mcevent);
-      }
       fDndeta.Exec("");
       
     }
index 2ea9db5..3b1e6ee 100644 (file)
@@ -36,17 +36,18 @@ class AliFMDAnalysisTaskSE : public AliAnalysisTaskSE
       fSharing(o.fSharing),
       fDensity(o.fDensity),
       fBackground(o.fBackground),
-      fDndeta(o.fDndeta),
-      fPrimary(o.fPrimary),
-      fRecordHits(o.fRecordHits) {}
+      fDndeta(o.fDndeta)
+      //      fPrimary(o.fPrimary),
+      // fRecordHits(o.fRecordHits) 
+       {}
     AliFMDAnalysisTaskSE& operator=(const AliFMDAnalysisTaskSE&) { return *this; }
     
     virtual void Init();
     virtual void UserCreateOutputObjects();
     virtual void UserExec(Option_t* /*option*/);
     void  Terminate(Option_t */*option*/);
-    void  SetAnalyzePrimary(Bool_t prim) {fPrimary = prim;}
-    void  SetRecordHits(Bool_t recordhits) {fRecordHits = recordhits;}
+    //   void  SetAnalyzePrimary(Bool_t prim) {fPrimary = prim;}
+    //   void  SetRecordHits(Bool_t recordhits) {fRecordHits = recordhits;}
  private:
     
     TList* fListOfHistos;
@@ -54,8 +55,8 @@ class AliFMDAnalysisTaskSE : public AliAnalysisTaskSE
     AliFMDAnalysisTaskDensity              fDensity;
     AliFMDAnalysisTaskBackgroundCorrection fBackground;
     AliFMDAnalysisTaskDndeta               fDndeta;
-    Bool_t                                 fPrimary;
-    Bool_t                                 fRecordHits;
+    //   Bool_t                                 fPrimary;
+    //  Bool_t                                 fRecordHits;
     ClassDef(AliFMDAnalysisTaskSE, 1);
 
 };
index c8c2b24..8f5f13d 100644 (file)
 #include "AliESDFMD.h"
 //#include "AliFMDGeometry.h"
 #include "AliMCEventHandler.h"
+#include "AliMCEvent.h"
 #include "AliStack.h"
 #include "AliESDVertex.h"
 #include "AliMultiplicity.h"
 #include "AliFMDAnaParameters.h"
 //#include "/home/canute/ALICE/AliRoot/PWG0/AliPWG0Helper.h"
 //#include "AliFMDParameters.h"
+#include "AliGenEventHeader.h"
+#include "AliHeader.h"
+#include "AliStack.h"
+#include "AliMCParticle.h"
 
 ClassImp(AliFMDAnalysisTaskSharing)
 
@@ -80,6 +85,28 @@ void AliFMDAnalysisTaskSharing::CreateOutputObjects()
     fDiagList = new TList();
   
   fDiagList->SetName("Sharing diagnostics");
+  
+  AliFMDAnaParameters* pars = AliFMDAnaParameters::Instance();
+  TH2F* hBg   = pars->GetBackgroundCorrection(1, 'I', 0);
+  TH1F* hPrimary = new TH1F("hMultvsEtaNoCuts","hMultvsEtaNoCuts",
+                           hBg->GetNbinsX(),
+                           hBg->GetXaxis()->GetXmin(),
+                           hBg->GetXaxis()->GetXmax());
+  hPrimary->Sumw2();
+  fDiagList->Add(hPrimary);
+  TH1F* hPrimVertexBin = 0;
+  for(Int_t i = 0; i< pars->GetNvtxBins(); i++) {
+    
+    hPrimVertexBin = new TH1F(Form("primmult_NoCuts_vtxbin%d",i),
+                             Form("primmult_NoCuts_vtxbin%d",i),
+                             hBg->GetNbinsX(),
+                             hBg->GetXaxis()->GetXmin(),
+                             hBg->GetXaxis()->GetXmax());
+    hPrimVertexBin->Sumw2();
+    fDiagList->Add(hPrimVertexBin);
+    
+  }
+  
   for(Int_t det = 1; det<=3; det++) {
     Int_t nRings = (det==1 ? 1 : 2);
     
@@ -93,15 +120,19 @@ void AliFMDAnalysisTaskSharing::CreateOutputObjects()
                                     1000,0,25);
       
       
-      TH1F* hNstripsHit    = new TH1F(Form("N_strips_hit_FMD%d%c",det,ringChar),
-                                    Form("N_strips_hit_FMD%d%c",det,ringChar),
-                                    25,0,25);
+      //TH1F* hNstripsHit    = new TH1F(Form("N_strips_hit_FMD%d%c",det,ringChar),
+      //                                    Form("N_strips_hit_FMD%d%c",det,ringChar),
+      //                                    25,0,25);
       fDiagList->Add(hEdist);
       fDiagList->Add(hEdist_after);
-      fDiagList->Add(hNstripsHit);
+      //fDiagList->Add(hNstripsHit);
 
     }
   }
+  TH1F*  nMCevents = new TH1F("nMCEventsNoCuts","nMCEventsNoCuts",pars->GetNvtxBins(),0,pars->GetNvtxBins());
+  
+  fDiagList->Add(nMCevents);
+  
 }
 //_____________________________________________________________________
 void AliFMDAnalysisTaskSharing::ConnectInputData(Option_t */*option*/)
@@ -120,35 +151,41 @@ void AliFMDAnalysisTaskSharing::Exec(Option_t */*option*/)
   
   foutputESDFMD->Clear();
   
+  AliFMDAnaParameters* pars = AliFMDAnaParameters::Instance();
   Double_t vertex[3];
-  GetVertex(vertex);
+  pars->GetVertex(fESD,vertex);
   fEsdVertex->SetXYZ(vertex);
-  /*
-    Bool_t isTriggered = AliPWG0Helper::IsEventTriggered(fESD, AliPWG0Helper::kMB1);
-    
-    if(!isTriggered) {
+  
+  // Process primaries here to get true MC distribution
+  if(pars->GetProcessPrimary())
+    ProcessPrimary();
+  
+  Bool_t isTriggered = pars->IsEventTriggered(fESD);
+  
+  if(!isTriggered) {
     fStatus = kFALSE;
-    std::cout<<"no trigger"<<std::endl;
     return;
-    }
-    else
+  }
+  else
     fStatus = kTRUE;
-  */
-  if(vertex[0] == 0 && vertex[1] == 0 && vertex[2] == 0) {
   
+  if(vertex[0] == 0 && vertex[1] == 0 && vertex[2] == 0) {
+    
     fStatus = kFALSE;
     return;
   }
   else
     fStatus = kTRUE;
+  
+  
   const AliMultiplicity* testmult = fESD->GetMultiplicity();
   
   Int_t nTrackLets = testmult->GetNumberOfTracklets();
   if(nTrackLets < 1000) foutputESDFMD->SetUniqueID(kTRUE);
   else foutputESDFMD->SetUniqueID(kFALSE);
-
+  
   AliESDFMD* fmd = fESD->GetFMDData();
-  AliFMDAnaParameters* pars = AliFMDAnaParameters::Instance();
+  
   if (!fmd) return;
   Int_t nHits = 0;
   for(UShort_t det=1;det<=3;det++) {
@@ -206,6 +243,7 @@ void AliFMDAnalysisTaskSharing::Exec(Option_t */*option*/)
     }
   }
   
+   
   if(fStandalone) {
     PostData(0, foutputESDFMD); 
     PostData(1, fEsdVertex); 
@@ -240,52 +278,7 @@ Float_t AliFMDAnalysisTaskSharing::GetMultiplicityOfStrip(Float_t mult,
   // Float_t cutPart = pars->GetMPV(det,ring,eta) - 5*pars->GetSigma(det,ring,eta);
   Float_t Etotal  = mult;
   
-  //if(mult > 5)
-  //  std::cout<<mult<<"    "<<det<<"    "<<ring<<"   "<<sec<<"    "<<strip<<std::endl;
-  //Float_t slow_particle_cut = 2*pars->GetMPV(det,ring,eta);
-  
-  //if(recopars->IsDead(det,ring,sec,strip))
-  //  std::cout<<"dead channel"<<std::endl;
-  //if(foutputESDFMD->GetUniqueID() == kTRUE) {
-  // Float_t mpv = pars->GetMPV(det,ring,eta);
-  
-  /*
-  if(foutputESDFMD->GetUniqueID() == kFALSE) {
-    
-    if(mult > 15)
-      return 0;
 
-    if(mult > cutLow ) {
-      fEnergy = fEnergy + mult;
-      fNstrips++;
-    }
-    
-    if( (Enext < cutLow && fEnergy > 0 )   || fNstrips >2 ){
-      
-      //if((fEnergy*TMath::Cos(Eta2Theta(eta))) > cutPart || fNstrips > 1) {
-      nParticles = 1;
-      merged_energy = fEnergy*TMath::Cos(Eta2Theta(eta));
-      TH1F* hEdist = (TH1F*)fDiagList.FindObject(Form("Edist_after_sharing_FMD%d%c",det,ring));
-      hEdist->Fill(fEnergy);
-      TH1F* hNstrips = (TH1F*)fDiagList.FindObject(Form("N_strips_hit_FMD%d%c",det,ring));
-      hNstrips->Fill(fNstrips);
-      // std::cout<<Form("Merged signals %f %f %f into %f , %f in det %d, ring %c, sec %d, strip %d",Eprev, mult, Enext, fEnergy/TMath::Cos(Eta2Theta(eta)),fEnergy,det,ring,sec,strip )<<std::endl;
-      
-      // }
-    // else
-    //std::cout<<Form("NO HIT  for  %f %f %f into %f , %f in strip %d, sec %d, ring %c, det %d, cuts %f , %f",Eprev, mult, Enext, fEnergy/TMath::Cos(Eta2Theta(eta)),fEnergy,strip,sec,ring,det,cutPart,cutHigh )<<std::endl;
-      
-      fEnergy  = 0;
-      fNstrips = 0;
-    
-    return merged_energy;
-    }
-    
-    
-    return 0;
-    
-  }
-  else {*/
     //std::cout<<det<<ring<<"   "<<sec<<"    "<<strip<<"   "<<cutLow<<std::endl;
   if(fSharedThis) {
     fSharedThis      = kFALSE;
@@ -342,33 +335,7 @@ Float_t AliFMDAnalysisTaskSharing::GetMultiplicityOfStrip(Float_t mult,
   return merged_energy; 
   //}  
 }
-//_____________________________________________________________________
-void AliFMDAnalysisTaskSharing::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;
-  
-}
+
 //_____________________________________________________________________
 Float_t AliFMDAnalysisTaskSharing::Eta2Theta(Float_t eta) {
 
@@ -383,30 +350,64 @@ Float_t AliFMDAnalysisTaskSharing::Eta2Theta(Float_t eta) {
 
 
 }
+
+
+
 //_____________________________________________________________________
-/*Double_t AliFMDAnalysisTaskSharing::EtaFromStrip(UShort_t det, 
-                                               Char_t ring, 
-                                               UShort_t sector, 
-                                               UShort_t strip, 
-                                               Double_t zvtx)
-{
-   
-  AliFMDGeometry* geo = AliFMDGeometry::Instance();
+void AliFMDAnalysisTaskSharing::ProcessPrimary() {
   
-  Double_t x,y,z;
-  geo->Detector2XYZ(det,ring,sector,strip,x,y,z);
+  AliMCEventHandler* eventHandler = dynamic_cast<AliMCEventHandler*> (AliAnalysisManager::GetAnalysisManager()->GetMCtruthEventHandler());
+  AliMCEvent* mcEvent = eventHandler->MCEvent();
+  if(!mcEvent)
+    return;
+  
+  AliFMDAnaParameters* pars = AliFMDAnaParameters::Instance();
+  
+  AliMCParticle* particle = 0;
+  
+  AliStack* stack = mcEvent->Stack();
+  
+  TH1F* hPrimary = (TH1F*)fDiagList->FindObject("hMultvsEtaNoCuts");
+  AliHeader* header            = mcEvent->Header();
+  AliGenEventHeader* genHeader = header->GenEventHeader();
   
-  Double_t r = TMath::Sqrt(x*x+y*y);
   
-  Double_t z_real      = z-zvtx;
-  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));
   
-  // std::cout<<det<<"   "<<ring<<"   "<<sector<<"   "<<strip<<"   "<<r<<"    "<<z_real<<"   "<<theta<<"    "<<eta<<std::endl;
+  TArrayF vertex;
+  genHeader->PrimaryVertex(vertex);
+  if(TMath::Abs(vertex.At(2)) > pars->GetVtxCutZ())
+    return;
+  
+  Double_t delta           = 2*pars->GetVtxCutZ()/pars->GetNvtxBins();
+  Double_t vertexBinDouble = (vertex.At(2) + pars->GetVtxCutZ()) / delta;
+  Int_t    vertexBin       = (Int_t)vertexBinDouble;
+  
+  Bool_t firstTrack = kTRUE;
   
-  return eta;
-  }*/
+  Int_t nTracks = stack->GetNprimary();
+  TH1F* nMCevents = (TH1F*)fDiagList->FindObject("nMCEventsNoCuts");
+  for(Int_t i = 0 ;i<nTracks;i++) {
+    particle = mcEvent->GetTrack(i);
+    if(!particle)
+      continue;
+    
+    if(stack->IsPhysicalPrimary(i) && particle->Charge() != 0) {
+      hPrimary->Fill(particle->Eta());
+      
+
+      TH1F* hPrimVtxBin = (TH1F*)fDiagList->FindObject(Form("primmult_NoCuts_vtxbin%d",vertexBin));
+      hPrimVtxBin->Fill(particle->Eta());
+      
+      if(firstTrack) {
+       nMCevents->Fill(vertexBin);
+       firstTrack = kFALSE;
+      }
+    
+    }
+  }
+
+}
+
 //_____________________________________________________________________
 //
 // EOF
index cd948a2..11963c3 100644 (file)
@@ -50,7 +50,7 @@ class AliFMDAnalysisTaskSharing : public AliAnalysisTask
     virtual void Terminate(Option_t* /* option*/) {}
     virtual void SetDebugLevel(Int_t level) {fDebug = level;}
     Float_t GetMultiplicityOfStrip(Float_t mult, Float_t eta, Float_t Eprev, Float_t Enext, UShort_t   det, Char_t  ring, UShort_t sec, UShort_t strip);
-    void GetVertex(Double_t* vertexXYZ) ;
+    // void GetVertex(Double_t* vertexXYZ) ;
     void SetFMDData(AliESDFMD* fmd) {foutputESDFMD = fmd;}
     void SetOutputList(TList* outlist) {fDiagList = outlist;}
     void SetVertex(AliESDVertex* vertex) {fEsdVertex = vertex;}
@@ -59,6 +59,8 @@ class AliFMDAnalysisTaskSharing : public AliAnalysisTask
  private:
     Float_t Eta2Theta(Float_t eta);
     Double_t EtaFromStrip(UShort_t det, Char_t ring, UShort_t sector, UShort_t strip, Double_t zvtx);
+    void ProcessPrimary();
+    
     Int_t         fDebug;        //  Debug flag
     AliESDEvent*  fESD;          //! ESD
     // AliESDEvent   fOutputESD;
index 981718c..0e6229f 100644 (file)
@@ -31,6 +31,7 @@
 #pragma link C++ class AliFMDAnalysisTaskDndeta+;
 #pragma link C++ class AliFMDAnaCalibBackgroundCorrection+;
 #pragma link C++ class AliFMDAnaCalibEnergyDistribution+;
+#pragma link C++ class AliFMDAnaCalibEventSelectionEfficiency+;
 #pragma link C++ class AliFMDAnaParameters+;
 #pragma link C++ class AliFMDAnaCalibEnergyDistribution+;
 #pragma link C++ class AliFMDAnaCalibBackgroundCorrection+;
@@ -39,7 +40,7 @@
 #pragma link C++ class AliFMDAnalysisTaskDensity+;
 #pragma link C++ class AliFMDAnalysisTaskBackgroundCorrection+;
 #pragma link C++ class AliFMDAnalysisTaskCollector+;
-#pragma link C++ class AliFMDAnalysisTaskGenerateBackground+;
+#pragma link C++ class AliFMDAnalysisTaskGenerateCorrection+;
 
 #else
 # error Not for compilation 
index 3bb69ce..299e79e 100644 (file)
@@ -4,18 +4,19 @@
 SRCS           =  analysis/AliFMDAnaParameters.cxx     \
                   analysis/AliFMDAnaCalibEnergyDistribution.cxx \
                   analysis/AliFMDAnaCalibBackgroundCorrection.cxx \
-                  analysis/AliFMDAnalysisTaskESDReader.cxx     \
+                   analysis/AliFMDAnaCalibEventSelectionEfficiency.cxx \
+                   analysis/AliFMDAnalysisTaskESDReader.cxx    \
                   analysis/AliFMDAnalysisTaskSharing.cxx       \
                   analysis/AliFMDAnalysisTaskDensity.cxx       \
                   analysis/AliFMDAnalysisTaskBackgroundCorrection.cxx \
                   analysis/AliFMDAnalysisTaskCollector.cxx   \
                   analysis/AliFMDAnalysisTaskDndeta.cxx         \
                   analysis/AliFMDAnalysisTaskSE.cxx       \
-                  analysis/AliFMDAnalysisTaskGenerateBackground.cxx
+                  analysis/AliFMDAnalysisTaskGenerateCorrection.cxx
 
 
 HDRS           =  $(SRCS:.cxx=.h) 
-EINCLUDE       := ANALYSIS 
+EINCLUDE       := ANALYSIS PWG0
 #ELIBS           := ANALYSIS
 #ELIBSDIR      := $(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET)
 DHDR           := analysis/FMDanalysisLinkDef.h