]>
Commit | Line | Data |
---|---|---|
d92b41ad | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-2007, 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 | /* $Id: $ */ | |
17 | ||
18 | //------------------------------------------------------------------------- | |
19 | // AOD class for photon and other particles storage and | |
20 | // correlation studies | |
21 | // Author: Yves Schutz, CERN | |
22 | //------------------------------------------------------------------------- | |
23 | ||
24 | #include <TLorentzVector.h> | |
25 | #include "AliAODJet.h" | |
26 | #include "AliAODParticleCorrelation.h" | |
27 | ||
28 | ClassImp(AliAODParticleCorrelation) | |
29 | ||
30 | ||
31 | //______________________________________________________________________________ | |
32 | AliAODParticleCorrelation::AliAODParticleCorrelation() : | |
33 | AliVParticle(), | |
34 | fMomentum(0),fPdg(-1), fTag(-1),fLabel(-1),fDetector(""),fR(0), | |
35 | fRefTracks(new TRefArray()), fRefClusters(new TRefArray()), | |
36 | fRefIsolationConeTracks(new TRefArray()), fRefIsolationConeClusters(new TRefArray()), | |
37 | fRefBackgroundTracks(new TRefArray()), fRefBackgroundClusters(new TRefArray()), | |
38 | fLeadingDetector(""), fLeading(0), fCorrJet(0), fRefJet(0) | |
39 | { | |
40 | // constructor | |
41 | } | |
42 | ||
43 | //______________________________________________________________________________ | |
44 | AliAODParticleCorrelation::AliAODParticleCorrelation(Double_t px, Double_t py, Double_t pz, Double_t e): | |
45 | AliVParticle(), | |
46 | fMomentum(0),fPdg(-1), fTag(-1),fLabel(-1),fDetector(""),fR(0), | |
47 | fRefTracks(new TRefArray()), fRefClusters(new TRefArray()), | |
48 | fRefIsolationConeTracks(new TRefArray()), fRefIsolationConeClusters(new TRefArray()), | |
49 | fRefBackgroundTracks(new TRefArray()), fRefBackgroundClusters(new TRefArray()), | |
50 | fLeadingDetector(""), fLeading(new TLorentzVector), fCorrJet(new TLorentzVector), fRefJet(0) | |
51 | { | |
52 | // constructor | |
53 | fMomentum = new TLorentzVector(px, py, pz, e); | |
54 | } | |
55 | ||
56 | //______________________________________________________________________________ | |
57 | AliAODParticleCorrelation::AliAODParticleCorrelation(TLorentzVector & p): | |
58 | AliVParticle(), | |
59 | fMomentum(0),fPdg(-1), fTag(-1),fLabel(-1),fDetector(""),fR(0), | |
60 | fRefTracks(new TRefArray()), fRefClusters(new TRefArray()), | |
61 | fRefIsolationConeTracks(new TRefArray()), fRefIsolationConeClusters(new TRefArray()), | |
62 | fRefBackgroundTracks(new TRefArray()), fRefBackgroundClusters(new TRefArray()), | |
63 | fLeadingDetector(""), fLeading(new TLorentzVector), fCorrJet(new TLorentzVector), fRefJet(0) | |
64 | { | |
65 | // constructor | |
66 | fMomentum = new TLorentzVector(p); | |
67 | } | |
68 | ||
69 | ||
70 | //______________________________________________________________________________ | |
71 | AliAODParticleCorrelation::~AliAODParticleCorrelation() | |
72 | { | |
73 | // destructor | |
74 | delete fMomentum; | |
75 | delete fRefTracks; | |
76 | delete fRefClusters; | |
77 | delete fRefIsolationConeTracks; | |
78 | delete fRefIsolationConeClusters; | |
79 | delete fRefBackgroundTracks; | |
80 | delete fRefBackgroundClusters; | |
81 | delete fLeading; | |
82 | delete fCorrJet; | |
83 | } | |
84 | ||
85 | //______________________________________________________________________________ | |
86 | AliAODParticleCorrelation::AliAODParticleCorrelation(const AliAODParticleCorrelation& part) : | |
87 | AliVParticle(part), | |
88 | fMomentum(0) ,fPdg(part.fPdg), fTag(part.fTag),fLabel(part.fLabel), | |
89 | fDetector(part.fDetector), | |
90 | fR(part.fR), | |
91 | fRefTracks(), fRefClusters(), | |
92 | fRefIsolationConeTracks(), fRefIsolationConeClusters(), | |
93 | fRefBackgroundTracks(), fRefBackgroundClusters(), | |
94 | fLeadingDetector(part.fLeadingDetector), fLeading(0), | |
95 | fCorrJet(0), fRefJet(part.fRefJet) | |
96 | { | |
97 | // Copy constructor | |
98 | fMomentum = new TLorentzVector(*part.fMomentum); | |
99 | fLeading = new TLorentzVector(*part.fLeading); | |
100 | fCorrJet = new TLorentzVector(*part.fCorrJet); | |
101 | fRefTracks = new TRefArray(*part.fRefTracks); | |
102 | fRefClusters = new TRefArray(*part.fRefClusters); | |
103 | fRefIsolationConeTracks = new TRefArray(*part.fRefIsolationConeTracks); | |
104 | fRefIsolationConeClusters = new TRefArray(*part.fRefIsolationConeClusters); | |
105 | fRefBackgroundTracks = new TRefArray(*part.fRefBackgroundTracks); | |
106 | fRefBackgroundClusters = new TRefArray(*part.fRefBackgroundClusters); | |
107 | } | |
108 | ||
109 | //______________________________________________________________________________ | |
110 | AliAODParticleCorrelation& AliAODParticleCorrelation::operator=(const AliAODParticleCorrelation& part) | |
111 | { | |
112 | // Assignment operator | |
113 | if(this!=&part) { | |
114 | } | |
115 | ||
116 | fPdg = part.fPdg; | |
117 | fTag = part.fTag; | |
118 | fLabel = part.fLabel; | |
119 | fR = part.fR; | |
120 | fRefJet = part.fRefJet ; | |
121 | fDetector =part.fDetector; | |
122 | fLeadingDetector =part.fLeadingDetector; | |
123 | ||
124 | if (fMomentum ) delete fMomentum; | |
125 | if (fLeading ) delete fLeading; | |
126 | if (fCorrJet ) delete fCorrJet; | |
127 | if( fRefTracks ) delete fRefTracks ; | |
128 | if( fRefClusters) delete fRefClusters ; | |
129 | if( fRefIsolationConeTracks ) delete fRefIsolationConeTracks ; | |
130 | if( fRefIsolationConeClusters) delete fRefIsolationConeClusters ; | |
131 | if( fRefBackgroundTracks ) delete fRefBackgroundTracks ; | |
132 | if( fRefBackgroundClusters ) delete fRefBackgroundClusters ; | |
133 | ||
134 | fMomentum = new TLorentzVector(*part.fMomentum); | |
135 | fLeading = new TLorentzVector(*part.fLeading); | |
136 | fCorrJet = new TLorentzVector(*part.fCorrJet); | |
137 | fRefTracks = new TRefArray(*part.fRefTracks); | |
138 | fRefClusters = new TRefArray(*part.fRefClusters); | |
139 | fRefIsolationConeTracks = new TRefArray(*part.fRefIsolationConeTracks); | |
140 | fRefIsolationConeClusters = new TRefArray(*part.fRefIsolationConeClusters); | |
141 | fRefBackgroundTracks = new TRefArray(*part.fRefBackgroundTracks); | |
142 | fRefBackgroundClusters = new TRefArray(*part.fRefBackgroundClusters); | |
143 | ||
144 | return *this; | |
145 | } | |
146 | ||
147 | void AliAODParticleCorrelation::Print(Option_t* /*option*/) const | |
148 | { | |
149 | // Print information of all data members | |
150 | printf("Particle 4-vector:\n"); | |
151 | printf(" E = %13.3f\n", E() ); | |
152 | printf(" Px = %13.3f\n", Px()); | |
153 | printf(" Py = %13.3f\n", Py()); | |
154 | printf(" Pz = %13.3f\n", Pz()); | |
155 | printf("pdg : %d\n",fPdg); | |
156 | printf("tag : %d\n",fTag); | |
157 | printf("R : %2.2f\n",fR); | |
158 | printf("Detector : %s\n",fDetector.Data()); | |
159 | ||
160 | // if(fRefJet) fRefJet.Print(); | |
161 | ||
162 | } |