]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWG2/RESONANCES/AliRsnMiniPair.h
Added first version of cut monitoring + style format applied
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnMiniPair.h
index 7b3c9a281643bfe3134d3797abb060793c7014f8..7b5317f5df635e4cb963cb1b383d433eec079f55 100644 (file)
@@ -3,9 +3,9 @@
 
 //
 // This object is used as lightweight temporary container
-// of all information needed from any input object and 
+// of all information needed from any input object and
 // useful for resonance analysis.
-// 
+//
 
 #include <TObject.h>
 #include <TLorentzVector.h>
@@ -17,25 +17,25 @@ public:
 
    AliRsnMiniPair() : fMother(-1), fMotherPDG(0) { }
 
-   Int_t&          Mother()    {return fMother;}
-   Int_t&          MotherPDG() {return fMotherPDG;}
+   Int_t          &Mother()    {return fMother;}
+   Int_t          &MotherPDG() {return fMotherPDG;}
    void            Fill(AliRsnMiniParticle *p1, AliRsnMiniParticle *p2, Double_t m1, Double_t m2, Double_t refMass);
    void            FillRef(Double_t mass);
    void            InvertP(Bool_t first);
-      
+
    Int_t           ID(Bool_t mc) const {if (mc) return 1; else return 0;}
-   
-   TLorentzVectorP1 (Bool_t mc) {return fP1 [ID(mc)];}
-   TLorentzVectorP2 (Bool_t mc) {return fP2 [ID(mc)];}
-   TLorentzVectorSum(Bool_t mc) {return fSum[ID(mc)];}
-   TLorentzVectorRef(Bool_t mc) {return fRef[ID(mc)];}
-   
+
+   TLorentzVector &P1 (Bool_t mc) {return fP1 [ID(mc)];}
+   TLorentzVector &P2 (Bool_t mc) {return fP2 [ID(mc)];}
+   TLorentzVector &Sum(Bool_t mc) {return fSum[ID(mc)];}
+   TLorentzVector &Ref(Bool_t mc) {return fRef[ID(mc)];}
+
    Double_t        Pt(Bool_t mc)             const  {return fSum[ID(mc)].Pt();}
    Double_t        Pz(Bool_t mc)             const  {return fSum[ID(mc)].Pz();}
    Double_t        Eta(Bool_t mc)            const  {return fSum[ID(mc)].Eta();}
    Double_t        InvMass(Bool_t mc)        const  {return fSum[ID(mc)].M();}
-   Double_t        InvMassRes()              const;            
-   Double_t        InvMassDiff()             const;            
+   Double_t        InvMassRes()              const;
+   Double_t        InvMassDiff()             const;
    Double_t        Mt(Bool_t mc)             const  {return fRef[ID(mc)].Mt();}
    Double_t        Y(Bool_t mc)              const  {return fRef[ID(mc)].Rapidity();}
    Double_t        PtRatio(Bool_t mc)        const;
@@ -48,10 +48,10 @@ private:
    TLorentzVector fP2 [2];    // 2nd daughter momentum
    TLorentzVector fSum[2];    // sum of momenta
    TLorentzVector fRef[2];    // same as 'fSum' but with nominal resonance mass
-                           
+
    Int_t          fMother;    // label of mothers (when common)
    Int_t          fMotherPDG; // PDG code of mother (when common)
-   
+
    ClassDef(AliRsnMiniPair,1)
 };
 
@@ -74,7 +74,7 @@ inline Double_t AliRsnMiniPair::InvMassRes() const
 //
 
    if (fSum[1].M() <= 0.0) return 1E20;
-   
+
    return (fSum[0].M() - fSum[1].M()) / fSum[1].M();
 }
 
@@ -85,7 +85,7 @@ inline Double_t AliRsnMiniPair::InvMassDiff() const
 //
 
    if (fSum[1].M() <= 0.0) return 1E20;
-   
+
    return (fSum[0].M() - fSum[1].M());
 }
 
@@ -97,9 +97,9 @@ inline Double_t AliRsnMiniPair::PtRatio(Bool_t mc) const
 
    Double_t num = TMath::Abs(fP1[ID(mc)].Perp() - fP2[ID(mc)].Perp());
    Double_t den = TMath::Abs(fP1[ID(mc)].Perp() + fP2[ID(mc)].Perp());
-   
+
    if (den <= 0.0) return 1E20;
-   
+
    return num / den;
 }
 
@@ -111,7 +111,7 @@ inline Double_t AliRsnMiniPair::DipAngle(Bool_t mc) const
 
    const TLorentzVector &p1 = fP1[ID(mc)];
    const TLorentzVector &p2 = fP2[ID(mc)];
-   
+
    return ((p1.Perp() * p2.Perp() + p1.Z() * p2.Z()) / p1.Mag() / p2.Mag());
 }