1 /**************************************************************************
2 * Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
18 //-------------------------------------------------------------------------
19 // AOD class for photon and other particles storage and
20 // correlation studies
21 // Author: Yves Schutz, CERN
22 //-------------------------------------------------------------------------
24 #include <TLorentzVector.h>
25 #include "AliAODJet.h"
26 #include "AliAODParticleCorrelation.h"
28 ClassImp(AliAODParticleCorrelation)
31 //______________________________________________________________________________
32 AliAODParticleCorrelation::AliAODParticleCorrelation() :
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)
43 //______________________________________________________________________________
44 AliAODParticleCorrelation::AliAODParticleCorrelation(Double_t px, Double_t py, Double_t pz, Double_t e):
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)
53 fMomentum = new TLorentzVector(px, py, pz, e);
56 //______________________________________________________________________________
57 AliAODParticleCorrelation::AliAODParticleCorrelation(TLorentzVector & p):
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)
66 fMomentum = new TLorentzVector(p);
70 //______________________________________________________________________________
71 AliAODParticleCorrelation::~AliAODParticleCorrelation()
77 delete fRefIsolationConeTracks;
78 delete fRefIsolationConeClusters;
79 delete fRefBackgroundTracks;
80 delete fRefBackgroundClusters;
85 //______________________________________________________________________________
86 AliAODParticleCorrelation::AliAODParticleCorrelation(const AliAODParticleCorrelation& part) :
88 fMomentum(0) ,fPdg(part.fPdg), fTag(part.fTag),fLabel(part.fLabel),
89 fDetector(part.fDetector),
91 fRefTracks(), fRefClusters(),
92 fRefIsolationConeTracks(), fRefIsolationConeClusters(),
93 fRefBackgroundTracks(), fRefBackgroundClusters(),
94 fLeadingDetector(part.fLeadingDetector), fLeading(0),
95 fCorrJet(0), fRefJet(part.fRefJet)
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);
109 //______________________________________________________________________________
110 AliAODParticleCorrelation& AliAODParticleCorrelation::operator=(const AliAODParticleCorrelation& part)
112 // Assignment operator
118 fLabel = part.fLabel;
120 fRefJet = part.fRefJet ;
121 fDetector =part.fDetector;
122 fLeadingDetector =part.fLeadingDetector;
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 ;
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);
147 void AliAODParticleCorrelation::Print(Option_t* /*option*/) const
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());
160 // if(fRefJet) fRefJet.Print();