]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/RESONANCES/AliRsnDaughterDef.cxx
example macros to run on proof
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnDaughterDef.cxx
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
20 //
21 //  authors: A. Pulvirenti (alberto.pulvirenti@ct.infn.it)
22 //           M. Vala (martin.vala@cern.ch)
23 //
24
25 #include "AliLog.h"
26 #include "AliRsnDaughterDef.h"
27
28 ClassImp(AliRsnDaughterDef)
29
30
31 //_____________________________________________________________________________
32 AliRsnDaughterDef::AliRsnDaughterDef() :
33    fPID(AliRsnDaughter::kUnknown),
34    fMass(0.0),
35    fCharge(0),
36    fRefType(AliRsnDaughter::kNoType)
37 {
38 //
39 // This version of constructor leaves everything undefined:
40 // this will cause all daughters to be accepted.
41 //
42 }
43
44 //_____________________________________________________________________________
45 AliRsnDaughterDef::AliRsnDaughterDef(AliRsnDaughter::ESpecies type, Char_t sign) :
46    fPID(type),
47    fMass(AliRsnDaughter::SpeciesMass(type)),
48    fCharge(sign),
49    fRefType(AliRsnDaughter::RefType(type))
50 {
51 //
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).
54 //
55 }
56
57 //_____________________________________________________________________________
58 AliRsnDaughterDef::AliRsnDaughterDef(EPARTYPE type, Char_t sign) :
59    fPID(AliRsnDaughter::FromAliPID(type)),
60    fMass(AliRsnDaughter::SpeciesMass(AliRsnDaughter::FromAliPID(type))),
61    fCharge(sign),
62    fRefType(AliRsnDaughter::RefType(AliRsnDaughter::FromAliPID(type)))
63 {
64 //
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).
67 //
68 }
69
70 //_____________________________________________________________________________
71 AliRsnDaughterDef::AliRsnDaughterDef(AliRsnDaughter::ERefType refType, Char_t sign) :
72    fPID(AliRsnDaughter::kUnknown),
73    fMass(0.0),
74    fCharge(sign),
75    fRefType(refType)
76 {
77 //
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.
85 //
86 }
87
88 //_____________________________________________________________________________
89 AliRsnDaughterDef::AliRsnDaughterDef(const AliRsnDaughterDef &copy) :
90    TObject(copy),
91    fPID(copy.fPID),
92    fMass(copy.fMass),
93    fCharge(copy.fCharge),
94    fRefType(copy.fRefType)
95 {
96 //
97 // Copy constructor has standard behavior.
98 //
99 }
100
101 //_____________________________________________________________________________
102 const AliRsnDaughterDef& AliRsnDaughterDef::operator=(const AliRsnDaughterDef &copy)
103 {
104 //
105 // Assignment operator has standard behavior.
106 //
107
108    fMass = copy.fMass;
109    fCharge = copy.fCharge;
110    fPID = copy.fPID;
111    fRefType = copy.fRefType;
112
113    return (*this);
114 }