new analysis task: multiplicity fluctuations (Maitreyee Mukherjee <maitreyee.mukherje...
authormiweber <miweber@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 18 Nov 2013 15:09:01 +0000 (15:09 +0000)
committermiweber <miweber@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 18 Nov 2013 15:09:01 +0000 (15:09 +0000)
PWGCF/CMakelibPWGCFebye.pkg
PWGCF/EBYE/Fluctuations/AliEbyEMultFluctuationTask.cxx [new file with mode: 0644]
PWGCF/EBYE/Fluctuations/AliEbyEMultFluctuationTask.h [new file with mode: 0644]
PWGCF/EBYE/macros/AddAliEbyEMultFluctuationTask.C [new file with mode: 0644]
PWGCF/PWGCFebyeLinkDef.h

index 74f5357..e4a5718 100644 (file)
@@ -52,6 +52,7 @@ set ( SRCS
     EBYE/Fluctuations/AliEbyEHigherMomentsTask.cxx 
     EBYE/Fluctuations/AliEbyEHigherMomentsEffContTask.cxx    
     EBYE/Fluctuations/AliHigherMomentsToyModel.cxx    
+    EBYE/Fluctuations/AliEbyEMultFluctuationTask.cxx
     EBYE/MeanPtFluctuations/AliAnalysisTaskPtFluc.cxx 
     EBYE/MeanPtFluctuations/AliAnalysisTaskPtFlucPbPb.cxx
     EBYE/PIDFluctuation/task/AliAnalysisTaskPIDFluctuation.cxx  
diff --git a/PWGCF/EBYE/Fluctuations/AliEbyEMultFluctuationTask.cxx b/PWGCF/EBYE/Fluctuations/AliEbyEMultFluctuationTask.cxx
new file mode 100644 (file)
index 0000000..11f5844
--- /dev/null
@@ -0,0 +1,446 @@
+
+#include "TChain.h"
+#include "TTree.h"
+#include "TNtuple.h"
+#include "TH1F.h"
+#include "TH2D.h"
+#include "TH1D.h"
+#include "TCanvas.h"
+#include "TArrayD.h"
+#include "AliAnalysisTask.h"
+#include "AliAnalysisManager.h"
+#include "AliAODHeader.h"
+#include "AliAODTrack.h"
+#include "AliAODTracklets.h"
+#include "AliAODpidUtil.h"
+#include "AliVTrack.h"
+#include "AliAODEvent.h"
+#include "AliAODInputHandler.h"
+#include "AliCentrality.h"
+#include "AliEbyEMultFluctuationTask.h"
+#include "AliAODVertex.h"
+#include "AliAODVZERO.h"
+#include "AliCentrality.h"
+#include "AliPID.h"
+#include "AliPIDResponse.h"
+#include "AliPIDCombined.h"
+#include "AliAODpidUtil.h"
+#include "TRandom.h"
+#include "AliTPCPIDResponse.h"
+#include "AliTRDPIDResponse.h"
+
+
+ClassImp(AliEbyEMultFluctuationTask)
+
+//________________________________________________________________________
+AliEbyEMultFluctuationTask::AliEbyEMultFluctuationTask(const char *name) 
+: AliAnalysisTaskSE(name), fAOD(0), fOutputList(0),fHistNchPt(0),fHistNchEta(0),fHistNchEtaCent(0),fHistNchPhi(0),fHistDCAxy(0),fHistDCAz(0),fHistnclus(0),fHistchi2ndf(0),fDeDx(NULL),fHistMult(0),fAODVertex(0),fPID(0),fEventCounter(0),histcounter(0),fHistVz(0),fHistchi2ndfvscs(0),My_ntuple(0),fHistMultV0A(0),fHistMultV0C(0),fHistMultV0total(0),fCentralityCounter(0),fCentralityEstimator("V0M"),Counter(0)
+   
+
+
+{
+  // Constructor
+  for(Int_t ibin=0;ibin<91;ibin++)
+               {
+                       fMult[ibin]=NULL;
+               }
+               for(Int_t jbin=0;jbin<46;jbin++)
+               {
+               fMultTwo[jbin]=NULL;
+               }
+               for(Int_t kbin=0;kbin<15;kbin++)
+               {
+               fMultFive[kbin]=NULL;
+               }
+       
+           
+  DefineInput(0, TChain::Class());
+  
+  DefineOutput(1, TList::Class());
+}
+
+//________________________________________________________________________
+Bool_t AliEbyEMultFluctuationTask :: SelectEvent(AliAODVertex* vertex)
+{
+if(vertex) 
+  
+      if(vertex->GetNContributors() < 0) return kFALSE;
+
+         
+         Double_t lvx = vertex->GetX();
+         Double_t lvy = vertex->GetY();
+         Double_t lvz = vertex->GetZ();
+         
+         fEventCounter->Fill(3);
+         
+         
+         if(TMath::Abs(lvx) > 0.3)  return kFALSE;
+           if(TMath::Abs(lvy) > 0.3) return kFALSE;
+           if(TMath::Abs(lvz) > 10) return kFALSE;
+           if(vertex->GetType()==AliAODVertex::kPileupSPD) return kFALSE;  
+            
+               fEventCounter->Fill(5);
+               fHistVz->Fill(lvz);             
+return kTRUE;
+}
+//_____________________________________________________________________________
+Int_t AliEbyEMultFluctuationTask :: SelectTrack(AliAODTrack* track)
+{
+       Double_t eta = track->Eta();
+       Double_t phi = track->Phi();
+
+     if(TMath :: Abs(eta)>0.8) return 0;
+
+ if(!track->TestFilterBit(128)) return 0;
+
+ Float_t dxy, dz;
+                 
+  dxy = track->DCA();
+ dz  = track->ZAtDCA();
+                   if(TMath ::Abs(dxy) >2.4 || TMath ::Abs(dz)>3.0) return 0;
+                 // cout<<dxy<<dz<<endl;
+
+
+  Double_t nclus = track->GetTPCClusterInfo(2,1);
+  if(nclus<80) return 0;
+
+//chi2cut
+
+ Double_t chi2ndf = track->Chi2perNDF();
+  if(chi2ndf>4) return 0;
+
+return 1;
+  
+}
+
+//___________________________________________________________________________________
+void AliEbyEMultFluctuationTask::UserCreateOutputObjects()
+{
+  fOutputList = new TList();
+
+
+       
+  My_ntuple = new TNtuple("My_ntuple", "My_ntuple", "Mult:Mult1:Mult2:nCentrality:fV0total:nBin2:nBin5:spdmult0:spdmult1:tracklets:run");
+    fOutputList->Add(My_ntuple);
+
+fOutputList->SetOwner(kTRUE);
+fEventCounter = new TH1D("fEventCounter","EventCounter", 10, 0.5,10.5);
+fOutputList->Add(fEventCounter);
+
+
+histcounter = new TH1D("histcounter","histcounter", 10, 0.5,10.5);
+fOutputList->Add(histcounter);
+
+
+TString BinLebel;
+fCentralityCounter = new TH1D("fEventCounter","EventCounter", 100, 0.5,100.5);
+TAxis *xaxis = fCentralityCounter->GetXaxis();
+ for(Int_t ibin=0;ibin<100;ibin++)
+{
+BinLebel="cent";BinLebel+=ibin;
+xaxis->SetBinLabel(ibin,BinLebel.Data());
+
+}
+fOutputList->Add(fCentralityCounter);
+
+fHistMultV0A = new TH1F("fHistMultV0A","Mult-VOA",22000,0,22000);
+fHistMultV0C = new TH1F("fHistMultV0C","Mult-VOC",22000,0,22000);
+fHistMultV0total = new TH1F("fHistMultV0total","Mult-VOTotal",22000,0,22000);
+
+
+ fHistNchEta = new TH1D("fHistNchEta", "#eta distribution of charged tracks(for hybrid)", 200, -0.8, 0.8);
+fHistNchEta->GetXaxis()->SetTitle("#eta");
+fHistNchEta->GetYaxis()->SetTitle("dNch/d#eta");
+
+
+fHistNchEtaCent = new TH1D("fHistNchEtaCent", "Central #eta distribution of charged tracks(for hybrid)", 200, -0.8, 0.8);
+fHistNchEtaCent->GetXaxis()->SetTitle("#eta");
+fHistNchEtaCent->GetYaxis()->SetTitle("dNch/d#eta(Central)");
+
+
+
+fHistNchPhi = new TH1D("fHistNchPhi", "#phi distribution of charged tracks(for hybrid)", 200, -10, 10);
+fHistNchPhi->GetXaxis()->SetTitle("#phi");
+fHistNchPhi->GetYaxis()->SetTitle("dNch/d#phi");
+
+fHistNchPt = new TH1D("fHistNchPt", "P_{T} distribution(charged tracks for hybrid)", 150, 0.1, 3.1);
+fHistNchPt->GetXaxis()->SetTitle("P_{T} (GeV/c)");
+fHistNchPt->GetYaxis()->SetTitle("dNch/dP_{T}(c/GeV)");
+
+
+ fHistchi2ndfvscs = new TH2D("fHistchi2ndfvscs","Chi2/ndf from Gaussian fits of Multiplicity Distribution",95,0,95,60,0,6);
+ fHistchi2ndfvscs->SetXTitle("%cs");
+ fHistchi2ndfvscs->SetYTitle("Chi2/ndf");
+fHistnclus=new TH1D("no of clusters","no of tracks after TPCcluster cut",200,0,200);
+fHistchi2ndf= new TH1D("chi_square/ndf","no of tracks after chi_square/ndf cut",10,0,10);
+
+ fHistVz = new TH1D("fHistVz","Primary vertex distribution - z coordinate",90,-15,15);
+ fHistVz->SetXTitle("Vz");
+ fHistVz->SetYTitle("Entries");
+
+
+  fOutputList->Add(fHistMultV0A);
+  fOutputList->Add(fHistMultV0C);
+  fOutputList->Add(fHistMultV0total);
+  fOutputList->Add(fHistnclus);
+  fOutputList->Add(fHistchi2ndf); 
+  fOutputList->Add(fHistNchPt);
+  fOutputList->Add(fHistNchEta);
+  fOutputList->Add(fHistNchEtaCent);
+
+  fOutputList->Add(fHistNchPhi);
+  fOutputList->Add(fHistVz);
+  fOutputList->Add(fHistchi2ndfvscs);
+
+
+TString hname;
+TString htitle;
+  
+  for(Int_t i = 0; i < 25; i++)  {
+    hname  = "fMult"; hname+=i;
+    htitle = "Multiplicity in Cent Bin "; htitle+=i;
+    fMult[i] = new TH1F(hname.Data(),htitle.Data(),5000,0.5,5000.5);
+    fOutputList->Add(fMult[i]);
+  }
+  
+  for(Int_t i = 25; i < 50; i++) {
+   hname  = "fMult"; hname+=i;
+    htitle = "Multiplicity in Cent Bin "; htitle+=i;
+    fMult[i] = new TH1F(hname.Data(),htitle.Data(),3000,0.5,3000.5);
+    fOutputList->Add(fMult[i]);
+  }
+  
+  for(Int_t i = 50; i < 91; i++) {
+    hname  = "fMult"; hname+=i;
+    htitle = "Multiplicity in Cent Bin "; htitle+=i;
+    fMult[i] = new TH1F(hname.Data(),htitle.Data(),2000,0.5,2000.5);
+    fOutputList->Add(fMult[i]);
+  }
+
+//****************for 2% centrality bin**************************//
+for(Int_t i = 0; i < 12; i++)  {
+    hname  = "fMultTwo"; hname+=i;
+    htitle = "Multiplicity in Cent Bin "; htitle+=i;
+    fMultTwo[i] = new TH1F(hname.Data(),htitle.Data(),5000,0.5,5000.5);
+    fOutputList->Add(fMultTwo[i]);
+  }
+  
+  for(Int_t i = 12; i < 25; i++) {
+   hname  = "fMultTwo"; hname+=i;
+    htitle = "Multiplicity in Cent Bin "; htitle+=i;
+    fMultTwo[i] = new TH1F(hname.Data(),htitle.Data(),3000,0.5,3000.5);
+    fOutputList->Add(fMultTwo[i]);
+  }
+  
+  for(Int_t i = 25; i <= 45; i++) {
+    hname  = "fMultTwo"; hname+=i;
+    htitle = "Multiplicity in Cent Bin "; htitle+=i;
+    fMultTwo[i] = new TH1F(hname.Data(),htitle.Data(),2000,0.5,2000.5);
+    fOutputList->Add(fMultTwo[i]);
+  }
+
+  
+  
+//*****************************for 5 % centrality bin********************//
+for(Int_t i = 0; i < 5; i++)  {
+    hname  = "fMultFive"; hname+=i;
+    htitle = "Multiplicity in Cent Bin "; htitle+=i;
+    fMultFive[i] = new TH1F(hname.Data(),htitle.Data(),5000,0.5,5000.5);
+    fOutputList->Add(fMultFive[i]);
+  }
+  
+  for(Int_t i = 5; i < 10; i++) {
+   hname  = "fMultFive"; hname+=i;
+    htitle = "Multiplicity in Cent Bin "; htitle+=i;
+    fMultFive[i] = new TH1F(hname.Data(),htitle.Data(),3000,0.5,3000.5);
+    fOutputList->Add(fMultFive[i]);
+  }
+  
+  for(Int_t i = 10; i <= 14; i++) {
+    hname  = "fMultFive"; hname+=i;
+    htitle = "Multiplicity in Cent Bin "; htitle+=i;
+    fMultFive[i] = new TH1F(hname.Data(),htitle.Data(),2000,0.5,2000.5);
+    fOutputList->Add(fMultFive[i]);
+  }
+
+       
+       }
+
+//________________________________________________________________________
+void AliEbyEMultFluctuationTask::UserExec(Option_t *) 
+{  
+  
+
+
+// Post output data.
+  fAOD = dynamic_cast<AliAODEvent*>(InputEvent());
+  if (!fAOD) {
+    printf("ERROR: fAOD not available\n");
+    return;
+
+  }
+
+  //  Int_t Counter = 0;
+Bool_t isSelected = (((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected() & AliVEvent::kMB);
+if(!isSelected) return;
+ fEventCounter->Fill(1);
+ //Counter++;
+
+
+// Get the event vertex.
+       fAODVertex = fAOD->GetPrimaryVertex();
+       
+       if(TMath::Abs((fAODVertex->GetZ())-((fAOD->GetPrimaryVertexSPD())->GetZ())) > 0.5) return;
+
+       if (!fAODVertex) {
+               
+               return;
+       }
+
+
+    if (!SelectEvent(fAODVertex)) return;
+       
+    //***************VZERO-AMPLITUDE*************************//        
+
+       AliAODVZERO *aodV0 = fAOD->GetVZEROData();
+       Float_t fV0Amult = aodV0->GetMTotV0A();
+       Float_t fV0Cmult = aodV0->GetMTotV0C();      
+               Float_t fV0total = fV0Amult + fV0Cmult;
+
+       //*****************SPD-CLUSTERS*************************//
+
+
+       
+               AliAODHeader *fHeader = fAOD->GetHeader();
+               Int_t spdmult0 = fHeader->GetNumberOfITSClusters(0);
+               Int_t spdmult1 = fHeader->GetNumberOfITSClusters(1);
+               Int_t run = fHeader->GetRunNumber();
+               
+               AliAODTracklets *fTracklets = fAOD->GetTracklets(); 
+               Int_t tracklets = fTracklets->GetNumberOfTracklets();
+       
+
+               //********************CENTRALITY******************************************//    
+
+    AliCentrality *centrality= fAOD->GetCentrality();
+    Double_t cent=centrality->GetCentralityPercentile("V0M");
+    //    cout<<"cent= "<<cent<<endl;  
+
+ if(cent < 0 || cent >= 91) return;
+
+Int_t nCentrality = (Int_t)cent;
+       
+Int_t nBin2= (Int_t)( nCentrality/2.0);
+       
+Int_t nBin5 = (Int_t)( nCentrality/5.0);
+ if(nBin5==0){
+
+histcounter->Fill(1);
+ }
+       
+
+       
+fCentralityCounter->Fill(nCentrality);
+
+fEventCounter->Fill(7);
+
+Double_t Mult=0.0;
+       Double_t Mult1=0.0;
+       Double_t Mult2=0.0;
+
+       //printf("There are %d tracks in this event\n", fAOD->GetNumberOfTracks());
+
+  for (Int_t iTracks = 0; iTracks < fAOD->GetNumberOfTracks(); iTracks++) {
+  AliAODTrack*  track = fAOD->GetTrack(iTracks);
+    if (!track) {
+      printf("ERROR: Could not receive track %d\n", iTracks);
+      continue;
+    }
+
+
+
+
+// Find the track classification.
+Int_t tracktype = SelectTrack(track);
+
+
+ if (tracktype==0) {
+   continue;          
+               }
+
+ if(track->GetType()== AliAODTrack::kPrimary)
+{
+  Short_t Charge = track->Charge();
+       Double_t eta = track->Eta();
+ if(TMath :: Abs(Charge)==1 && nBin5==0){
+                      fHistNchEtaCent->Fill(eta);
+                      
+                    }
+               
+       Double_t pt = track->Pt();
+       if( pt < 0.3 || pt > 2.0 ) continue;
+  Double_t nclus = track->GetTPCClusterInfo(2,1);
+  Double_t chi2ndf = track->Chi2perNDF();
+  fHistnclus->Fill(nclus);
+  fHistchi2ndf->Fill(chi2ndf);
+  fHistchi2ndfvscs->Fill(cent,chi2ndf);
+
+               //Count the charge particles-----
+                 if(TMath :: Abs(Charge)==1) Mult +=1;
+                 if(Charge==1) Mult1 +=1;
+                       if(Charge==-1) Mult2 +=1;
+
+
+       Double_t phi = track->Phi();
+                    if(TMath :: Abs(Charge)==1) fHistNchPt->Fill(pt);
+                   
+                    
+                 if(TMath :: Abs(Charge)==1) fHistNchEta->Fill(eta);
+                  if(TMath :: Abs(Charge)==1) fHistNchPhi->Fill(phi);
+                 
+
+ }
+
+
+  } //track loop 
+
+
+  //****************Filling Tree*************************//
+  
+  My_ntuple->Fill(Mult,Mult1,Mult2,nCentrality,fV0total,nBin2,nBin5,spdmult0,spdmult1,tracklets,run);
+
+
+fMult[nCentrality]->Fill(Mult);
+
+if(nBin2<=45) {
+fMultTwo[nBin2]->Fill(Mult);
+ }
+if(nBin5<=14){
+fMultFive[nBin5]->Fill(Mult);
+ }
+
+ fHistMultV0A->Fill(fV0Amult);
+ fHistMultV0C->Fill(fV0Cmult);
+ fHistMultV0total->Fill(fV0total);
+
+  PostData(1, fOutputList);
+}
+//________________________________________________________________________
+void AliEbyEMultFluctuationTask::Terminate(Option_t *) 
+{
+  
+
+  fOutputList = dynamic_cast<TList*> (GetOutputData(1));
+  if (!fOutputList) {
+    printf("ERROR: Output list not available\n");
+    return;
+  }
+}
diff --git a/PWGCF/EBYE/Fluctuations/AliEbyEMultFluctuationTask.h b/PWGCF/EBYE/Fluctuations/AliEbyEMultFluctuationTask.h
new file mode 100644 (file)
index 0000000..10be42f
--- /dev/null
@@ -0,0 +1,103 @@
+#ifndef AliEbyEMultFluctuationTask_cxx
+#define AliEbyEMultFluctuationTask_cxx
+
+class TString;
+class TH1F;
+class TH2D;
+class TH1I;
+class TNtuple;
+class AliESDTrack;
+class AliAODEvent;
+class AliAODHeader;
+class AliVEvent;
+class AliAODVertex;
+class AliAODVZERO;
+class AliAODTrack;
+class AliAODTracklets;
+#include "AliAnalysisTaskSE.h"
+
+class AliEbyEMultFluctuationTask : public AliAnalysisTaskSE {
+ public:
+ AliEbyEMultFluctuationTask() : AliAnalysisTaskSE(), fAOD(0), fOutputList(0), fAODVertex(0),fHistNchPt(0),fHistNchEta(0),fHistNchEtaCent(0),fHistNchPhi(0),fDeDx(NULL),fPID(0),fEventCounter(0),histcounter(0),fCentralityCounter(0),fHistDCAxy(0),fHistDCAz(0),fHistnclus(0),fHistchi2ndf(0),fHistVz(0),fHistMultV0A(0),fHistMultV0C(0),fHistMultV0total(0),My_ntuple(0),fHistchi2ndfvscs(0),fCentralityEstimator("V0M"),Counter(0),fCentralityBins20(kFALSE) {
+               for(Int_t ibin=0;ibin<91;ibin++)
+               {
+                       fMult[ibin]=NULL;
+               }
+               for(Int_t jbin=0;jbin<46;jbin++)
+               {
+               fMultTwo[jbin]=NULL;
+               }
+               for(Int_t kbin=0;kbin<15;kbin++)
+               {
+               fMultFive[kbin]=NULL;
+               }
+       
+         
+       
+
+       }
+  AliEbyEMultFluctuationTask(const char *name);
+  virtual ~AliEbyEMultFluctuationTask() {}
+  
+  virtual void   UserCreateOutputObjects();
+  virtual void   UserExec(Option_t *option);
+  virtual void   Terminate(Option_t *);
+       
+
+  
+  void SetCentralityEstimator(const char* centralityEstimator) {
+    fCentralityEstimator = centralityEstimator;}
+  void SetCentralityBins20() {fCentralityBins20 = kTRUE;}
+private:
+//functions
+       
+       Bool_t SelectEvent(AliAODVertex *vertex);
+       Int_t SelectTrack(AliAODTrack *track);
+       Int_t Counter;
+       
+  
+ private://objects
+ AliAODEvent *fAOD;    //! AOD object
+AliAODVertex *fAODVertex;
+
+       
+TH1D        *fHistNchPt; //! 
+TH1D *fHistNchEta;//!
+ TH1D *fHistNchEtaCent;
+TH1D *fHistNchPhi;
+ TH1D *fHistDCAxy;
+ TH1D *fHistDCAz;
+ TH1D *fHistnclus;
+ TH1D *fHistchi2ndf;
+TH2D *fDeDx;  
+ TH2D *fHistchi2ndfvscs;
+TH1I *fPID;
+TH1D *fHistMult;
+
+TH1F *fMult[91];
+TH1F *fMultTwo[46];
+TH1F *fMultFive[15];
+
+ TH1D *fHistVz;
+       TH1F    *fHistMultV0A;
+       TH1F    *fHistMultV0C;
+               TH1F    *fHistMultV0total;
+               TNtuple *My_ntuple;
+TList       *fOutputList; //! Output list
+       
+
+ TString fCentralityEstimator;//"V0M","TRK","TKL","ZDC","FMD"
+ Bool_t fCentralityBins20;//centrality bins of 5% width
+
+ TH1D *fCentralityCounter;
+ TH1D *fEventCounter;
+TH1D *histcounter;
+
+  AliEbyEMultFluctuationTask(const AliEbyEMultFluctuationTask&); 
+  AliEbyEMultFluctuationTask& operator=(const AliEbyEMultFluctuationTask&);
+
+  ClassDef(AliEbyEMultFluctuationTask, 1); 
+};
+
+#endif
diff --git a/PWGCF/EBYE/macros/AddAliEbyEMultFluctuationTask.C b/PWGCF/EBYE/macros/AddAliEbyEMultFluctuationTask.C
new file mode 100644 (file)
index 0000000..65d9268
--- /dev/null
@@ -0,0 +1,64 @@
+//=================================================================//
+//       Analysis AddTask for Multiplicity Fluctuation  Analysis 
+//=================================================================//
+
+TString fileNameBase="AnalysisResults.root";
+//=======================================================//
+
+AliAnalysisTask* AddAliEbyEMultFluctuationTask(Double_t vx, 
+                                            Double_t vy, 
+                                            Double_t vz,
+                                            Double_t dcaxy, 
+                                            Double_t dcaz,
+                                            Double_t ptl, 
+                                            Double_t pth,
+                                            Double_t eta,
+                                            Int_t    nclus,
+                                            Int_t AODfilterBit, 
+                                            const char* centralityEstimator,
+                                            const char* analysisType,
+                                            const char* taskstring) {
+
+TString taskname = "MF";
+  taskname.Append(taskstring);
+
+AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
+  if (!mgr) {
+    ::Error("AddTaskMultFluctuations", "No analysis manager to connect to.");
+    return NULL;
+  }
+  
+  if (!mgr->GetInputEventHandler()) {
+    ::Error("AddTaskMultFluctuations", "This task requires an input event handler");
+    return NULL;
+  }
+  TString type = mgr->GetInputEventHandler()->GetDataType();
+
+ AliEbyEMultFluctuationTask *taskMF = new AliEbyEMultFluctuationTask(taskstring);
+
+ //taskMF->SetVertexDiamond(vx,vy,vz);
+ /// taskMF->SetKinematicsCutsAOD(ptl,pth,eta);
+ // taskMF->SetDCA(dcaxy, dcaz);
+ // taskMF->SetCentralityEstimator(centralityEstimator);
+ // taskMF->SetAnalysisType(analysisType);
+ // taskMF->SetPtRange(ptl,pth);
+ // taskMF->SetEta(eta);
+ // taskMF->SetTPCNclus(nclus);
+ // taskMF->SetAODtrackCutBit(AODfilterBit);
+  
+  taskMF->SelectCollisionCandidates(AliVEvent::kMB);
+
+  mgr->AddTask(taskMF);
+  
+
+AliAnalysisDataContainer *coutFA = mgr->CreateContainer(taskname.Data(), 
+                                                         TList::Class(),
+                                                         AliAnalysisManager::kOutputContainer,
+                                                         fileNameBase.Data());
+  mgr->ConnectInput(taskMF, 0, mgr->GetCommonInputContainer());
+  mgr->ConnectOutput(taskMF, 1, coutFA);
+  
+  return taskMF;
+}
+
+  
index ea5025c..9538d23 100644 (file)
@@ -32,6 +32,7 @@
 #pragma link C++ class AliEbyEHigherMomentsTask+;
 #pragma link C++ class AliEbyEHigherMomentsEffContTask+;
 #pragma link C++ class AliHigherMomentsToyModel+;
+#pragma link C++ class AliEbyEMultFluctuationTask+;
 
 #pragma link C++ class AliAnalysisTaskPtFluc+;
 #pragma link C++ class AliAnalysisTaskPtFlucPbPb+;