]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/AliAODPWG4ParticleCorrelation.cxx
more secure string operations
[u/mrichter/AliRoot.git] / STEER / 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"
1c5acb87 28
29ClassImp(AliAODPWG4ParticleCorrelation)
30
31
32//______________________________________________________________________________
477d6cee 33 AliAODPWG4ParticleCorrelation::AliAODPWG4ParticleCorrelation() :
34 AliAODPWG4Particle(), fIsolated(kFALSE),
a3aebfff 35 fLeadingDetector(""), fLeading(), fCorrJet(), fCorrBkg(), fRefJet(0),
591cc579 36 fListOfObjArrays(new TList)
1c5acb87 37{
38 // constructor
0da5958d 39 fListOfObjArrays->SetOwner(kTRUE);
1c5acb87 40}
41
42//______________________________________________________________________________
43AliAODPWG4ParticleCorrelation::AliAODPWG4ParticleCorrelation(Double_t px, Double_t py, Double_t pz, Double_t e):
477d6cee 44 AliAODPWG4Particle(), fIsolated(kFALSE),
477d6cee 45 fLeadingDetector(""), fLeading(), fCorrJet(),
591cc579 46 fCorrBkg(), fRefJet(0), fListOfObjArrays(new TList)
1c5acb87 47{
48 // constructor
477d6cee 49 SetMomentum(new TLorentzVector(px, py, pz, e));
0da5958d 50 fListOfObjArrays->SetOwner(kTRUE);
51
1c5acb87 52}
53
54//______________________________________________________________________________
55AliAODPWG4ParticleCorrelation::AliAODPWG4ParticleCorrelation(TLorentzVector & p):
477d6cee 56 AliAODPWG4Particle(p), fIsolated(kFALSE),
591cc579 57 fLeadingDetector(""), fLeading(), fCorrJet(), fCorrBkg(), fRefJet(0), fListOfObjArrays(new TList)
1c5acb87 58{
59 // constructor
0da5958d 60 fListOfObjArrays->SetOwner(kTRUE);
61
1c5acb87 62}
63
64//______________________________________________________________________________
65AliAODPWG4ParticleCorrelation::AliAODPWG4ParticleCorrelation(AliAODPWG4Particle & p):
477d6cee 66 AliAODPWG4Particle(p), fIsolated(kFALSE),
591cc579 67 fLeadingDetector(""), fLeading(), fCorrJet(), fCorrBkg(),fRefJet(0), fListOfObjArrays(new TList)
1c5acb87 68{
69 // constructor
0da5958d 70 fListOfObjArrays->SetOwner(kTRUE);
71
1c5acb87 72}
73
74//______________________________________________________________________________
75AliAODPWG4ParticleCorrelation::~AliAODPWG4ParticleCorrelation()
76{
77 // destructor
591cc579 78 if(fListOfObjArrays){
79 fListOfObjArrays->Clear();
80 delete fListOfObjArrays ;
a3aebfff 81 }
1c5acb87 82}
83
4695da48 84//______________________________________________________________________________
85void AliAODPWG4ParticleCorrelation::Clear(const Option_t* /*opt*/)
86{
87 // Clear
88 if(fListOfObjArrays){
89 fListOfObjArrays->Clear();
90 delete fListOfObjArrays ;
91 }
92}
93
94
1c5acb87 95//______________________________________________________________________________
96AliAODPWG4ParticleCorrelation::AliAODPWG4ParticleCorrelation(const AliAODPWG4ParticleCorrelation& part) :
477d6cee 97 AliAODPWG4Particle(part), fIsolated(part.fIsolated),
477d6cee 98 fLeadingDetector(part.fLeadingDetector), fLeading(part.fLeading),
a3aebfff 99 fCorrJet(part.fCorrJet), fCorrBkg(part.fCorrBkg), fRefJet(part.fRefJet),
4695da48 100 fListOfObjArrays(new TList)
1c5acb87 101{
102 // Copy constructor
a3aebfff 103
1c5acb87 104}
105
106//______________________________________________________________________________
82679d84 107//AliAODPWG4ParticleCorrelation& AliAODPWG4ParticleCorrelation::operator=(const AliAODPWG4ParticleCorrelation& part)
108//{
109// // Assignment operator
110// if(this!=&part) {
111//
112// fIsolated = part.fIsolated;
113// fRefJet = part.fRefJet ;
114// fLeadingDetector =part.fLeadingDetector;
115// fLeading = part.fLeading;
116// fCorrJet = part.fCorrJet ;
117// fCorrBkg = part.fCorrBkg;
118// fListOfObjArrays = fListOfObjArrays;
119//
120// }
121//
122// return *this;
123//}
1c5acb87 124
125//______________________________________________________________________________
126void AliAODPWG4ParticleCorrelation::Print(Option_t* /*option*/) const
127{
128 // Print information of all data members
129 AliAODPWG4Particle::Print("");
a3aebfff 130
1c5acb87 131 if(fIsolated) printf("Isolated! \n");
a3aebfff 132
133 if(GetJet()) GetJet()->Print("");
134
1c5acb87 135 printf("Leading Detector : %s\n",fLeadingDetector.Data());
a3aebfff 136 printf("Leading Particle 4-vector:\n");
137 printf(" E = %13.3f", fLeading.E() );
138 printf(" Px = %13.3f", fLeading.Px());
139 printf(" Py = %13.3f", fLeading.Py());
140 printf(" Pz = %13.3f\n", fLeading.Pz());
1c5acb87 141
591cc579 142 if( fListOfObjArrays) fListOfObjArrays->Print("");
1c5acb87 143}