]>
Commit | Line | Data |
---|---|---|
895a906e | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
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 | **************************************************************************/ | |
15 | ||
16 | #include "AliPMDhit.h" | |
17 | #include <TClonesArray.h> | |
18 | #include "Riostream.h" | |
19 | #include "Rtypes.h" | |
20 | ||
21 | ClassImp(AliPMDhit) | |
22 | ||
245bd3b0 | 23 | //_____________________________________________________________________________ |
24 | AliPMDhit::AliPMDhit(): | |
954e52e8 | 25 | fEnergy(0.), |
26 | fTime(0.) | |
245bd3b0 | 27 | { |
24c5571f | 28 | for (Int_t i=0; i<6; i++) |
245bd3b0 | 29 | { |
30 | fVolume[i] = 0; | |
31 | } | |
32 | } | |
895a906e | 33 | //_____________________________________________________________________________ |
34 | AliPMDhit::AliPMDhit(Int_t shunt,Int_t track, Int_t *vol, Float_t *hits): | |
245bd3b0 | 35 | AliHit(shunt, track), |
36 | fEnergy(hits[3]) | |
895a906e | 37 | { |
38 | // | |
39 | // Add a PMD hit | |
40 | // | |
41 | Int_t i; | |
24c5571f | 42 | for (i=0; i<6; i++) fVolume[i] = vol[i]; |
895a906e | 43 | fX=hits[0]; |
44 | fY=hits[1]; | |
45 | fZ=hits[2]; | |
954e52e8 | 46 | fTime = hits[3]; |
895a906e | 47 | } |
245bd3b0 | 48 | //_____________________________________________________________________________ |
49 | AliPMDhit::AliPMDhit(AliPMDhit* oldhit): | |
50 | fEnergy(0.) | |
51 | { | |
52 | *this=*oldhit; | |
53 | } | |
54 | ||
895a906e | 55 | //_____________________________________________________________________________ |
56 | int AliPMDhit::operator == (AliPMDhit &cell) const | |
57 | { | |
58 | Int_t i; | |
59 | if(fTrack!=cell.GetTrack()) return 0; | |
24c5571f | 60 | for (i=0; i<6; i++) if(fVolume[i]!=cell.GetVolume(i)) return 0; |
895a906e | 61 | return 1; |
62 | } |