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