]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliAODPWG4ParticleCorrelation.cxx
AOD data classes moved from PWG4 to STEER (Gustavo Conesa)
[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 }
40
41 //______________________________________________________________________________
42 AliAODPWG4ParticleCorrelation::AliAODPWG4ParticleCorrelation(Double_t px, Double_t py, Double_t pz, Double_t e):
43   AliAODPWG4Particle(), fIsolated(kFALSE),
44   fLeadingDetector(""),  fLeading(), fCorrJet(),
45   fCorrBkg(), fRefJet(0),  fListOfObjArrays(new TList)
46 {
47   // constructor
48   SetMomentum(new TLorentzVector(px, py, pz, e));
49 }
50
51 //______________________________________________________________________________
52 AliAODPWG4ParticleCorrelation::AliAODPWG4ParticleCorrelation(TLorentzVector & p):
53   AliAODPWG4Particle(p), fIsolated(kFALSE),
54   fLeadingDetector(""),  fLeading(), fCorrJet(), fCorrBkg(), fRefJet(0),  fListOfObjArrays(new TList)
55 {
56   // constructor
57 }
58
59 //______________________________________________________________________________
60 AliAODPWG4ParticleCorrelation::AliAODPWG4ParticleCorrelation(AliAODPWG4Particle & p):
61   AliAODPWG4Particle(p), fIsolated(kFALSE),
62   fLeadingDetector(""),  fLeading(), fCorrJet(), fCorrBkg(),fRefJet(0),   fListOfObjArrays(new TList)
63 {
64   // constructor
65   
66 }
67
68 //______________________________________________________________________________
69 AliAODPWG4ParticleCorrelation::~AliAODPWG4ParticleCorrelation() 
70 {
71   // destructor
72   if(fListOfObjArrays){
73     fListOfObjArrays->Clear();
74     delete   fListOfObjArrays ;
75   }
76 }
77
78 //______________________________________________________________________________
79 AliAODPWG4ParticleCorrelation::AliAODPWG4ParticleCorrelation(const AliAODPWG4ParticleCorrelation& part) :
80   AliAODPWG4Particle(part), fIsolated(part.fIsolated),
81   fLeadingDetector(part.fLeadingDetector), fLeading(part.fLeading),  
82   fCorrJet(part.fCorrJet), fCorrBkg(part.fCorrBkg), fRefJet(part.fRefJet),   
83   fListOfObjArrays(part.fListOfObjArrays)
84 {
85   // Copy constructor
86
87 }
88
89 //______________________________________________________________________________
90 AliAODPWG4ParticleCorrelation& AliAODPWG4ParticleCorrelation::operator=(const AliAODPWG4ParticleCorrelation& part)
91 {
92   // Assignment operator
93   if(this!=&part) {
94   
95     fIsolated = part.fIsolated;
96     fRefJet   = part.fRefJet ;
97     fLeadingDetector =part.fLeadingDetector;
98     fLeading  = part.fLeading;
99     fCorrJet  = part.fCorrJet ;
100     fCorrBkg  = part.fCorrBkg; 
101     fListOfObjArrays = fListOfObjArrays;
102
103   }
104   
105   return *this;
106 }
107
108 //______________________________________________________________________________
109 void AliAODPWG4ParticleCorrelation::Print(Option_t* /*option*/) const 
110 {
111   // Print information of all data members
112   AliAODPWG4Particle::Print("");
113
114   if(fIsolated) printf("Isolated! \n");
115
116   if(GetJet()) GetJet()->Print("");
117
118   printf("Leading Detector : %s\n",fLeadingDetector.Data());
119   printf("Leading Particle 4-vector:\n");
120   printf("     E  = %13.3f",   fLeading.E() );
121   printf("     Px = %13.3f",   fLeading.Px());
122   printf("     Py = %13.3f",   fLeading.Py());
123   printf("     Pz = %13.3f\n", fLeading.Pz());
124
125   if( fListOfObjArrays)   fListOfObjArrays->Print("");
126 }