]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/AOD/AliAODPWG4ParticleCorrelation.cxx
Proper treatment of roundoff error for 0-length step
[u/mrichter/AliRoot.git] / STEER / AOD / AliAODPWG4ParticleCorrelation.cxx
CommitLineData
1c5acb87 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: AliAODPWG4ParticleCorrelation.h $ */
17
18//-------------------------------------------------------------------------
19// AOD class for photon and other particles storage and
20// correlation studies
21// Author: Yves Schutz, CERN, Gustavo Conesa, INFN
22//-------------------------------------------------------------------------
23
24//-- ROOT system --
25
26//-- Analysis system
27#include "AliAODPWG4ParticleCorrelation.h"
5e6a3170 28#include "AliAODJet.h"
1c5acb87 29
30ClassImp(AliAODPWG4ParticleCorrelation)
31
32
33//______________________________________________________________________________
477d6cee 34 AliAODPWG4ParticleCorrelation::AliAODPWG4ParticleCorrelation() :
35 AliAODPWG4Particle(), fIsolated(kFALSE),
f284616d 36 fLeadingParticle(kTRUE),
a3aebfff 37 fLeadingDetector(""), fLeading(), fCorrJet(), fCorrBkg(), fRefJet(0),
f0f2f871 38 fListOfObjArrays(0)
1c5acb87 39{
40 // constructor
41}
42
43//______________________________________________________________________________
44AliAODPWG4ParticleCorrelation::AliAODPWG4ParticleCorrelation(Double_t px, Double_t py, Double_t pz, Double_t e):
477d6cee 45 AliAODPWG4Particle(), fIsolated(kFALSE),
f284616d 46 fLeadingParticle(kTRUE),
477d6cee 47 fLeadingDetector(""), fLeading(), fCorrJet(),
591cc579 48 fCorrBkg(), fRefJet(0), fListOfObjArrays(new TList)
1c5acb87 49{
50 // constructor
477d6cee 51 SetMomentum(new TLorentzVector(px, py, pz, e));
0da5958d 52 fListOfObjArrays->SetOwner(kTRUE);
53
1c5acb87 54}
55
56//______________________________________________________________________________
57AliAODPWG4ParticleCorrelation::AliAODPWG4ParticleCorrelation(TLorentzVector & p):
477d6cee 58 AliAODPWG4Particle(p), fIsolated(kFALSE),
f284616d 59 fLeadingParticle(kTRUE),
591cc579 60 fLeadingDetector(""), fLeading(), fCorrJet(), fCorrBkg(), fRefJet(0), fListOfObjArrays(new TList)
1c5acb87 61{
62 // constructor
0da5958d 63 fListOfObjArrays->SetOwner(kTRUE);
64
1c5acb87 65}
66
67//______________________________________________________________________________
68AliAODPWG4ParticleCorrelation::AliAODPWG4ParticleCorrelation(AliAODPWG4Particle & p):
477d6cee 69 AliAODPWG4Particle(p), fIsolated(kFALSE),
f284616d 70 fLeadingParticle(kTRUE),
591cc579 71 fLeadingDetector(""), fLeading(), fCorrJet(), fCorrBkg(),fRefJet(0), fListOfObjArrays(new TList)
1c5acb87 72{
73 // constructor
0da5958d 74 fListOfObjArrays->SetOwner(kTRUE);
75
1c5acb87 76}
77
78//______________________________________________________________________________
79AliAODPWG4ParticleCorrelation::~AliAODPWG4ParticleCorrelation()
80{
81 // destructor
591cc579 82 if(fListOfObjArrays){
83 fListOfObjArrays->Clear();
84 delete fListOfObjArrays ;
a3aebfff 85 }
1c5acb87 86}
87
4695da48 88//______________________________________________________________________________
89void AliAODPWG4ParticleCorrelation::Clear(const Option_t* /*opt*/)
90{
91 // Clear
032002d9 92
93 AliAODPWG4Particle::Clear(""); //delete fMomentum
94
4695da48 95 if(fListOfObjArrays){
96 fListOfObjArrays->Clear();
97 delete fListOfObjArrays ;
98 }
99}
100
101
1c5acb87 102//______________________________________________________________________________
103AliAODPWG4ParticleCorrelation::AliAODPWG4ParticleCorrelation(const AliAODPWG4ParticleCorrelation& part) :
477d6cee 104 AliAODPWG4Particle(part), fIsolated(part.fIsolated),
f284616d 105 fLeadingParticle(part.fLeadingParticle),
477d6cee 106 fLeadingDetector(part.fLeadingDetector), fLeading(part.fLeading),
a3aebfff 107 fCorrJet(part.fCorrJet), fCorrBkg(part.fCorrBkg), fRefJet(part.fRefJet),
4695da48 108 fListOfObjArrays(new TList)
1c5acb87 109{
110 // Copy constructor
a3aebfff 111
1c5acb87 112}
113
114//______________________________________________________________________________
82679d84 115//AliAODPWG4ParticleCorrelation& AliAODPWG4ParticleCorrelation::operator=(const AliAODPWG4ParticleCorrelation& part)
116//{
117// // Assignment operator
118// if(this!=&part) {
119//
120// fIsolated = part.fIsolated;
121// fRefJet = part.fRefJet ;
122// fLeadingDetector =part.fLeadingDetector;
123// fLeading = part.fLeading;
124// fCorrJet = part.fCorrJet ;
125// fCorrBkg = part.fCorrBkg;
126// fListOfObjArrays = fListOfObjArrays;
127//
128// }
129//
130// return *this;
131//}
1c5acb87 132
133//______________________________________________________________________________
134void AliAODPWG4ParticleCorrelation::Print(Option_t* /*option*/) const
135{
136 // Print information of all data members
137 AliAODPWG4Particle::Print("");
a3aebfff 138
1c5acb87 139 if(fIsolated) printf("Isolated! \n");
a3aebfff 140
141 if(GetJet()) GetJet()->Print("");
142
1c5acb87 143 printf("Leading Detector : %s\n",fLeadingDetector.Data());
a3aebfff 144 printf("Leading Particle 4-vector:\n");
145 printf(" E = %13.3f", fLeading.E() );
146 printf(" Px = %13.3f", fLeading.Px());
147 printf(" Py = %13.3f", fLeading.Py());
148 printf(" Pz = %13.3f\n", fLeading.Pz());
1c5acb87 149
591cc579 150 if( fListOfObjArrays) fListOfObjArrays->Print("");
1c5acb87 151}