Changes needed by the updated track references
[u/mrichter/AliRoot.git] / STEER / AliAODJet.cxx
CommitLineData
df9db588 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$ */
17
18//-------------------------------------------------------------------------
87102d3c 19// AOD class for jets
20// Author: Andreas Morsch, CERN
df9db588 21//-------------------------------------------------------------------------
22
87102d3c 23#include <TLorentzVector.h>
df9db588 24#include "AliAODJet.h"
25
26ClassImp(AliAODJet)
27
28
29//______________________________________________________________________________
a1708071 30AliAODJet::AliAODJet() :
31 AliVirtualParticle(),
32 fMomentum(0)
df9db588 33{
34 // constructor
a1708071 35 fBackgEnergy[0] = 0.;
36 fBackgEnergy[1] = 0.;
37 fEffectiveArea[0] = 0.;
38 fEffectiveArea[1] = 0.;
df9db588 39}
40
87102d3c 41AliAODJet::AliAODJet(Double_t px, Double_t py, Double_t pz, Double_t e):
42 AliVirtualParticle(),
43 fMomentum(0)
44{
45 // constructor
46 fMomentum = new TLorentzVector(px, py, pz, e);
47 fBackgEnergy[0] = 0.;
48 fBackgEnergy[1] = 0.;
49 fEffectiveArea[0] = 0.;
50 fEffectiveArea[1] = 0.;
51}
52
a1708071 53AliAODJet::AliAODJet(TLorentzVector & p):
87102d3c 54 AliVirtualParticle(),
55 fMomentum(0)
56{
57 // constructor
58 fMomentum = new TLorentzVector(p);
59 fBackgEnergy[0] = 0.;
60 fBackgEnergy[1] = 0.;
61 fEffectiveArea[0] = 0.;
62 fEffectiveArea[1] = 0.;
63}
64
65
df9db588 66//______________________________________________________________________________
67AliAODJet::~AliAODJet()
68{
69 // destructor
87102d3c 70 delete fMomentum;
df9db588 71}
72
73//______________________________________________________________________________
74AliAODJet::AliAODJet(const AliAODJet& jet) :
87102d3c 75 AliVirtualParticle(jet),
76 fMomentum(0)
df9db588 77{
78 // Copy constructor
87102d3c 79 fMomentum = new TLorentzVector(*jet.fMomentum);
d3ad3ee1 80 fBackgEnergy[0] = jet.fBackgEnergy[0];
81 fBackgEnergy[1] = jet.fBackgEnergy[1];
82 fEffectiveArea[0] = jet.fEffectiveArea[0];
83 fEffectiveArea[1] = jet.fEffectiveArea[1];
87102d3c 84
df9db588 85}
86
87//______________________________________________________________________________
88AliAODJet& AliAODJet::operator=(const AliAODJet& jet)
89{
90 // Assignment operator
91 if(this!=&jet) {
92 }
93
94 return *this;
95}
96
87102d3c 97void AliAODJet::Print(Option_t* /*option*/) const
98{
99 // Print information of all data members
100 printf("Jet 4-vector:\n");
101 printf(" E = %13.3f\n", E() );
102 printf(" Px = %13.3f\n", Px());
103 printf(" Py = %13.3f\n", Py());
104 printf(" Pz = %13.3f\n", Pz());
105 printf("Background Energy:\n");
106 printf("Charged: %13.3f\n", ChargedBgEnergy());
107 printf("Neutral: %13.3f\n", NeutralBgEnergy());
108 printf("Total: %13.3f\n", TotalBgEnergy());
109 printf("Effective Area: \n");
110 printf("Charged: %13.3f\n", EffectiveAreaCharged());
111 printf("Neutral: %13.3f\n", EffectiveAreaNeutral());
112}