BOSS 7.1.0
BESIII Offline Software System
Loading...
Searching...
No Matches
BesEmcTruthHit Class Reference

#include <BesEmcHit.hh>

+ Inheritance diagram for BesEmcTruthHit:

Public Member Functions

 BesEmcTruthHit ()
 
virtual ~BesEmcTruthHit ()
 
 BesEmcTruthHit (const BesEmcTruthHit &)
 
const BesEmcTruthHitoperator= (const BesEmcTruthHit &)
 
G4int operator== (const BesEmcTruthHit &) const
 
void * operator new (size_t)
 
void operator delete (void *)
 
void Print ()
 
void SetIdentify (Identifier id)
 
void SetTrackIndex (G4int index)
 
void SetG4TrackId (G4int trackId)
 
void SetHitEmc (G4int is)
 
void SetPDGCode (G4int code)
 
void SetPDGCharge (G4double charge)
 
void SetParticleName (G4String name)
 
void SetEDep (G4double de)
 
void SetTime (G4double time)
 
void SetMomentum (G4ThreeVector p)
 
void SetPosition (G4ThreeVector pos)
 
Identifier GetIdentify () const
 
G4int GetTrackIndex () const
 
G4int GetG4TrackId () const
 
G4int GetHitEmc () const
 
G4int GetPDGCode () const
 
G4double GetPDGCharge () const
 
G4String GetParticleName () const
 
G4double GetEDep () const
 
G4double GetTime () const
 
G4ThreeVector GetMomentum () const
 
G4ThreeVector GetPosition () const
 
std::map< Identifier, G4double >::const_iterator Begin () const
 
std::map< Identifier, G4double >::const_iterator End () const
 
std::map< Identifier, G4double >::const_iterator Find (Identifier) const
 
G4double GetEHit (Identifier)
 
void AddEHit (Identifier, G4double)
 
void Insert (Identifier, G4double)
 
G4int Size () const
 

Detailed Description

Definition at line 105 of file BesEmcHit.hh.

Constructor & Destructor Documentation

◆ BesEmcTruthHit() [1/2]

BesEmcTruthHit::BesEmcTruthHit ( )

Definition at line 113 of file BesEmcHit.cc.

114{
115 m_trackIndex = -1;
116 m_g4TrackId = -1;
117 m_hitEmc = -1;
118 m_PDGCode = 0;
119 m_PDGCharge = 0;
120 m_particleName = G4String();
121 m_edep = 0;
122 m_time = 0;
123 m_momentum = G4ThreeVector(0,0,0);
124 m_position = G4ThreeVector(0,0,0);
125 m_hitMap.clear();
126}

◆ ~BesEmcTruthHit()

BesEmcTruthHit::~BesEmcTruthHit ( )
virtual

Definition at line 128 of file BesEmcHit.cc.

129{}

◆ BesEmcTruthHit() [2/2]

BesEmcTruthHit::BesEmcTruthHit ( const BesEmcTruthHit right)

Definition at line 131 of file BesEmcHit.cc.

132 : G4VHit()
133{
134 *this = right;
135}

Member Function Documentation

◆ AddEHit()

void BesEmcTruthHit::AddEHit ( Identifier  id,
G4double  energy 
)

Definition at line 197 of file BesEmcHit.cc.

198{
199 if(energy>0) m_hitMap[id]+=energy;
200}
************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 BesEmcSD::ProcessHits().

◆ Begin()

std::map< Identifier, G4double >::const_iterator BesEmcTruthHit::Begin ( ) const

Definition at line 177 of file BesEmcHit.cc.

178{
179 return m_hitMap.begin();
180}

Referenced by operator=(), and BesMcTruthWriter::SaveEmcTruth().

◆ End()

std::map< Identifier, G4double >::const_iterator BesEmcTruthHit::End ( ) const

Definition at line 182 of file BesEmcHit.cc.

183{
184 return m_hitMap.end();
185}

Referenced by operator=(), BesEmcSD::ProcessHits(), and BesMcTruthWriter::SaveEmcTruth().

◆ Find()

std::map< Identifier, G4double >::const_iterator BesEmcTruthHit::Find ( Identifier  id) const

Definition at line 187 of file BesEmcHit.cc.

188{
189 return m_hitMap.find(id);
190}

Referenced by BesEmcSD::ProcessHits().

◆ GetEDep()

G4double BesEmcTruthHit::GetEDep ( ) const
inline

Definition at line 142 of file BesEmcHit.hh.

142{ return m_edep; }

Referenced by BesEmcSD::ProcessHits(), and BesMcTruthWriter::SaveEmcTruth().

◆ GetEHit()

G4double BesEmcTruthHit::GetEHit ( Identifier  id)

Definition at line 192 of file BesEmcHit.cc.

193{
194 return m_hitMap[id];
195}

◆ GetG4TrackId()

G4int BesEmcTruthHit::GetG4TrackId ( ) const
inline

Definition at line 137 of file BesEmcHit.hh.

137{ return m_g4TrackId; }

◆ GetHitEmc()

G4int BesEmcTruthHit::GetHitEmc ( ) const
inline

Definition at line 138 of file BesEmcHit.hh.

138{ return m_hitEmc; }

Referenced by BesMcTruthWriter::SaveEmcTruth().

◆ GetIdentify()

Identifier BesEmcTruthHit::GetIdentify ( ) const
inline

Definition at line 135 of file BesEmcHit.hh.

135{ return m_identify; }

Referenced by BesMcTruthWriter::SaveEmcTruth().

◆ GetMomentum()

G4ThreeVector BesEmcTruthHit::GetMomentum ( ) const
inline

Definition at line 144 of file BesEmcHit.hh.

144{ return m_momentum; }

Referenced by BesMcTruthWriter::SaveEmcTruth().

◆ GetParticleName()

G4String BesEmcTruthHit::GetParticleName ( ) const
inline

Definition at line 141 of file BesEmcHit.hh.

141{return m_particleName;}

◆ GetPDGCharge()

G4double BesEmcTruthHit::GetPDGCharge ( ) const
inline

Definition at line 140 of file BesEmcHit.hh.

140{return m_PDGCharge;}

Referenced by BesMcTruthWriter::SaveEmcTruth().

◆ GetPDGCode()

G4int BesEmcTruthHit::GetPDGCode ( ) const
inline

Definition at line 139 of file BesEmcHit.hh.

139{return m_PDGCode;}

Referenced by BesMcTruthWriter::SaveEmcTruth().

◆ GetPosition()

G4ThreeVector BesEmcTruthHit::GetPosition ( ) const
inline

Definition at line 145 of file BesEmcHit.hh.

145{ return m_position; }

Referenced by BesMcTruthWriter::SaveEmcTruth().

◆ GetTime()

G4double BesEmcTruthHit::GetTime ( ) const
inline

Definition at line 143 of file BesEmcHit.hh.

143{ return m_time; }

Referenced by BesMcTruthWriter::SaveEmcTruth().

◆ GetTrackIndex()

G4int BesEmcTruthHit::GetTrackIndex ( ) const
inline

Definition at line 136 of file BesEmcHit.hh.

136{ return m_trackIndex; }

Referenced by BesEmcSD::ProcessHits(), and BesMcTruthWriter::SaveEmcTruth().

◆ Insert()

void BesEmcTruthHit::Insert ( Identifier  id,
G4double  energy 
)

Definition at line 202 of file BesEmcHit.cc.

203{
204 if(energy>0) m_hitMap[id]=energy;
205}

Referenced by operator=(), and BesEmcSD::ProcessHits().

◆ operator delete()

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

Definition at line 194 of file BesEmcHit.hh.

195{
196 BesEmcTruthHitAllocator.FreeSingle((BesEmcTruthHit*) aHit);
197}
G4Allocator< BesEmcTruthHit > BesEmcTruthHitAllocator
Definition: BesEmcHit.cc:17

◆ operator new()

void * BesEmcTruthHit::operator new ( size_t  )
inline

Definition at line 187 of file BesEmcHit.hh.

188{
189 void* aHit;
190 aHit = (void*) BesEmcTruthHitAllocator.MallocSingle();
191 return aHit;
192}

◆ operator=()

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

Definition at line 137 of file BesEmcHit.cc.

138{
139 m_hitMap.clear();
140 std::map<Identifier,G4double>::const_iterator iHitMap;
141 if(this!=&right) {
142 for(iHitMap=right.Begin();
143 iHitMap!=right.End();
144 iHitMap++) {
145 Insert(iHitMap->first,iHitMap->second);
146 }
147
148 m_identify = right.m_identify;
149 m_trackIndex = right.m_trackIndex;
150 m_g4TrackId = right.m_g4TrackId;
151 m_hitEmc = right.m_hitEmc;
152 m_PDGCode = right.m_PDGCode;
153 m_PDGCharge = right.m_PDGCharge;
154 m_particleName = right.m_particleName;
155 m_edep = right.m_edep;
156 m_time = right.m_time;
157 m_momentum = right.m_momentum;
158 m_position = right.m_position;
159 }
160
161 return *this;
162}
std::map< Identifier, G4double >::const_iterator End() const
Definition: BesEmcHit.cc:182
void Insert(Identifier, G4double)
Definition: BesEmcHit.cc:202
std::map< Identifier, G4double >::const_iterator Begin() const
Definition: BesEmcHit.cc:177

◆ operator==()

G4int BesEmcTruthHit::operator== ( const BesEmcTruthHit ) const

◆ Print()

void BesEmcTruthHit::Print ( )

Definition at line 164 of file BesEmcHit.cc.

165{
166 G4cout<<"Id: "<<m_identify<<"\tTrack Index: "<<m_trackIndex<<"\tG4 Track Id: "<<m_g4TrackId
167 <<"\tHit Emc: "<<m_hitEmc<<"\tTotal Energy: "<<m_edep
168 <<"\nPDGCode: "<<m_PDGCode<<"\tCharge: "<<m_PDGCharge<<"\tParticle Name: "<<m_particleName
169 <<"\nGloble Time: "<<m_time<<"\tMomentum: "<<m_momentum.mag()<<"\tPosition: "<<m_position<<G4endl;
170
171 std::map<Identifier,G4double>::iterator iHitMap;
172 for(iHitMap=m_hitMap.begin();iHitMap!=m_hitMap.end();iHitMap++) {
173 G4cout<<iHitMap->first<<"\t"<<iHitMap->second<<G4endl;
174 }
175}

◆ SetEDep()

void BesEmcTruthHit::SetEDep ( G4double  de)
inline

Definition at line 130 of file BesEmcHit.hh.

130{ m_edep=de; }

Referenced by BesEmcSD::ProcessHits().

◆ SetG4TrackId()

void BesEmcTruthHit::SetG4TrackId ( G4int  trackId)
inline

Definition at line 125 of file BesEmcHit.hh.

125{ m_g4TrackId=trackId; }

Referenced by BesEmcSD::ProcessHits().

◆ SetHitEmc()

void BesEmcTruthHit::SetHitEmc ( G4int  is)
inline

Definition at line 126 of file BesEmcHit.hh.

126{ m_hitEmc=is; }

Referenced by BesEmcSD::ProcessHits().

◆ SetIdentify()

void BesEmcTruthHit::SetIdentify ( Identifier  id)
inline

Definition at line 123 of file BesEmcHit.hh.

123{ m_identify=id; }

Referenced by BesEmcSD::ProcessHits().

◆ SetMomentum()

void BesEmcTruthHit::SetMomentum ( G4ThreeVector  p)
inline

Definition at line 132 of file BesEmcHit.hh.

132{ m_momentum=p; }

Referenced by BesEmcSD::ProcessHits().

◆ SetParticleName()

void BesEmcTruthHit::SetParticleName ( G4String  name)
inline

Definition at line 129 of file BesEmcHit.hh.

129{m_particleName=name;}

Referenced by BesEmcSD::ProcessHits().

◆ SetPDGCharge()

void BesEmcTruthHit::SetPDGCharge ( G4double  charge)
inline

Definition at line 128 of file BesEmcHit.hh.

128{m_PDGCharge = charge;}
float charge

Referenced by BesEmcSD::ProcessHits().

◆ SetPDGCode()

void BesEmcTruthHit::SetPDGCode ( G4int  code)
inline

Definition at line 127 of file BesEmcHit.hh.

127{m_PDGCode=code;}

Referenced by BesEmcSD::ProcessHits().

◆ SetPosition()

void BesEmcTruthHit::SetPosition ( G4ThreeVector  pos)
inline

Definition at line 133 of file BesEmcHit.hh.

133{ m_position=pos; }

Referenced by BesEmcSD::ProcessHits().

◆ SetTime()

void BesEmcTruthHit::SetTime ( G4double  time)
inline

Definition at line 131 of file BesEmcHit.hh.

131{ m_time=time; }
Double_t time

Referenced by BesEmcSD::ProcessHits().

◆ SetTrackIndex()

void BesEmcTruthHit::SetTrackIndex ( G4int  index)
inline

Definition at line 124 of file BesEmcHit.hh.

124{ m_trackIndex=index; }

Referenced by BesEmcSD::ProcessHits().

◆ Size()

G4int BesEmcTruthHit::Size ( ) const

Definition at line 207 of file BesEmcHit.cc.

208{
209 return m_hitMap.size();
210}

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