X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=blobdiff_plain;f=EMCAL%2FAliEMCALHit.cxx;h=027fd11e010777386900b2a1755c77515e155ec3;hp=6d724d31148504a31b96a4e84d3cf413d6f83a48;hb=78e1bea11967ba599e3e5399748e4eb15187190b;hpb=87c17b7b29bd3bb07a8c307472ea7f5cc427bdeb diff --git a/EMCAL/AliEMCALHit.cxx b/EMCAL/AliEMCALHit.cxx index 6d724d31148..027fd11e010 100644 --- a/EMCAL/AliEMCALHit.cxx +++ b/EMCAL/AliEMCALHit.cxx @@ -26,8 +26,8 @@ #include #include #include -#include -#include +#include +#include // --- ROOT system --- #include @@ -36,7 +36,8 @@ #include "AliEMCALHit.h" #include "AliRun.h" #include "AliConst.h" - +#include "AliEMCALGeometry.h" +#include "AliEMCALGetter.h" ClassImp(AliEMCALHit) @@ -46,6 +47,7 @@ AliEMCALHit::AliEMCALHit(){ fId = 0; fELOS = 0.0; + fTime = 0.0; fPrimary = 0; fTrack = 0; fX = 0.0; @@ -75,6 +77,7 @@ AliEMCALHit::AliEMCALHit(const AliEMCALHit & hit){ fPe = hit.fPe; fIparent = hit.fIparent; fIenergy = hit.fIenergy; + fTime = hit.fTime ; } //______________________________________________________________________ AliEMCALHit::AliEMCALHit(Int_t shunt, Int_t primary, Int_t track,Int_t iparent, Float_t ienergy, Int_t id, @@ -85,8 +88,9 @@ AliEMCALHit::AliEMCALHit(Int_t shunt, Int_t primary, Int_t track,Int_t iparent, fX = hits[0]; fY = hits[1]; fZ = hits[2]; + fTime = hits[3] ; fId = id; - fELOS = hits[3]; + fELOS = hits[4]; fPrimary = primary; fPx = p[0]; fPy = p[1]; @@ -95,6 +99,7 @@ AliEMCALHit::AliEMCALHit(Int_t shunt, Int_t primary, Int_t track,Int_t iparent, fIparent = iparent; fIenergy = ienergy; } + //______________________________________________________________________ Bool_t AliEMCALHit::operator==(AliEMCALHit const &rValue) const{ // Two hits are identical if they have the same Id and originat @@ -111,7 +116,10 @@ AliEMCALHit AliEMCALHit::operator+(const AliEMCALHit &rValue){ // Add the energy of the hit fELOS += rValue.GetEnergy() ; - + + if(rValue.GetTime() < fTime) + fTime = rValue.GetTime() ; + return *this; } @@ -122,6 +130,7 @@ ostream& operator << (ostream& out,AliEMCALHit& hit){ out << "AliEMCALHit:"; out << "id=" << hit.GetId(); out << ", Eloss=" << hit.GetEnergy(); + out << ", Time=" << hit.GetTime(); out << "GeV , Track no.=" << hit.GetPrimary(); out << ", (xyz)=(" << hit.X()<< ","<< hit.Y()<< ","<