1 /**************************************************************************
2 * Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
18 //-------------------------------------------------------------------------
20 // Author: Andreas Morsch, CERN
21 //-------------------------------------------------------------------------
23 #include <TLorentzVector.h>
24 #include "AliAODJet.h"
29 //______________________________________________________________________________
30 AliAODJet::AliAODJet() :
33 fRefTracks(new TRefArray())
38 fEffectiveArea[0] = 0.;
39 fEffectiveArea[1] = 0.;
42 AliAODJet::AliAODJet(Double_t px, Double_t py, Double_t pz, Double_t e):
45 fRefTracks(new TRefArray())
50 fEffectiveArea[0] = 0.;
51 fEffectiveArea[1] = 0.;
52 fMomentum = new TLorentzVector(px, py, pz, e);
55 AliAODJet::AliAODJet(TLorentzVector & p):
58 fRefTracks(new TRefArray())
63 fEffectiveArea[0] = 0.;
64 fEffectiveArea[1] = 0.;
65 fMomentum = new TLorentzVector(p);
69 //______________________________________________________________________________
70 AliAODJet::~AliAODJet()
77 //______________________________________________________________________________
78 AliAODJet::AliAODJet(const AliAODJet& jet) :
83 fBackgEnergy[0] = jet.fBackgEnergy[0];
84 fBackgEnergy[1] = jet.fBackgEnergy[1];
85 fEffectiveArea[0] = jet.fEffectiveArea[0];
86 fEffectiveArea[1] = jet.fEffectiveArea[1];
88 fMomentum = new TLorentzVector(*jet.fMomentum);
89 fRefTracks = new TRefArray(*jet.fRefTracks);
92 //______________________________________________________________________________
93 AliAODJet& AliAODJet::operator=(const AliAODJet& jet)
95 // Assignment operator
98 fBackgEnergy[0] = jet.fBackgEnergy[0];
99 fBackgEnergy[1] = jet.fBackgEnergy[1];
100 fEffectiveArea[0] = jet.fEffectiveArea[0];
101 fEffectiveArea[1] = jet.fEffectiveArea[1];
104 fMomentum = new TLorentzVector(*jet.fMomentum);
106 fRefTracks = new TRefArray(*jet.fRefTracks);
112 void AliAODJet::Print(Option_t* /*option*/) const
114 // Print information of all data members
115 printf("Jet 4-vector:\n");
116 printf(" E = %13.3f\n", E() );
117 printf(" Px = %13.3f\n", Px());
118 printf(" Py = %13.3f\n", Py());
119 printf(" Pz = %13.3f\n", Pz());
120 printf("Background Energy:\n");
121 printf("Charged: %13.3f\n", ChargedBgEnergy());
122 printf("Neutral: %13.3f\n", NeutralBgEnergy());
123 printf("Total: %13.3f\n", TotalBgEnergy());
124 printf("Effective Area: \n");
125 printf("Charged: %13.3f\n", EffectiveAreaCharged());
126 printf("Neutral: %13.3f\n", EffectiveAreaNeutral());