#include <BesMucHit.hh>
Public Member Functions | |
BesMucHit () | |
BesMucHit (int prt, int seg, int lay, int str, int trId, int trIndex) | |
~BesMucHit () | |
BesMucHit (const BesMucHit &) | |
const BesMucHit & | operator= (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 () |
Private Attributes | |
G4int | m_TrackID |
G4int | m_TrackIndex |
G4int | m_PDGCode |
G4double | m_Edep |
G4double | m_Energy |
G4double | m_Time |
G4ThreeVector | m_Pos |
G4ThreeVector | m_PosLocal |
G4ThreeVector | m_Dir |
G4ThreeVector | m_Momentum |
G4VPhysicalVolume * | m_Volume |
G4String | m_VolumeName |
G4int | m_Part |
G4int | m_Seg |
G4int | m_Gap |
G4int | m_Strip |
G4int | m_Panel |
G4int | m_GasChamber |
Definition at line 26 of file BesMucHit.hh.
BesMucHit::BesMucHit | ( | ) |
BesMucHit::BesMucHit | ( | int | prt, | |
int | seg, | |||
int | lay, | |||
int | str, | |||
int | trId, | |||
int | trIndex | |||
) |
Definition at line 28 of file BesMucHit.cc.
References m_Gap, m_Part, m_Seg, m_Strip, m_TrackID, and m_TrackIndex.
00029 { 00030 m_Part = prt; 00031 m_Seg = seg; 00032 m_Gap = lay; 00033 m_Strip = str; 00034 m_TrackID = trId; 00035 m_TrackIndex = trIndex; 00036 }
BesMucHit::~BesMucHit | ( | ) |
BesMucHit::BesMucHit | ( | const BesMucHit & | ) |
Definition at line 41 of file BesMucHit.cc.
References m_Dir, m_Edep, m_Energy, m_Gap, m_GasChamber, m_Momentum, m_Panel, m_Part, m_PDGCode, m_Pos, m_PosLocal, m_Seg, m_Strip, m_Time, m_TrackID, m_TrackIndex, m_Volume, and m_VolumeName.
00042 :G4VHit() 00043 { 00044 m_TrackID = right.m_TrackID; 00045 m_TrackIndex = right.m_TrackIndex; 00046 m_PDGCode = right.m_PDGCode; 00047 m_Edep = right.m_Edep; 00048 m_Energy = right.m_Energy; 00049 m_Time = right.m_Time; 00050 m_Pos = right.m_Pos; 00051 m_PosLocal = right.m_PosLocal; 00052 m_Dir = right.m_Dir; 00053 m_Momentum = right.m_Momentum; 00054 m_Volume = right.m_Volume; 00055 m_VolumeName = right.m_VolumeName; 00056 m_Part = right.m_Part; 00057 m_Seg = right.m_Seg; 00058 m_Gap = right.m_Gap; 00059 m_Panel = right.m_Panel; 00060 m_GasChamber = right.m_GasChamber; //now it means up or down RPC! 2006.10.17 00061 m_Strip = right.m_Strip; 00062 }
void BesMucHit::Draw | ( | ) |
Definition at line 139 of file BesMucHit.cc.
References m_Pos.
Referenced by BesMucSD::ProcessHits().
00140 { 00141 G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance(); 00142 if(pVVisManager) 00143 { 00144 G4Circle circle(m_Pos); 00145 circle.SetScreenSize(4.); 00146 circle.SetFillStyle(G4Circle::filled); 00147 G4Colour colour(0.,0.,1.); 00148 G4VisAttributes attribs(colour); 00149 circle.SetVisAttributes(attribs); 00150 pVVisManager->Draw(circle); 00151 00152 //re-visualize a physical volume where a hit is detected 00153 // 00154 // 00155 /* const G4ThreeVector& thrVector=G4ThreeVector(1.,0.,0.); 00156 const G4RotationMatrix &rot = 00157 G4RotationMatrix(thrVector,0.*deg); 00158 00159 G4Transform3D trans(rot, pos); 00160 G4VisAttributes att; 00161 const G4VPhysicalVolume* pPhys= detector->GetPhysicalTrap(); 00162 const G4LogicalVolume* logVol= 00163 pPhys->GetLogicalVolume(); 00164 const G4VisAttributes* pVA=logVol->GetVisAttributes(); 00165 if(pVA) att=*pVA; 00166 G4Colour col(1.,0.,0.); 00167 att.SetColour(col); 00168 att.SetForceSolid(true); 00169 00170 pVVisManager->Draw(*pPhys,att,trans);*/ 00171 } 00172 }
G4ThreeVector BesMucHit::GetDir | ( | ) | [inline] |
G4double BesMucHit::GetEdep | ( | ) | [inline] |
G4double BesMucHit::GetEnergy | ( | ) | [inline] |
G4int BesMucHit::GetGap | ( | ) | [inline] |
Definition at line 76 of file BesMucHit.hh.
References m_Gap.
Referenced by BesMucEfficiency::GetEfficiency(), BesMucDigit::GetGap(), BesMucDigit::GetNearestStripNo(), BesMucEfficiency::GetPosLengthWidth(), BesMucDigit::GetStripPos(), BesMucNoise::IsExist(), BesMucSD::ProcessHits(), BesMcTruthWriter::SaveMucTruth(), BesAsciiIO::SaveMucTruth(), BesMucEfficiency::SetHit(), and BesMucDigit::SetHit().
00076 { return m_Gap; };
G4int BesMucHit::GetGasChamber | ( | ) | [inline] |
G4ThreeVector BesMucHit::GetMomentum | ( | ) | [inline] |
Definition at line 71 of file BesMucHit.hh.
References m_Momentum.
Referenced by BesMcTruthWriter::SaveMucTruth(), and BesAsciiIO::SaveMucTruth().
00071 { return m_Momentum; };
G4int BesMucHit::GetPanel | ( | ) | [inline] |
G4int BesMucHit::GetPart | ( | ) | [inline] |
Definition at line 74 of file BesMucHit.hh.
References m_Part.
Referenced by BesMucEfficiency::GetEfficiency(), BesMucDigit::GetNearestStripNo(), BesMucDigit::GetPart(), BesMucEfficiency::GetPosLengthWidth(), BesMucDigit::GetStripPos(), BesMucNoise::IsExist(), BesMucSD::ProcessHits(), BesMcTruthWriter::SaveMucTruth(), BesAsciiIO::SaveMucTruth(), BesMucEfficiency::SetHit(), and BesMucDigit::SetHit().
00074 { return m_Part; };
G4int BesMucHit::GetPDGCode | ( | ) | [inline] |
G4ThreeVector BesMucHit::GetPos | ( | ) | [inline] |
Definition at line 68 of file BesMucHit.hh.
References m_Pos.
Referenced by BesMcTruthWriter::SaveMucTruth(), and BesAsciiIO::SaveMucTruth().
00068 { return m_Pos; };
G4ThreeVector BesMucHit::GetPosLocal | ( | ) | [inline] |
Definition at line 69 of file BesMucHit.hh.
References m_PosLocal.
Referenced by BesMucEfficiency::SetHit(), and BesMucDigit::SetHit().
00069 { return m_PosLocal; };
G4int BesMucHit::GetSeg | ( | ) | [inline] |
Definition at line 75 of file BesMucHit.hh.
References m_Seg.
Referenced by BesMucEfficiency::GetEfficiency(), BesMucDigit::GetNearestStripNo(), BesMucDigit::GetSeg(), BesMucNoise::IsExist(), BesMucSD::ProcessHits(), BesMcTruthWriter::SaveMucTruth(), BesAsciiIO::SaveMucTruth(), and BesMucDigit::SetHit().
00075 { return m_Seg; };
G4int BesMucHit::GetStrip | ( | ) | [inline] |
Definition at line 77 of file BesMucHit.hh.
References m_Strip.
Referenced by BesMucDigit::GetNearestStripNo(), BesMucNoise::IsExist(), BesMucSD::ProcessHits(), BesMcTruthWriter::SaveMucTruth(), and BesAsciiIO::SaveMucTruth().
00077 { return m_Strip; };
G4double BesMucHit::GetTime | ( | ) | [inline] |
G4int BesMucHit::GetTrackID | ( | ) | [inline] |
Definition at line 62 of file BesMucHit.hh.
References m_TrackID.
Referenced by BesMucDigit::GetNearestStripNo(), and BesMucDigit::SetHit().
00062 { return m_TrackID; };
G4int BesMucHit::GetTrackIndex | ( | ) | [inline] |
Definition at line 63 of file BesMucHit.hh.
References m_TrackIndex.
Referenced by BesMucDigit::GetTrackIndex(), BesMucNoise::IsExist(), BesMucSD::ProcessHits(), BesMcTruthWriter::SaveMucTruth(), and BesAsciiIO::SaveMucTruth().
00063 { return m_TrackIndex;};
G4VPhysicalVolume* BesMucHit::GetVolume | ( | ) | [inline] |
Definition at line 72 of file BesMucHit.hh.
References m_Volume.
Referenced by BesMucDigit::SetHit().
00072 { return m_Volume; };
G4String BesMucHit::GetVolumeName | ( | ) | [inline] |
void BesMucHit::operator delete | ( | void * | ) | [inline] |
Definition at line 115 of file BesMucHit.hh.
References BesMucHitAllocator.
00116 { 00117 BesMucHitAllocator.FreeSingle((BesMucHit*) aHit); 00118 }
void * BesMucHit::operator new | ( | size_t | ) | [inline] |
Definition at line 108 of file BesMucHit.hh.
References BesMucHitAllocator.
00109 { 00110 void *aHit; 00111 aHit = (void *) BesMucHitAllocator.MallocSingle(); 00112 return aHit; 00113 }
Definition at line 64 of file BesMucHit.cc.
References m_Dir, m_Edep, m_Energy, m_Gap, m_GasChamber, m_Momentum, m_Panel, m_Part, m_PDGCode, m_Pos, m_PosLocal, m_Seg, m_Strip, m_Time, m_TrackID, m_TrackIndex, m_Volume, and m_VolumeName.
00065 { 00066 m_TrackID = right.m_TrackID; 00067 m_TrackIndex = right.m_TrackIndex; 00068 m_PDGCode = right.m_PDGCode; 00069 m_Edep = right.m_Edep; 00070 m_Energy = right.m_Energy; 00071 m_Time = right.m_Time; 00072 m_Pos = right.m_Pos; 00073 m_PosLocal = right.m_PosLocal; 00074 m_Dir = right.m_Dir; 00075 m_Momentum = right.m_Momentum; 00076 m_Volume = right.m_Volume; 00077 m_VolumeName = right.m_VolumeName; 00078 m_Part = right.m_Part; 00079 m_Seg = right.m_Seg; 00080 m_Gap = right.m_Gap; 00081 m_Panel = right.m_Panel; 00082 m_GasChamber = right.m_GasChamber; 00083 m_Strip = right.m_Strip; 00084 return *this; 00085 }
int BesMucHit::operator== | ( | const BesMucHit & | ) | const |
void BesMucHit::Print | ( | ) |
Definition at line 174 of file BesMucHit.cc.
References m_Dir, m_Edep, m_Energy, m_PDGCode, m_Pos, m_PosLocal, m_Time, m_TrackID, and m_VolumeName.
00175 { 00176 00177 G4cout << " Track id: " << m_TrackID 00178 << " pdg code: " << m_PDGCode 00179 << G4endl 00180 << " energy deposit: " << G4BestUnit(m_Edep, "Energy") 00181 << " pos: " << G4BestUnit(m_Pos, "Length") 00182 << " posLocal: " << G4BestUnit(m_PosLocal, "Length") 00183 << G4endl 00184 << " energy: " << G4BestUnit(m_Energy, "Energy") 00185 << " direction: " << m_Dir 00186 << " time: " << G4BestUnit(m_Time,"Time") 00187 << " volume name: " << m_VolumeName 00188 << G4endl; 00189 }
void BesMucHit::SetDir | ( | G4ThreeVector | dir | ) | [inline] |
Definition at line 53 of file BesMucHit.hh.
References m_Dir.
Referenced by BesMucSD::ProcessHits().
00053 { m_Dir = dir; };
void BesMucHit::SetEdep | ( | G4double | de | ) | [inline] |
Definition at line 48 of file BesMucHit.hh.
References m_Edep.
Referenced by BesMucSD::ProcessHits().
00048 { m_Edep = de; };
void BesMucHit::SetEnergy | ( | G4double | energy | ) | [inline] |
Definition at line 49 of file BesMucHit.hh.
References m_Energy.
Referenced by BesMucSD::ProcessHits().
void BesMucHit::SetGap | ( | G4int | gap | ) | [inline] |
Definition at line 58 of file BesMucHit.hh.
References m_Gap.
Referenced by BesMucSD::ProcessHits().
00058 { m_Gap = gap; };
void BesMucHit::SetMomentum | ( | G4ThreeVector | momentum | ) | [inline] |
Definition at line 54 of file BesMucHit.hh.
References m_Momentum.
Referenced by BesMucSD::ProcessHits().
00054 { m_Momentum = momentum; };
void BesMucHit::SetPart | ( | G4int | part | ) | [inline] |
Definition at line 56 of file BesMucHit.hh.
References m_Part.
Referenced by BesMucSD::ProcessHits().
00056 { m_Part = part; };
void BesMucHit::SetPDGCode | ( | G4int | pdg | ) | [inline] |
Definition at line 47 of file BesMucHit.hh.
References m_PDGCode.
Referenced by BesMucSD::ProcessHits().
00047 { m_PDGCode = pdg; };
void BesMucHit::SetPos | ( | G4ThreeVector | xyz | ) | [inline] |
Definition at line 51 of file BesMucHit.hh.
References m_Pos.
Referenced by BesMucSD::ProcessHits().
00051 { m_Pos = xyz; };
void BesMucHit::SetPosLocal | ( | G4ThreeVector | xyzLocal | ) | [inline] |
Definition at line 52 of file BesMucHit.hh.
References m_PosLocal.
Referenced by BesMucSD::ProcessHits().
00052 { m_PosLocal = xyzLocal; };
void BesMucHit::SetSeg | ( | G4int | seg | ) | [inline] |
Definition at line 57 of file BesMucHit.hh.
References m_Seg.
Referenced by BesMucSD::ProcessHits().
00057 { m_Seg = seg; };
void BesMucHit::SetStrip | ( | G4int | strip | ) | [inline] |
Definition at line 59 of file BesMucHit.hh.
References m_Strip.
Referenced by BesMucSD::ProcessHits().
00059 { m_Strip = strip; };
void BesMucHit::SetTime | ( | G4double | t | ) | [inline] |
Definition at line 50 of file BesMucHit.hh.
References m_Time.
Referenced by BesMucSD::ProcessHits().
void BesMucHit::SetTrackID | ( | G4int | track | ) | [inline] |
Definition at line 45 of file BesMucHit.hh.
References m_TrackID.
Referenced by BesMucSD::ProcessHits().
00045 { m_TrackID = track; };
void BesMucHit::SetTrackIndex | ( | G4int | index | ) | [inline] |
Definition at line 46 of file BesMucHit.hh.
References m_TrackIndex.
Referenced by BesMucSD::ProcessHits().
00046 { m_TrackIndex = index;};
void BesMucHit::SetVolume | ( | G4VPhysicalVolume * | pv | ) |
Definition at line 92 of file BesMucHit.cc.
References m_Gap, m_GasChamber, m_Panel, m_Part, m_Seg, m_Volume, and m_VolumeName.
Referenced by BesMucSD::ProcessHits().
00093 { 00094 m_Volume = pv; 00095 m_VolumeName = pv->GetLogicalVolume()->GetName(); 00096 00097 G4LogicalVolume *lvGap = pv->GetMotherLogical(); 00098 G4String GapName = lvGap->GetName(); 00099 00100 //G4cout<<" in BesMucHit ---- "<<m_VolumeName<<" "<<GapName<<G4endl; 00101 // // "logicalMucPart1Seg0Gap4Panel1GasChamber0" 00102 // // "logicalMucPart1Seg4Gap0" 00103 // G4String strPart = m_VolumeName.substr(14,1); 00104 // G4String strSeg = GapName.substr(18,1); 00105 // G4String strGap = m_VolumeName.substr(22,1); 00106 // G4String strPanel = m_VolumeName.substr(28,1); 00107 // G4String strGasChamber = m_VolumeName.substr(39,1); 00108 00109 // "logicalMucPart0Seg0Gap0RpcUpDown0Panel0GasChamber" 2006.10.17 liangyt 00110 // "logicalMucPart0Seg0Gap0" 00111 00112 // "lMucP0S0G0R0Pn0C" 2006.12.05 liangyt 00113 // "lMucP0S0G0" 00114 G4String strPart = m_VolumeName.substr(5,1); 00115 G4String strSeg = GapName.substr(7,1); 00116 G4String strGap = m_VolumeName.substr(9,1); 00117 G4String strGasChamber = m_VolumeName.substr(11,1); //same as rpcupdown 00118 G4String strPanel = m_VolumeName.substr(14,1); 00119 // G4String strPart = m_VolumeName.substr(14,1); 00120 // G4String strSeg = GapName.substr(18,1); 00121 // G4String strGap = m_VolumeName.substr(22,1); 00122 // G4String strGasChamber = m_VolumeName.substr(32,1); //same as rpcupdown 00123 // G4String strPanel = m_VolumeName.substr(38,1); 00124 00125 std::istrstream partBuf(strPart.c_str(), strlen(strPart.c_str())); 00126 std::istrstream segBuf(strSeg.c_str(), strlen(strSeg.c_str())); 00127 std::istrstream gapBuf(strGap.c_str(), strlen(strGap.c_str())); 00128 std::istrstream panelBuf(strPanel.c_str(), strlen(strPanel.c_str())); 00129 std::istrstream gasChamberBuf(strGasChamber.c_str(), strlen(strGasChamber.c_str())); 00130 00131 partBuf >> m_Part ; 00132 segBuf >> m_Seg; 00133 gapBuf >> m_Gap; 00134 panelBuf >> m_Panel; 00135 gasChamberBuf >> m_GasChamber; 00136 }
G4ThreeVector BesMucHit::m_Dir [private] |
Definition at line 91 of file BesMucHit.hh.
Referenced by BesMucHit(), GetDir(), operator=(), Print(), and SetDir().
G4double BesMucHit::m_Edep [private] |
Definition at line 86 of file BesMucHit.hh.
Referenced by BesMucHit(), GetEdep(), operator=(), Print(), and SetEdep().
G4double BesMucHit::m_Energy [private] |
Definition at line 87 of file BesMucHit.hh.
Referenced by BesMucHit(), GetEnergy(), operator=(), Print(), and SetEnergy().
G4int BesMucHit::m_Gap [private] |
Definition at line 97 of file BesMucHit.hh.
Referenced by BesMucHit(), GetGap(), operator=(), SetGap(), and SetVolume().
G4int BesMucHit::m_GasChamber [private] |
Definition at line 100 of file BesMucHit.hh.
Referenced by BesMucHit(), operator=(), and SetVolume().
G4ThreeVector BesMucHit::m_Momentum [private] |
Definition at line 92 of file BesMucHit.hh.
Referenced by BesMucHit(), GetMomentum(), operator=(), and SetMomentum().
G4int BesMucHit::m_Panel [private] |
Definition at line 99 of file BesMucHit.hh.
Referenced by BesMucHit(), GetPanel(), operator=(), and SetVolume().
G4int BesMucHit::m_Part [private] |
Definition at line 95 of file BesMucHit.hh.
Referenced by BesMucHit(), GetPart(), operator=(), SetPart(), and SetVolume().
G4int BesMucHit::m_PDGCode [private] |
Definition at line 85 of file BesMucHit.hh.
Referenced by BesMucHit(), GetPDGCode(), operator=(), Print(), and SetPDGCode().
G4ThreeVector BesMucHit::m_Pos [private] |
Definition at line 89 of file BesMucHit.hh.
Referenced by BesMucHit(), Draw(), GetPos(), operator=(), Print(), and SetPos().
G4ThreeVector BesMucHit::m_PosLocal [private] |
Definition at line 90 of file BesMucHit.hh.
Referenced by BesMucHit(), GetPosLocal(), operator=(), Print(), and SetPosLocal().
G4int BesMucHit::m_Seg [private] |
Definition at line 96 of file BesMucHit.hh.
Referenced by BesMucHit(), GetSeg(), operator=(), SetSeg(), and SetVolume().
G4int BesMucHit::m_Strip [private] |
Definition at line 98 of file BesMucHit.hh.
Referenced by BesMucHit(), GetStrip(), operator=(), and SetStrip().
G4double BesMucHit::m_Time [private] |
Definition at line 88 of file BesMucHit.hh.
Referenced by BesMucHit(), GetTime(), operator=(), Print(), and SetTime().
G4int BesMucHit::m_TrackID [private] |
Definition at line 79 of file BesMucHit.hh.
Referenced by BesMucHit(), GetTrackID(), operator=(), Print(), and SetTrackID().
G4int BesMucHit::m_TrackIndex [private] |
Definition at line 84 of file BesMucHit.hh.
Referenced by BesMucHit(), GetTrackIndex(), operator=(), and SetTrackIndex().
G4VPhysicalVolume* BesMucHit::m_Volume [private] |
Definition at line 93 of file BesMucHit.hh.
Referenced by BesMucHit(), GetVolume(), operator=(), and SetVolume().
G4String BesMucHit::m_VolumeName [private] |
Definition at line 94 of file BesMucHit.hh.
Referenced by BesMucHit(), GetVolumeName(), operator=(), Print(), and SetVolume().