From 51372c5df5b9466324653f69559907c8165ebfe3 Mon Sep 17 00:00:00 2001 From: kaamodt Date: Wed, 3 Mar 2010 16:37:31 +0000 Subject: [PATCH] Fixed warnings + moved filling of histograms --- PWG4/GammaConv/AliV0Reader.cxx | 167 ++++++++++++++++----------------- 1 file changed, 83 insertions(+), 84 deletions(-) diff --git a/PWG4/GammaConv/AliV0Reader.cxx b/PWG4/GammaConv/AliV0Reader.cxx index 55e3236e129..d05be99c74d 100644 --- a/PWG4/GammaConv/AliV0Reader.cxx +++ b/PWG4/GammaConv/AliV0Reader.cxx @@ -511,90 +511,6 @@ Bool_t AliV0Reader::UpdateV0Information(){ fCurrentNegativeESDTrack = fESDEvent->GetTrack(fCurrentV0->GetNindex()); fCurrentPositiveESDTrack = fESDEvent->GetTrack(fCurrentV0->GetPindex()); - if(fCurrentNegativeESDTrack->GetSign() == fCurrentPositiveESDTrack->GetSign()){ // avoid like sign - iResult=kFALSE; - if(fHistograms != NULL && fUpdateV0AlreadyCalled == kFALSE){ - fHistograms->FillHistogram("ESD_CutLikeSign_InvMass",GetMotherCandidateMass()); - // to avoid filling the other cut histograms. So in this case fUpdateV0AlreadyCalled also serves as a flag for the histogram filling - // it will anyway be set to true at the end of the UpdateV0Information function, and there are no return until the end - fUpdateV0AlreadyCalled == kTRUE; - } - } - - if(fCurrentPositiveESDTrack->GetSign() == -1 && fCurrentNegativeESDTrack->GetSign() == 1){ // switch wrong signed tracks - fCurrentNegativeESDTrack = fESDEvent->GetTrack(fCurrentV0->GetPindex()); - fCurrentPositiveESDTrack = fESDEvent->GetTrack(fCurrentV0->GetNindex()); - switchTracks = kTRUE; - } - - if( !(fCurrentNegativeESDTrack->GetStatus() & AliESDtrack::kTPCrefit) || - !(fCurrentPositiveESDTrack->GetStatus() & AliESDtrack::kTPCrefit) ){ - // if( !(fCurrentNegativeESDTrack->GetStatus() & AliESDtrack::kITSrefit) || - // !(fCurrentPositiveESDTrack->GetStatus() & AliESDtrack::kITSrefit) ){ - iResult=kFALSE; - if(fHistograms != NULL && fUpdateV0AlreadyCalled == kFALSE){ - fHistograms->FillHistogram("ESD_CutRefit_InvMass",GetMotherCandidateMass()); - // to avoid filling the other cut histograms. So in this case fUpdateV0AlreadyCalled also serves as a flag for the histogram filling - // it will anyway be set to true at the end of the UpdateV0Information function, and there are no return until the end - fUpdateV0AlreadyCalled == kTRUE; - } - } - - if( fCurrentNegativeESDTrack->GetKinkIndex(0) > 0 || - fCurrentPositiveESDTrack->GetKinkIndex(0) > 0) { - - iResult=kFALSE; - if(fHistograms != NULL && fUpdateV0AlreadyCalled == kFALSE){ - fHistograms->FillHistogram("ESD_CutKink_InvMass",GetMotherCandidateMass()); - // to avoid filling the other cut histograms. So in this case fUpdateV0AlreadyCalled also serves as a flag for the histogram filling - // it will anyway be set to true at the end of the UpdateV0Information function, and there are no return until the end - fUpdateV0AlreadyCalled == kTRUE; - } - } - - if(fDodEdxSigmaCut == kTRUE){ - - if( fESDpid->NumberOfSigmasTPC(fCurrentPositiveESDTrack,AliPID::kElectron)NumberOfSigmasTPC(fCurrentPositiveESDTrack,AliPID::kElectron)>fPIDnSigmaAboveElectronLine || - fESDpid->NumberOfSigmasTPC(fCurrentNegativeESDTrack,AliPID::kElectron)NumberOfSigmasTPC(fCurrentNegativeESDTrack,AliPID::kElectron)>fPIDnSigmaAboveElectronLine ){ - iResult=kFALSE; - if(fHistograms != NULL && fUpdateV0AlreadyCalled == kFALSE){ - fHistograms->FillHistogram("ESD_CutdEdxSigmaElectronLine_InvMass",GetMotherCandidateMass()); - // to avoid filling the other cut histograms. So in this case fUpdateV0AlreadyCalled also serves as a flag for the histogram filling - // it will anyway be set to true at the end of the UpdateV0Information function, and there are no return until the end - fUpdateV0AlreadyCalled == kTRUE; - } - } - if( fCurrentPositiveESDTrack->P()>fPIDMinPnSigmaAbovePionLine){ - if(fESDpid->NumberOfSigmasTPC(fCurrentPositiveESDTrack,AliPID::kElectron)>fPIDnSigmaBelowElectronLine && - fESDpid->NumberOfSigmasTPC(fCurrentPositiveESDTrack,AliPID::kElectron)NumberOfSigmasTPC(fCurrentPositiveESDTrack,AliPID::kPion)FillHistogram("ESD_CutdEdxSigmaPionLine_InvMass",GetMotherCandidateMass()); - // to avoid filling the other cut histograms. So in this case fUpdateV0AlreadyCalled also serves as a flag for the histogram filling - // it will anyway be set to true at the end of the UpdateV0Information function, and there are no return until the end - fUpdateV0AlreadyCalled == kTRUE; - } - } - } - - if( fCurrentNegativeESDTrack->P()>fPIDMinPnSigmaAbovePionLine){ - if(fESDpid->NumberOfSigmasTPC(fCurrentNegativeESDTrack,AliPID::kElectron)>fPIDnSigmaBelowElectronLine && - fESDpid->NumberOfSigmasTPC(fCurrentNegativeESDTrack,AliPID::kElectron)NumberOfSigmasTPC(fCurrentNegativeESDTrack,AliPID::kPion)FillHistogram("ESD_CutdEdxSigmaPionLine_InvMass",GetMotherCandidateMass()); - // to avoid filling the other cut histograms. So in this case fUpdateV0AlreadyCalled also serves as a flag for the histogram filling - // it will anyway be set to true at the end of the UpdateV0Information function, and there are no return until the end - fUpdateV0AlreadyCalled == kTRUE; - } - } - } - } - if(fCurrentNegativeKFParticle != NULL){ delete fCurrentNegativeKFParticle; } @@ -705,7 +621,90 @@ Bool_t AliV0Reader::UpdateV0Information(){ fCurrentZValue = GetConvPosZ(GetPositiveESDTrack(),GetNegativeESDTrack(),GetMagneticField()); } + if(fCurrentNegativeESDTrack->GetSign() == fCurrentPositiveESDTrack->GetSign()){ // avoid like sign + iResult=kFALSE; + if(fHistograms != NULL && fUpdateV0AlreadyCalled == kFALSE){ + fHistograms->FillHistogram("ESD_CutLikeSign_InvMass",GetMotherCandidateMass()); + // to avoid filling the other cut histograms. So in this case fUpdateV0AlreadyCalled also serves as a flag for the histogram filling + // it will anyway be set to true at the end of the UpdateV0Information function, and there are no return until the end + fUpdateV0AlreadyCalled = kTRUE; + } + } + + if(fCurrentPositiveESDTrack->GetSign() == -1 && fCurrentNegativeESDTrack->GetSign() == 1){ // switch wrong signed tracks + fCurrentNegativeESDTrack = fESDEvent->GetTrack(fCurrentV0->GetPindex()); + fCurrentPositiveESDTrack = fESDEvent->GetTrack(fCurrentV0->GetNindex()); + switchTracks = kTRUE; + } + + if( !(fCurrentNegativeESDTrack->GetStatus() & AliESDtrack::kTPCrefit) || + !(fCurrentPositiveESDTrack->GetStatus() & AliESDtrack::kTPCrefit) ){ + // if( !(fCurrentNegativeESDTrack->GetStatus() & AliESDtrack::kITSrefit) || + // !(fCurrentPositiveESDTrack->GetStatus() & AliESDtrack::kITSrefit) ){ + iResult=kFALSE; + if(fHistograms != NULL && fUpdateV0AlreadyCalled == kFALSE){ + fHistograms->FillHistogram("ESD_CutRefit_InvMass",GetMotherCandidateMass()); + // to avoid filling the other cut histograms. So in this case fUpdateV0AlreadyCalled also serves as a flag for the histogram filling + // it will anyway be set to true at the end of the UpdateV0Information function, and there are no return until the end + fUpdateV0AlreadyCalled = kTRUE; + } + } + + if( fCurrentNegativeESDTrack->GetKinkIndex(0) > 0 || + fCurrentPositiveESDTrack->GetKinkIndex(0) > 0) { + + iResult=kFALSE; + if(fHistograms != NULL && fUpdateV0AlreadyCalled == kFALSE){ + fHistograms->FillHistogram("ESD_CutKink_InvMass",GetMotherCandidateMass()); + // to avoid filling the other cut histograms. So in this case fUpdateV0AlreadyCalled also serves as a flag for the histogram filling + // it will anyway be set to true at the end of the UpdateV0Information function, and there are no return until the end + fUpdateV0AlreadyCalled = kTRUE; + } + } + + if(fDodEdxSigmaCut == kTRUE){ + if( fESDpid->NumberOfSigmasTPC(fCurrentPositiveESDTrack,AliPID::kElectron)NumberOfSigmasTPC(fCurrentPositiveESDTrack,AliPID::kElectron)>fPIDnSigmaAboveElectronLine || + fESDpid->NumberOfSigmasTPC(fCurrentNegativeESDTrack,AliPID::kElectron)NumberOfSigmasTPC(fCurrentNegativeESDTrack,AliPID::kElectron)>fPIDnSigmaAboveElectronLine ){ + iResult=kFALSE; + if(fHistograms != NULL && fUpdateV0AlreadyCalled == kFALSE){ + fHistograms->FillHistogram("ESD_CutdEdxSigmaElectronLine_InvMass",GetMotherCandidateMass()); + // to avoid filling the other cut histograms. So in this case fUpdateV0AlreadyCalled also serves as a flag for the histogram filling + // it will anyway be set to true at the end of the UpdateV0Information function, and there are no return until the end + fUpdateV0AlreadyCalled = kTRUE; + } + } + if( fCurrentPositiveESDTrack->P()>fPIDMinPnSigmaAbovePionLine){ + if(fESDpid->NumberOfSigmasTPC(fCurrentPositiveESDTrack,AliPID::kElectron)>fPIDnSigmaBelowElectronLine && + fESDpid->NumberOfSigmasTPC(fCurrentPositiveESDTrack,AliPID::kElectron)NumberOfSigmasTPC(fCurrentPositiveESDTrack,AliPID::kPion)FillHistogram("ESD_CutdEdxSigmaPionLine_InvMass",GetMotherCandidateMass()); + // to avoid filling the other cut histograms. So in this case fUpdateV0AlreadyCalled also serves as a flag for the histogram filling + // it will anyway be set to true at the end of the UpdateV0Information function, and there are no return until the end + fUpdateV0AlreadyCalled = kTRUE; + } + } + } + + if( fCurrentNegativeESDTrack->P()>fPIDMinPnSigmaAbovePionLine){ + if(fESDpid->NumberOfSigmasTPC(fCurrentNegativeESDTrack,AliPID::kElectron)>fPIDnSigmaBelowElectronLine && + fESDpid->NumberOfSigmasTPC(fCurrentNegativeESDTrack,AliPID::kElectron)NumberOfSigmasTPC(fCurrentNegativeESDTrack,AliPID::kPion)FillHistogram("ESD_CutdEdxSigmaPionLine_InvMass",GetMotherCandidateMass()); + // to avoid filling the other cut histograms. So in this case fUpdateV0AlreadyCalled also serves as a flag for the histogram filling + // it will anyway be set to true at the end of the UpdateV0Information function, and there are no return until the end + fUpdateV0AlreadyCalled = kTRUE; + } + } + } + } + fUpdateV0AlreadyCalled = kTRUE; return iResult; -- 2.43.0