]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/RESONANCES/AliRsnPairParticle.h
EMCAL Space Frame now included in geometry
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnPairParticle.h
CommitLineData
06351446 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * See cxx source for full Copyright notice *
4 **************************************************************************/
5
6//
7// Class AliRsnPairParticle
8//
9// Implementation of a pair of tracks, for several purposes
10// - computing the total 4-momentum & inv. mass for output histos filling
11// - evaluating cut checks on the pair of particles
12//
13// author: Martin Vala (martin.vala@cern.ch)
14// revised by: Alberto Pulvirenti (alberto.pulvirenti@ct.infn.it)
15//
16
17#ifndef ALIRSNPAIRPARTICLE_H
18#define ALIRSNPAIRPARTICLE_H
19
20#include <TMath.h>
21
22#include "AliRsnDaughter.h"
23#include "AliRsnMCInfo.h"
24
25class AliRsnPairParticle : public TObject
26{
27public:
28
29 AliRsnPairParticle();
30 AliRsnPairParticle(const AliRsnPairParticle &obj);
31 AliRsnPairParticle& operator=(const AliRsnPairParticle &obj);
32 virtual ~AliRsnPairParticle();
33
e2bafbbc 34 Double_t GetInvMass (Double_t m1, Double_t m2);
35 Double_t GetInvMassMC (Double_t m1 = -1.0, Double_t m2 = -1.0);
36
37 Double_t GetP2() const {return (fPTot[0]*fPTot[0] + fPTot[1]*fPTot[1] + fPTot[2]*fPTot[2]);}
38 Double_t GetPt2() const {return (fPTot[0]*fPTot[0] + fPTot[1]*fPTot[1]);}
39 Double_t GetP() const {return TMath::Sqrt(GetP2());}
40 Double_t GetPx() const {return fPTot[0];}
41 Double_t GetPy() const {return fPTot[1];}
42 Double_t GetPz() const {return fPTot[2];}
43 Double_t GetPt() const {return TMath::Sqrt(GetPt2());}
44
45 Double_t GetP2MC() const {return (fPTotMC[0]*fPTotMC[0] + fPTotMC[1]*fPTotMC[1] + fPTotMC[2]*fPTotMC[2]);}
46 Double_t GetPt2MC() const {return (fPTotMC[0]*fPTotMC[0] + fPTotMC[1]*fPTotMC[1]);}
47 Double_t GetPMC() const {return TMath::Sqrt(GetP2MC());}
48 Double_t GetPxMC() const {return fPTotMC[0];}
49 Double_t GetPyMC() const {return fPTotMC[1];}
50 Double_t GetPzMC() const {return fPTotMC[2];}
51 Double_t GetPtMC() const {return TMath::Sqrt(GetPt2MC());}
52
53 Double_t GetAngle() const;
54
55 AliRsnDaughter* GetDaughter(const Int_t &index) const {return fDaughter[index];}
56
57 Bool_t IsLabelEqual() {return abs(fDaughter[0]->Label()) == abs(fDaughter[1]->Label());}
58 Bool_t IsIndexEqual() {return (fDaughter[0]->Index() == fDaughter[1]->Index());}
59 Bool_t IsTruePair(Int_t refPDG = 0);
60
61 void SetPair(AliRsnDaughter *daughter1, AliRsnDaughter *daughter2);
62 void PrintInfo (const Option_t *option = "");
06351446 63
64private:
65
66 Double_t fPTot[3]; // total momentum computed with rec. values
67 Double_t fPTotMC[3]; // total momentum computed with MC values
68 Double_t fPTrack[2][3]; // rec. momentum of single tracks
69 Double_t fPTrackMC[2][3]; // MC momentum of single tracks
70
06351446 71 Int_t fMotherLabel[2]; // GEANT label of tracks
72 Int_t fMotherPDG[2]; // PDG code of mother of tracks
73
74 AliRsnDaughter *fDaughter[2]; // elements of the pair
75
76 ClassDef (AliRsnPairParticle,1)
77};
78
79#endif