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 **************************************************************************/
18 //_________________________________________________________________________
19 // Hits class for EMCAL
20 // A hit in EMCAL is the usuall hi with full information about xlocal, ylocal, zlocal
21 //*-- Author: Aleksei Pavlinov(WSU); Nov 25, 05
23 #include <Riostream.h>
25 // --- AliRoot header files ---
26 #include "AliEMCALHitv1.h"
28 ClassImp(AliEMCALHitv1)
30 //______________________________________________________________________
31 AliEMCALHitv1::AliEMCALHitv1(){
49 //______________________________________________________________________
50 AliEMCALHitv1::AliEMCALHitv1(const AliEMCALHitv1 & hit) : AliHit(hit){
55 fPrimary = hit.fPrimary ;
64 fIparent = hit.fIparent;
65 fIenergy = hit.fIenergy;
68 //______________________________________________________________________
69 AliEMCALHitv1::AliEMCALHitv1(Int_t shunt, Int_t primary, Int_t track,Int_t iparent, Float_t ienergy, Int_t id,
70 Float_t *hits,Float_t *p):AliHit(shunt, track){
72 // Create an EMCAL hit object
89 //______________________________________________________________________
90 Bool_t AliEMCALHitv1::operator==(AliEMCALHitv1 const &rValue) const{
91 // no identical hits !!
94 if ( (fId == rValue.GetId()));
95 // if ( (fId == rValue.GetId()) && ( fIparent == rValue.GetIparent()))
100 //______________________________________________________________________
101 AliEMCALHitv1 AliEMCALHitv1::operator+(const AliEMCALHitv1 &rValue){
102 // Add the energy of the hit
104 fELOS += rValue.GetEnergy() ;
106 if(rValue.GetTime() < fTime)
107 fTime = rValue.GetTime() ;
112 //______________________________________________________________________
113 ostream& operator << (ostream& out,AliEMCALHitv1& hit){
114 // Print out Id and energy
116 out << "AliEMCALHitv1:";
117 out << "id=" << hit.GetId();
118 out << ", Eloss=" << hit.GetEnergy();
119 out << ", Time=" << hit.GetTime();
120 out << "GeV , Track no.=" << hit.GetPrimary();
121 out << ", (xyz)=(" << hit.X()<< ","<< hit.Y()<< ","<<hit.Z()<<") cm <- local";
122 out << ", fTrack=" << hit.GetTrack();
123 out << ", P=(" << hit.GetPx() << "," << hit.GetPy() << "," << hit.GetPz()
124 << "," <<hit.GetPe() << ") GeV" ;
125 out << ", Enterring particle ID" << hit.GetIparent();
126 out << ", Enterring particle initial energy = " << hit.GetIenergy() << " GeV" ;