]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGLF/RESONANCES/AliRsnMiniPair.h
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGLF / RESONANCES / AliRsnMiniPair.h
CommitLineData
03d23846 1#ifndef ALIRSNMINIPAIR_H
2#define ALIRSNMINIPAIR_H
3
4//
5// This object is used as lightweight temporary container
61f275d1 6// of all information needed from any input object and
03d23846 7// useful for resonance analysis.
61f275d1 8//
03d23846 9
10#include <TObject.h>
11#include <TLorentzVector.h>
213adb92 12#include "TClonesArray.h"
13#include "AliRsnListOutput.h"
03d23846 14
213adb92 15class AliRsnListOutput;
03d23846 16class AliRsnMiniParticle;
17
18class AliRsnMiniPair : public TObject {
19public:
20
31dbef4e 21 AliRsnMiniPair() : fDCA1(0), fDCA2(0), fMother(-1), fMotherPDG(0), fNSisters(-1), fIsFromB(kFALSE), fIsQuarkFound(kFALSE) {Int_t i = 3; while (i--) fPmother[i] = 0.0;}
213adb92 22
61f275d1 23 Int_t &Mother() {return fMother;}
24 Int_t &MotherPDG() {return fMotherPDG;}
31dbef4e 25 Bool_t &IsFromB() {return fIsFromB;}
26 Bool_t &IsQuarkFound() {return fIsQuarkFound;}
35b36c39 27 Float_t &PmotherX() {return fPmother[0];}
28 Float_t &PmotherY() {return fPmother[1];}
29 Float_t &PmotherZ() {return fPmother[2];}
213adb92 30 void Fill(AliRsnMiniParticle *p1, AliRsnMiniParticle *p2, Double_t m1, Double_t m2, Double_t refMass);
31 void FillRef(Double_t mass);
32 void InvertP(Bool_t first);
61f275d1 33
213adb92 34 Int_t ID(Bool_t mc) const {if (mc) return 1; else return 0;}
61f275d1 35
36 TLorentzVector &P1 (Bool_t mc) {return fP1 [ID(mc)];}
37 TLorentzVector &P2 (Bool_t mc) {return fP2 [ID(mc)];}
38 TLorentzVector &Sum(Bool_t mc) {return fSum[ID(mc)];}
39 TLorentzVector &Ref(Bool_t mc) {return fRef[ID(mc)];}
40
03d23846 41 Double_t Pt(Bool_t mc) const {return fSum[ID(mc)].Pt();}
42 Double_t Pz(Bool_t mc) const {return fSum[ID(mc)].Pz();}
43 Double_t Eta(Bool_t mc) const {return fSum[ID(mc)].Eta();}
44 Double_t InvMass(Bool_t mc) const {return fSum[ID(mc)].M();}
61f275d1 45 Double_t InvMassRes() const;
46 Double_t InvMassDiff() const;
03d23846 47 Double_t Mt(Bool_t mc) const {return fRef[ID(mc)].Mt();}
48 Double_t Y(Bool_t mc) const {return fRef[ID(mc)].Rapidity();}
49 Double_t PtRatio(Bool_t mc) const;
50 Double_t DipAngle(Bool_t mc) const;
51 Double_t CosThetaStar(Bool_t mc);
213adb92 52 Double_t DaughterPt(Int_t daughterId, Bool_t mc);
53 Double_t DaughterDCA(Int_t daughterId);
54 Double_t DCAProduct();
397c0062 55 void DaughterPxPyPz(Int_t daughterId, Bool_t mc, Double_t *pxpypz);
088ca370 56 Short_t NSisters() {return fNSisters;}
213adb92 57
397c0062 58 private:
59
03d23846 60 TLorentzVector fP1 [2]; // 1st daughter momentum
61 TLorentzVector fP2 [2]; // 2nd daughter momentum
62 TLorentzVector fSum[2]; // sum of momenta
63 TLorentzVector fRef[2]; // same as 'fSum' but with nominal resonance mass
397c0062 64
213adb92 65 Double_t fDCA1; // 1st daughter DCA
66 Double_t fDCA2; // 2nd daughter DCA
67
03d23846 68 Int_t fMother; // label of mothers (when common)
69 Int_t fMotherPDG; // PDG code of mother (when common)
088ca370 70 Short_t fNSisters; // total number of mother's daughters in the MC stack
31dbef4e 71 Bool_t fIsFromB; // is the particle from B meson flag
72 Bool_t fIsQuarkFound; // is the particle from a quark flag (used to reject or accept Hijing event)
35b36c39 73 Float_t fPmother[3];// MC momentum of the pair corresponding mother
397c0062 74
31dbef4e 75 ClassDef(AliRsnMiniPair,4)
397c0062 76 };
03d23846 77
78#endif