BOSS 7.1.2
BESIII Offline Software System
Loading...
Searching...
No Matches
BesMucHit Class Reference

#include <BesMucHit.hh>

+ Inheritance diagram for BesMucHit:

Public Member Functions

 BesMucHit ()
 
 BesMucHit (int prt, int seg, int lay, int str, int trId, int trIndex)
 
 ~BesMucHit ()
 
 BesMucHit (const BesMucHit &)
 
const BesMucHitoperator= (const BesMucHit &)
 
int operator== (const BesMucHit &) const
 
void * operator new (size_t)
 
void operator delete (void *)
 
void Draw ()
 
void Print ()
 
void SetTrackID (G4int track)
 
void SetTrackIndex (G4int index)
 
void SetPDGCode (G4int pdg)
 
void SetEdep (G4double de)
 
void SetEnergy (G4double energy)
 
void SetTime (G4double t)
 
void SetPos (G4ThreeVector xyz)
 
void SetPosLocal (G4ThreeVector xyzLocal)
 
void SetDir (G4ThreeVector dir)
 
void SetMomentum (G4ThreeVector momentum)
 
void SetVolume (G4VPhysicalVolume *pv)
 
void SetPart (G4int part)
 
void SetSeg (G4int seg)
 
void SetGap (G4int gap)
 
void SetStrip (G4int strip)
 
G4int GetTrackID ()
 
G4int GetTrackIndex ()
 
G4int GetPDGCode ()
 
G4double GetEdep ()
 
G4double GetEnergy ()
 
G4double GetTime ()
 
G4ThreeVector GetPos ()
 
G4ThreeVector GetPosLocal ()
 
G4ThreeVector GetDir ()
 
G4ThreeVector GetMomentum ()
 
G4VPhysicalVolume * GetVolume ()
 
G4String GetVolumeName ()
 
G4int GetPart ()
 
G4int GetSeg ()
 
G4int GetGap ()
 
G4int GetStrip ()
 
G4int GetPanel ()
 
G4int GetGasChamber ()
 

Detailed Description

Definition at line 26 of file BesMucHit.hh.

Constructor & Destructor Documentation

◆ BesMucHit() [1/3]

BesMucHit::BesMucHit ( )

Definition at line 25 of file BesMucHit.cc.

26{ }

◆ BesMucHit() [2/3]

BesMucHit::BesMucHit ( int prt,
int seg,
int lay,
int str,
int trId,
int trIndex )

Definition at line 28 of file BesMucHit.cc.

29{
30 m_Part = prt;
31 m_Seg = seg;
32 m_Gap = lay;
33 m_Strip = str;
34 m_TrackID = trId;
35 m_TrackIndex = trIndex;
36}
#define prt(n)

◆ ~BesMucHit()

BesMucHit::~BesMucHit ( )

Definition at line 38 of file BesMucHit.cc.

39{ }

◆ BesMucHit() [3/3]

BesMucHit::BesMucHit ( const BesMucHit & right)

Definition at line 41 of file BesMucHit.cc.

42 :G4VHit()
43{
44 m_TrackID = right.m_TrackID;
45 m_TrackIndex = right.m_TrackIndex;
46 m_PDGCode = right.m_PDGCode;
47 m_Edep = right.m_Edep;
48 m_Energy = right.m_Energy;
49 m_Time = right.m_Time;
50 m_Pos = right.m_Pos;
51 m_PosLocal = right.m_PosLocal;
52 m_Dir = right.m_Dir;
53 m_Momentum = right.m_Momentum;
54 m_Volume = right.m_Volume;
55 m_VolumeName = right.m_VolumeName;
56 m_Part = right.m_Part;
57 m_Seg = right.m_Seg;
58 m_Gap = right.m_Gap;
59 m_Panel = right.m_Panel;
60 m_GasChamber = right.m_GasChamber; //now it means up or down RPC! 2006.10.17
61 m_Strip = right.m_Strip;
62}

Member Function Documentation

◆ Draw()

void BesMucHit::Draw ( )

Definition at line 139 of file BesMucHit.cc.

140{
141 G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance();
142 if(pVVisManager)
143 {
144 G4Circle circle(m_Pos);
145 circle.SetScreenSize(4.);
146 circle.SetFillStyle(G4Circle::filled);
147 G4Colour colour(0.,0.,1.);
148 G4VisAttributes attribs(colour);
149 circle.SetVisAttributes(attribs);
150 pVVisManager->Draw(circle);
151
152 //re-visualize a physical volume where a hit is detected
153 //
154 //
155 /* const G4ThreeVector& thrVector=G4ThreeVector(1.,0.,0.);
156 const G4RotationMatrix &rot =
157 G4RotationMatrix(thrVector,0.*deg);
158
159 G4Transform3D trans(rot, pos);
160 G4VisAttributes att;
161 const G4VPhysicalVolume* pPhys= detector->GetPhysicalTrap();
162 const G4LogicalVolume* logVol=
163 pPhys->GetLogicalVolume();
164 const G4VisAttributes* pVA=logVol->GetVisAttributes();
165 if(pVA) att=*pVA;
166 G4Colour col(1.,0.,0.);
167 att.SetColour(col);
168 att.SetForceSolid(true);
169
170 pVVisManager->Draw(*pPhys,att,trans);*/
171 }
172}

Referenced by BesMucSD::ProcessHits().

◆ GetDir()

G4ThreeVector BesMucHit::GetDir ( )
inline

Definition at line 70 of file BesMucHit.hh.

70{ return m_Dir; };

◆ GetEdep()

G4double BesMucHit::GetEdep ( )
inline

Definition at line 65 of file BesMucHit.hh.

65{ return m_Edep; };

◆ GetEnergy()

G4double BesMucHit::GetEnergy ( )
inline

Definition at line 66 of file BesMucHit.hh.

66{ return m_Energy; };

◆ GetGap()

◆ GetGasChamber()

G4int BesMucHit::GetGasChamber ( )
inline

Definition at line 79 of file BesMucHit.hh.

79{ return m_GasChamber; };

◆ GetMomentum()

G4ThreeVector BesMucHit::GetMomentum ( )
inline

Definition at line 71 of file BesMucHit.hh.

71{ return m_Momentum; };

Referenced by BesAsciiIO::SaveMucTruth(), and BesMcTruthWriter::SaveMucTruth().

◆ GetPanel()

G4int BesMucHit::GetPanel ( )
inline

Definition at line 78 of file BesMucHit.hh.

78{ return m_Panel; };

◆ GetPart()

◆ GetPDGCode()

G4int BesMucHit::GetPDGCode ( )
inline

Definition at line 64 of file BesMucHit.hh.

64{ return m_PDGCode; };

◆ GetPos()

G4ThreeVector BesMucHit::GetPos ( )
inline

Definition at line 68 of file BesMucHit.hh.

68{ return m_Pos; };

Referenced by BesAsciiIO::SaveMucTruth(), and BesMcTruthWriter::SaveMucTruth().

◆ GetPosLocal()

G4ThreeVector BesMucHit::GetPosLocal ( )
inline

Definition at line 69 of file BesMucHit.hh.

69{ return m_PosLocal; };

Referenced by BesMucDigit::SetHit(), and BesMucEfficiency::SetHit().

◆ GetSeg()

◆ GetStrip()

G4int BesMucHit::GetStrip ( )
inline

◆ GetTime()

G4double BesMucHit::GetTime ( )
inline

Definition at line 67 of file BesMucHit.hh.

67{ return m_Time; };

◆ GetTrackID()

G4int BesMucHit::GetTrackID ( )
inline

Definition at line 62 of file BesMucHit.hh.

62{ return m_TrackID; };

Referenced by BesMucDigit::GetNearestStripNo(), and BesMucDigit::SetHit().

◆ GetTrackIndex()

G4int BesMucHit::GetTrackIndex ( )
inline

◆ GetVolume()

G4VPhysicalVolume * BesMucHit::GetVolume ( )
inline

Definition at line 72 of file BesMucHit.hh.

72{ return m_Volume; };

Referenced by BesMucDigit::SetHit().

◆ GetVolumeName()

G4String BesMucHit::GetVolumeName ( )
inline

Definition at line 73 of file BesMucHit.hh.

73{ return m_VolumeName; };

◆ operator delete()

void BesMucHit::operator delete ( void * aHit)
inline

Definition at line 115 of file BesMucHit.hh.

116{
117 BesMucHitAllocator.FreeSingle((BesMucHit*) aHit);
118}
G4Allocator< BesMucHit > BesMucHitAllocator
Definition BesMucHit.cc:23

◆ operator new()

void * BesMucHit::operator new ( size_t )
inline

Definition at line 108 of file BesMucHit.hh.

109{
110 void *aHit;
111 aHit = (void *) BesMucHitAllocator.MallocSingle();
112 return aHit;
113}

◆ operator=()

const BesMucHit & BesMucHit::operator= ( const BesMucHit & right)

Definition at line 64 of file BesMucHit.cc.

65{
66 m_TrackID = right.m_TrackID;
67 m_TrackIndex = right.m_TrackIndex;
68 m_PDGCode = right.m_PDGCode;
69 m_Edep = right.m_Edep;
70 m_Energy = right.m_Energy;
71 m_Time = right.m_Time;
72 m_Pos = right.m_Pos;
73 m_PosLocal = right.m_PosLocal;
74 m_Dir = right.m_Dir;
75 m_Momentum = right.m_Momentum;
76 m_Volume = right.m_Volume;
77 m_VolumeName = right.m_VolumeName;
78 m_Part = right.m_Part;
79 m_Seg = right.m_Seg;
80 m_Gap = right.m_Gap;
81 m_Panel = right.m_Panel;
82 m_GasChamber = right.m_GasChamber;
83 m_Strip = right.m_Strip;
84 return *this;
85}

◆ operator==()

int BesMucHit::operator== ( const BesMucHit & right) const

Definition at line 87 of file BesMucHit.cc.

88{
89 return (this==&right) ? 1 : 0;
90}

◆ Print()

void BesMucHit::Print ( )

Definition at line 174 of file BesMucHit.cc.

175{
176
177 G4cout << " Track id: " << m_TrackID
178 << " pdg code: " << m_PDGCode
179 << G4endl
180 << " energy deposit: " << G4BestUnit(m_Edep, "Energy")
181 << " pos: " << G4BestUnit(m_Pos, "Length")
182 << " posLocal: " << G4BestUnit(m_PosLocal, "Length")
183 << G4endl
184 << " energy: " << G4BestUnit(m_Energy, "Energy")
185 << " direction: " << m_Dir
186 << " time: " << G4BestUnit(m_Time,"Time")
187 << " volume name: " << m_VolumeName
188 << G4endl;
189}

◆ SetDir()

void BesMucHit::SetDir ( G4ThreeVector dir)
inline

Definition at line 53 of file BesMucHit.hh.

53{ m_Dir = dir; };

Referenced by BesMucSD::ProcessHits().

◆ SetEdep()

void BesMucHit::SetEdep ( G4double de)
inline

Definition at line 48 of file BesMucHit.hh.

48{ m_Edep = de; };

Referenced by BesMucSD::ProcessHits().

◆ SetEnergy()

void BesMucHit::SetEnergy ( G4double energy)
inline

Definition at line 49 of file BesMucHit.hh.

49{ m_Energy = energy; };
************Class m_ypar INTEGER m_KeyWgt INTEGER m_KeyIHVP INTEGER m_KeyGPS INTEGER m_IsBeamPolarized INTEGER m_EvtGenInterface DOUBLE PRECISION m_Emin DOUBLE PRECISION m_sphot DOUBLE PRECISION m_Xenph DOUBLE PRECISION m_q2 DOUBLE PRECISION m_PolBeam2 DOUBLE PRECISION m_xErrPb *COMMON c_KK2f $ !CMS energy average $ !Spin Polarization vector first beam $ !Spin Polarization vector second beam $ !Beam energy spread[GeV] $ !minimum hadronization energy[GeV] $ !input READ never touch them !$ !debug facility $ !maximum weight $ !inverse alfaQED $ !minimum real photon energy
Definition KK2f.h:50

Referenced by BesMucSD::ProcessHits().

◆ SetGap()

void BesMucHit::SetGap ( G4int gap)
inline

Definition at line 58 of file BesMucHit.hh.

58{ m_Gap = gap; };

Referenced by BesMucSD::ProcessHits().

◆ SetMomentum()

void BesMucHit::SetMomentum ( G4ThreeVector momentum)
inline

Definition at line 54 of file BesMucHit.hh.

54{ m_Momentum = momentum; };
**********INTEGER nmxhep !maximum number of particles DOUBLE PRECISION vhep INTEGER jdahep COMMON hepevt $ !serial number $ !number of particles $ !status code $ !particle ident KF $ !parent particles $ !childreen particles $ !four momentum

Referenced by BesMucSD::ProcessHits().

◆ SetPart()

void BesMucHit::SetPart ( G4int part)
inline

Definition at line 56 of file BesMucHit.hh.

56{ m_Part = part; };

Referenced by BesMucSD::ProcessHits().

◆ SetPDGCode()

void BesMucHit::SetPDGCode ( G4int pdg)
inline

Definition at line 47 of file BesMucHit.hh.

47{ m_PDGCode = pdg; };

Referenced by BesMucSD::ProcessHits().

◆ SetPos()

void BesMucHit::SetPos ( G4ThreeVector xyz)
inline

Definition at line 51 of file BesMucHit.hh.

51{ m_Pos = xyz; };

Referenced by BesMucSD::ProcessHits().

◆ SetPosLocal()

void BesMucHit::SetPosLocal ( G4ThreeVector xyzLocal)
inline

Definition at line 52 of file BesMucHit.hh.

52{ m_PosLocal = xyzLocal; };

Referenced by BesMucSD::ProcessHits().

◆ SetSeg()

void BesMucHit::SetSeg ( G4int seg)
inline

Definition at line 57 of file BesMucHit.hh.

57{ m_Seg = seg; };

Referenced by BesMucSD::ProcessHits().

◆ SetStrip()

void BesMucHit::SetStrip ( G4int strip)
inline

Definition at line 59 of file BesMucHit.hh.

59{ m_Strip = strip; };

Referenced by BesMucSD::ProcessHits().

◆ SetTime()

void BesMucHit::SetTime ( G4double t)
inline

Definition at line 50 of file BesMucHit.hh.

50{ m_Time = t; };
TTree * t
Definition binning.cxx:23

Referenced by BesMucSD::ProcessHits().

◆ SetTrackID()

void BesMucHit::SetTrackID ( G4int track)
inline

Definition at line 45 of file BesMucHit.hh.

45{ m_TrackID = track; };

Referenced by BesMucSD::ProcessHits().

◆ SetTrackIndex()

void BesMucHit::SetTrackIndex ( G4int index)
inline

Definition at line 46 of file BesMucHit.hh.

46{ m_TrackIndex = index;};

Referenced by BesMucSD::ProcessHits().

◆ SetVolume()

void BesMucHit::SetVolume ( G4VPhysicalVolume * pv)

Definition at line 92 of file BesMucHit.cc.

93{
94 m_Volume = pv;
95 m_VolumeName = pv->GetLogicalVolume()->GetName();
96
97 G4LogicalVolume *lvGap = pv->GetMotherLogical();
98 G4String GapName = lvGap->GetName();
99
100 //G4cout<<" in BesMucHit ---- "<<m_VolumeName<<" "<<GapName<<G4endl;
101// // "logicalMucPart1Seg0Gap4Panel1GasChamber0"
102// // "logicalMucPart1Seg4Gap0"
103// G4String strPart = m_VolumeName.substr(14,1);
104// G4String strSeg = GapName.substr(18,1);
105// G4String strGap = m_VolumeName.substr(22,1);
106// G4String strPanel = m_VolumeName.substr(28,1);
107// G4String strGasChamber = m_VolumeName.substr(39,1);
108
109 // "logicalMucPart0Seg0Gap0RpcUpDown0Panel0GasChamber" 2006.10.17 liangyt
110 // "logicalMucPart0Seg0Gap0"
111
112 // "lMucP0S0G0R0Pn0C" 2006.12.05 liangyt
113 // "lMucP0S0G0"
114 G4String strPart = m_VolumeName.substr(5,1);
115 G4String strSeg = GapName.substr(7,1);
116 G4String strGap = m_VolumeName.substr(9,1);
117 G4String strGasChamber = m_VolumeName.substr(11,1); //same as rpcupdown
118 G4String strPanel = m_VolumeName.substr(14,1);
119// G4String strPart = m_VolumeName.substr(14,1);
120// G4String strSeg = GapName.substr(18,1);
121// G4String strGap = m_VolumeName.substr(22,1);
122// G4String strGasChamber = m_VolumeName.substr(32,1); //same as rpcupdown
123// G4String strPanel = m_VolumeName.substr(38,1);
124
125 std::istrstream partBuf(strPart.c_str(), strlen(strPart.c_str()));
126 std::istrstream segBuf(strSeg.c_str(), strlen(strSeg.c_str()));
127 std::istrstream gapBuf(strGap.c_str(), strlen(strGap.c_str()));
128 std::istrstream panelBuf(strPanel.c_str(), strlen(strPanel.c_str()));
129 std::istrstream gasChamberBuf(strGasChamber.c_str(), strlen(strGasChamber.c_str()));
130
131 partBuf >> m_Part ;
132 segBuf >> m_Seg;
133 gapBuf >> m_Gap;
134 panelBuf >> m_Panel;
135 gasChamberBuf >> m_GasChamber;
136}

Referenced by BesMucSD::ProcessHits().


The documentation for this class was generated from the following files: