]>
Commit | Line | Data |
---|---|---|
49cd54c0 | 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 | //_________________________________________________________________________ | |
17 | // Hit classes for PHOS | |
18 | //*-- Author : Maxim Volkov, RRC KI | |
19 | ////////////////////////////////////////////////////////////////////////////// | |
20 | ||
21 | // --- ROOT system --- | |
22 | ||
23 | // --- Standard library --- | |
24 | #include <stdio.h> | |
25 | #include <string.h> | |
26 | #include <stdlib.h> | |
27 | #include <strstream.h> | |
28 | ||
29 | // --- AliRoot header files --- | |
30 | #include "AliPHOSHit.h" | |
31 | #include "AliRun.h" | |
32 | #include "AliConst.h" | |
33 | ||
34 | ||
35 | ClassImp(AliPHOSHit) | |
36 | ||
37 | //____________________________________________________________________________ | |
38 | AliPHOSHit::AliPHOSHit(Int_t shunt, Int_t track, Int_t id, Float_t *hits): | |
39 | AliHit(shunt, track) | |
40 | { | |
41 | ||
42 | fId = id ; | |
43 | fX = hits[0]; | |
44 | fY = hits[1]; | |
45 | fZ = hits[2]; | |
46 | fELOS = hits[3]; | |
47 | } | |
48 | ||
49 | //____________________________________________________________________________ | |
50 | Bool_t AliPHOSHit::operator==(AliPHOSHit const &rValue) const | |
51 | { | |
52 | if ( fId != rValue.GetId() ) return kFALSE; | |
53 | ||
54 | return kTRUE; | |
55 | } | |
56 | ||
57 | //____________________________________________________________________________ | |
58 | AliPHOSHit AliPHOSHit::operator+(const AliPHOSHit &rValue) const | |
59 | { | |
60 | ||
61 | AliPHOSHit added(*this); | |
62 | ||
63 | added.fX = rValue.fX ; | |
64 | added.fY = rValue.fY ; | |
65 | added.fZ = rValue.fZ ; | |
66 | ||
67 | added.fELOS += rValue.GetEnergy() ; | |
68 | ||
69 | return added; | |
70 | ||
71 | } | |
72 | ||
73 | //____________________________________________________________________________ | |
74 | ostream& operator << (ostream& out, const AliPHOSHit& hit) | |
75 | { | |
76 | out << "AliPHOSHit = " << hit.GetId() << " " << hit.GetEnergy() << endl ; | |
77 | return out ; | |
78 | } | |
79 | ||
80 | ||
81 |