]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PMD/AliPMDhit.cxx
Completely reengineered version of CMake build system (Johny)
[u/mrichter/AliRoot.git] / PMD / AliPMDhit.cxx
index 5b480381ded82a3c00dda5cab08a93e2b592b87e..11ded4d592ab5c457d676cec8c3b231802223789 100644 (file)
 
 ClassImp(AliPMDhit)
   
+//_____________________________________________________________________________
+AliPMDhit::AliPMDhit():
+  fEnergy(0.),
+  fTime(0.)
+{
+  for (Int_t i=0; i<6; i++)
+    {
+      fVolume[i] = 0;
+    }
+}
 //_____________________________________________________________________________
 AliPMDhit::AliPMDhit(Int_t shunt,Int_t track, Int_t *vol, Float_t *hits):
-  AliHit(shunt, track)
+  AliHit(shunt, track),
+  fEnergy(hits[3]),
+  fTime(hits[4])
 {
   //
   // Add a PMD hit
   //
   Int_t i;
-  for (i=0;i<10;i++) fVolume[i] = vol[i];
+  for (i=0; i<6; i++) fVolume[i] = vol[i];
   fX=hits[0];
   fY=hits[1];
   fZ=hits[2];
-  fEnergy=hits[3];
 }
+//_____________________________________________________________________________
+AliPMDhit::AliPMDhit(AliPMDhit* oldhit):
+  fEnergy(0.),
+  fTime(0.)
+{
+  *this=*oldhit;
+}
+
 //_____________________________________________________________________________
 int AliPMDhit::operator == (AliPMDhit &cell) const
 {
   Int_t i;
   if(fTrack!=cell.GetTrack()) return 0;
-  for (i=0; i<10; i++) if(fVolume[i]!=cell.GetVolume(i)) return 0;
+  for (i=0; i<6; i++) if(fVolume[i]!=cell.GetVolume(i)) return 0;
   return 1;
 }