]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HBTAN/AliHBTPair.h
Speed optimization: LLWeight bufferred
[u/mrichter/AliRoot.git] / HBTAN / AliHBTPair.h
index d24e5c906a8930ef2cee68f6c0ad440dc55bf23e..f01c5922f67ad057eab509c123ce06c1e26156d1 100644 (file)
@@ -13,6 +13,7 @@ class AliHBTPair: public TObject
 {
  public:
    AliHBTPair(Bool_t rev = kFALSE); //contructor
+   AliHBTPair(AliHBTParticle* part1, AliHBTParticle* part2, Bool_t rev = kFALSE); //contructor
    virtual ~AliHBTPair(){}
    void SetParticles(AliHBTParticle*,AliHBTParticle*); //sets particles in the pair
    AliHBTPair* GetSwapedPair() {return fSwapedPair;} //returns pair with swapped particles
@@ -20,25 +21,27 @@ class AliHBTPair: public TObject
    AliHBTParticle* Particle1() const {return fPart1;} //returns pointer to first particle
    AliHBTParticle* Particle2() const {return fPart2;} //returns pointer to decond particle
    
+   void Changed();
    //Center Mass System - Longitudinally Comoving
    
-   Double_t GetInvMass(); //returns invariant mass of the pair
-   
-
-   Double_t GetQInv(); //returns Q invariant
-   Double_t GetQSideCMSLC(); //returns Q Side CMS longitudionally co-moving
-   Double_t GetQOutCMSLC(); //returns Q out CMS longitudionally co-moving
-   Double_t GetQLongCMSLC(); //returns Q Long CMS longitudionally co-moving
+   virtual Double_t GetInvMass(); //returns invariant mass of the pair
+   virtual Double_t GetMt();
+   virtual Double_t GetQInv(); //returns Q invariant
+   virtual Double_t GetQSideCMSLC(); //returns Q Side CMS longitudionally co-moving
+   virtual Double_t GetQOutCMSLC(); //returns Q out CMS longitudionally co-moving
+   virtual Double_t GetQLongCMSLC(); //returns Q Long CMS longitudionally co-moving
    
    
-   Double_t GetKt();  //returns K transverse
-   Double_t GetKStar();
+   virtual Double_t GetKt();  //returns K transverse
+   virtual Double_t GetKStar();
    
-   Double_t GetDeltaP(); //return difference of momenta
-   Double_t GetDeltaPx();
-   Double_t GetDeltaPy();
-   Double_t GetDeltaPz();
+   virtual Double_t GetDeltaP(); //return difference of momenta
+   virtual Double_t GetDeltaPx();
+   virtual Double_t GetDeltaPy();
+   virtual Double_t GetDeltaPz();
    
+   virtual Double_t GetGammaToCMSLC();
+   Double_t GetLLWeight();
  protected:
    AliHBTParticle* fPart1;  //pointer to first particle
    AliHBTParticle* fPart2;  //pointer to second particle
@@ -73,11 +76,14 @@ class AliHBTPair: public TObject
    Bool_t   fKStarNotCalc;
    
    Double_t fPInv;  //invariant momentum
+   
    Double_t fQSide; //Q Side
    Double_t fOut;//Q Out
    Double_t fQLong;//Q Long
 
-   
+   Double_t fMt;//Transverse coordinate of Inv. Mass
+   Bool_t   fMtNotCalc;//flag indicating if Mt is calculated
+      
    Double_t fInvMassSqr;//squre of invariant mass
    Bool_t   fMassSqrNotCalc; //
    void     CalculateInvMassSqr();
@@ -85,6 +91,9 @@ class AliHBTPair: public TObject
    Double_t fQInvL;
    Bool_t   fQInvLNotCalc;
    void     CalculateQInvL();
+
+   Double_t fLLWeight;
+   Bool_t   ffLLWeightNotCalc;
    
    Double_t fPxSum;
    Double_t fPySum;
@@ -100,7 +109,8 @@ class AliHBTPair: public TObject
    Bool_t   fDiffsNotCalc;
    void     CalculateDiffs();
    
-   
+   Double_t fGammaCMSLC;
+   Bool_t   fGammaCMSLCNotCalc;   
    /***************************************************/
    void CalculateBase();
    Bool_t fChanged;
@@ -120,26 +130,32 @@ void AliHBTPair::SetParticles(AliHBTParticle* p1,AliHBTParticle* p2)
  fPart2 = p2;
  if (fSwapedPair) //if we have Swaped (so we are not)
    fSwapedPair->SetParticles(p2,p1); //set particles for him too
- // Resel all calculations (flags)
+ Changed();
+ //and do nothing until will be asked for
+} 
+/****************************************************************/
 
+inline
+void AliHBTPair::Changed()
+{
+ // Resel all calculations (flags)
  fChanged           = kTRUE;
  fSumsNotCalc       = kTRUE;
  fDiffsNotCalc      = kTRUE;
  fMassSqrNotCalc    = kTRUE;
  fInvMassNotCalc    = kTRUE;
  fQInvNotCalc       = kTRUE;
+ fMtNotCalc         = kTRUE;
  fQSideCMSLCNotCalc = kTRUE;
  fQOutCMSLCNotCalc  = kTRUE;
  fQLongCMSLCNotCalc = kTRUE;
  fKtNotCalc         = kTRUE;
  fKStarNotCalc      = kTRUE;
  fQInvLNotCalc      = kTRUE;
- //and do nothing until will be asked for
+ fGammaCMSLCNotCalc = kTRUE;
+ ffLLWeightNotCalc = kTRUE;
 }
 /****************************************************************/
-/****************************************************************/
 inline 
 void AliHBTPair::CalculateInvMassSqr()
  {