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 **************************************************************************/
17 #include "AliTrackReference.h"
18 #include "TParticle.h"
20 #include "TLorentzVector.h"
23 // Track Reference object is created every time particle is
24 // crossing detector bounds. The object is created by Step Manager
26 // The class stores the following informations:
28 // track position: X,Y,X
29 // track momentum px, py, pz
30 // track length and time of fligth: both in cm
31 // status bits from Monte Carlo
35 ClassImp(AliTrackReference)
37 //_______________________________________________________________________
38 AliTrackReference::AliTrackReference():
49 // Default constructor
50 // Creates empty object
52 for(Int_t i=0; i<16; i++) ResetBit(BIT(i));
55 //_______________________________________________________________________
56 AliTrackReference::AliTrackReference(Int_t label, TVirtualMC *vMC) {
58 // Create Reference object out of label and
59 // data in TVirtualMC object
61 // Creates an object and fill all parameters
62 // from data in VirtualMC
64 // Sylwester Radomski, (S.Radomski@gsi.de)
71 fLength = vMC->TrackLength();
72 fTime = vMC->TrackTime();
74 vMC->TrackPosition(vec);
80 vMC->TrackMomentum(vec);
87 // Copy Bits from virtual MC
89 for(Int_t i=0; i<16; i++) ResetBit(BIT(i));
91 SetBit(BIT(0), vMC->IsNewTrack());
92 SetBit(BIT(1), vMC->IsTrackAlive());
93 SetBit(BIT(2), vMC->IsTrackDisappeared());
94 SetBit(BIT(3), vMC->IsTrackEntering());
95 SetBit(BIT(4), vMC->IsTrackExiting());
96 SetBit(BIT(5), vMC->IsTrackInside());
97 SetBit(BIT(6), vMC->IsTrackOut());
98 SetBit(BIT(7), vMC->IsTrackStop());
100 //_______________________________________________________________________