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 **************************************************************************/
16 #include "AliRICHv0.h"
17 #include <TVirtualMC.h>
19 #include "AliRICHConst.h"
21 #include <TLorentzVector.h>
25 void AliRICHv0::StepManager()
28 switch(gMC->TrackPid()){
30 sParticle="proton";break;
32 sParticle="neutron";break;
34 sParticle="gamma";break;
36 sParticle="photon";break;
38 sParticle="Pi0";break;
40 sParticle="electron";break;
42 sParticle="not known";break;
45 Info("","event=%i hunt=%i tid=%i pid=%i(%s) m=%f q=%3.1f",
48 gAlice->GetCurrentTrackNumber(),
53 Info("","Flags:alive(%i) disap(%i) enter(%i) exit(%i) inside(%i) out(%i) stop(%i) new(%i)",
55 gMC->IsTrackDisappeared(),
56 gMC->IsTrackEntering(),
57 gMC->IsTrackExiting(),
62 Int_t copy0,copy1,copy2,copy3;
63 Int_t vid0=gMC->CurrentVolID(copy0);
64 Int_t vid1=gMC->CurrentVolOffID(1,copy1);
65 Int_t vid2=gMC->CurrentVolOffID(2,copy2);
66 Int_t vid3=gMC->CurrentVolOffID(3,copy3);
67 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",
68 vid0,gMC->VolName(vid0),copy0,
69 vid1,gMC->VolName(vid1),copy1,
70 vid2,gMC->VolName(vid2),copy2,
71 vid3,gMC->VolName(vid3),copy3,
72 gMC->CurrentVolName(),
73 gMC->CurrentVolOffName(1),
74 gMC->CurrentVolOffName(2),
75 gMC->CurrentVolOffName(3));
77 Float_t a,z,den,rad,abs; a=z=den=rad=abs=kBad;
78 Int_t mid=gMC->CurrentMaterial(a,z,den,rad,abs);
79 Info("","mid=%i a=%7.2f z=%7.2f den=%7.2f rad=%7.2f abs=%7.2f",mid,a,z,den,rad,abs);
82 gMC->TrackPosition(x4);
83 Float_t glo[3],loc[3];
84 glo[0]=x4.X();glo[1]=x4.Y();glo[2]=x4.Z();
85 gMC->Gmtod(glo,loc,1);
86 Info("","glo(%+8.3f,%+8.3f,%+8.3f) r=%8.3f theta=%8.3f phi=%8.3f",
87 glo[0],glo[1],glo[2],x4.Rho(),x4.Theta()*kR2d,x4.Phi()*kR2d);
88 Info("","loc(%+8.3f,%+8.3f,%8.3f) by gMC->Gmtod()", loc[0],loc[1],loc[2]);
89 if(gMC->VolId("CSI ")==gMC->CurrentVolID(copy0)){
91 gMC->CurrentVolOffID(2,iChamber);
92 TVector3 x3=C(iChamber)->G2L(x4);
93 Info("","loc(%+8.3f,%+8.3f,%8.3f) by G2L", x3.X(),x3.Y(),x3.Z());
94 x3=C(iChamber)->Global2Local(x4);
95 Info("","loc(%+8.3f,%+8.3f,%8.3f) by Global2Local", x3.X(),x3.Y(),x3.Z());
97 Info("","end of current step\n");
98 }//AliRICHv0::StepManager()
99 //__________________________________________________________________________________________________