]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/RESONANCES/AliRsnDaughterDef.cxx
Some bug fixes, removal of some duplicates and clarified the logic of some pieces...
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnDaughterDef.cxx
CommitLineData
f34f960b 1//
2// Definition for a single candidate daughter.
3// They can be chosen among the following possibilities:
4//
5// -- particle species, chosen in the enum AliRsnDaughter::ESpecies;
6// this option does two things:
7// -- when possible (needs MC) and required, allow to check is a daughter
8// is of the defined species (e.g.: for selecting true daughters of a resonance)
9// -- defines the mass to be assigned to this object, for any purpose
10// (e.g.: to compute its 4-momentum to be used for a resonance mass)
11//
12// -- track charge, which can be '+', '-', '0',
13// -- any other char leaves this undefined (use only in daughter monitor loops)
14// -- when doing resonance analysis, or when RSN Input handler needs to be used,
15// this must always be defined
16//
17// -- object type (track/V0/cascade)
18// -- could be needed to select tracks when particle species is not specified
19// -- works only in single daughter loops
7356f978 20//
21// authors: A. Pulvirenti (alberto.pulvirenti@ct.infn.it)
22// M. Vala (martin.vala@cern.ch)
23//
465f48b2 24
25#include "AliLog.h"
465f48b2 26#include "AliRsnDaughterDef.h"
27
28ClassImp(AliRsnDaughterDef)
29
3a15c861 30
31//_____________________________________________________________________________
32AliRsnDaughterDef::AliRsnDaughterDef() :
7356f978 33 fPID(AliRsnDaughter::kUnknown),
3a15c861 34 fMass(0.0),
35 fCharge(0),
7356f978 36 fRefType(AliRsnDaughter::kNoType)
3a15c861 37{
38//
7356f978 39// This version of constructor leaves everything undefined:
40// this will cause all daughters to be accepted.
3a15c861 41//
42}
43
465f48b2 44//_____________________________________________________________________________
7356f978 45AliRsnDaughterDef::AliRsnDaughterDef(AliRsnDaughter::ESpecies type, Char_t sign) :
46 fPID(type),
d7712d44 47 fMass(AliRsnDaughter::SpeciesMass(type)),
9ae306ed 48 fCharge(sign),
7356f978 49 fRefType(AliRsnDaughter::RefType(type))
465f48b2 50{
51//
f34f960b 52// This version of constructor initializes the PID type (and then the mass)
53// and the charge (optional, leave 2nd argument to default to include both).
465f48b2 54//
7356f978 55}
465f48b2 56
7356f978 57//_____________________________________________________________________________
58AliRsnDaughterDef::AliRsnDaughterDef(EPARTYPE type, Char_t sign) :
59 fPID(AliRsnDaughter::FromAliPID(type)),
d7712d44 60 fMass(AliRsnDaughter::SpeciesMass(AliRsnDaughter::FromAliPID(type))),
7356f978 61 fCharge(sign),
62 fRefType(AliRsnDaughter::RefType(AliRsnDaughter::FromAliPID(type)))
63{
64//
f34f960b 65// This version of constructor initializes the PID type (and then the mass)
66// and the charge (optional, leave 2nd argument to default to include both).
7356f978 67//
465f48b2 68}
69
3a15c861 70//_____________________________________________________________________________
71AliRsnDaughterDef::AliRsnDaughterDef(AliRsnDaughter::ERefType refType, Char_t sign) :
7356f978 72 fPID(AliRsnDaughter::kUnknown),
3a15c861 73 fMass(0.0),
74 fCharge(sign),
7356f978 75 fRefType(refType)
3a15c861 76{
77//
7356f978 78// This version of constructor initializes the object type
79// and the charge (optional, leave 2nd argument to default to include both),
80// and leaves the PID type undefined.
81// This is useful when one is interested in all tracks/V0s/cascades without
82// requiring them to be identified as a certain species, but if one then requires
83// an object linked to this definition to compute a rapidity or a transverse mass,
84// this will not work.
3a15c861 85//
86}
465f48b2 87
88//_____________________________________________________________________________
89AliRsnDaughterDef::AliRsnDaughterDef(const AliRsnDaughterDef &copy) :
90 TObject(copy),
7356f978 91 fPID(copy.fPID),
465f48b2 92 fMass(copy.fMass),
93 fCharge(copy.fCharge),
7356f978 94 fRefType(copy.fRefType)
465f48b2 95{
96//
7356f978 97// Copy constructor has standard behavior.
465f48b2 98//
99}
100
101//_____________________________________________________________________________
102const AliRsnDaughterDef& AliRsnDaughterDef::operator=(const AliRsnDaughterDef &copy)
103{
104//
7356f978 105// Assignment operator has standard behavior.
465f48b2 106//
107
108 fMass = copy.fMass;
109 fCharge = copy.fCharge;
110 fPID = copy.fPID;
7356f978 111 fRefType = copy.fRefType;
465f48b2 112
113 return (*this);
114}