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