]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
o small fix in mixing handler (bin finding)
authorwiechula <wiechula@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 13 May 2012 23:23:05 +0000 (23:23 +0000)
committerwiechula <wiechula@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 13 May 2012 23:23:05 +0000 (23:23 +0000)
o new variable for pair: angle wrt. to b fiels (Christoph Baumann)

PWGDQ/dielectron/AliDielectronMixingHandler.cxx
PWGDQ/dielectron/AliDielectronPair.cxx
PWGDQ/dielectron/AliDielectronPair.h
PWGDQ/dielectron/AliDielectronVarManager.cxx
PWGDQ/dielectron/AliDielectronVarManager.h

index b43f873f4a40618d3a8a92b3123dc4db85227fda..3e5afbc51ff910b4578d59c3457565bf21822bf4 100644 (file)
@@ -441,11 +441,14 @@ void AliDielectronMixingHandler::MoveToSameVertex(AliVTrack * const vtrack, cons
     //translation
     Double_t vt[3] = {vMix[0]-vFirst[0],vMix[1]-vFirst[1],vMix[2]-vFirst[2]};
     //rotate to the track frame
-    track->Global2LocalPosition(vt,track->GetAlpha());
+//     track->Global2LocalPosition(vt,track->GetAlpha());
 
     //add to track position
-    x        = x       -vt[0];
-    param[0] = param[0]-vt[1];
+//     x        = x       -vt[0];
+//     param[0] = param[0]-vt[1];
+//     param[1] = param[1]-vt[2];
+    x        = x;
+    param[0] = param[0];
     param[1] = param[1]-vt[2];
     
     //set updated track information
index abca10cbfc459164ebc297e6490db727bfdb095f..f73a0cc44cbeeab005b583ad7e2e428454e50260 100644 (file)
@@ -24,6 +24,7 @@
 #include <AliVTrack.h>
 #include <AliVVertex.h>
 #include <AliPID.h>
+#include <AliExternalTrackParam.h>
 
 #include "AliDielectronPair.h"
 
@@ -214,6 +215,70 @@ void AliDielectronPair::GetThetaPhiCM(Double_t &thetaHE, Double_t &phiHE, Double
   }
 }
 
+//______________________________________________
+Double_t AliDielectronPair::PsiPair(Double_t MagField) const
+{
+  //Following idea to use opening of colinear pairs in magnetic field from e.g. PHENIX
+  //to ID conversions. Adapted from AliTRDv0Info class
+  Double_t x, y, z;
+  x = fPair.GetX();
+  y = fPair.GetY();
+  z = fPair.GetZ();
+
+  Double_t m1[3] = {0,0,0};
+  Double_t m2[3] = {0,0,0};
+
+  m1[0] = fD1.GetPx();
+  m1[1] = fD1.GetPy();
+  m1[2] = fD1.GetPz();  
+
+  m2[0] = fD2.GetPx();
+  m2[1] = fD2.GetPy();
+  m2[2] = fD2.GetPz();
+
+  Double_t deltat = 1.;
+  deltat = TMath::ATan(m2[2]/(TMath::Sqrt(m2[0]*m2[0] + m2[1]*m2[1])+1.e-13))-
+       TMath::ATan(m1[2]/(TMath::Sqrt(m1[0]*m1[0] + m1[1]*m1[1])+1.e-13));//difference of angles of the two daughter tracks with z-axis
+
+  Double_t radiussum = TMath::Sqrt(x*x + y*y) + 50;//radius to which tracks shall be propagated
+
+  Double_t mom1Prop[3];
+  Double_t mom2Prop[3];
+
+  AliExternalTrackParam *d1 = static_cast<AliExternalTrackParam*>(fRefD1.GetObject());
+  AliExternalTrackParam *d2 = static_cast<AliExternalTrackParam*>(fRefD2.GetObject());
+
+  AliExternalTrackParam nt(*d1), pt(*d2);
+  //AliExternalTrackParam nt(), pt();
+  nt.CopyFromVTrack(d1);
+  pt.CopyFromVTrack(d2);
+
+  Double_t fPsiPair = 4.;
+  if(nt.PropagateTo(radiussum,MagField) == 0)//propagate tracks to the outside
+       fPsiPair =  -5.;
+  if(pt.PropagateTo(radiussum,MagField) == 0)
+       fPsiPair = -5.;
+  pt.GetPxPyPz(mom1Prop);//Get momentum vectors of tracks after propagation
+  nt.GetPxPyPz(mom2Prop);
+
+
+
+  Double_t pEle =
+       TMath::Sqrt(mom2Prop[0]*mom2Prop[0]+mom2Prop[1]*mom2Prop[1]+mom2Prop[2]*mom2Prop[2]);//absolute momentum val
+  Double_t pPos =
+       TMath::Sqrt(mom1Prop[0]*mom1Prop[0]+mom1Prop[1]*mom1Prop[1]+mom1Prop[2]*mom1Prop[2]);//absolute momentum val
+
+  Double_t scalarproduct =
+       mom1Prop[0]*mom2Prop[0]+mom1Prop[1]*mom2Prop[1]+mom1Prop[2]*mom2Prop[2];//scalar product of propagated posit
+
+  Double_t chipair = TMath::ACos(scalarproduct/(pEle*pPos));//Angle between propagated daughter tracks
+
+  fPsiPair =  TMath::Abs(TMath::ASin(deltat/chipair));
+
+  return fPsiPair;
+
+}
+
 //______________________________________________
 Double_t AliDielectronPair::ThetaPhiCM(const AliVParticle* d1, const AliVParticle* d2, 
                                        const Bool_t isHE, const Bool_t isTheta)
index 1d1c5d0e41adff0871427fa4c6bf994c12e38751..6bd2439e329a09ffa58e135bb5af7e0af7fc5b61 100644 (file)
@@ -120,6 +120,8 @@ public:
   Double_t ThetaPhiCM(Bool_t isHE, Bool_t isTheta) const;
   static Double_t ThetaPhiCM(const AliVParticle* d1, const AliVParticle* d2, 
                                               const Bool_t isHE, const Bool_t isTheta);
+
+  Double_t PsiPair(Double_t MagField)const; //Angle cut w.r.t. to magnetic field
   // internal KF particle
   const AliKFParticle& GetKFParticle()       const { return fPair; }
   const AliKFParticle& GetKFFirstDaughter()  const { return fD1;   }
index 29f81625404c5c8844218d01bd53392237199fec..7b990326d439163cd796f50696160be1817a69bc 100644 (file)
@@ -132,6 +132,7 @@ const char* AliDielectronVarManager::fgkParticleNames[AliDielectronVarManager::k
   "CosTilPhiHE",
   "ThetaCS",
   "PhiCS",
+  "PsiPair",
   "Cos2PhiCS",
   "CosTilPhiCS",
   "DeltaPhiV0ArpH2",        
index b010cb9e9f70bee7d9b6529bd2250a7222ad4989..71fa85a0c6051cb7937267075dccf5c07362389c 100644 (file)
@@ -182,6 +182,7 @@ public:
     // the 3-mom vectors of target and projectile beams
     kThetaCS,                // theta in mother's rest frame in Collins-Soper picture
     kPhiCS,                  // phi in mother's rest frame in Collins-Soper picture
+    kPsiPair,                // phi in mother's rest frame in Collins-Soper picture
     kCos2PhiCS,              // Cosine of 2*phi in mother's rest frame in the Collins-Soper picture
     kCosTilPhiCS,            // Sin(phi) +/- Cos(phi) in mother's rest frame in Collins-Soper picture; Sign is sign(Cos(phi))
     kDeltaPhiV0ArpH2,        // Delta phi of the pair with respect to the 2nd order harmonic reaction plane from V0-A
@@ -1036,6 +1037,7 @@ inline void AliDielectronVarManager::FillVarDielectronPair(const AliDielectronPa
   values[AliDielectronVarManager::kPairType]     = pair->GetType();
 
   Double_t errPseudoProperTime2 = -1;
+  values[AliDielectronVarManager::kPsiPair]      = pair->PsiPair(fgEvent->GetMagneticField());
   values[AliDielectronVarManager::kPseudoProperTime] = fgEvent ? pair->GetKFParticle().GetPseudoProperDecayTime(*(fgEvent->GetPrimaryVertex()), TDatabasePDG::Instance()->GetParticle(443)->Mass(), &errPseudoProperTime2 ) : -1e10;
   // values[AliDielectronVarManager::kPseudoProperTime] = fgEvent ? pair->GetPseudoProperTime(fgEvent->GetPrimaryVertex()): -1e10;