coding conventions fix
authorsnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 13 Mar 2011 16:44:10 +0000 (16:44 +0000)
committersnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 13 Mar 2011 16:44:10 +0000 (16:44 +0000)
PWG2/FLOW/AliFlowTasks/AliAnalysisTaskFlowK0Candidates.cxx
PWG2/FLOW/AliFlowTasks/AliAnalysisTaskFlowK0Candidates.h

index 0b71140..fe32d94 100644 (file)
@@ -59,24 +59,25 @@ AliAnalysisTaskFlowK0Candidates::AliAnalysisTaskFlowK0Candidates() :
   fMassMin(0),
   fMassMax(0),
   fDLcut(0),
-  tEvent(NULL),
-  tMulti(NULL)
+  fEvent(NULL),
+  fMulti(NULL)
 {
+  //
   for(int i=0; i!=4; ++i) {
-    tMass[i] = NULL;
-    tDCA[i]  = NULL;
-    tDL[i]   = NULL;
-    tCTP[i]  = NULL;
-    td0d0[i] = NULL;
-    tPhi[i]  = NULL;
-    tEta[i]  = NULL;
-    tPt[i]   = NULL;
-    tAPhi[i] = NULL;
-    tAEta[i] = NULL;
-    tAPt[i]  = NULL;
-    tBPhi[i] = NULL;
-    tBEta[i] = NULL;
-    tBPt[i]  = NULL;
+    fMass[i] = NULL;
+    fDCA[i]  = NULL;
+    fDL[i]   = NULL;
+    fCTP[i]  = NULL;
+    fd0d0[i] = NULL;
+    fPhi[i]  = NULL;
+    fEta[i]  = NULL;
+    fPt[i]   = NULL;
+    fAPhi[i] = NULL;
+    fAEta[i] = NULL;
+    fAPt[i]  = NULL;
+    fBPhi[i] = NULL;
+    fBEta[i] = NULL;
+    fBPt[i]  = NULL;
   }
 }
 
@@ -89,24 +90,25 @@ AliAnalysisTaskFlowK0Candidates::AliAnalysisTaskFlowK0Candidates(const char *nam
   fMassMin(MassMin),
   fMassMax(MassMax),
   fDLcut(0),
-  tEvent(NULL),
-  tMulti(NULL)
+  fEvent(NULL),
+  fMulti(NULL)
 {
+  //
   for(int i=0; i!=4; ++i) {
-    tMass[i] = NULL;
-    tDCA[i]  = NULL;
-    tDL[i]   = NULL;
-    tCTP[i]  = NULL;
-    td0d0[i] = NULL;
-    tPhi[i]  = NULL;
-    tEta[i]  = NULL;
-    tPt[i]   = NULL;
-    tAPhi[i] = NULL;
-    tAEta[i] = NULL;
-    tAPt[i]  = NULL;
-    tBPhi[i] = NULL;
-    tBEta[i] = NULL;
-    tBPt[i]  = NULL;
+    fMass[i] = NULL;
+    fDCA[i]  = NULL;
+    fDL[i]   = NULL;
+    fCTP[i]  = NULL;
+    fd0d0[i] = NULL;
+    fPhi[i]  = NULL;
+    fEta[i]  = NULL;
+    fPt[i]   = NULL;
+    fAPhi[i] = NULL;
+    fAEta[i] = NULL;
+    fAPt[i]  = NULL;
+    fBPhi[i] = NULL;
+    fBEta[i] = NULL;
+    fBPt[i]  = NULL;
   }
   DefineInput(  0, TChain::Class() );
   DefineOutput( 1, TObjArray::Class() );
@@ -116,12 +118,14 @@ AliAnalysisTaskFlowK0Candidates::AliAnalysisTaskFlowK0Candidates(const char *nam
 //_____________________________________________________________________________
 AliAnalysisTaskFlowK0Candidates::~AliAnalysisTaskFlowK0Candidates()
 {
+  //
   if(fQAList) delete fQAList;
 }
 
 //_____________________________________________________________________________
 void AliAnalysisTaskFlowK0Candidates::UserCreateOutputObjects()
 {
+  //
   fQAList = new TList();
   fQAList->SetOwner();
   AddQAEvents();
@@ -131,41 +135,43 @@ void AliAnalysisTaskFlowK0Candidates::UserCreateOutputObjects()
 //_____________________________________________________________________________
 void AliAnalysisTaskFlowK0Candidates::AddQAEvents()
 {
+  //
   TList *tQAEvents = new TList();
   tQAEvents->SetName("Events");
   tQAEvents->SetOwner();
-  tEvent = new TH1D("Event", "Number of Events",    2, 0, 2);
-  tQAEvents->Add(tEvent);
-  tMulti = new TH1D("Multiplicity", "Multiplicity", 180, 0, 10000);
-  tQAEvents->Add(tMulti);
+  fEvent = new TH1D("Event", "Number of Events",    2, 0, 2);
+  tQAEvents->Add(fEvent);
+  fMulti = new TH1D("Multiplicity", "Multiplicity", 180, 0, 10000);
+  tQAEvents->Add(fMulti);
   fQAList->Add(tQAEvents);
 }  
 //_____________________________________________________________________________
 void AliAnalysisTaskFlowK0Candidates::AddQACandidates()
 {
+  //
   TList *tQACandidates[4];
   TList *tQADaughters[4];
   for(int i=0; i!=4; ++i) {
     tQACandidates[i] = new TList();
     tQACandidates[i]->SetOwner();
     tQACandidates[i]->SetName(Form("Candidates%d",i));
-    tMass[i] = new TH1D( Form("Mass%i",i), "Mass;M_{#pi#pi} [GeV];Counts per MeV", 180, 0.41, 0.59); tQACandidates[i]->Add( tMass[i] );
-    tDCA[i]  = new TH1D( Form("DCA%i" ,i), "DCA;[cm];Counts per 10 um",            180, 0.00, 0.18); tQACandidates[i]->Add( tDCA[i]  );
-    tDL[i]   = new TH1D( Form("DL%i"  ,i), "Decay Length;[cm];Counts per 0.1 mm",  180, 0.00, 1.80); tQACandidates[i]->Add( tDL[i]   );
-    tCTP[i]  = new TH1D( Form("CTP%i" ,i), "Cos#theta_{p}",                        180,-1.10, 1.10); tQACandidates[i]->Add( tCTP[i]  );
-    td0d0[i] = new TH1D( Form("d0d0%i",i), "d_{0}xd_{0};[cm^{2}];Cnts 0.01 mm^{2}",180,-0.009,0.009);tQACandidates[i]->Add( td0d0[i] );
-    tPhi[i]  = new TH1D( Form("Phi%i" ,i), "Phi;[rad];Counts per degree",     180,0,TMath::TwoPi()); tQACandidates[i]->Add( tPhi[i]  );
-    tEta[i]  = new TH1D( Form("Eta%i" ,i), "Eta;;Counts per 0.04",                 180,-3.60, 3.60); tQACandidates[i]->Add( tEta[i]  );
-    tPt[i]   = new TH1D( Form("Pt%i"  ,i), "Pt;[GeV];Counts per 0.1 GeV",          180, 0.00,18.00); tQACandidates[i]->Add( tPt[i]   );
+    fMass[i] = new TH1D( Form("Mass%i",i), "Mass;M_{#pi#pi} [GeV];Counts per MeV", 180, 0.41, 0.59); tQACandidates[i]->Add( fMass[i] );
+    fDCA[i]  = new TH1D( Form("DCA%i" ,i), "DCA;[cm];Counts per 10 um",            180, 0.00, 0.18); tQACandidates[i]->Add( fDCA[i]  );
+    fDL[i]   = new TH1D( Form("DL%i"  ,i), "Decay Length;[cm];Counts per 0.1 mm",  180, 0.00, 1.80); tQACandidates[i]->Add( fDL[i]   );
+    fCTP[i]  = new TH1D( Form("CTP%i" ,i), "Cos#theta_{p}",                        180,-1.10, 1.10); tQACandidates[i]->Add( fCTP[i]  );
+    fd0d0[i] = new TH1D( Form("d0d0%i",i), "d_{0}xd_{0};[cm^{2}];Cnts 0.01 mm^{2}",180,-0.009,0.009);tQACandidates[i]->Add( fd0d0[i] );
+    fPhi[i]  = new TH1D( Form("Phi%i" ,i), "Phi;[rad];Counts per degree",     180,0,TMath::TwoPi()); tQACandidates[i]->Add( fPhi[i]  );
+    fEta[i]  = new TH1D( Form("Eta%i" ,i), "Eta;;Counts per 0.04",                 180,-3.60, 3.60); tQACandidates[i]->Add( fEta[i]  );
+    fPt[i]   = new TH1D( Form("Pt%i"  ,i), "Pt;[GeV];Counts per 0.1 GeV",          180, 0.00,18.00); tQACandidates[i]->Add( fPt[i]   );
     tQADaughters[i] = new TList();
     tQADaughters[i]->SetOwner();
     tQADaughters[i]->SetName(Form("Daughters%d",i));
-    tAPhi[i] = new TH1D( Form("PhiBef%i",i), "Phi prePropagation;[rad];Cnts per degree",180,0,TMath::TwoPi()); tQADaughters[i]->Add( tAPhi[i] );
-    tAEta[i] = new TH1D( Form("EtaBef%i",i), "Eta prePropagation;;Counts per 0.04"     ,180,-3.6,3.6); tQADaughters[i]->Add( tAEta[i] );
-    tAPt[i]  = new TH1D( Form("PtBef%i" ,i), "Pt prePropagation;[GeV];Counts per 0.1 GeV",180, 0, 18); tQADaughters[i]->Add( tAPt[i]  );
-    tBPhi[i] = new TH1D( Form("PhiAft%i",i), "Phi posPropagation;[rad];Cnts per degree",180,0,TMath::TwoPi()); tQADaughters[i]->Add( tBPhi[i] );
-    tBEta[i] = new TH1D( Form("EtaAft%i",i), "Eta posPropagation;;Counts per 0.04"     ,180,-3.6,3.6); tQADaughters[i]->Add( tBEta[i] );
-    tBPt[i]  = new TH1D( Form("PtAft%i" ,i), "Pt posPropagation;[GeV];Counts per 0.1 GeV",180, 0, 18); tQADaughters[i]->Add( tBPt[i]  );
+    fAPhi[i] = new TH1D( Form("PhiBef%i",i), "Phi prePropagation;[rad];Cnts per degree",180,0,TMath::TwoPi()); tQADaughters[i]->Add( fAPhi[i] );
+    fAEta[i] = new TH1D( Form("EtaBef%i",i), "Eta prePropagation;;Counts per 0.04"     ,180,-3.6,3.6); tQADaughters[i]->Add( fAEta[i] );
+    fAPt[i]  = new TH1D( Form("PtBef%i" ,i), "Pt prePropagation;[GeV];Counts per 0.1 GeV",180, 0, 18); tQADaughters[i]->Add( fAPt[i]  );
+    fBPhi[i] = new TH1D( Form("PhiAft%i",i), "Phi posPropagation;[rad];Cnts per degree",180,0,TMath::TwoPi()); tQADaughters[i]->Add( fBPhi[i] );
+    fBPhi[i] = new TH1D( Form("EtaAft%i",i), "Eta posPropagation;;Counts per 0.04"     ,180,-3.6,3.6); tQADaughters[i]->Add( fBPhi[i] );
+    fBPt[i]  = new TH1D( Form("PtAft%i" ,i), "Pt posPropagation;[GeV];Counts per 0.1 GeV",180, 0, 18); tQADaughters[i]->Add( fBPt[i]  );
     tQACandidates[i]->Add(tQADaughters[i]);
     fQAList->Add(tQACandidates[i]);
   }
@@ -173,6 +179,7 @@ void AliAnalysisTaskFlowK0Candidates::AddQACandidates()
 //_____________________________________________________________________________
 void AliAnalysisTaskFlowK0Candidates::NotifyRun()
 {
+  //
 //  AliESDEvent *fESD = dynamic_cast<AliESDEvent*>(InputEvent());
 //  if(!fESD) return;
 }
@@ -180,28 +187,30 @@ void AliAnalysisTaskFlowK0Candidates::NotifyRun()
 //_____________________________________________________________________________
 void AliAnalysisTaskFlowK0Candidates::UserExec(Option_t *)
 {
+  //
   AliESDEvent *fESD = dynamic_cast<AliESDEvent*>(InputEvent());
   AliAODEvent *fAOD = dynamic_cast<AliAODEvent*>(InputEvent());
   if( (!fESD)&&(!fAOD) )
     return;
 //  printf("\nEvent found");
-  tEvent->Fill( 0 );
+  fEvent->Fill( 0 );
   if(fCutsEvent)
     if( !(fCutsEvent->IsSelected(InputEvent())) )
       return;
-  tEvent->Fill( 1 );
+  fEvent->Fill( 1 );
   if(fESD)
     ReadFromESD(fESD);
   else if(fAOD)
     ReadFromAOD(fAOD);
 }
 //_____________________________________________________________________________
-void AliAnalysisTaskFlowK0Candidates::ReadFromESD(AliESDEvent *fESD)
+void AliAnalysisTaskFlowK0Candidates::ReadFromESD(const AliESDEvent *fESD)
 {
-  TObjArray *POIselection =  new TObjArray();
-  POIselection->SetOwner();
+  //
+  TObjArray *gPOIselection =  new TObjArray();
+  gPOIselection->SetOwner();
   int nTracks = fESD->GetNumberOfTracks();
-  tMulti->Fill( nTracks );
+  fMulti->Fill( nTracks );
   for(int i=0; i!=nTracks; ++i) {
     AliESDtrack *ioT = fESD->GetTrack(i);
     if(fCuts)
@@ -226,31 +235,31 @@ void AliAnalysisTaskFlowK0Candidates::ReadFromESD(AliESDEvent *fESD)
       vp = TVector3( (iT->Xv()+jT->Xv())/2, (iT->Yv()+jT->Yv())/2, (iT->Zv()+jT->Zv())/2 ); // candidate position
       vv = TVector3( fESD->GetPrimaryVertex()->GetX(), fESD->GetPrimaryVertex()->GetY(), fESD->GetPrimaryVertex()->GetZ() ); // vertex position
       vl = vp - vv; // flight line
-      double DL;
-      DL  = vl.Mag();
+      double gDL;
+      gDL  = vl.Mag();
       // getting cos pointing angle
-      double CTP;
+      double gCTP;
       TVector3 vi, vj, vs;
       vi = TVector3( iT->Px(), iT->Py(), iT->Pz() );
       vj = TVector3( jT->Px(), jT->Py(), jT->Pz() );
       vs = vi + vj;
-      CTP = TMath::Cos( vl.Angle(vs) ); // Marta says: "Carlos, it is faster if you calculate this by hand!"
-      double D0D0;
-      D0D0 = iT->GetD(vv.X(),vv.Y(),fESD->GetMagneticField())*jT->GetD(vv.X(),vv.Y(),fESD->GetMagneticField());
+      gCTP = TMath::Cos( vl.Angle(vs) ); // Marta says: "Carlos, it is faster if you calculate this by hand!"
+      double gD0D0;
+      gD0D0 = iT->GetD(vv.X(),vv.Y(),fESD->GetMagneticField())*jT->GetD(vv.X(),vv.Y(),fESD->GetMagneticField());
       // getting invariant mass
       double sum12 = iT->P()*iT->P()+jT->P()*jT->P();
       double pro12 = iT->P()*iT->P()*jT->P()*jT->P();
-      double InvMass = 0;
-      InvMass += TMath::Power(0.13957018,2);
-      InvMass += sqrt( TMath::Power(0.13957018,4) + TMath::Power(0.13957018,2)*(sum12) + pro12 );
-      InvMass -= ( iT->Px()*jT->Px()+iT->Py()*jT->Py()+iT->Pz()*jT->Pz() );
-      InvMass *= 2;
-      InvMass = sqrt(InvMass);
+      double gInvMass = 0;
+      gInvMass += TMath::Power(0.13957018,2);
+      gInvMass += sqrt( TMath::Power(0.13957018,4) + TMath::Power(0.13957018,2)*(sum12) + pro12 );
+      gInvMass -= ( iT->Px()*jT->Px()+iT->Py()*jT->Py()+iT->Pz()*jT->Pz() );
+      gInvMass *= 2;
+      gInvMass = sqrt(gInvMass);
       // filtering
       int iLevel = 3;
-      if( CTP<0.8 )
+      if( gCTP<0.8 )
         iLevel = 2;
-      if( DL<fDLcut ) // 0.5
+      if( gDL<fDLcut ) // 0.5
         iLevel = 1;
       if( DCA>0.05 )
         iLevel = 0;
@@ -258,55 +267,56 @@ void AliAnalysisTaskFlowK0Candidates::ReadFromESD(AliESDEvent *fESD)
       for(int h=0; h!=iLevel+1; ++h) {
         // printf(" %d",h);
         // candidate
-        tDCA[h]->Fill( DCA );
-        tDL[h]->Fill( DL );
-        tCTP[h]->Fill( CTP );
-        td0d0[h]->Fill( D0D0 );
-        tMass[h]->Fill( InvMass );
-        tPhi[h]->Fill( vs.Phi()+TMath::Pi() );
-        tEta[h]->Fill( vs.Eta() );
-        tPt[h]->Fill( vs.Pt() );
+        fDCA[h]->Fill( DCA );
+        fDL[h]->Fill( gDL );
+        fCTP[h]->Fill( gCTP );
+        fd0d0[h]->Fill( gD0D0 );
+        fMass[h]->Fill( gInvMass );
+        fPhi[h]->Fill( vs.Phi()+TMath::Pi() );
+        fEta[h]->Fill( vs.Eta() );
+        fPt[h]->Fill( vs.Pt() );
         // daughters
-        tAPhi[h]->Fill( iT->Phi() );
-        tAEta[h]->Fill( iT->Eta() );
-        tAPt[h]->Fill(  iT->Pt()  );
-        tAPhi[h]->Fill( jT->Phi() );
-        tAEta[h]->Fill( jT->Eta() );
-        tAPt[h]->Fill(  jT->Pt()  );
-        tBPhi[h]->Fill( ioT->Phi());
-        tBEta[h]->Fill( ioT->Eta());
-        tBPt[h]->Fill(  ioT->Pt() );
-        tBPhi[h]->Fill( joT->Phi());
-        tBEta[h]->Fill( joT->Eta());
-        tBPt[h]->Fill(  joT->Pt() );
+        fAPhi[h]->Fill( iT->Phi() );
+        fAEta[h]->Fill( iT->Eta() );
+        fAPt[h]->Fill(  iT->Pt()  );
+        fAPhi[h]->Fill( jT->Phi() );
+        fAEta[h]->Fill( jT->Eta() );
+        fAPt[h]->Fill(  jT->Pt()  );
+        fBPhi[h]->Fill( ioT->Phi());
+        fBPhi[h]->Fill( ioT->Eta());
+        fBPt[h]->Fill(  ioT->Pt() );
+        fBPhi[h]->Fill( joT->Phi());
+        fBPhi[h]->Fill( joT->Eta());
+        fBPt[h]->Fill(  joT->Pt() );
       }
       // building candidate
-      if( (InvMass>fMassMin) && (InvMass<fMassMax) && (iLevel==3) ) {
+      if( (gInvMass>fMassMin) && (gInvMass<fMassMax) && (iLevel==3) ) {
         AliFlowCandidateTrack *sTrack = new AliFlowCandidateTrack();
-        sTrack->SetMass( InvMass );
+        sTrack->SetMass( gInvMass );
         sTrack->SetPt( vs.Pt() );
         sTrack->SetPhi( vs.Phi()+TMath::Pi() );
         sTrack->SetEta( vs.Eta() );
         sTrack->SetCharge( 0 );
         sTrack->AddDaughter( iT->GetID() );
         sTrack->AddDaughter( jT->GetID() );
-        POIselection->AddLast( sTrack );
+        gPOIselection->AddLast( sTrack );
       }
       delete iT;
       delete jT;
     } // endfor j
   } // endfor i
-  PostData( 1, POIselection );
+  PostData( 1, gPOIselection );
   PostData( 2, fQAList);
 }
 
 //_____________________________________________________________________________
-void AliAnalysisTaskFlowK0Candidates::ReadFromAOD(AliAODEvent *fAOD)
+void AliAnalysisTaskFlowK0Candidates::ReadFromAOD(const AliAODEvent *fAOD)
 {
-  TObjArray *POIselection =  new TObjArray();
-  POIselection->SetOwner();
+  //
+  TObjArray *gPOIselection =  new TObjArray();
+  gPOIselection->SetOwner();
   int nTracks = fAOD->GetNumberOfTracks();
-  tMulti->Fill( nTracks );
+  fMulti->Fill( nTracks );
   for(int i=0; i!=fAOD->GetNumberOfV0s(); ++i) {
     AliAODv0 *iV0 = (AliAODv0*) fAOD->GetV0(i);
     if ( iV0->GetOnFlyStatus() ) continue;
@@ -314,67 +324,68 @@ void AliAnalysisTaskFlowK0Candidates::ReadFromAOD(AliAODEvent *fAOD)
     // getting distance of closest approach
     double DCA = iV0->DcaV0Daughters();
     // getting decay length
-    double DL;
+    double gDL;
     double vv[3];
     vv[0] = fAOD->GetPrimaryVertex()->GetX();
     vv[1] = fAOD->GetPrimaryVertex()->GetY();
     vv[2] = fAOD->GetPrimaryVertex()->GetZ();
-    DL = iV0->DecayLengthV0(vv);
+    gDL = iV0->DecayLengthV0(vv);
     // cos pointing angle
-    double CTP;
-    CTP = iV0->CosPointingAngle(vv);
-    double D0D0;
-    D0D0 = iV0->Prodd0d0();
+    double gCTP;
+    gCTP = iV0->CosPointingAngle(vv);
+    double gD0D0;
+    gD0D0 = iV0->Prodd0d0();
     // getting invariant mass
-    double InvMass = iV0->MassK0Short();
+    double gInvMass = iV0->MassK0Short();
     // filtering
     int iLevel = 3;
-    if( CTP<0.8 )
+    if( gCTP<0.8 )
       iLevel = 2;
-    if( DL<fDLcut ) // 0.5
+    if( gDL<fDLcut ) // 0.5
       iLevel = 1;
     if( DCA>0.05 )
       iLevel = 0;
     for(int h=0; h!=iLevel+1; ++h) {
       // candidate
-      tDCA[h]->Fill( DCA );
-      tDL[h]->Fill( DL );
-      tCTP[h]->Fill( CTP );
-      td0d0[h]->Fill( D0D0 );
-      tMass[h]->Fill( InvMass );
-      tPhi[h]->Fill( iV0->Phi() );
-      tEta[h]->Fill( iV0->Eta() );
-      tPt[h]->Fill( iV0->Pt() );
+      fDCA[h]->Fill( DCA );
+      fDL[h]->Fill( gDL );
+      fCTP[h]->Fill( gCTP );
+      fd0d0[h]->Fill( gD0D0 );
+      fMass[h]->Fill( gInvMass );
+      fPhi[h]->Fill( iV0->Phi() );
+      fEta[h]->Fill( iV0->Eta() );
+      fPt[h]->Fill( iV0->Pt() );
       // daughters
-      tAPhi[h]->Fill( ( (AliAODTrack*) iV0->GetDaughter(0) )->Phi() );
-      tAEta[h]->Fill( ( (AliAODTrack*) iV0->GetDaughter(0) )->Eta() );
-      tAPt[h]->Fill(  ( (AliAODTrack*) iV0->GetDaughter(0) )->Pt()  );
-      tAPhi[h]->Fill( ( (AliAODTrack*) iV0->GetDaughter(1) )->Phi() );
-      tAEta[h]->Fill( ( (AliAODTrack*) iV0->GetDaughter(1) )->Eta() );
-      tAPt[h]->Fill(  ( (AliAODTrack*) iV0->GetDaughter(1) )->Pt()  );
-      tBPhi[h]->Fill( iV0->PhiProng(0) );
-      tBEta[h]->Fill( iV0->EtaProng(0) );
-      tBPt[h]->Fill(  iV0->PtProng(0)  );
-      tBPhi[h]->Fill( iV0->PhiProng(1) );
-      tBEta[h]->Fill( iV0->EtaProng(1) );
-      tBPt[h]->Fill(  iV0->PtProng(1)  );
+      fAPhi[h]->Fill( ( (AliAODTrack*) iV0->GetDaughter(0) )->Phi() );
+      fAEta[h]->Fill( ( (AliAODTrack*) iV0->GetDaughter(0) )->Eta() );
+      fAPt[h]->Fill(  ( (AliAODTrack*) iV0->GetDaughter(0) )->Pt()  );
+      fAPhi[h]->Fill( ( (AliAODTrack*) iV0->GetDaughter(1) )->Phi() );
+      fAEta[h]->Fill( ( (AliAODTrack*) iV0->GetDaughter(1) )->Eta() );
+      fAPt[h]->Fill(  ( (AliAODTrack*) iV0->GetDaughter(1) )->Pt()  );
+      fBPhi[h]->Fill( iV0->PhiProng(0) );
+      fBPhi[h]->Fill( iV0->EtaProng(0) );
+      fBPt[h]->Fill(  iV0->PtProng(0)  );
+      fBPhi[h]->Fill( iV0->PhiProng(1) );
+      fBPhi[h]->Fill( iV0->EtaProng(1) );
+      fBPt[h]->Fill(  iV0->PtProng(1)  );
     }
     AliFlowCandidateTrack *sTrack = new AliFlowCandidateTrack();
-    sTrack->SetMass( InvMass );
+    sTrack->SetMass( gInvMass );
     sTrack->SetPt( iV0->Pt() );
     sTrack->SetPhi( iV0->Phi() );
     sTrack->SetEta( iV0->Eta() );
     sTrack->SetCharge( 0 );
     sTrack->AddDaughter( iV0->GetPosID() );
     sTrack->AddDaughter( iV0->GetNegID() );
-    POIselection->AddLast( sTrack );
+    gPOIselection->AddLast( sTrack );
   }
-  PostData( 1, POIselection );
+  PostData( 1, gPOIselection );
   PostData( 2, fQAList);
 }
 
 //_____________________________________________________________________________
 void AliAnalysisTaskFlowK0Candidates::Terminate(Option_t *)
 {
+  //
 }
 
index 553c0f3..5b271d9 100644 (file)
@@ -8,8 +8,8 @@
 * See cxx source for full Copyright notice */
 /* $Id: $ */
 
-#ifndef AliAnalysisTaskFlowK0Candidates_H
-#define AliAnalysisTaskFlowK0Candidates_H
+#ifndef ALIANALYSISTASKFLOWK0CANDIDATES_H
+#define ALIANALYSISTASKFLOWK0CANDIDATES_H
 
 #include "AliAnalysisTaskSE.h"
 
@@ -19,23 +19,6 @@ class TList;
 class TH1D;
 
 class AliAnalysisTaskFlowK0Candidates : public AliAnalysisTaskSE {
-  private:
-    AliAnalysisTaskFlowK0Candidates(const AliAnalysisTaskFlowK0Candidates& analysisTask);
-    AliAnalysisTaskFlowK0Candidates& operator=(const AliAnalysisTaskFlowK0Candidates& analysisTask);
-    void AddQAEvents();
-    void AddQACandidates();
-    void ReadFromESD(AliESDEvent *fESD);
-    void ReadFromAOD(AliAODEvent *fAOD);
-
-    AliFlowEventCuts *fCutsEvent; // cuts for event
-    AliESDtrackCuts  *fCuts;      // cuts for both pis
-    TList *fQAList;               // list for QA histos (slot2)
-    Double_t fMassMin, fMassMax;  // Mass cutting range
-    Double_t fDLcut;
-    TH1D *tEvent, *tMulti;
-    TH1D *tMass[4], *tDCA[4], *tDL[4], *tCTP[4], *td0d0[4], *tPhi[4], *tEta[4], *tPt[4];
-    TH1D *tAPhi[4], *tAEta[4], *tAPt[4], *tBPhi[4], *tBEta[4], *tBPt[4];
-
   public:
     AliAnalysisTaskFlowK0Candidates();
     AliAnalysisTaskFlowK0Candidates(const char *name, AliFlowEventCuts *cutsEvent, AliESDtrackCuts *cuts, Double_t MassMin, Double_t MassMax);
@@ -46,6 +29,22 @@ class AliAnalysisTaskFlowK0Candidates : public AliAnalysisTaskSE {
     virtual void NotifyRun();
     void SetDL( Double_t pMin ) { fDLcut = pMin; }
 
+  private:
+    AliAnalysisTaskFlowK0Candidates(const AliAnalysisTaskFlowK0Candidates& analysisTask);
+    AliAnalysisTaskFlowK0Candidates& operator=(const AliAnalysisTaskFlowK0Candidates& analysisTask);
+    void AddQAEvents();
+    void AddQACandidates();
+    void ReadFromESD(const AliESDEvent *fESD);
+    void ReadFromAOD(const AliAODEvent *fAOD);
+
+    AliFlowEventCuts *fCutsEvent; // cuts for event
+    AliESDtrackCuts  *fCuts;      // cuts for both pis
+    TList *fQAList;               // list for QA histos (slot2)
+    Double_t fMassMin, fMassMax;  // Mass cutting range
+    Double_t fDLcut;//
+    TH1D *fEvent, *fMulti;//
+    TH1D *fMass[4], *fDCA[4], *fDL[4], *fCTP[4], *fd0d0[4], *fPhi[4], *fEta[4], *fPt[4];//
+    TH1D *fAPhi[4], *fAEta[4], *fAPt[4], *fBPhi[4], *fBEta[4], *fBPt[4];//
 
   ClassDef(AliAnalysisTaskFlowK0Candidates, 1);
 };