]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PHOS/AliPHOSImpact.cxx
do not delete fGeom object in ~AliPHOSReconstructor, since it is owned by the AliPHOS...
[u/mrichter/AliRoot.git] / PHOS / AliPHOSImpact.cxx
CommitLineData
473062df 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/* $Id$ */
17
702ab87e 18/* History of cvs commits:
19 *
20 * $Log$
43fbaae1 21 * Revision 1.6 2005/05/28 14:19:04 schutz
22 * Compilation warnings fixed by T.P.
23 *
702ab87e 24 */
25
473062df 26//_________________________________________________________________________
27// Hit impact class for PHOS
28// A hit impact in PHOS is a set of parameters of a track which
29// enters the detector for the first time.
30// Track parameters are:
31// - track number
32// - primary particle number
33// - type of a particle
34// - impact coordinate
35// - impact 4-momentum
36//
37//*-- Author: Yuri Kharlov (IHEP, Protvino/SUBATECH, Nantes)
38
39// --- ROOT system ---
40
41// --- Standard library ---
42
43// --- AliRoot header files ---
44#include "AliPHOSImpact.h"
45
46ClassImp(AliPHOSImpact)
47
48//____________________________________________________________________________
43fbaae1 49AliPHOSImpact::AliPHOSImpact() :
50 fPid(0),
51 fPrimary(0),
52 fMomentum()
53{
54 //Def ctor.
55}
56
57//____________________________________________________________________________
58AliPHOSImpact::AliPHOSImpact(const AliPHOSImpact & hit) :
59 AliHit(hit),
60 fPid(hit.fPid),
61 fPrimary(hit.fPrimary),
62 fMomentum(hit.fMomentum)
473062df 63{
43fbaae1 64 // copy ctor
473062df 65 fTrack = hit.fTrack ;
473062df 66 fX = hit.fX ;
67 fY = hit.fY ;
68 fZ = hit.fZ ;
473062df 69}
70
71//____________________________________________________________________________
43fbaae1 72AliPHOSImpact::AliPHOSImpact(Int_t shunt, Int_t primary, Int_t track, Int_t pid, TLorentzVector p, Float_t *xyz):
73 AliHit(shunt, track),
74 fPid(pid),
75 fPrimary(primary),
76 fMomentum(p)
473062df 77{
78 //
79 // Create a PHOS hit impact object
80 //
473062df 81 fX = xyz[0]; //position of particle first entering cristall/pad
82 fY = xyz[1];
83 fZ = xyz[2];
84}
85
6c8ba828 86//____________________________________________________________________________
87AliPHOSImpact & AliPHOSImpact::operator = (const AliPHOSImpact &)
88{
89 Fatal("operator =", "not implemented");
90 return *this;
91}
92
473062df 93//____________________________________________________________________________
702ab87e 94void AliPHOSImpact::Print(const Option_t *)const
473062df 95{
e957fea8 96 // Prints particle info
473062df 97 printf("Impact Pid=%4d, p=(%6.2f,%6.2f,%6.2f,%6.2f) GeV, x=(%6.1f,%6.1f,%6.1f) cm\n",
98 fPid,fMomentum.Px(),fMomentum.Py(),fMomentum.Pz(),fMomentum.E(),
99 fX,fY,fZ);
100}