new analysis for omega identification
authorgconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 3 Nov 2009 14:26:40 +0000 (14:26 +0000)
committergconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 3 Nov 2009 14:26:40 +0000 (14:26 +0000)
PWG4/CMake_libPWG4PartCorrDep.txt
PWG4/PWG4PartCorrDepLinkDef.h
PWG4/PartCorrDep/AliAnaOmegaToPi0Gamma.cxx [new file with mode: 0644]
PWG4/PartCorrDep/AliAnaOmegaToPi0Gamma.h [new file with mode: 0644]
PWG4/libPWG4PartCorrDep.pkg

index 68eea3a9618099176c53d1e546914b774c4de6e8..c73f6a2c82b65086221cb15f605fed75c67f7274 100755 (executable)
@@ -7,8 +7,9 @@ set(SRCS
        PartCorrDep/AliAnaParticleIsolation.cxx PartCorrDep/AliAnaParticlePartonCorrelation.cxx 
        PartCorrDep/AliAnaParticleHadronCorrelation.cxx PartCorrDep/AliAnaParticleJetFinderCorrelation.cxx
        PartCorrDep/AliAnaParticleJetLeadingConeCorrelation.cxx PartCorrDep/AliAnaChargedParticles.cxx
-       PartCorrDep/AliAnaCalorimeterQA.cxx PartCorrDep/AliAnaNeutralMeson.cxx  
-       PartCorrDep/AliAnaElectron.cxx    
+       PartCorrDep/AliAnaCalorimeterQA.cxx PartCorrDep/AliAnaElectron.cxx    
+       PartCorrDep/AliAnalysisTaskTaggedPhotons.cxx PartCorrDep/AliAnaOmegaToPi0Gamma.cxx
+
 )
 
 # fill list of header files from list of source files
index 90d03b90fbf4f9abafcf0debddc31ae12ea4f0a6..66ad6195a00e4c759b9c0163ea5d9356a5221038 100755 (executable)
@@ -17,8 +17,8 @@
 #pragma link C++ class AliAnaParticleJetFinderCorrelation+;
 #pragma link C++ class AliAnaParticleJetLeadingConeCorrelation+;
 #pragma link C++ class AliAnaCalorimeterQA+;
-#pragma link C++ class AliAnaNeutralMeson+;
 #pragma link C++ class AliAnaElectron+;
 #pragma link C++ class AliAnalysisTaskTaggedPhotons+;
+#pragma link C++ class AliAnaOmegaToPi0Gamma+;
 
 #endif
diff --git a/PWG4/PartCorrDep/AliAnaOmegaToPi0Gamma.cxx b/PWG4/PartCorrDep/AliAnaOmegaToPi0Gamma.cxx
new file mode 100644 (file)
index 0000000..aa5cea3
--- /dev/null
@@ -0,0 +1,811 @@
+/**************************************************************************\r
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *\r
+ *                                                                        *\r
+ * Author: The ALICE Off-line Project.                                    *\r
+ * Contributors are mentioned in the code where appropriate.              *\r
+ *                                                                        *\r
+ * Permission to use, copy, modify and distribute this software and its   *\r
+ * documentation strictly for non-commercial purposes is hereby granted   *\r
+ * without fee, provided that the above copyright notice appears in all   *\r
+ * copies and that both the copyright notice and this permission notice   *\r
+ * appear in the supporting documentation. The authors make no claims     *\r
+ * about the suitability of this software for any purpose. It is          *\r
+ * provided "as is" without express or implied warranty.                  *\r
+ **************************************************************************/\r
+/* $Id: $ */\r
+//_________________________________________________________________________\r
+// class to extract omega(782)->pi0+gamma->3gamma\r
+//\r
+//-- Author: Renzhuo Wan (IOPP-Wuhan, China)\r
+//_________________________________________________________________________\r
+\r
+// --- ROOT system\r
+class TROOT;\r
+\r
+// --- AliRoot system\r
+//class AliVEvent;\r
+// --- ROOT system ---\r
+#include "TH2F.h"\r
+#include "TLorentzVector.h"\r
+#include "TParticle.h"\r
+#include "TCanvas.h"\r
+#include "TFile.h"\r
+//---- AliRoot system ----\r
+#include "AliAnaOmegaToPi0Gamma.h"\r
+#include "AliCaloTrackReader.h"\r
+#include "AliCaloPID.h"\r
+#include "AliStack.h"\r
+#include "AliVEvent.h"\r
+#include "AliAODEvent.h"\r
+#include "AliAODMCParticle.h"\r
+ClassImp(AliAnaOmegaToPi0Gamma)\r
+\r
+//______________________________________________________________________________\r
+AliAnaOmegaToPi0Gamma::AliAnaOmegaToPi0Gamma() : AliAnaPartCorrBaseClass(),\r
+fInputAODGamma(0),fInputAODPi0(0), fInputAODGammaName(""),\r
+fEventsList(0), \r
+fVtxZCut(0), fCent(0), fRp(0), fBadChDist(0),\r
+fNVtxZBin(0), fNCentBin(0), fNRpBin(0), fNBadChDistBin(0), fNpid(0),\r
+fNmaxMixEv(0), fPi0Mass(0),\r
+fPi0MassWindow(0),\r
+fNbinsPt(0),fPtBegin(0),fPtEnd(0),\r
+fNbinsM(0),fMinM(0),fMaxM(0),\r
+fhEtalon(0),\r
+fRealOmega(0), fMixAOmega(0),\r
+fMixBOmega(0), fMixCOmega(0),\r
+fRealOmega1(0), fMixAOmega1(0),\r
+fMixBOmega1(0), fMixCOmega1(0),\r
+fRealOmega2(0), fMixAOmega2(0),\r
+fMixBOmega2(0), fMixCOmega2(0),\r
+fhOmegaPriPt(0)\r
+{\r
+ //Default Ctor\r
+ InitParameters();\r
+}\r
+\r
+//______________________________________________________________________________\r
+AliAnaOmegaToPi0Gamma::AliAnaOmegaToPi0Gamma(const AliAnaOmegaToPi0Gamma & ex) : AliAnaPartCorrBaseClass(ex),\r
+fInputAODGamma(new TClonesArray (*ex.fInputAODGamma)), \r
+fInputAODPi0(new TClonesArray (*ex.fInputAODPi0)),\r
+fInputAODGammaName(ex.fInputAODGammaName),\r
+fEventsList(ex.fEventsList), \r
+fVtxZCut(ex.fVtxZCut), fCent(ex.fCent), fRp(ex.fRp), fBadChDist(ex.fBadChDist),\r
+fNVtxZBin(ex.fNVtxZBin), fNCentBin(ex.fNCentBin), fNRpBin(ex.fNRpBin),\r
+fNBadChDistBin(ex.fNBadChDistBin),fNpid(ex.fNpid),\r
+fNmaxMixEv(ex.fNmaxMixEv), fPi0Mass(ex.fPi0Mass),\r
+fPi0MassWindow(ex.fPi0MassWindow),\r
+fNbinsPt(ex.fNbinsPt),fPtBegin(ex.fPtBegin),fPtEnd(ex.fPtEnd),\r
+fNbinsM(ex.fNbinsM),fMinM(ex.fMinM),fMaxM(ex.fMaxM),\r
+fhEtalon(ex.fhEtalon),\r
+fRealOmega(ex.fRealOmega), fMixAOmega(ex.fMixAOmega),\r
+fMixBOmega(ex.fMixBOmega), fMixCOmega(ex.fMixCOmega),\r
+fRealOmega1(ex.fRealOmega1), fMixAOmega1(ex.fMixAOmega1),\r
+fMixBOmega1(ex.fMixBOmega1), fMixCOmega1(ex.fMixCOmega1),\r
+fRealOmega2(ex.fRealOmega2), fMixAOmega2(ex.fMixAOmega2),\r
+fMixBOmega2(ex.fMixBOmega2), fMixCOmega2(ex.fMixCOmega2),\r
+fhOmegaPriPt(ex.fhOmegaPriPt)\r
+{\r
+ // cpy ctor\r
+ //Do not need it\r
+}\r
+\r
+//______________________________________________________________________________\r
+AliAnaOmegaToPi0Gamma & AliAnaOmegaToPi0Gamma::operator = (const AliAnaOmegaToPi0Gamma & ex)\r
+{\r
+ // assignment operator\r
+\r
+ if(this == &ex)return *this;\r
+   ((AliAnaPartCorrBaseClass *)this)->operator=(ex);\r
+   fInputAODGamma = new TClonesArray(*ex.fInputAODGamma);\r
+   fInputAODPi0 = new TClonesArray(*ex.fInputAODPi0);\r
+//   fInputAODGamma=ex.fInputAODGamma;\r
+//   fInputAODPi0=ex.fInputAODPi0;\r
+   fInputAODGammaName = ex.fInputAODGammaName;\r
+   fEventsList = ex.fEventsList;\r
+\r
+   fVtxZCut=ex.fVtxZCut;\r
+   fCent=ex.fCent;\r
+   fRp=ex.fRp;\r
+   fBadChDist=ex.fBadChDist;\r
+   fNVtxZBin=ex.fNVtxZBin; \r
+   fNCentBin=ex.fNCentBin;\r
+   fNRpBin=ex.fNRpBin;\r
+   fNBadChDistBin=ex.fNBadChDistBin;\r
+   fNpid=ex.fNpid;\r
+\r
+   fNmaxMixEv =ex.fNmaxMixEv;\r
+   fPi0Mass=ex.fPi0Mass;\r
+   fPi0MassWindow=ex.fPi0MassWindow;\r
+\r
+   fNbinsPt=ex.fNbinsPt;fPtBegin=ex.fPtBegin;fPtEnd=ex.fPtEnd;\r
+   fNbinsM=ex.fNbinsM;fMinM=ex.fMinM;fMaxM=ex.fMaxM;\r
+   \r
+   fhEtalon=ex.fhEtalon;\r
+   fRealOmega=ex.fRealOmega;\r
+   fMixAOmega=ex.fMixAOmega;\r
+   fMixBOmega=ex.fMixBOmega;\r
+   fMixCOmega=ex.fMixCOmega;\r
+   fRealOmega1=ex.fRealOmega1;\r
+   fMixAOmega1=ex.fMixAOmega1;\r
+   fMixBOmega1=ex.fMixBOmega1;\r
+   fMixCOmega1=ex.fMixCOmega1;\r
+   fRealOmega2=ex.fRealOmega2;\r
+   fMixAOmega2=ex.fMixAOmega2;\r
+   fMixBOmega2=ex.fMixBOmega2;\r
+   fMixCOmega2=ex.fMixCOmega2;\r
+   fhOmegaPriPt=ex.fhOmegaPriPt;\r
+  return *this;\r
+       \r
+}\r
+\r
+//______________________________________________________________________________\r
+AliAnaOmegaToPi0Gamma::~AliAnaOmegaToPi0Gamma() {\r
+\r
+  //dtor\r
+  if(fInputAODGamma){\r
+    fInputAODGamma->Clear();\r
+    delete fInputAODGamma;\r
+  }\r
+  \r
+  if(fInputAODPi0){\r
+    fInputAODPi0->Clear();\r
+    delete fInputAODPi0;\r
+  }  \r
+\r
+  if(fEventsList){\r
+     for(Int_t i=0;i<fNVtxZBin;i++){\r
+        for(Int_t j=0;j<fNCentBin;j++){\r
+           for(Int_t k=0;k<fNRpBin;k++){\r
+               fEventsList[i*fNCentBin*fNRpBin+j*fNRpBin+k]->Clear();\r
+               delete fEventsList[i*fNCentBin*fNRpBin+j*fNRpBin+k];\r
+           }\r
+        }\r
+     }\r
+  }\r
+  delete [] fEventsList;\r
+  fEventsList=0;\r
+}\r
+\r
+//______________________________________________________________________________\r
+void AliAnaOmegaToPi0Gamma::InitParameters()\r
+{\r
+//Init parameters when first called the analysis\r
+//Set default parameters\r
+  fInputAODGammaName = "PhotonsPHOS";\r
+  fNmaxMixEv = 4;\r
+\r
+  fPi0Mass=0.13498;\r
+  fPi0MassWindow=0.015;\r
+  fNbinsPt=200;\r
+  fPtBegin=0;\r
+  fPtEnd=20;\r
+  fNbinsM=100;  //mass bin number, min and max\r
+  fMinM=0;\r
+  fMaxM=1;\r
+\r
+  fNVtxZBin=1;\r
+  fNCentBin=1;\r
+  fNRpBin=1;\r
+  fNBadChDistBin=1;\r
+  fNpid=3;\r
+\r
+  fVtxZCut = new Double_t [fNVtxZBin];\r
+  fVtxZCut[0]=30;\r
+  //fVtxZCut[0]=10 ; fVtxZCut[1]=20 ; fVtxZCut[2]=30 ;// fVtxZCut[3]=40 ;;\r
+\r
+  fCent=new Double_t[fNCentBin];\r
+  fCent[0]=0;\r
+\r
+  fRp=new Double_t[fNRpBin];\r
+  fRp[0]=0;\r
+\r
+  fBadChDist=new Int_t [fNBadChDistBin];\r
+//  fBadChDist[0]=0; fBadChDist[1]=1; fBadChDist[2]=2;\r
+   fBadChDist[0]=0; \r
+\r
+  fhEtalon = new TH2F("hEtalon","Histo with binning parameters", fNbinsPt,fPtBegin, fPtEnd,fNbinsM,fMinM,fMaxM) ;\r
+  fhEtalon->SetXTitle("P_{T} (GeV)") ;\r
+  fhEtalon->SetYTitle("m_{inv} (GeV)") ;\r
+\r
+}\r
+\r
+\r
+//______________________________________________________________________________\r
+TList * AliAnaOmegaToPi0Gamma::GetCreateOutputObjects()\r
+{  \r
+ // store them in fOutputContainer\r
+ fEventsList = new TList*[fNVtxZBin*fNCentBin*fNRpBin];\r
+ for(Int_t i=0;i<fNVtxZBin;i++){\r
+     for(Int_t j=0;j<fNCentBin;j++){\r
+         for(Int_t k=0;k<fNRpBin;k++){\r
+             fEventsList[i*fNCentBin*fNRpBin+j*fNRpBin+k]=new TList();\r
+         }\r
+     }\r
+ }\r
+\r
+       \r
+ TList * outputContainer = new TList() ; \r
+ outputContainer->SetName(GetName());\r
+ char key[255] ;\r
+ char title[255] ;\r
+ const char * detector= fInputAODGammaName.Data();\r
+ Int_t ndim=fNVtxZBin*fNCentBin*fNRpBin*fNBadChDistBin*fNpid;\r
+\r
+ fRealOmega =new TH2F*[ndim];\r
+ fMixAOmega =new TH2F*[ndim];\r
+ fMixBOmega =new TH2F*[ndim];\r
+ fMixCOmega =new TH2F*[ndim];\r
\r
+ fRealOmega1 =new TH2F*[ndim];\r
+ fMixAOmega1 =new TH2F*[ndim];\r
+ fMixBOmega1 =new TH2F*[ndim];\r
+ fMixCOmega1 =new TH2F*[ndim];\r
+\r
+ fRealOmega2 =new TH2F*[ndim];\r
+ fMixAOmega2 =new TH2F*[ndim];\r
+ fMixBOmega2 =new TH2F*[ndim];\r
+ fMixCOmega2 =new TH2F*[ndim];\r
+\r
+ for(Int_t i=0;i<fNVtxZBin;i++){\r
+     for(Int_t j=0;j<fNCentBin;j++){\r
+         for(Int_t k=0;k<fNRpBin;k++){ //at event level\r
+             Int_t idim=i*fNCentBin*fNRpBin+j*fNRpBin+k;\r
+             for(Int_t ipid=0;ipid<fNpid;ipid++){\r
+                for(Int_t idist=0;idist<fNBadChDistBin;idist++){ //at particle level\r
+\r
+                     Int_t index=idim*fNpid*fNBadChDistBin+ipid*fNBadChDistBin+idist;\r
+\r
+                    sprintf(key,"RPi0Gamma_Vz%dC%dRp%dPid%dDist%d",i,j,k,ipid,idist);\r
+                     sprintf(title, "%s Real Pi0GammaIVM vz_%2.1f_ct_%2.1f_Rp_%2.1f_pid_%d_dist_%d",detector,fVtxZCut[i],fCent[j],fRp[k],ipid,fBadChDist[idist]);\r
+                     fhEtalon->Clone(key);\r
+                     fRealOmega[index]=(TH2F*)fhEtalon->Clone(key) ;\r
+                     fRealOmega[index]->SetName(key) ;\r
+                     fRealOmega[index]->SetTitle(title);\r
+                     outputContainer->Add(fRealOmega[index]);\r
+\r
+                    sprintf(key,"MAPi0Gamma_Vz%dC%dRp%dPid%dDist%d",i,j,k,ipid,idist);\r
+                     sprintf(title, "%s MixA Pi0GammaIVM vz_%2.1f_ct_%2.1f_Rp_%2.1f_pid_%d_dist_%d",detector,fVtxZCut[i],fCent[j],fRp[k],ipid,fBadChDist[idist]);\r
+                     fhEtalon->Clone(key);\r
+                     fMixAOmega[index]=(TH2F*)fhEtalon->Clone(key) ;\r
+                     fMixAOmega[index]->SetName(key) ;\r
+                     fMixAOmega[index]->SetTitle(title);\r
+                     outputContainer->Add(fMixAOmega[index]);\r
+\r
+                    sprintf(key,"MBPi0Gamma_Vz%dC%dRp%dPid%dDist%d",i,j,k,ipid,idist);\r
+                     sprintf(title, "%s MixB Pi0GammaIVM vz_%2.1f_ct_%2.1f_Rp_%2.1f_pid_%d_dist_%d",detector,fVtxZCut[i],fCent[j],fRp[k],ipid,fBadChDist[idist]);\r
+                     fhEtalon->Clone(key);\r
+                     fMixBOmega[index]=(TH2F*)fhEtalon->Clone(key) ;\r
+                     fMixBOmega[index]->SetName(key) ;\r
+                     fMixBOmega[index]->SetTitle(title);\r
+                     outputContainer->Add(fMixBOmega[index]);\r
+\r
+                    sprintf(key,"MCPi0Gamma_Vz%dC%dRp%dPid%dDist%d",i,j,k,ipid,idist);\r
+                     sprintf(title, "%s MixC Pi0GammaIVM vz_%2.1f_ct_%2.1f_Rp_%2.1f_pid_%d_dist_%d",detector,fVtxZCut[i],fCent[j],fRp[k],ipid,fBadChDist[idist]);\r
+                     fhEtalon->Clone(key);\r
+                     fMixCOmega[index]=(TH2F*)fhEtalon->Clone(key) ;\r
+                     fMixCOmega[index]->SetName(key) ;\r
+                     fMixCOmega[index]->SetTitle(title);\r
+                     outputContainer->Add(fMixCOmega[index]);\r
+\r
+                    sprintf(key,"RPi0Gamma1_Vz%dC%dRp%dPid%dDist%d",i,j,k,ipid,idist);\r
+                     sprintf(title, "%s Real Pi0(A<0.7)GammaIVM vz_%2.1f_ct_%2.1f_Rp_%2.1f_pid_%d_dist_%d",detector,fVtxZCut[i],fCent[j],fRp[k],ipid,fBadChDist[idist]);\r
+                     fhEtalon->Clone(key);\r
+                     fRealOmega1[index]=(TH2F*)fhEtalon->Clone(key) ;\r
+                     fRealOmega1[index]->SetName(key) ;\r
+                     fRealOmega1[index]->SetTitle(title);\r
+                     outputContainer->Add(fRealOmega1[index]);\r
+\r
+                     sprintf(key,"MAPi0Gamma1_Vz%dC%dRp%dPid%dDist%d",i,j,k,ipid,idist);\r
+                     sprintf(title, "%s MixA Pi0(A<0.7)GammaIVM vz_%2.1f_ct_%2.1f_Rp_%2.1f_pid_%d_dist_%d",detector,fVtxZCut[i],fCent[j],fRp[k],ipid,fBadChDist[idist]);\r
+                     fhEtalon->Clone(key);\r
+                     fMixAOmega1[index]=(TH2F*)fhEtalon->Clone(key) ;\r
+                     fMixAOmega1[index]->SetName(key) ;\r
+                     fMixAOmega1[index]->SetTitle(title);\r
+                     outputContainer->Add(fMixAOmega1[index]);\r
+\r
+                     sprintf(key,"MBPi0Gamma1_Vz%dC%dRp%dPid%dDist%d",i,j,k,ipid,idist);\r
+                     sprintf(title, "%s MixB Pi0(A<0.7)GammaIVM vz_%2.1f_ct_%2.1f_Rp_%2.1f_pid_%d_dist_%d",detector,fVtxZCut[i],fCent[j],fRp[k],ipid,fBadChDist[idist]);\r
+                     fhEtalon->Clone(key);\r
+                     fMixBOmega1[index]=(TH2F*)fhEtalon->Clone(key) ;\r
+                     fMixBOmega1[index]->SetName(key) ;\r
+                     fMixBOmega1[index]->SetTitle(title);\r
+                     outputContainer->Add(fMixBOmega1[index]);\r
+\r
+                     sprintf(key,"MCPi0Gamma1_Vz%dC%dRp%dPid%dDist%d",i,j,k,ipid,idist);\r
+                     sprintf(title, "%s MixC Pi0(A<0.7)GammaIVM vz_%2.1f_ct_%2.1f_Rp_%2.1f_pid_%d_dist_%d",detector,fVtxZCut[i],fCent[j],fRp[k],ipid,fBadChDist[idist]);\r
+                     fhEtalon->Clone(key);\r
+                     fMixCOmega1[index]=(TH2F*)fhEtalon->Clone(key) ;\r
+                     fMixCOmega1[index]->SetName(key) ;\r
+                     fMixCOmega1[index]->SetTitle(title);\r
+                     outputContainer->Add(fMixCOmega1[index]);\r
+\r
+                    sprintf(key,"RPi0Gamma2_Vz%dC%dRp%dPid%dDist%d",i,j,k,ipid,idist);\r
+                     sprintf(title, "%s Real Pi0(A<0.8)GammaIVM vz_%2.1f_ct_%2.1f_Rp_%2.1f_pid_%d_dist_%d",detector,fVtxZCut[i],fCent[j],fRp[k],ipid,fBadChDist[idist]);\r
+                     fhEtalon->Clone(key);\r
+                     fRealOmega2[index]=(TH2F*)fhEtalon->Clone(key) ;\r
+                     fRealOmega2[index]->SetName(key) ;\r
+                     fRealOmega2[index]->SetTitle(title);\r
+                     outputContainer->Add(fRealOmega2[index]);\r
+\r
+                     sprintf(key,"MAPi0Gamma2_Vz%dC%dRp%dPid%dDist%d",i,j,k,ipid,idist);\r
+                     sprintf(title, "%s MixA Pi0(A<0.8)GammaIVM vz_%2.1f_ct_%2.1f_Rp_%2.1f_pid_%d_dist_%d",detector,fVtxZCut[i],fCent[j],fRp[k],ipid,fBadChDist[idist]);\r
+                     fhEtalon->Clone(key);\r
+                     fMixAOmega2[index]=(TH2F*)fhEtalon->Clone(key) ;\r
+                     fMixAOmega2[index]->SetName(key) ;\r
+                     fMixAOmega2[index]->SetTitle(title);\r
+                     outputContainer->Add(fMixAOmega2[index]);\r
+\r
+                     sprintf(key,"MBPi0Gamma2_Vz%dC%dRp%dPid%dDist%d",i,j,k,ipid,idist);\r
+                     sprintf(title, "%s MixB Pi0(A<0.8)GammaIVM vz_%2.1f_ct_%2.1f_Rp_%2.1f_pid_%d_dist_%d",detector,fVtxZCut[i],fCent[j],fRp[k],ipid,fBadChDist[idist]);\r
+                     fhEtalon->Clone(key);\r
+                     fMixBOmega2[index]=(TH2F*)fhEtalon->Clone(key) ;\r
+                     fMixBOmega2[index]->SetName(key) ;\r
+                     fMixBOmega2[index]->SetTitle(title);\r
+                     outputContainer->Add(fMixBOmega2[index]);\r
+\r
+                     sprintf(key,"MCPi0Gamma2_Vz%dC%dRp%dPid%dDist%d",i,j,k,ipid,idist);\r
+                     sprintf(title, "%s MixC Pi0(A<0.8)GammaIVM vz_%2.1f_ct_%2.1f_Rp_%2.1f_pid_%d_dist_%d",detector,fVtxZCut[i],fCent[j],fRp[k],ipid,fBadChDist[idist]);\r
+                     fhEtalon->Clone(key);\r
+                     fMixCOmega2[index]=(TH2F*)fhEtalon->Clone(key) ;\r
+                     fMixCOmega2[index]->SetName(key) ;\r
+                     fMixCOmega2[index]->SetTitle(title);\r
+                     outputContainer->Add(fMixCOmega2[index]);\r
+                 }\r
+             }\r
+         }\r
+     }  \r
+ }\r
+\r
+ if(IsDataMC()){\r
+    sprintf(key, "%sOmegaPri",detector);\r
+    sprintf(title,"primary #omega in %s",detector);\r
+    fhOmegaPriPt=new TH1F(key, title,fNbinsPt,fPtBegin,fPtEnd);\r
+    fhOmegaPriPt->GetXaxis()->SetTitle("P_{T}");\r
+    fhOmegaPriPt->GetYaxis()->SetTitle("dN/P_{T}");\r
+    outputContainer->Add(fhOmegaPriPt);\r
+ }\r
+\r
+ delete fhEtalon;\r
+ return outputContainer;\r
+}\r
+\r
+//______________________________________________________________________________\r
+void AliAnaOmegaToPi0Gamma::Print(const Option_t * /*opt*/) const\r
+{\r
+  //Print some relevant parameters set in the analysis\r
+  printf("**** Print %s %s ****\n", GetName(), GetTitle() ) ;\r
+  AliAnaPartCorrBaseClass::Print(" ");\r
+  printf("Omega->pi0+gamma->3gamma\n");\r
+  printf("Cuts at event level:            \n");\r
+  printf("Bins of vertex Z:                     %d \n", fNVtxZBin);\r
+  printf("Bins of centrality:                   %d \n",fNCentBin);\r
+  printf("Bins of Reaction plane:               %d\n",fNRpBin);\r
+  printf("Cuts at AOD particle level:\n");\r
+  printf("Number of PID:                        %d \n", fNpid);\r
+  printf("Number of DistToBadChannel cuts:      %d\n", fNBadChDistBin);\r
+  printf("number of events buffer to be mixed:  %d\n",fNmaxMixEv);\r
+} \r
+\r
+//______________________________________________________________________________\r
+void AliAnaOmegaToPi0Gamma::MakeAnalysisFillHistograms() \r
+{\r
+ //fill the MC AOD if needed first\r
+ //-----------\r
+ //need to be further implemented\r
+ AliStack * stack = 0x0;\r
+// TParticle * primary = 0x0;\r
+ TClonesArray * mcparticles0 = 0x0;\r
+ TClonesArray * mcparticles1 = 0x0;\r
+ AliAODMCParticle * aodprimary = 0x0;\r
+ Int_t pdg=0;\r
+ Double_t pt=0;\r
+ Double_t eta=0;\r
+\r
+ if(IsDataMC()){\r
+     if(GetReader()->ReadStack()){\r
+        stack =  GetMCStack() ;\r
+        if(!stack)\r
+        printf("AliAnaAcceptance::MakeAnalysisFillHistograms() - There is no stack!\n");\r
+        for(Int_t i=0 ; i<stack->GetNtrack(); i++){\r
+            TParticle * prim = stack->Particle(i) ;\r
+            pdg = prim->GetPdgCode() ;\r
+            eta=prim->Eta();\r
+            pt=prim->Pt();\r
+            if(TMath::Abs(eta)<0.5) {\r
+               if(pdg==223) fhOmegaPriPt->Fill(pt);\r
+            }\r
+        }\r
+      }\r
+      else if(GetReader()->ReadAODMCParticles()){\r
+          //Get the list of MC particles\r
+          mcparticles0 = GetReader()->GetAODMCParticles(0);\r
+          if(!mcparticles0 && GetDebug() > 0)     {\r
+             printf("AliAnaAcceptance::MakeAnalysisFillHistograms() -  Standard MCParticles not available!\n");\r
+           }\r
+           if(GetReader()->GetSecondInputAODTree()){\r
+               mcparticles1 = GetReader()->GetAODMCParticles(1);\r
+               if(!mcparticles1 && GetDebug() > 0)     {\r
+                   printf("AliAnaAcceptance::MakeAnalysisFillHistograms() -  Second input MCParticles not available!\n");\r
+                }\r
+           }\r
+           for(Int_t i=0;i<mcparticles0->GetEntries();i++){\r
+               aodprimary =(AliAODMCParticle*)mcparticles0->At(i);\r
+               pdg = aodprimary->GetPdgCode() ;\r
+               eta=aodprimary->Eta();\r
+               pt=aodprimary->Pt();\r
+               if(TMath::Abs(eta)<0.5) {\r
+                  if(pdg==223) fhOmegaPriPt->Fill(pt);\r
+                }\r
+\r
+           }\r
+     }\r
+ }// is data and MC\r
+  \r
+\r
+ //process event from AOD brach \r
+ //extract pi0, eta and omega analysis\r
+ Int_t iRun=(GetReader()->GetInputEvent())->GetRunNumber() ;\r
+ if(IsBadRun(iRun)) return ;   \r
+\r
+ //vertex z\r
+ Double_t vert[]={0,0,0} ;\r
+ GetReader()->GetVertex(vert);\r
+ Int_t curEventBin =0;\r
+ Int_t ivtxzbin = -1;\r
+ for(Int_t i=0;i<fNVtxZBin;i++){\r
+ //   if(TMath::Abs(vert[2])<fVtxZCut[i] && TMath::Abs(vert[2])>=(fVtxZCut[i]-10)) ivtxzbin=i;\r
+     if(TMath::Abs(vert[2])<fVtxZCut[i]) ivtxzbin=i;\r
+ }\r
+ //centrality\r
+ Int_t icentbin=0;\r
+\r
+ //reaction plane\r
+ Int_t irpbin=0;\r
+\r
+ if(ivtxzbin==-1) return; \r
+ curEventBin = ivtxzbin*fNCentBin*fNRpBin + icentbin*fNRpBin + irpbin;\r
+\r
+  fInputAODGamma = GetAODBranch(fInputAODGammaName); //photon array\r
+ //fInputAODGamma = (TClonesArray *) GetReader()->GetOutputEvent()->FindListObject(fInputAODGammaName); //photon array\r
+ Int_t nphotons = fInputAODGamma->GetEntries();\r
+\r
+ fInputAODPi0 = (TClonesArray*)GetInputAODBranch();  //pi0 array\r
+ Int_t npi0s = fInputAODPi0 ->GetEntries();\r
\r
+ if(nphotons<3)return; //for pi0, eta and omega->pi0+gamma->3gamma reconstruction\r
+\r
+ //if((nphotons<3) || (npi0s<=0)) return;\r
+ //reconstruction of omega(782)->pi0+gamma->3gamma\r
+ //loop for pi0 and photon\r
+ if(GetDebug() > 0) printf("omega->pi0+gamma->3gamma invariant mass analysis ! \n");\r
+ for(Int_t i=0;i<npi0s;i++){\r
+     AliAODPWG4Particle * pi0 = (AliAODPWG4Particle*) (fInputAODPi0->At(i)) ; //pi0\r
+     TLorentzVector vpi0(pi0->Px(),pi0->Py(),pi0->Pz(),pi0->E());\r
+     Int_t lab1=pi0->GetCaloLabel(0);  // photon1 from pi0 decay\r
+     Int_t lab2=pi0->GetCaloLabel(1);  // photon2 from pi0 decay\r
+     //for omega->pi0+gamma, it needs at least three photons per event\r
+\r
+     //Get the two decay photons from pi0\r
+     AliAODPWG4Particle * photon1 =0;\r
+     AliAODPWG4Particle * photon2 =0;\r
+     for(Int_t d1=0;d1<nphotons;d1++){\r
+         for(Int_t d2=0;d2<nphotons;d2++){\r
+             AliAODPWG4Particle * dp1 = (AliAODPWG4Particle*) (fInputAODGamma->At(d1));\r
+             AliAODPWG4Particle * dp2 = (AliAODPWG4Particle*) (fInputAODGamma->At(d2));\r
+             Int_t dlab1=dp1->GetCaloLabel(0);\r
+             Int_t dlab2=dp2->GetCaloLabel(0);\r
+             if(dlab1==lab1 && dlab2==lab2){\r
+                photon1=dp1;\r
+                photon2=dp2;\r
+             }\r
+             else continue;\r
+         }\r
+    }\r
+\r
+    //caculate the asy and dist of the two photon from pi0 decay\r
+    TLorentzVector dph1(photon1->Px(),photon1->Py(),photon1->Pz(),photon1->E());\r
+    TLorentzVector dph2(photon2->Px(),photon2->Py(),photon2->Pz(),photon2->E());\r
+\r
+    Double_t pi0asy= TMath::Abs(dph1.E()-dph2.E())/(dph1.E()+dph2.E());\r
+//    Double_t phi1=dph1.Phi();\r
+//    Double_t phi2=dph2.Phi();\r
+//    Double_t eta1=dph1.Eta();\r
+//    Double_t eta2=dph2.Eta();\r
+//    Double_t pi0dist=TMath::Sqrt((phi1-phi2)*(phi1-phi2)+(eta1-eta2)*(eta1-eta2));\r
+\r
+\r
+    if(pi0->GetPdg()==111  && nphotons>2 && npi0s\r
+           && TMath::Abs(vpi0.M()-fPi0Mass)<fPi0MassWindow) { //pi0 candidates\r
+\r
+         //avoid the double counting\r
+         Int_t * dc1= new Int_t[nphotons];\r
+         Int_t * dc2= new Int_t[nphotons];\r
+         Int_t index1=0;\r
+         Int_t index2=0;\r
+         for(Int_t k=0;k<i;k++){\r
+             AliAODPWG4Particle * p3=(AliAODPWG4Particle*)(fInputAODPi0->At(k));\r
+             Int_t lab4=p3->GetCaloLabel(0);\r
+             Int_t lab5=p3->GetCaloLabel(1);\r
+             if(lab1==lab4){ dc1[index1]=lab5;  index1++;  }\r
+             if(lab2==lab5){ dc2[index2]=lab4;  index2++;  }\r
+         }\r
+\r
+\r
+        //loop the pi0 with third gamma\r
+        for(Int_t j=0;j<nphotons;j++){\r
+             AliAODPWG4Particle *photon3 = (AliAODPWG4Particle*) (fInputAODGamma->At(j));\r
+            TLorentzVector dph3(photon3->Px(),photon3->Py(),photon3->Pz(),photon3->E());\r
+            Int_t lab3=photon3->GetCaloLabel(0);\r
+\r
+            for(Int_t l=0;l<index1;l++) if(lab3==dc1[l]) lab3=-1;\r
+             for(Int_t l=0;l<index2;l++) if(lab3==dc2[l]) lab3=-1;\r
+\r
+            if(lab3>0 && lab3!=lab1 && lab3!=lab2){\r
+               for(Int_t ipid=0;ipid<fNpid;ipid++){\r
+                   for(Int_t idist=0;idist<fNBadChDistBin;idist++){\r
+                       Int_t index=curEventBin*fNpid*fNBadChDistBin+ipid*fNBadChDistBin+idist;\r
+                       if(photon1->IsPIDOK(ipid,AliCaloPID::kPhoton) &&\r
+                          photon2->IsPIDOK(ipid,AliCaloPID::kPhoton) && \r
+                          photon3->IsPIDOK(ipid,AliCaloPID::kPhoton) &&\r
+                          photon1->DistToBad()>=fBadChDist[idist] &&\r
+                          photon2->DistToBad()>=fBadChDist[idist] &&\r
+                          photon3->DistToBad()>=fBadChDist[idist] ){\r
+                        \r
+                          Double_t pi0gammapt=(vpi0+dph3).Pt();\r
+                          Double_t pi0gammamass=(vpi0+dph3).M();\r
+                          //fill the histograms\r
+                          fRealOmega[index]->Fill(pi0gammapt,pi0gammamass); \r
+                          if(pi0asy<0.7) fRealOmega1[index]->Fill(pi0gammapt,pi0gammamass);\r
+                          if(pi0asy<0.8) fRealOmega2[index]->Fill(pi0gammapt,pi0gammamass);\r
+//printf("real omega  %d  %2.2f \n", index, pi0gammamass);\r
+                       }\r
+                    }\r
+               }\r
+             }\r
+         }     \r
+         delete []dc1;\r
+        delete []dc2;\r
+\r
+        //-------------------------\r
+        //background analysis\r
+        //three background\r
+        // --A   (r1_event1+r2_event1)+r3_event2\r
+\r
+         Int_t nMixed = fEventsList[curEventBin]->GetSize();\r
+         for(Int_t im=0;im<nMixed;im++){\r
+             TClonesArray* ev2= (TClonesArray*) (fEventsList[curEventBin]->At(im));\r
+            for(Int_t mix1=0;mix1<ev2->GetEntries();mix1++){\r
+                AliAODPWG4Particle *mix1ph = (AliAODPWG4Particle*) (ev2->At(mix1));     \r
+               TLorentzVector vmixph(mix1ph->Px(),mix1ph->Py(),mix1ph->Pz(),mix1ph->E());\r
+               for(Int_t ipid=0;ipid<fNpid;ipid++){\r
+                  for(Int_t idist=0;idist<fNBadChDistBin;idist++){\r
+                      Int_t index=curEventBin*fNpid*fNBadChDistBin+ipid*fNBadChDistBin+idist;\r
+                       if(photon1->IsPIDOK(ipid,AliCaloPID::kPhoton)&&\r
+                          photon2->IsPIDOK(ipid,AliCaloPID::kPhoton)&&\r
+                          mix1ph->IsPIDOK(ipid,AliCaloPID::kPhoton) &&\r
+                          photon1->DistToBad()>=fBadChDist[idist] &&\r
+                          photon2->DistToBad()>=fBadChDist[idist] &&\r
+                          mix1ph->DistToBad()>=fBadChDist[idist] ){\r
+\r
+                          Double_t pi0gammapt=(vpi0+vmixph).Pt();\r
+                          Double_t pi0gammamass=(vpi0+vmixph).M();\r
+                         //fill the histograms\r
+                         fMixAOmega[index]->Fill(pi0gammapt,pi0gammamass);\r
+                          if(pi0asy<0.7)fMixAOmega1[index]->Fill(pi0gammapt,pi0gammamass);\r
+                          if(pi0asy<0.8)fMixAOmega2[index]->Fill(pi0gammapt,pi0gammamass);\r
+//printf("mix A  %d  %2.2f \n", index, pi0gammamass);\r
+                         \r
+                       }\r
+                  }\r
+                }\r
+            }\r
+         }\r
+     }\r
+ }\r
+\r
+ //\r
+ // --B   (r1_event1+r2_event2)+r3_event2\r
+ //\r
+ for(Int_t i=0;i<nphotons;i++){\r
+     AliAODPWG4Particle *ph1 = (AliAODPWG4Particle*) (fInputAODGamma->At(i)); \r
+     TLorentzVector vph1(ph1->Px(),ph1->Py(),ph1->Pz(),ph1->E());\r
+\r
+     Int_t nMixed = fEventsList[curEventBin]->GetSize();\r
+     for(Int_t ie=0;ie<nMixed;ie++){\r
+         TClonesArray* ev2= (TClonesArray*) (fEventsList[curEventBin]->At(ie));\r
+         for(Int_t mix1=0;mix1<ev2->GetEntries();mix1++){\r
+             AliAODPWG4Particle *ph2 = (AliAODPWG4Particle*) (ev2->At(mix1));\r
+            TLorentzVector vph2(ph2->Px(),ph2->Py(),ph2->Pz(),ph2->E());\r
+            Double_t pi0asy = TMath::Abs(vph1.E()-vph2.E())/(vph1.E()+vph2.E());            \r
+            Double_t pi0mass=(vph1+vph2).M();\r
+               \r
+            if(TMath::Abs(pi0mass-fPi0Mass)<fPi0MassWindow){//for pi0 selection\r
+               for(Int_t mix2=(mix1+1);mix2<ev2->GetEntries();mix2++){\r
+                    AliAODPWG4Particle *ph3 = (AliAODPWG4Particle*) (ev2->At(mix2));\r
+                    TLorentzVector vph3(ph3->Px(),ph3->Py(),ph3->Pz(),ph3->E());\r
+                   \r
+                    Double_t pi0gammapt=(vph1+vph2+vph3).Pt();\r
+                    Double_t pi0gammamass=(vph1+vph2+vph3).M(); \r
+                   for(Int_t ipid=0;ipid<fNpid;ipid++){\r
+                        for(Int_t idist=0;idist<fNBadChDistBin;idist++){\r
+                            Int_t index=curEventBin*fNpid*fNBadChDistBin+ipid*fNBadChDistBin+idist;\r
+                           if(ph1->IsPIDOK(ipid,AliCaloPID::kPhoton) &&\r
+                              ph2->IsPIDOK(ipid,AliCaloPID::kPhoton) &&\r
+                               ph3->IsPIDOK(ipid,AliCaloPID::kPhoton) &&\r
+                              ph1->DistToBad()>=fBadChDist[idist] &&\r
+                               ph2->DistToBad()>=fBadChDist[idist] &&\r
+                               ph3->DistToBad()>=fBadChDist[idist] ){\r
+                              //fill histograms\r
+                              fMixBOmega[index]->Fill(pi0gammapt,pi0gammamass);\r
+                               if(pi0asy<0.7) fMixBOmega1[index]->Fill(pi0gammapt,pi0gammamass);\r
+                               if(pi0asy<0.8) fMixBOmega2[index]->Fill(pi0gammapt,pi0gammamass);\r
+//printf("mix B  %d  %2.2f \n", index, pi0gammamass);\r
+                           }\r
+                       }                   \r
+                   }\r
+               }\r
+               \r
+               //\r
+               // --C   (r1_event1+r2_event2)+r3_event3\r
+                //\r
+               for(Int_t je=(ie+1);je<nMixed;je++){\r
+                   TClonesArray* ev3= (TClonesArray*) (fEventsList[curEventBin]->At(je));\r
+                   for(Int_t mix3=0;mix3<ev3->GetEntries();mix3++){\r
+                       AliAODPWG4Particle *ph3 = (AliAODPWG4Particle*) (ev3->At(mix3));\r
+                       TLorentzVector vph3(ph3->Px(),ph3->Py(),ph3->Pz(),ph3->E());\r
+                       \r
+                        Double_t pi0gammapt=(vph1+vph2+vph3).Pt();\r
+                       Double_t pi0gammamass=(vph1+vph2+vph3).M();\r
+                       \r
+                       for(Int_t ipid=0;ipid<fNpid;ipid++){\r
+                           for(Int_t idist=0;idist<fNBadChDistBin;idist++){\r
+                                Int_t index=curEventBin*fNpid*fNBadChDistBin+ipid*fNBadChDistBin+idist;\r
+                                if(ph1->IsPIDOK(ipid,AliCaloPID::kPhoton) &&\r
+                                   ph2->IsPIDOK(ipid,AliCaloPID::kPhoton) &&\r
+                                   ph3->IsPIDOK(ipid,AliCaloPID::kPhoton) &&\r
+                                  ph1->DistToBad()>=fBadChDist[idist] &&\r
+                                   ph2->DistToBad()>=fBadChDist[idist] &&\r
+                                   ph3->DistToBad()>=fBadChDist[idist] ){\r
+                                  //fill histograms\r
+                                 fMixCOmega[index]->Fill(pi0gammapt,pi0gammamass);\r
+                                  if(pi0asy<0.7) fMixCOmega1[index]->Fill(pi0gammapt,pi0gammamass);\r
+                                 if(pi0asy<0.8) fMixCOmega2[index]->Fill(pi0gammapt,pi0gammamass);\r
+//printf("mix C  %d  %2.2f \n", index, pi0gammamass);\r
+                               }\r
+                          }\r
+                        }\r
+                   }\r
+               }\r
+            } //for pi0 selecton               \r
+        }\r
+     }\r
+ }\r
+\r
+ //event buffer \r
+ TClonesArray *currentEvent = new TClonesArray(*fInputAODGamma);\r
+ if(currentEvent->GetEntriesFast()>0){\r
+        fEventsList[curEventBin]->AddFirst(currentEvent) ;\r
+        currentEvent=0 ; \r
+        if(fEventsList[curEventBin]->GetSize()>=fNmaxMixEv) {\r
+            TClonesArray * tmp = (TClonesArray*) (fEventsList[curEventBin]->Last()) ;\r
+            fEventsList[curEventBin]->RemoveLast() ;\r
+            delete tmp ;\r
+        }\r
+ }\r
+ else{ \r
+       delete currentEvent ;\r
+       currentEvent=0 ;\r
+ }\r
\r
+}\r
+\r
+//______________________________________________________________________________\r
+void AliAnaOmegaToPi0Gamma::ReadHistograms(TList * outputList)\r
+{\r
+ //read the histograms \r
+ //for the finalization of the terminate analysis\r
+\r
+ Int_t index = outputList->IndexOf(outputList->FindObject(GetAddedHistogramsStringToName()+"RPi0Gamma_Vz0C0Rp0Pid0Dist0"));\r
+\r
+  Int_t ndim=fNVtxZBin*fNCentBin*fNRpBin*fNBadChDistBin*fNpid;\r
+\r
+ if(!fRealOmega) fRealOmega =new TH2F*[ndim];\r
+ if(!fMixAOmega) fMixAOmega =new TH2F*[ndim];\r
+ if(!fMixBOmega) fMixBOmega =new TH2F*[ndim];\r
+ if(!fMixCOmega) fMixCOmega =new TH2F*[ndim];\r
+\r
+ if(!fRealOmega1) fRealOmega1 =new TH2F*[ndim];\r
+ if(!fMixAOmega1) fMixAOmega1 =new TH2F*[ndim];\r
+ if(!fMixBOmega1) fMixBOmega1 =new TH2F*[ndim];\r
+ if(!fMixCOmega1) fMixCOmega1 =new TH2F*[ndim];\r
+\r
+ if(!fRealOmega2) fRealOmega2 =new TH2F*[ndim];\r
+ if(!fMixAOmega2) fMixAOmega2 =new TH2F*[ndim];\r
+ if(!fMixBOmega2) fMixBOmega2 =new TH2F*[ndim];\r
+ if(!fMixCOmega2) fMixCOmega2 =new TH2F*[ndim];\r
+\r
+  for(Int_t i=0;i<fNVtxZBin;i++){\r
+     for(Int_t j=0;j<fNCentBin;j++){\r
+         for(Int_t k=0;k<fNRpBin;k++){ //at event level\r
+             Int_t idim=i*fNCentBin*fNRpBin+j*fNRpBin+k;\r
+             for(Int_t ipid=0;ipid<fNpid;ipid++){ \r
+                for(Int_t idist=0;idist<fNBadChDistBin;idist++){ //at particle\r
+                    Int_t ind=idim*fNpid*fNBadChDistBin+ipid*fNBadChDistBin+idist;\r
+                    fRealOmega[ind]= (TH2F*) outputList->At(index++);\r
+                    fMixAOmega[ind]= (TH2F*) outputList->At(index++);\r
+                    fMixBOmega[ind]= (TH2F*) outputList->At(index++);\r
+                    fMixCOmega[ind]= (TH2F*) outputList->At(index++);\r
+\r
+                    fRealOmega1[ind]= (TH2F*) outputList->At(index++);\r
+                    fMixAOmega1[ind]= (TH2F*) outputList->At(index++);\r
+                    fMixBOmega1[ind]= (TH2F*) outputList->At(index++);\r
+                    fMixCOmega1[ind]= (TH2F*) outputList->At(index++);\r
+\r
+                    fRealOmega2[ind]= (TH2F*) outputList->At(index++);\r
+                    fMixAOmega2[ind]= (TH2F*) outputList->At(index++);\r
+                    fMixBOmega2[ind]= (TH2F*) outputList->At(index++);\r
+                    fMixCOmega2[ind]= (TH2F*) outputList->At(index++);\r
+                    \r
+                 \r
+                }\r
+              }\r
+          }\r
+      }\r
+  }\r
+  \r
+  if(IsDataMC()){\r
+     fhOmegaPriPt  = (TH1F*)  outputList->At(index++);\r
+  }\r
+\r
+}\r
+\r
+//______________________________________________________________________________\r
+void AliAnaOmegaToPi0Gamma::Terminate(TList * outputList) \r
+{\r
+// //Do some calculations and plots from the final histograms.\r
+  if(GetDebug() >= 0) printf("AliAnaOmegaToPi0Gamma::Terminate() \n");\r
+  ReadHistograms(outputList);\r
+  char cvs1[128];  \r
+  sprintf(cvs1, "Neutral_%s_IVM",fInputAODGammaName.Data());\r
+\r
+  TCanvas * cvsIVM = new TCanvas(cvs1, cvs1, 400, 10, 600, 700) ;\r
+  cvsIVM->Divide(2, 2);\r
+\r
+  cvsIVM->cd(1);\r
+  TH2F * h2Real= new TH2F(*fRealOmega[0]);\r
+  h2Real->GetXaxis()->SetRangeUser(4,6);\r
+  TH1F * hRealOmega = (TH1F*) h2Real->ProjectionY();\r
+  hRealOmega->SetTitle("RealPi0Gamma 4<pt<6");\r
+  hRealOmega->SetLineColor(2);\r
+  hRealOmega->Draw();\r
+\r
+  cvsIVM->cd(2);\r
+  TH2F *h2MixA= new TH2F(*fMixAOmega[0]);\r
+  h2MixA->GetXaxis()->SetRangeUser(4,6);\r
+  TH1F * hMixAOmega = (TH1F*) h2MixA->ProjectionY();\r
+  hMixAOmega->SetTitle("MixA 4<pt<6");\r
+  hMixAOmega->SetLineColor(2);\r
+  hMixAOmega->Draw();\r
+\r
+  cvsIVM->cd(3);\r
+  TH2F * h2MixB=new TH2F(*fMixBOmega[0]);\r
+  h2MixB->GetXaxis()->SetRangeUser(4,6);\r
+  TH1F * hMixBOmega = (TH1F*) h2MixB->ProjectionY();\r
+  hMixBOmega->SetTitle("MixB 4<pt<6");\r
+  hMixBOmega->SetLineColor(2);\r
+  hMixBOmega->Draw();\r
+\r
+  cvsIVM->cd(4);\r
+  TH2F *h2MixC= new TH2F(*fMixCOmega[0]);\r
+  h2MixC->GetXaxis()->SetRangeUser(4,6);\r
+  TH1F * hMixCOmega = (TH1F*) h2MixC->ProjectionY();\r
+  hMixCOmega->SetTitle("MixC 4<pt<6");\r
+  hMixCOmega->SetLineColor(2);\r
+  hMixCOmega->Draw();\r
+\r
+  char eps[128 ];\r
+  sprintf(eps,"CVS_%s_IVM.eps",fInputAODGammaName.Data());\r
+  cvsIVM->Print(eps);\r
+  cvsIVM->Modified();\r
\r
+}\r
diff --git a/PWG4/PartCorrDep/AliAnaOmegaToPi0Gamma.h b/PWG4/PartCorrDep/AliAnaOmegaToPi0Gamma.h
new file mode 100644 (file)
index 0000000..64200fa
--- /dev/null
@@ -0,0 +1,103 @@
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice     */
+/* $Id: $ */
+
+//_________________________________________________________________________
+// class to extract omega(782)->pi0+gamma->3gamma
+//
+//-- Author: Renzhuo Wan (IOPP-Wuhan, China)
+//_________________________________________________________________________
+#ifndef ALIANAOMEGATOPI0GAMMA_H
+#define ALIANAOMEGATOPI0GAMMA_H
+//Root
+class TList;
+class TH2F ;
+class TLorentzVector;
+//Analysis
+#include "AliAnaPartCorrBaseClass.h"
+class TParticle;
+
+class AliAnaOmegaToPi0Gamma : public AliAnaPartCorrBaseClass {
+  
+  public: 
+  
+  AliAnaOmegaToPi0Gamma() ; // default ctor
+  AliAnaOmegaToPi0Gamma(const char *name) ; // default ctor
+  AliAnaOmegaToPi0Gamma(const AliAnaOmegaToPi0Gamma & g) ; // cpy ctor
+  AliAnaOmegaToPi0Gamma & operator = (const AliAnaOmegaToPi0Gamma & api0) ;//cpy assignment
+  virtual ~AliAnaOmegaToPi0Gamma() ;//virtual dtor
+  TList * GetCreateOutputObjects(); 
+  void Print(const Option_t * opt) const;
+  
+  void InitParameters();
+  void MakeAnalysisFillHistograms();
+  void Terminate(TList * outList);
+
+  TString GetInputAODPhotonName() const {return fInputAODGammaName;}
+  void SetInputAODPhotonName(TString name) {fInputAODGammaName=name;}
+  Bool_t IsBadRun(Int_t /*iRun*/) const {return kFALSE;} //Tests if this run bad according to private list
+
+  void SetNPtBinsMinMax(Int_t bins, Double_t min, Double_t max) {fNbinsPt=bins; fPtBegin=min; fPtEnd=max; } //set pt bins, min and max   
+  void SetNMassBinsMinMas(Int_t bins, Double_t min, Double_t max) {fNbinsM=bins; fMinM=min; fMaxM=max; } //set mass pt bins, min and max   
+  void SetNEventsMixed(Int_t nevents) { fNmaxMixEv=nevents;} //events to be mixed 
+  void SetNPID(Int_t pid) {fNpid=pid;} 
+  void SetPi0MassPeakWidthCut(Double_t win){fPi0MassWindow=win;} 
+
+  void ReadHistograms(TList * outputList);
+
+  private:
+
+  TClonesArray * fInputAODGamma; //Input AOD gamma array 
+  TClonesArray * fInputAODPi0;   //Input AOD pi0 array
+  TString fInputAODGammaName;    //Input AOD gamma name
+  TList ** fEventsList;          //event list for mixing 
+
+  Double_t *fVtxZCut;            //vtertx z cut
+  Double_t *fCent;               //centrality cut
+  Double_t *fRp;                 //reaction plane cut
+  Int_t *fBadChDist;             //bad channel dist
+
+  Int_t fNVtxZBin;               //Number of vertex z cut
+  Int_t fNCentBin;               //Number of centrality cut
+  Int_t fNRpBin;                 //Number of reaction plane cut
+  Int_t fNBadChDistBin;          //Number of bad channel dist cut
+  Int_t fNpid;                   //Number of PID cut
+
+  Int_t fNmaxMixEv;              //buffer size events to be mixed
+  Double_t fPi0Mass;             //nominal pi0 mass
+  Double_t fPi0MassWindow;       //pi0 mass windows
+
+  Int_t fNbinsPt;                //Pt bin number, min and max
+  Double_t fPtBegin;             //pt minmum
+  Double_t fPtEnd;               //pt maxium
+  Int_t fNbinsM;                 //mass bin number, min and max  
+  Double_t fMinM;                //mass minmum
+  Double_t fMaxM;                //mass maxium
+
+  TH2F * fhEtalon;               //an etalon of 3D histograms
+
+  TH2F **fRealOmega;             //real omega IVM(asy, pt, m), with Asy_pi0<1 
+  TH2F **fMixAOmega;             //mixA omega IVM(asy, pt, m) 
+  TH2F **fMixBOmega;             //mixB omega IVM(asy, pt, m) 
+  TH2F **fMixCOmega;             //mixC omega IVM(asy, pt, m) 
+
+  TH2F **fRealOmega1;            //real omega IVM(asy, pt, m), with Asy_pi0<0.7
+  TH2F **fMixAOmega1;            //mixA omega IVM(asy, pt, m)
+  TH2F **fMixBOmega1;            //mixB omega IVM(asy, pt, m)
+  TH2F **fMixCOmega1;            //mixC omega IVM(asy, pt, m)
+
+  TH2F **fRealOmega2;            //real omega IVM(asy, pt, m), with Asy_pi0<0.8
+  TH2F **fMixAOmega2;            //mixA omega IVM(asy, pt, m)
+  TH2F **fMixBOmega2;            //mixB omega IVM(asy, pt, m)
+  TH2F **fMixCOmega2;            //mixC omega IVM(asy, pt, m)
+
+  TH1F *fhOmegaPriPt;            //MC primary omega pt in 2pi and |y|<0.5
+  ClassDef(AliAnaOmegaToPi0Gamma,1)
+} ;
+
+#endif 
+
+
+
index f3561992bdd372e39a2a59418f6268f53b7323b6..1207127b121391c4f86d7b33a96cf5b973dd4531 100755 (executable)
@@ -9,8 +9,8 @@ SRCS = PartCorrDep/AliAnaCaloTrigger.cxx \
        PartCorrDep/AliAnaParticleJetLeadingConeCorrelation.cxx \
        PartCorrDep/AliAnaPhoton.cxx PartCorrDep/AliAnaPi0.cxx  \
        PartCorrDep/AliAnaPi0EbE.cxx PartCorrDep/AliAnaChargedParticles.cxx \
-       PartCorrDep/AliAnaCalorimeterQA.cxx PartCorrDep/AliAnaNeutralMeson.cxx \
-       PartCorrDep/AliAnaElectron.cxx  PartCorrDep/AliAnalysisTaskTaggedPhotons.cxx
+       PartCorrDep/AliAnaCalorimeterQA.cxx PartCorrDep/AliAnaElectron.cxx \
+       PartCorrDep/AliAnalysisTaskTaggedPhotons.cxx PartCorrDep/AliAnaOmegaToPi0Gamma.cxx 
 
 HDRS:= $(SRCS:.cxx=.h)