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 **************************************************************************/
16 /* $Id: AliAODParticleCorrelation.h $ */
18 //-------------------------------------------------------------------------
19 // AOD class for photon and other particles storage and
20 // correlation studies
21 // Author: Yves Schutz, CERN, Gustavo Conesa, INFN
22 //-------------------------------------------------------------------------
27 #include "AliAODParticleCorrelation.h"
29 ClassImp(AliAODParticleCorrelation)
32 //______________________________________________________________________________
33 AliAODParticleCorrelation::AliAODParticleCorrelation() :
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()),
39 fLeadingDetector(""), fLeading(), fCorrJet(), fCorrBkg(), fRefJet(0)
44 //______________________________________________________________________________
45 AliAODParticleCorrelation::AliAODParticleCorrelation(Double_t px, Double_t py, Double_t pz, Double_t e):
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()),
51 fLeadingDetector(""), fLeading(), fCorrJet(),
52 fCorrBkg(), fRefJet(0)
55 fMomentum = new TLorentzVector(px, py, pz, e);
58 //______________________________________________________________________________
59 AliAODParticleCorrelation::AliAODParticleCorrelation(TLorentzVector & p):
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()),
65 fLeadingDetector(""), fLeading(), fCorrJet(), fCorrBkg(),fRefJet(0)
68 fMomentum = new TLorentzVector(p);
72 //______________________________________________________________________________
73 AliAODParticleCorrelation::~AliAODParticleCorrelation()
79 delete fRefIsolationConeTracks;
80 delete fRefIsolationConeClusters;
81 delete fRefBackgroundTracks;
82 delete fRefBackgroundClusters;
86 //______________________________________________________________________________
87 AliAODParticleCorrelation::AliAODParticleCorrelation(const AliAODParticleCorrelation& part) :
89 fMomentum(0) ,fPdg(part.fPdg), fTag(part.fTag),fLabel(part.fLabel),
90 fDetector(part.fDetector),
92 fRefTracks(), fRefClusters(),
93 fRefIsolationConeTracks(), fRefIsolationConeClusters(),
94 fRefBackgroundTracks(), fRefBackgroundClusters(),
95 fLeadingDetector(part.fLeadingDetector), fLeading(part.fLeading),
96 fCorrJet(part.fCorrJet), fCorrBkg(part.fCorrBkg), fRefJet(part.fRefJet)
99 fMomentum = new TLorentzVector(*part.fMomentum);
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);
108 //______________________________________________________________________________
109 AliAODParticleCorrelation& AliAODParticleCorrelation::operator=(const AliAODParticleCorrelation& part)
111 // Assignment operator
117 fLabel = part.fLabel;
119 fRefJet = part.fRefJet ;
120 fDetector =part.fDetector;
121 fLeadingDetector =part.fLeadingDetector;
122 fLeading = part.fLeading;
123 fCorrJet = part.fCorrJet ;
124 fCorrBkg = part.fCorrBkg;
126 if (fMomentum ) delete fMomentum;
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 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);
145 void AliAODParticleCorrelation::Print(Option_t* /*option*/) const
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);
156 printf("Trigger Detector : %s\n",fDetector.Data());
157 printf("Leading Detector : %s\n",fLeadingDetector.Data());
158 // if(fRefJet) fRefJet.Print();