bugs corrected
[u/mrichter/AliRoot.git] / PWG4 / PartCorr / AliV0Reader.cxx
index 6c9291d..7e39f1f 100644 (file)
@@ -77,7 +77,8 @@ ClassImp(AliV0Reader)
     fMaxR(10000),// 100 meter(outside of ALICE)\r
     fEtaCut(0.),\r
     fPtCut(0.),\r
-    fChi2Cut(0.),\r
+    fChi2CutConversion(0.),\r
+    fChi2CutMeson(0.),\r
     fPIDProbabilityCutNegativeParticle(0),\r
     fPIDProbabilityCutPositiveParticle(0),\r
     fXVertexCut(0.),\r
@@ -126,7 +127,8 @@ AliV0Reader::AliV0Reader(const AliV0Reader & original) :
   fMaxR(original.fMaxR),\r
   fEtaCut(original.fEtaCut),\r
   fPtCut(original.fPtCut),\r
-  fChi2Cut(original.fChi2Cut),\r
+  fChi2CutConversion(original.fChi2CutConversion),\r
+  fChi2CutMeson(original.fChi2CutMeson),\r
   fPIDProbabilityCutNegativeParticle(original.fPIDProbabilityCutNegativeParticle),\r
   fPIDProbabilityCutPositiveParticle(original.fPIDProbabilityCutPositiveParticle),\r
   fXVertexCut(original.fXVertexCut),\r
@@ -231,7 +233,7 @@ Bool_t AliV0Reader::NextV0(){
        continue;\r
       }\r
       Double_t chi2V0 = fCurrentMotherKFCandidate->GetChi2()/fCurrentMotherKFCandidate->GetNDF();\r
-      if(chi2V0 > fChi2Cut || chi2V0 <=0){\r
+      if(chi2V0 > fChi2CutConversion || chi2V0 <=0){\r
        fCurrentV0IndexNumber++;\r
        fHistograms->FillHistogram("V0MassDebugCut6",GetMotherCandidateMass());\r
        continue;\r
@@ -332,10 +334,11 @@ void AliV0Reader::UpdateV0Information(){
     fMotherCandidateLorentzVector->SetXYZM(fMotherCandidateLorentzVector->Px() ,fMotherCandidateLorentzVector->Py(),fMotherCandidateLorentzVector->Pz(),0.); \r
   }\r
     \r
-  if(fDoMC){\r
+  if(fDoMC == kTRUE){\r
     fNegativeMCParticle = fMCStack->Particle(TMath::Abs(fESDEvent->GetTrack(fCurrentV0->GetNindex())->GetLabel()));\r
     fPositiveMCParticle = fMCStack->Particle(TMath::Abs(fESDEvent->GetTrack(fCurrentV0->GetPindex())->GetLabel()));\r
   }\r
+  fCurrentEventGoodV0s.push_back(*fCurrentMotherKFCandidate);\r
 }\r
 \r
 Bool_t AliV0Reader::HasSameMCMother(){\r