]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGHF/hfe/AliHFEreducedMCParticle.h
Merge branch 'master' of https://git.cern.ch/reps/AliRoot
[u/mrichter/AliRoot.git] / PWGHF / hfe / AliHFEreducedMCParticle.h
CommitLineData
3513afb7 1/**************************************************************************
2* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3* *
4* Author: The ALICE Off-line Project. *
5* Contributors are mentioned in the code where appropriate. *
6* *
7* Permission to use, copy, modify and distribute this software and its *
8* documentation strictly for non-commercial purposes is hereby granted *
9* without fee, provided that the above copyright notice appears in all *
10* copies and that both the copyright notice and this permission notice *
11* appear in the supporting documentation. The authors make no claims *
12* about the suitability of this software for any purpose. It is *
13* provided "as is" without express or implied warranty. *
14**************************************************************************/
15//
16// Debug tree to look at the distribution of the variable we are cutting on
17//
18//
19#ifndef ALIHFEREDUCEDMCPARTICLE_H
20#define ALIHFEREDUCEDMCPARTICLE_H
21
22#include <TObject.h>
23#include <TMath.h>
24
25class AliHFEreducedMCParticle : public TObject{
26 public:
27 AliHFEreducedMCParticle();
28 AliHFEreducedMCParticle(const AliHFEreducedMCParticle &ref);
29 AliHFEreducedMCParticle &operator=(const AliHFEreducedMCParticle &ref);
30 ~AliHFEreducedMCParticle() {}
31
32 Double_t Pt() const { return TMath::Abs(fSignedPt); }
33 Double_t P() const { return fP; }
34 Double_t Eta() const { return fEta; }
35 Double_t Phi() const { return fPhi; }
36 Int_t Charge() const {
37 if(fSignedPt > 0) return 1;
38 else return -1;
39 }
40 Int_t Pdg() const { return fPdg; }
41 Int_t MotherPdg() const { return fMotherPdg; }
42 Int_t Source() const { return static_cast<Int_t>(fSource); }
ff8249bd 43 Int_t GetElectronSource() const { return static_cast<Int_t>(fEleSource); }
3513afb7 44 Bool_t IsSignal() const { return fSignal; }
45 Double_t RadialProductionVertex() const { return TMath::Abs(fProductionVertex[0]*fProductionVertex[0]+fProductionVertex[1]*fProductionVertex[1]); }
46 Double_t VX() const { return fProductionVertex[0]; }
47 Double_t VY() const { return fProductionVertex[1]; }
48 Double_t VZ() const { return fProductionVertex[2]; }
ff8249bd 49 Double_t GetMotherVX() const { return fMotherProductionVertex[0]; }
50 Double_t GetMotherVY() const { return fMotherProductionVertex[1]; }
51 Double_t GetMotherVZ() const { return fMotherProductionVertex[2]; }
3513afb7 52
53 void SetSignedPt(Double_t pt, Bool_t positiveCharge){
54 double chargesign = positiveCharge ? 1. : -1.;
55 fSignedPt = pt * chargesign;
56 }
57 void SetP(Double_t p) { fP = p; }
58 void SetEta(Double_t eta) { fEta = eta; }
59 void SetPhi(Double_t phi) { fPhi = phi; }
60 void SetPdg(Int_t pdg) { fPdg = pdg; }
4437a0d2 61 void SetMotherPdg(Int_t pdg) { fMotherPdg = pdg; }
3513afb7 62 void SetSource(Int_t source) { fSource = static_cast<Char_t>(source); }
ff8249bd 63 void SetElectronSource(Int_t source) { fEleSource = static_cast<UChar_t>(source); }
3513afb7 64 void SetSignal() { fSignal = kTRUE; }
65 void SetProductionVertex(Double_t vx, Double_t vy, Double_t vz) {
66 fProductionVertex[0] = vx;
67 fProductionVertex[1] = vy;
68 fProductionVertex[2] = vz;
69 }
ff8249bd 70 void SetMotherProductionVertex(Double_t vx, Double_t vy, Double_t vz) {
71 fMotherProductionVertex[0] = vx;
72 fMotherProductionVertex[1] = vy;
73 fMotherProductionVertex[2] = vz;
74 }
3513afb7 75
76 private:
77 Double_t fSignedPt; // signed pt
78 Double_t fP; // p
79 Double_t fEta; // eta
80 Double_t fPhi; // phi
81 Int_t fPdg; // pdg
82 Int_t fMotherPdg; // mother pdg
83 Char_t fSource; // source
84 Bool_t fSignal; // signal
85 Double_t fProductionVertex[3]; // production vertex
ff8249bd 86 Double_t fMotherProductionVertex[3]; // production vertex
87 UChar_t fEleSource; // Electron source (AliHFEmcQA)
3513afb7 88
ff8249bd 89 ClassDef(AliHFEreducedMCParticle, 2)
3513afb7 90
91};
92#endif