1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
16 // Debug tree to look at the distribution of the variable we are cutting on
19 #ifndef ALIHFEREDUCEDMCPARTICLE_H
20 #define ALIHFEREDUCEDMCPARTICLE_H
25 class AliHFEreducedMCParticle : public TObject{
27 AliHFEreducedMCParticle();
28 AliHFEreducedMCParticle(const AliHFEreducedMCParticle &ref);
29 AliHFEreducedMCParticle &operator=(const AliHFEreducedMCParticle &ref);
30 ~AliHFEreducedMCParticle() {}
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;
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); }
43 Int_t GetElectronSource() const { return static_cast<Int_t>(fEleSource); }
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]; }
49 Double_t GetMotherVX() const { return fMotherProductionVertex[0]; }
50 Double_t GetMotherVY() const { return fMotherProductionVertex[1]; }
51 Double_t GetMotherVZ() const { return fMotherProductionVertex[2]; }
53 void SetSignedPt(Double_t pt, Bool_t positiveCharge){
54 double chargesign = positiveCharge ? 1. : -1.;
55 fSignedPt = pt * chargesign;
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; }
61 void SetMotherPdg(Int_t pdg) { fMotherPdg = pdg; }
62 void SetSource(Int_t source) { fSource = static_cast<Char_t>(source); }
63 void SetElectronSource(Int_t source) { fEleSource = static_cast<UChar_t>(source); }
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;
70 void SetMotherProductionVertex(Double_t vx, Double_t vy, Double_t vz) {
71 fMotherProductionVertex[0] = vx;
72 fMotherProductionVertex[1] = vy;
73 fMotherProductionVertex[2] = vz;
77 Double_t fSignedPt; // signed pt
82 Int_t fMotherPdg; // mother pdg
83 Char_t fSource; // source
84 Bool_t fSignal; // signal
85 Double_t fProductionVertex[3]; // production vertex
86 Double_t fMotherProductionVertex[3]; // production vertex
87 UChar_t fEleSource; // Electron source (AliHFEmcQA)
89 ClassDef(AliHFEreducedMCParticle, 2)