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 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 **************************************************************************/
16 //_________________________________________________________________________
17 // Hit classes for PHOS
18 //*-- Author : Maxim Volkov, RRC KI
19 //////////////////////////////////////////////////////////////////////////////
21 // --- ROOT system ---
23 // --- Standard library ---
30 // --- AliRoot header files ---
31 #include "AliPHOSHit.h"
38 //____________________________________________________________________________
39 AliPHOSHit::AliPHOSHit(Int_t primary, Int_t id, Float_t *hits)
50 //____________________________________________________________________________
51 Bool_t AliPHOSHit::operator==(AliPHOSHit const &rValue) const
55 if ( fId == rValue.GetId() && fPrimary == rValue.GetPrimary() )
61 //____________________________________________________________________________
62 AliPHOSHit AliPHOSHit::operator+(const AliPHOSHit &rValue) const
65 AliPHOSHit added(*this);
67 added.fX = rValue.fX ;
68 added.fY = rValue.fY ;
69 added.fZ = rValue.fZ ;
71 added.fELOS += rValue.GetEnergy() ;
73 assert ( added.fPrimary == rValue.fPrimary ) ;
79 //____________________________________________________________________________
80 ostream& operator << (ostream& out, const AliPHOSHit& hit)
82 out << "AliPHOSHit = " << hit.GetId() << " " << hit.GetEnergy() << endl ;