1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
18 //-----------------------------------------------------------------------
19 // Base Hit class for all detectors
20 // Contains the coordinates of the hit (single energy deposition)
21 // and the number of correspondent track
23 //-----------------------------------------------------------------------
25 #include "TParticle.h"
34 //_______________________________________________________________________
42 // Default constructor
46 //_______________________________________________________________________
47 AliHit::AliHit(Int_t shunt, Int_t track):
54 // Standard constructor
57 int primary = gAlice->GetMCApp()->GetPrimary(track);
58 gAlice->GetMCApp()->Particle(primary)->SetBit(kKeepBit);
62 else if (shunt == 2) {
63 // the "primary" particle associated to the hit is
64 // the last track that has been flagged in the StepManager
65 // used by PHOS to associate the hit with the decay gamma
66 // rather than with the original pi0
72 part = gAlice->GetMCApp()->Particle(current);
73 parent=part->GetFirstMother();
74 if(parent<0 || part->TestBit(kKeepBit))
80 gAlice->GetMCApp()->FlagTrack(fTrack);