]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AOD/AliAODPWG4ParticleCorrelation.cxx
Fix on the setter of VZEROEqFactors
[u/mrichter/AliRoot.git] / STEER / AOD / AliAODPWG4ParticleCorrelation.cxx
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 objects class in use in the CaloTrackCorrelations
20 //     analysis pacackge ($ALICE_ROOT/PWGGA/CaloTrackCorrelations)
21 //     Includes correlation objects
22 //
23 //     Author: Gustavo Conesa Balbastre - CNRS-LPSC-Grenoble
24 //-------------------------------------------------------------------------
25
26 //-- ROOT system --
27
28 //-- Analysis system
29 #include "AliAODPWG4ParticleCorrelation.h"
30 #include "AliAODJet.h"
31
32 ClassImp(AliAODPWG4ParticleCorrelation)
33
34
35 //______________________________________________________________________________
36  AliAODPWG4ParticleCorrelation::AliAODPWG4ParticleCorrelation() :
37    AliAODPWG4Particle(),
38    fLeadingDetector(""), fLeading(), fCorrJet(),  fCorrBkg(), fRefJet(0),
39    fListOfObjArrays(0)
40 {
41   // constructor
42 }
43
44 //______________________________________________________________________________
45 AliAODPWG4ParticleCorrelation::AliAODPWG4ParticleCorrelation(Double_t px, Double_t py, Double_t pz, Double_t e):
46   AliAODPWG4Particle(),
47   fLeadingDetector(""),  fLeading(), fCorrJet(),
48   fCorrBkg(), fRefJet(0),  fListOfObjArrays(new TList)
49 {
50   // constructor
51   SetMomentum(new TLorentzVector(px, py, pz, e));
52   fListOfObjArrays->SetOwner(kTRUE);
53
54 }
55
56 //______________________________________________________________________________
57 AliAODPWG4ParticleCorrelation::AliAODPWG4ParticleCorrelation(TLorentzVector & p):
58   AliAODPWG4Particle(p),
59   fLeadingDetector(""),  fLeading(), fCorrJet(), fCorrBkg(), fRefJet(0), fListOfObjArrays(new TList)
60 {
61   // constructor
62   fListOfObjArrays->SetOwner(kTRUE);
63
64 }
65
66 //______________________________________________________________________________
67 AliAODPWG4ParticleCorrelation::AliAODPWG4ParticleCorrelation(AliAODPWG4Particle & p):
68   AliAODPWG4Particle(p),
69   fLeadingDetector(""),  fLeading(), fCorrJet(), fCorrBkg(),fRefJet(0), fListOfObjArrays(new TList)
70 {
71   // constructor
72   fListOfObjArrays->SetOwner(kTRUE);
73
74 }
75
76 //______________________________________________________________________________
77 AliAODPWG4ParticleCorrelation::~AliAODPWG4ParticleCorrelation() 
78 {
79   // destructor
80   if(fListOfObjArrays){
81     fListOfObjArrays->Clear();
82     delete   fListOfObjArrays ;
83   }
84 }
85
86 //______________________________________________________________________________
87 void AliAODPWG4ParticleCorrelation::Clear(const Option_t* /*opt*/) 
88 {
89   // Clear
90   
91   AliAODPWG4Particle::Clear(""); //delete fMomentum
92   
93   if(fListOfObjArrays){
94     fListOfObjArrays->Clear();
95     delete   fListOfObjArrays ;
96   }
97 }
98
99
100 //______________________________________________________________________________
101 AliAODPWG4ParticleCorrelation::AliAODPWG4ParticleCorrelation(const AliAODPWG4ParticleCorrelation& part) :
102   AliAODPWG4Particle(part), fLeadingDetector(part.fLeadingDetector), fLeading(part.fLeading),  
103   fCorrJet(part.fCorrJet), fCorrBkg(part.fCorrBkg), fRefJet(part.fRefJet),   
104   fListOfObjArrays(new TList)
105 {
106   // Copy constructor
107
108 }
109
110 //______________________________________________________________________________
111 //AliAODPWG4ParticleCorrelation& AliAODPWG4ParticleCorrelation::operator=(const AliAODPWG4ParticleCorrelation& part)
112 //{
113 //  // Assignment operator
114 //  if(this!=&part) {
115 //
116 //    fRefJet   = part.fRefJet ;
117 //    fLeading  = part.fLeading;
118 //    fCorrJet  = part.fCorrJet ;
119 //    fCorrBkg  = part.fCorrBkg; 
120 //    fListOfObjArrays = fListOfObjArrays;
121 //
122 //  }
123 //  
124 //  return *this;
125 //}
126
127 //______________________________________________________________________________
128 void AliAODPWG4ParticleCorrelation::Print(Option_t* /*option*/) const 
129 {
130   // Print information of all data members
131   AliAODPWG4Particle::Print("");
132
133   if(GetJet()) GetJet()->Print("");
134
135   printf("Leading Detector : %s\n",fLeadingDetector.Data());
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());
141
142   if( fListOfObjArrays)   fListOfObjArrays->Print("");
143 }