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 Bool_t IsSignal() const { return fSignal; }
44 Double_t RadialProductionVertex() const { return TMath::Abs(fProductionVertex[0]*fProductionVertex[0]+fProductionVertex[1]*fProductionVertex[1]); }
45 Double_t VX() const { return fProductionVertex[0]; }
46 Double_t VY() const { return fProductionVertex[1]; }
47 Double_t VZ() const { return fProductionVertex[2]; }
49 void SetSignedPt(Double_t pt, Bool_t positiveCharge){
50 double chargesign = positiveCharge ? 1. : -1.;
51 fSignedPt = pt * chargesign;
53 void SetP(Double_t p) { fP = p; }
54 void SetEta(Double_t eta) { fEta = eta; }
55 void SetPhi(Double_t phi) { fPhi = phi; }
56 void SetPdg(Int_t pdg) { fPdg = pdg; }
57 void SetMotherPdg(Int_t pdg) { fMotherPdg = pdg; }
58 void SetSource(Int_t source) { fSource = static_cast<Char_t>(source); }
59 void SetSignal() { fSignal = kTRUE; }
60 void SetProductionVertex(Double_t vx, Double_t vy, Double_t vz) {
61 fProductionVertex[0] = vx;
62 fProductionVertex[1] = vy;
63 fProductionVertex[2] = vz;
67 Double_t fSignedPt; // signed pt
72 Int_t fMotherPdg; // mother pdg
73 Char_t fSource; // source
74 Bool_t fSignal; // signal
75 Double_t fProductionVertex[3]; // production vertex
77 ClassDef(AliHFEreducedMCParticle, 1)