1 /**************************************************************************
2 * Copyright(c) 1998-1999, 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 notifce *
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 **************************************************************************/
16 // $Id: AliPhJPiZero.cxx,v 1.3 2008/05/08 13:44:45 djkim Exp $
18 ////////////////////////////////////////////////////
20 // \file AliPhJPiZero.cxx
22 // \author J. Rak, D.J.Kim, R.Diaz (University of Jyvaskyla)
23 // \email: djkim@jyu.fi
24 // \version $Revision: 1.3 $
25 // \date $Date: 2008/05/08 13:44:45 $
27 // Class encapsulates basic properties of pi0
28 ////////////////////////////////////////////////////
35 #include <TLorentzVector.h>
37 #include "AliPhJBaseTrack.h"
38 #include "AliPhJPhoton.h"
40 #include "AliPhJPiZero.h"
42 ClassImp(AliPhJPiZero)
44 //___________________________________________________________
45 AliPhJPiZero::AliPhJPiZero():
48 fPi0P(-999,-999,-999),
58 //______________________________________________________________________________
59 AliPhJPiZero::AliPhJPiZero(const AliPhJPiZero& a):
74 //______________________________________________________________________________
76 bool AliPhJPiZero::SetMass(const AliPhJPhoton *g1, const AliPhJPhoton *g2){
77 //set pi0 four-momentum, assymetry, inv. mass, pT, phi, theta, energy
78 fV1.SetXYZ(g1->GetX(), g1->GetY(), g1->GetZ() ); //Z is corrected in main for vertex Z
79 fPhoton1.SetPxPyPzE(g1->GetE()*sin(fV1.Theta())*cos(fV1.Phi()),
80 g1->GetE()*sin(fV1.Theta())*sin(fV1.Phi()),
81 g1->GetE()*cos(fV1.Theta()),
84 fV2.SetXYZ(g2->GetX(), g2->GetY(), g2->GetZ() );
85 fPhoton2.SetPxPyPzE(g2->GetE()*sin(fV2.Theta())*cos(fV2.Phi()),
86 g2->GetE()*sin(fV2.Theta())*sin(fV2.Phi()),
87 g2->GetE()*cos(fV2.Theta()),
89 fPhotSum = fPhoton1 + fPhoton2;
90 fPi0P = fPhotSum.Vect();
91 fAsymm = fabs((g1->GetE()-g2->GetE())/(g1->GetE()+g2->GetE()));
93 fBasePt = fPhotSum.Pt();
94 fBasePhi = fPhotSum.Phi();
95 fBaseTheta= fPhotSum.Theta();
96 fBaseE = fPhotSum.E();
101 //______________________________________________________________________________
103 double AliPhJPiZero::operator- (const AliPhJPiZero &pi0){
105 //========================================
106 // retruns the closest distance between
107 // photon hits bolonging to two pi0
108 //========================================
113 if(v.Mag() < d) d = v.Mag();
115 if(v.Mag() < d) d = v.Mag();
117 if(v.Mag() < d) d = v.Mag();
119 if(v.Mag() < d) d = v.Mag();
124 //______________________________________________________________________________
126 AliPhJPiZero& AliPhJPiZero::operator= (const AliPhJPiZero& piz){
129 AliPhJBaseTrack::operator=(piz);
133 fPhotSum = piz.fPhotSum;
134 fPhoton1 = piz.fPhoton1;
135 fPhoton2 = piz.fPhoton2;
138 fMassBin = piz.fMassBin;