]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PHOS/AliPHOSImpact.cxx
updating
[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
18//_________________________________________________________________________
19// Hit impact class for PHOS
20// A hit impact in PHOS is a set of parameters of a track which
21// enters the detector for the first time.
22// Track parameters are:
23// - track number
24// - primary particle number
25// - type of a particle
26// - impact coordinate
27// - impact 4-momentum
28//
29//*-- Author: Yuri Kharlov (IHEP, Protvino/SUBATECH, Nantes)
30
31// --- ROOT system ---
32
33// --- Standard library ---
34
35// --- AliRoot header files ---
36#include "AliPHOSImpact.h"
37
38ClassImp(AliPHOSImpact)
39
40//____________________________________________________________________________
41AliPHOSImpact::AliPHOSImpact(const AliPHOSImpact & hit)
a8c47ab6 42 : AliHit(hit)
473062df 43{
44 // copy ctor
45
46 fTrack = hit.fTrack ;
47 fPrimary = hit.fPrimary ;
48 fPid = hit.fPid ;
49 fMomentum= hit.fMomentum ;
50 fX = hit.fX ;
51 fY = hit.fY ;
52 fZ = hit.fZ ;
53
54}
55
56//____________________________________________________________________________
57AliPHOSImpact::AliPHOSImpact(Int_t shunt, Int_t primary, Int_t track, Int_t pid, TLorentzVector p, Float_t *xyz)
58 : AliHit(shunt, track)
59{
60 //
61 // Create a PHOS hit impact object
62 //
63
64 fPrimary = primary ;
65 fPid = pid ;
66 fMomentum = p;
67 fX = xyz[0]; //position of particle first entering cristall/pad
68 fY = xyz[1];
69 fZ = xyz[2];
70}
71
72//____________________________________________________________________________
73void AliPHOSImpact::Print()
74{
e957fea8 75 // Prints particle info
473062df 76 printf("Impact Pid=%4d, p=(%6.2f,%6.2f,%6.2f,%6.2f) GeV, x=(%6.1f,%6.1f,%6.1f) cm\n",
77 fPid,fMomentum.Px(),fMomentum.Py(),fMomentum.Pz(),fMomentum.E(),
78 fX,fY,fZ);
79}