]> git.uio.no Git - u/mrichter/AliRoot.git/blob - RICH/AliRICHv0.cxx
Adding track references at decay points (M.Ivanov)
[u/mrichter/AliRoot.git] / RICH / AliRICHv0.cxx
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 #include "AliRICHv0.h"
17 #include <TVirtualMC.h>
18 #include <TPDGCode.h>
19 #include "AliRICHConst.h" 
20 #include <AliRun.h>
21 #include <TLorentzVector.h>
22
23 ClassImp(AliRICHv0)
24
25 void AliRICHv0::StepManager()
26 {
27   char *sParticle;
28   switch(gMC->TrackPid()){
29     case kProton:
30       sParticle="p";break;
31     case kNeutron:
32       sParticle="n";break;
33     case kGamma:
34       sParticle="gamma";break;
35     case kCerenkov:
36       sParticle="photon";break;
37     case kPi0:
38       sParticle="Pi0";break;  
39     default:
40       sParticle="not known";break;
41   }
42
43   Info("","event=%i hunt=%i tid=%i pid=%i(%s) m=%f q=%f",
44                             gMC->CurrentEvent(),
45                             fIshunt,
46                             gAlice->GetCurrentTrackNumber(),
47                             gMC->TrackPid(),
48                             sParticle,
49                             gMC->TrackMass(),
50                             gMC->TrackCharge());
51   Info("","Flags:alive(%i) disap(%i) enter(%i) exit(%i) inside(%i) out(%i) stop(%i) new(%i)",
52                             gMC->IsTrackAlive(),
53                             gMC->IsTrackDisappeared(),
54                             gMC->IsTrackEntering(),
55                             gMC->IsTrackExiting(),
56                             gMC->IsTrackInside(),
57                             gMC->IsTrackOut(),
58                             gMC->IsTrackStop(),
59                             gMC->IsNewTrack());
60   Int_t copy0,copy1,copy2,copy3;
61   Int_t vid0=gMC->CurrentVolID(copy0);
62   Int_t vid1=gMC->CurrentVolOffID(1,copy1);
63   Int_t vid2=gMC->CurrentVolOffID(2,copy2);
64   Int_t vid3=gMC->CurrentVolOffID(3,copy3);
65   Info("","vid0=%i(%s)c%i vid1=%i(%s)c%i vid2=%i(%s)c%i vid3=%i(%s)c%i   %s-%s-%s-%s",
66                       vid0,gMC->VolName(vid0),copy0, 
67                       vid1,gMC->VolName(vid1),copy1, 
68                       vid2,gMC->VolName(vid2),copy2, 
69                       vid3,gMC->VolName(vid3),copy3, 
70                       gMC->CurrentVolName(),
71                       gMC->CurrentVolOffName(1),
72                       gMC->CurrentVolOffName(2),
73                       gMC->CurrentVolOffName(3));
74   
75   Float_t a,z,den,rad,abs; a=z=den=rad=abs=kBad;
76   Int_t mid=gMC->CurrentMaterial(a,z,den,rad,abs);
77   Info("","mid=%i a=%7.2f z=%7.2f den=%7.2f rad=%7.2f abs=%7.2f",mid,a,z,den,rad,abs);
78   
79   TLorentzVector x4;
80   gMC->TrackPosition(x4);
81   Float_t glo[3],loc[3];
82   glo[0]=x4.X();glo[1]=x4.Y();glo[2]=x4.Z();  
83   gMC->Gmtod(glo,loc,1);
84   Info("","glo(%7.2f,%7.2f,%7.2f) r=%7.2f theta=%7.2f phi=%7.2f",
85                       glo[0],glo[1],glo[2],x4.Rho(),x4.Theta()*kR2d,x4.Phi()*kR2d);  
86   Info("","loc(%7.2f,%7.2f,%7.2f)\n",
87                       loc[0],loc[1],loc[2]);  
88 }//AliRICHv0::StepManager()
89 //__________________________________________________________________________________________________