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