]>
Commit | Line | Data |
---|---|---|
b2a297fa | 1 | /************************************************************************* |
2 | * Copyright(c) 1998-2009, 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 | /////////////////////////////////////////////////////////////////////////// | |
17 | // // | |
18 | // Dielectron Pair class. Internally it makes use of AliKFParticle. // | |
19 | // // | |
20 | /////////////////////////////////////////////////////////////////////////// | |
21 | ||
22 | ||
23 | #include "AliDielectronPair.h" | |
24 | #include "AliVTrack.h" | |
25 | ||
26 | ClassImp(AliDielectronPair) | |
27 | ||
28 | AliDielectronPair::AliDielectronPair() : | |
b2a297fa | 29 | fType(-1), |
a655b716 | 30 | fLabel(-1), |
b2a297fa | 31 | fPair(), |
572b0139 | 32 | fD1(), |
33 | fD2(), | |
b2a297fa | 34 | fRefD1(), |
35 | fRefD2() | |
36 | { | |
37 | // | |
38 | // Default Constructor | |
39 | // | |
40 | ||
41 | } | |
42 | ||
43 | //______________________________________________ | |
44 | AliDielectronPair::AliDielectronPair(AliVTrack * const particle1, Int_t pid1, | |
45 | AliVTrack * const particle2, Int_t pid2, Char_t type) : | |
b2a297fa | 46 | fType(type), |
a655b716 | 47 | fLabel(-1), |
b2a297fa | 48 | fPair(), |
572b0139 | 49 | fD1(), |
50 | fD2(), | |
b2a297fa | 51 | fRefD1(), |
52 | fRefD2() | |
53 | { | |
54 | // | |
55 | // Constructor with tracks | |
56 | // | |
57 | SetTracks(particle1, pid1, particle2, pid2); | |
58 | } | |
59 | ||
60 | //______________________________________________ | |
61 | AliDielectronPair::~AliDielectronPair() | |
62 | { | |
63 | // | |
64 | // Default Destructor | |
65 | // | |
66 | ||
67 | } | |
68 | ||
69 | //______________________________________________ | |
70 | void AliDielectronPair::SetTracks(AliVTrack * const particle1, Int_t pid1, | |
71 | AliVTrack * const particle2, Int_t pid2) | |
72 | { | |
73 | // | |
572b0139 | 74 | // Sort particles by pt, first particle larget Pt |
75 | // set AliKF daughters and pair | |
b2a297fa | 76 | // |
77 | fPair.Initialize(); | |
572b0139 | 78 | fD1.Initialize(); |
79 | fD2.Initialize(); | |
b2a297fa | 80 | |
81 | AliKFParticle kf1(*particle1,pid1); | |
82 | AliKFParticle kf2(*particle2,pid2); | |
572b0139 | 83 | |
b2a297fa | 84 | fPair.AddDaughter(kf1); |
85 | fPair.AddDaughter(kf2); | |
86 | ||
a655b716 | 87 | if (particle1->Pt()>particle2->Pt()){ |
88 | fRefD1 = particle1; | |
89 | fRefD2 = particle2; | |
572b0139 | 90 | fD1+=kf1; |
91 | fD2+=kf2; | |
a655b716 | 92 | } else { |
93 | fRefD1 = particle2; | |
94 | fRefD2 = particle1; | |
572b0139 | 95 | fD1+=kf2; |
96 | fD2+=kf1; | |
a655b716 | 97 | } |
b2a297fa | 98 | } |
99 |