]>
Commit | Line | Data |
---|---|---|
4c039060 | 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 | ||
88cb7938 | 16 | #include "AliRICHv0.h" |
c021cb15 | 17 | #include <TVirtualMC.h> |
18 | #include <TPDGCode.h> | |
19 | #include "AliRICHConst.h" | |
20 | #include <AliRun.h> | |
21 | #include <TLorentzVector.h> | |
5d12ce38 | 22 | #include "AliMC.h" |
ddae0931 | 23 | |
24 | ClassImp(AliRICHv0) | |
fbeabb4b | 25 | |
e14b8113 | 26 | void AliRICHv0::StepManager() |
fbeabb4b | 27 | { |
c021cb15 | 28 | char *sParticle; |
29 | switch(gMC->TrackPid()){ | |
30 | case kProton: | |
c60862bf | 31 | sParticle="proton";break; |
c021cb15 | 32 | case kNeutron: |
c60862bf | 33 | sParticle="neutron";break; |
c021cb15 | 34 | case kGamma: |
35 | sParticle="gamma";break; | |
fbeabb4b | 36 | case kCerenkov: |
c021cb15 | 37 | sParticle="photon";break; |
fbeabb4b | 38 | case kPi0: |
39 | sParticle="Pi0";break; | |
c60862bf | 40 | case kElectron: |
41 | sParticle="electron";break; | |
c021cb15 | 42 | default: |
43 | sParticle="not known";break; | |
44 | } | |
45 | ||
c60862bf | 46 | Info("","event=%i hunt=%i tid=%i pid=%i(%s) m=%f q=%3.1f", |
fbeabb4b | 47 | gMC->CurrentEvent(), |
48 | fIshunt, | |
5d12ce38 | 49 | gAlice->GetMCApp()->GetCurrentTrackNumber(), |
fbeabb4b | 50 | gMC->TrackPid(), |
51 | sParticle, | |
52 | gMC->TrackMass(), | |
53 | gMC->TrackCharge()); | |
54 | Info("","Flags:alive(%i) disap(%i) enter(%i) exit(%i) inside(%i) out(%i) stop(%i) new(%i)", | |
c021cb15 | 55 | gMC->IsTrackAlive(), |
fbeabb4b | 56 | gMC->IsTrackDisappeared(), |
57 | gMC->IsTrackEntering(), | |
58 | gMC->IsTrackExiting(), | |
59 | gMC->IsTrackInside(), | |
60 | gMC->IsTrackOut(), | |
61 | gMC->IsTrackStop(), | |
62 | gMC->IsNewTrack()); | |
63 | Int_t copy0,copy1,copy2,copy3; | |
64 | Int_t vid0=gMC->CurrentVolID(copy0); | |
65 | Int_t vid1=gMC->CurrentVolOffID(1,copy1); | |
66 | Int_t vid2=gMC->CurrentVolOffID(2,copy2); | |
67 | Int_t vid3=gMC->CurrentVolOffID(3,copy3); | |
68 | 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", | |
69 | vid0,gMC->VolName(vid0),copy0, | |
70 | vid1,gMC->VolName(vid1),copy1, | |
71 | vid2,gMC->VolName(vid2),copy2, | |
72 | vid3,gMC->VolName(vid3),copy3, | |
73 | gMC->CurrentVolName(), | |
74 | gMC->CurrentVolOffName(1), | |
75 | gMC->CurrentVolOffName(2), | |
76 | gMC->CurrentVolOffName(3)); | |
77 | ||
78 | Float_t a,z,den,rad,abs; a=z=den=rad=abs=kBad; | |
79 | Int_t mid=gMC->CurrentMaterial(a,z,den,rad,abs); | |
80 | Info("","mid=%i a=%7.2f z=%7.2f den=%7.2f rad=%7.2f abs=%7.2f",mid,a,z,den,rad,abs); | |
81 | ||
c021cb15 | 82 | TLorentzVector x4; |
83 | gMC->TrackPosition(x4); | |
fbeabb4b | 84 | Float_t glo[3],loc[3]; |
85 | glo[0]=x4.X();glo[1]=x4.Y();glo[2]=x4.Z(); | |
86 | gMC->Gmtod(glo,loc,1); | |
9e23b054 | 87 | Info("","glo(%+8.3f,%+8.3f,%+8.3f) r=%8.3f theta=%8.3f phi=%8.3f", |
fbeabb4b | 88 | glo[0],glo[1],glo[2],x4.Rho(),x4.Theta()*kR2d,x4.Phi()*kR2d); |
c60862bf | 89 | Info("","loc(%+8.3f,%+8.3f,%8.3f) by gMC->Gmtod()", loc[0],loc[1],loc[2]); |
90 | if(gMC->VolId("CSI ")==gMC->CurrentVolID(copy0)){ | |
91 | Int_t iChamber; | |
92 | gMC->CurrentVolOffID(2,iChamber); | |
93 | TVector3 x3=C(iChamber)->G2L(x4); | |
94 | Info("","loc(%+8.3f,%+8.3f,%8.3f) by G2L", x3.X(),x3.Y(),x3.Z()); | |
c712cb2f | 95 | x3=C(iChamber)->Glob2Loc(x4); |
9e23b054 | 96 | Info("","loc(%+8.3f,%+8.3f,%8.3f) by Global2Local", x3.X(),x3.Y(),x3.Z()); |
c60862bf | 97 | } |
98 | Info("","end of current step\n"); | |
e14b8113 | 99 | }//AliRICHv0::StepManager() |
c021cb15 | 100 | //__________________________________________________________________________________________________ |