BOSS 6.6.4.p03
BESIII Offline Software System
Loading...
Searching...
No Matches
ExtSteppingAction.h
Go to the documentation of this file.
1//
2//File: ExtSteppingAction.hh
3//data: 2005.3.16
4//Author: L.L.Wang
5//
6//Description:
7//
8
9
10#ifndef EXTSTEPPINGACTION
11#define EXTSTEPPINGACTION 1
12
13#include "G4UserSteppingAction.hh"
14#include "G4Material.hh"
15
17#include "CLHEP/Matrix/SymMatrix.h"
19#include "MucRawEvent/MucDigi.h"
20#include "McTruth/MucMcHit.h"
21#include "G4LogicalVolume.hh"
22#include "G4VPhysicalVolume.hh"
23using namespace CLHEP;
24
25class ExtSteppingAction: public G4UserSteppingAction
26{
27 public:
28 // Constructor and destructors
31
32 void Reset();
33 void MucReset();
34 void UserSteppingAction(const G4Step* currentStep);
35
36 void SetInitialPath(double aPath) {initialPath = aPath;};
37 void SetInitialTof(double aTof) {initialTof = aTof;};
38 void SetBetaInMDC(double aBeta) {myBetaInMDC = aBeta;};
39 void SetXpErrPointer(Ext_xp_err* xpErr) {extXpErr = xpErr;};
40
41 void SetMsgFlag(bool aMsgFalg) {msgFlag = aMsgFalg;};
42 void SetMucKalFlag(bool aMucKalFlag){myUseMucKalFlag=aMucKalFlag;};
43 void SetMucWindow(int aMucWindow){myMucWindow=aMucWindow;};
44 void SetExtTrackPointer(RecExtTrack *aExtTrack) {myExtTrack = aExtTrack;};
45// inline void SetMsFlag(bool value){msFlag=value};
46 void CalculateEmcEndThetaPhi(int npart, int sector, int nb, int &ntheta, int &nphi);
49
50 void InfmodMuc(Hep3Vector &pos,Hep3Vector &mom,HepSymMatrix &err);
51 Hep3Vector GetGapID(G4String vol);
52 bool TrackStop(){return m_trackstop;}
53 void SetMucDigiColPointer(MucDigiCol* rawdigicol){ m_mucdigicol = rawdigicol;}
54private:
55 //Calculate chicc
56 void CalculateChicc(G4Material* currentMaterial);
57
58 double chicc;//a const about the materimal
59 double initialPath;//particle path in MDC
60 double initialTof;//particle TOF in MDC
61 double myBetaInMDC;//particle velocity/C in MDC
62
63 double myPathIntoCrystal;
64 double myPathOutCrystal;
65 double myPathInCrystal;
66
67 double myPathIntoTof1;
68 double myPathOutTof1;
69 vector<double> myPathInTof1;
70
71 double myPathIntoTof2;
72 double myPathOutTof2;
73 vector<double> myPathInTof2;
74 int myMucWindow;
75// bool msFlag; //Caculation of multiple scattering error switch flag
76
77 Ext_xp_err* extXpErr;
78
79//units mm,MeV --> cm,GeV
80 HepSymMatrix myOutputSM;
81 HepSymMatrix & myOutputSymMatrix(const HepSymMatrix &);
82
83 MucDigiCol* m_mucdigicol;
84 bool myUseMucKalFlag;
85 Hep3Vector RememberID;
86 bool m_trackstop;
87 int myMucnfit_;
88 double myMucchisq_;
89 double myMucdepth_;
90 int myMucbrLastLay_;
91 int myMucecLastLay_;
92 int myMucnhits_;
93 HepSymMatrix m_err_mod;
94 Hep3Vector m_pos_mod;
95 Hep3Vector m_mom_mod;
96
97 Hep3Vector RemPositon;
98 Hep3Vector RemMomentum;
99 HepSymMatrix RemXpErr;
100 int RemStep;
101 double RemDist;
102 double RemDepth;
103 Hep3Vector RemID;
104 G4String RemVol;
105
106//Ext data
107 RecExtTrack *myExtTrack;
108
109 bool msgFlag;//Message on/off
110 bool myTofFlag;//when enter "physicalTof",this flag will be ture.
111 bool myTof1Flag;//If we get Tof1 data,the flag will be true.
112 bool myTof2Flag;
113 bool myInTof1;
114 bool myOutTof1;
115 bool myInTof2;
116 bool myOutTof2;
117 bool myPhyEmcFlag;//when enter "BSC",this flag will be ture.
118 bool myEmcFlag;
119 bool myEmcPathFlag;
120 bool myMucFlag;
121
122 double myTof1R;
123 double myTof1Z;
124 double myTof2R;
125
126 double myEmcR1;
127 double myEmcR2;
128 double myEmcZ;
129
130 double myMucR;
131 double myMucZ;
132
133};
134
135#endif
ObjectVector< MucDigi > MucDigiCol
Definition: MucDigi.h:29
void SetMsgFlag(bool aMsgFalg)
void SetExtTrackPointer(RecExtTrack *aExtTrack)
void SetMucWindow(int aMucWindow)
void SetBetaInMDC(double aBeta)
void SetMucKalFlag(bool aMucKalFlag)
void SetInitialPath(double aPath)
void SetInitialTof(double aTof)
Hep3Vector GetGapID(G4String vol)
void CalculateEmcEndThetaPhi(int npart, int sector, int nb, int &ntheta, int &nphi)
void InfmodMuc(Hep3Vector &pos, Hep3Vector &mom, HepSymMatrix &err)
void UserSteppingAction(const G4Step *currentStep)
int CalculateEmcEndCopyNb(int num)
void SetXpErrPointer(Ext_xp_err *xpErr)
int CalculateEmcEndPhiNb(int num)
void SetMucDigiColPointer(MucDigiCol *rawdigicol)
int num[96]
Definition: ranlxd.c:373