]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Resonance cut only for unlike sign pairs
authormiweber <miweber@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 7 Mar 2013 13:47:40 +0000 (13:47 +0000)
committermiweber <miweber@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 7 Mar 2013 13:47:40 +0000 (13:47 +0000)
PWGCF/EBYE/BalanceFunctions/AliBalancePsi.cxx

index 8a951bd9bc3bf55b73401ceb7086d6af4179bcf1..7fa9bff5eb203846ca471b74e3244f7c99650b6f 100644 (file)
@@ -532,36 +532,38 @@ void AliBalancePsi::CalculateBalance(Double_t gReactionPlane,
       //at the invariant mass and not considering the pairs that 
       //fall within 3sigma from the mass peak of: rho0, K0s, Lambda
       if(fResonancesCut) {
+       if (charge1 * charge2 < 0) {
 
-       //rho0
-       vectorDaughter[0].SetPtEtaPhiM(firstPt,firstEta,firstPhi,pPion.GetMass());
-       vectorDaughter[1].SetPtEtaPhiM(secondPt[j],secondEta[j],secondPhi[j],pPion.GetMass());
-       vectorMother = vectorDaughter[0] + vectorDaughter[1];
-       fHistResonancesBefore->Fill(trackVariablesPair[1],trackVariablesPair[2],vectorMother.M());
-       if(TMath::Abs(vectorMother.M() - pRho0.GetMass()) <= nSigmaRejection*gWidthForRho0)
-         continue;
-       fHistResonancesRho->Fill(trackVariablesPair[1],trackVariablesPair[2],vectorMother.M());
-
-       //K0s
-       if(TMath::Abs(vectorMother.M() - pK0s.GetMass()) <= nSigmaRejection*gWidthForK0s)
-         continue;
-       fHistResonancesK0->Fill(trackVariablesPair[1],trackVariablesPair[2],vectorMother.M());
-
-
-       //Lambda
-       vectorDaughter[0].SetPtEtaPhiM(firstPt,firstEta,firstPhi,pPion.GetMass());
-       vectorDaughter[1].SetPtEtaPhiM(secondPt[j],secondEta[j],secondPhi[j],pProton.GetMass());
-       vectorMother = vectorDaughter[0] + vectorDaughter[1];
-       if(TMath::Abs(vectorMother.M() - pLambda.GetMass()) <= nSigmaRejection*gWidthForLambda)
-         continue;
-
-       vectorDaughter[0].SetPtEtaPhiM(firstPt,firstEta,firstPhi,pProton.GetMass());
-       vectorDaughter[1].SetPtEtaPhiM(secondPt[j],secondEta[j],secondPhi[j],pPion.GetMass());
-       vectorMother = vectorDaughter[0] + vectorDaughter[1];
-       if(TMath::Abs(vectorMother.M() - pLambda.GetMass()) <= nSigmaRejection*gWidthForLambda)
-         continue;
-       fHistResonancesLambda->Fill(trackVariablesPair[1],trackVariablesPair[2],vectorMother.M());
-
+         //rho0
+         vectorDaughter[0].SetPtEtaPhiM(firstPt,firstEta,firstPhi,pPion.GetMass());
+         vectorDaughter[1].SetPtEtaPhiM(secondPt[j],secondEta[j],secondPhi[j],pPion.GetMass());
+         vectorMother = vectorDaughter[0] + vectorDaughter[1];
+         fHistResonancesBefore->Fill(trackVariablesPair[1],trackVariablesPair[2],vectorMother.M());
+         if(TMath::Abs(vectorMother.M() - pRho0.GetMass()) <= nSigmaRejection*gWidthForRho0)
+           continue;
+         fHistResonancesRho->Fill(trackVariablesPair[1],trackVariablesPair[2],vectorMother.M());
+         
+         //K0s
+         if(TMath::Abs(vectorMother.M() - pK0s.GetMass()) <= nSigmaRejection*gWidthForK0s)
+           continue;
+         fHistResonancesK0->Fill(trackVariablesPair[1],trackVariablesPair[2],vectorMother.M());
+         
+         
+         //Lambda
+         vectorDaughter[0].SetPtEtaPhiM(firstPt,firstEta,firstPhi,pPion.GetMass());
+         vectorDaughter[1].SetPtEtaPhiM(secondPt[j],secondEta[j],secondPhi[j],pProton.GetMass());
+         vectorMother = vectorDaughter[0] + vectorDaughter[1];
+         if(TMath::Abs(vectorMother.M() - pLambda.GetMass()) <= nSigmaRejection*gWidthForLambda)
+           continue;
+         
+         vectorDaughter[0].SetPtEtaPhiM(firstPt,firstEta,firstPhi,pProton.GetMass());
+         vectorDaughter[1].SetPtEtaPhiM(secondPt[j],secondEta[j],secondPhi[j],pPion.GetMass());
+         vectorMother = vectorDaughter[0] + vectorDaughter[1];
+         if(TMath::Abs(vectorMother.M() - pLambda.GetMass()) <= nSigmaRejection*gWidthForLambda)
+           continue;
+         fHistResonancesLambda->Fill(trackVariablesPair[1],trackVariablesPair[2],vectorMother.M());
+       
+       }//unlike-sign only
       }//resonance cut
 
       // HBT like cut