BesEmcTruthHit Class Reference

#include <BesEmcHit.hh>

List of all members.

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

Private Attributes

Identifier m_identify
G4int m_trackIndex
G4int m_g4TrackId
G4int m_hitEmc
G4int m_PDGCode
G4double m_PDGCharge
G4String m_particleName
G4double m_edep
G4double m_time
G4ThreeVector m_momentum
G4ThreeVector m_position
std::map< Identifier, G4double > m_hitMap


Detailed Description

Definition at line 105 of file BesEmcHit.hh.


Constructor & Destructor Documentation

BesEmcTruthHit::BesEmcTruthHit (  ) 

Definition at line 113 of file BesEmcHit.cc.

References m_edep, m_g4TrackId, m_hitEmc, m_hitMap, m_momentum, m_particleName, m_PDGCharge, m_PDGCode, m_position, m_time, and m_trackIndex.

00114 {
00115   m_trackIndex = -1;
00116   m_g4TrackId = -1;
00117   m_hitEmc = -1;
00118   m_PDGCode = 0;
00119   m_PDGCharge = 0;
00120   m_particleName = G4String();
00121   m_edep = 0;
00122   m_time = 0;
00123   m_momentum = G4ThreeVector(0,0,0);
00124   m_position = G4ThreeVector(0,0,0);
00125   m_hitMap.clear();
00126 }

BesEmcTruthHit::~BesEmcTruthHit (  )  [virtual]

Definition at line 128 of file BesEmcHit.cc.

00129 {}

BesEmcTruthHit::BesEmcTruthHit ( const BesEmcTruthHit  ) 

Definition at line 131 of file BesEmcHit.cc.

00132   : G4VHit()
00133 {
00134   *this = right;
00135 }


Member Function Documentation

void BesEmcTruthHit::AddEHit ( Identifier  ,
G4double   
)

Definition at line 197 of file BesEmcHit.cc.

References m_hitMap.

00198 {
00199   if(energy>0) m_hitMap[id]+=energy;
00200 }

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

Definition at line 177 of file BesEmcHit.cc.

References m_hitMap.

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

00178 {
00179   return m_hitMap.begin();
00180 }

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

Definition at line 182 of file BesEmcHit.cc.

References m_hitMap.

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

00183 {
00184   return m_hitMap.end();
00185 }

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

Definition at line 187 of file BesEmcHit.cc.

References m_hitMap.

00188 {
00189   return m_hitMap.find(id);
00190 }

G4double BesEmcTruthHit::GetEDep (  )  const [inline]

Definition at line 142 of file BesEmcHit.hh.

References m_edep.

Referenced by BesMcTruthWriter::SaveEmcTruth().

00142 { return m_edep; }

G4double BesEmcTruthHit::GetEHit ( Identifier   ) 

Definition at line 192 of file BesEmcHit.cc.

References m_hitMap.

00193 {
00194   return m_hitMap[id];
00195 }

G4int BesEmcTruthHit::GetG4TrackId (  )  const [inline]

Definition at line 137 of file BesEmcHit.hh.

References m_g4TrackId.

00137 { return m_g4TrackId; }

G4int BesEmcTruthHit::GetHitEmc (  )  const [inline]

Definition at line 138 of file BesEmcHit.hh.

References m_hitEmc.

Referenced by BesMcTruthWriter::SaveEmcTruth().

00138 { return m_hitEmc; }

Identifier BesEmcTruthHit::GetIdentify (  )  const [inline]

Definition at line 135 of file BesEmcHit.hh.

References m_identify.

Referenced by BesMcTruthWriter::SaveEmcTruth().

00135 { return m_identify; }

G4ThreeVector BesEmcTruthHit::GetMomentum (  )  const [inline]

Definition at line 144 of file BesEmcHit.hh.

References m_momentum.

Referenced by BesMcTruthWriter::SaveEmcTruth().

00144 { return m_momentum; }

G4String BesEmcTruthHit::GetParticleName (  )  const [inline]

Definition at line 141 of file BesEmcHit.hh.

References m_particleName.

00141 {return m_particleName;}

G4double BesEmcTruthHit::GetPDGCharge (  )  const [inline]

Definition at line 140 of file BesEmcHit.hh.

References m_PDGCharge.

Referenced by BesMcTruthWriter::SaveEmcTruth().

00140 {return m_PDGCharge;}

G4int BesEmcTruthHit::GetPDGCode (  )  const [inline]

Definition at line 139 of file BesEmcHit.hh.

References m_PDGCode.

Referenced by BesMcTruthWriter::SaveEmcTruth().

00139 {return m_PDGCode;}

G4ThreeVector BesEmcTruthHit::GetPosition (  )  const [inline]

Definition at line 145 of file BesEmcHit.hh.

References m_position.

Referenced by BesMcTruthWriter::SaveEmcTruth().

00145 { return m_position; }

G4double BesEmcTruthHit::GetTime (  )  const [inline]

Definition at line 143 of file BesEmcHit.hh.

References m_time.

Referenced by BesMcTruthWriter::SaveEmcTruth().

00143 { return m_time; }

G4int BesEmcTruthHit::GetTrackIndex (  )  const [inline]

Definition at line 136 of file BesEmcHit.hh.

References m_trackIndex.

Referenced by BesMcTruthWriter::SaveEmcTruth().

00136 { return m_trackIndex; }

void BesEmcTruthHit::Insert ( Identifier  ,
G4double   
)

Definition at line 202 of file BesEmcHit.cc.

References m_hitMap.

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

00203 {
00204   if(energy>0) m_hitMap[id]=energy;
00205 }

void BesEmcTruthHit::operator delete ( void *   )  [inline]

Definition at line 194 of file BesEmcHit.hh.

References BesEmcTruthHitAllocator.

00195 {
00196   BesEmcTruthHitAllocator.FreeSingle((BesEmcTruthHit*) aHit);
00197 }

void * BesEmcTruthHit::operator new ( size_t   )  [inline]

Definition at line 187 of file BesEmcHit.hh.

References BesEmcTruthHitAllocator.

00188 {
00189   void* aHit;
00190   aHit = (void*) BesEmcTruthHitAllocator.MallocSingle();
00191   return aHit;
00192 }

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

Definition at line 137 of file BesEmcHit.cc.

References Begin(), End(), Insert(), m_edep, m_g4TrackId, m_hitEmc, m_hitMap, m_identify, m_momentum, m_particleName, m_PDGCharge, m_PDGCode, m_position, m_time, and m_trackIndex.

00138 {
00139   m_hitMap.clear();
00140   std::map<Identifier,G4double>::const_iterator iHitMap;
00141   if(this!=&right) {
00142     for(iHitMap=right.Begin();
00143         iHitMap!=right.End();
00144         iHitMap++) {
00145       Insert(iHitMap->first,iHitMap->second);
00146     }
00147     
00148     m_identify = right.m_identify;
00149     m_trackIndex = right.m_trackIndex;
00150     m_g4TrackId = right.m_g4TrackId;
00151     m_hitEmc = right.m_hitEmc;
00152     m_PDGCode = right.m_PDGCode;
00153     m_PDGCharge = right.m_PDGCharge;
00154     m_particleName = right.m_particleName;
00155     m_edep = right.m_edep;
00156     m_time = right.m_time;
00157     m_momentum = right.m_momentum;
00158     m_position = right.m_position;
00159   }
00160   
00161   return *this;
00162 }

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

void BesEmcTruthHit::Print (  ) 

Definition at line 164 of file BesEmcHit.cc.

References m_edep, m_g4TrackId, m_hitEmc, m_hitMap, m_identify, m_momentum, m_particleName, m_PDGCharge, m_PDGCode, m_position, m_time, and m_trackIndex.

00165 {
00166   G4cout<<"Id: "<<m_identify<<"\tTrack Index: "<<m_trackIndex<<"\tG4 Track Id: "<<m_g4TrackId
00167     <<"\tHit Emc: "<<m_hitEmc<<"\tTotal Energy: "<<m_edep
00168     <<"\nPDGCode: "<<m_PDGCode<<"\tCharge: "<<m_PDGCharge<<"\tParticle Name: "<<m_particleName
00169     <<"\nGloble Time: "<<m_time<<"\tMomentum: "<<m_momentum.mag()<<"\tPosition: "<<m_position<<G4endl;
00170 
00171   std::map<Identifier,G4double>::iterator iHitMap;
00172   for(iHitMap=m_hitMap.begin();iHitMap!=m_hitMap.end();iHitMap++) {
00173     G4cout<<iHitMap->first<<"\t"<<iHitMap->second<<G4endl;
00174   }
00175 }

void BesEmcTruthHit::SetEDep ( G4double  de  )  [inline]

Definition at line 130 of file BesEmcHit.hh.

References m_edep.

Referenced by BesEmcSD::ProcessHits().

00130 { m_edep=de; }

void BesEmcTruthHit::SetG4TrackId ( G4int  trackId  )  [inline]

Definition at line 125 of file BesEmcHit.hh.

References m_g4TrackId.

Referenced by BesEmcSD::ProcessHits().

00125 { m_g4TrackId=trackId; }

void BesEmcTruthHit::SetHitEmc ( G4int  is  )  [inline]

Definition at line 126 of file BesEmcHit.hh.

References m_hitEmc.

Referenced by BesEmcSD::ProcessHits().

00126 { m_hitEmc=is; }

void BesEmcTruthHit::SetIdentify ( Identifier  id  )  [inline]

Definition at line 123 of file BesEmcHit.hh.

References m_identify.

Referenced by BesEmcSD::ProcessHits().

00123 { m_identify=id; }

void BesEmcTruthHit::SetMomentum ( G4ThreeVector  p  )  [inline]

Definition at line 132 of file BesEmcHit.hh.

References m_momentum.

Referenced by BesEmcSD::ProcessHits().

00132 { m_momentum=p; }

void BesEmcTruthHit::SetParticleName ( G4String  name  )  [inline]

Definition at line 129 of file BesEmcHit.hh.

References m_particleName.

Referenced by BesEmcSD::ProcessHits().

00129 {m_particleName=name;}

void BesEmcTruthHit::SetPDGCharge ( G4double  charge  )  [inline]

Definition at line 128 of file BesEmcHit.hh.

References m_PDGCharge.

Referenced by BesEmcSD::ProcessHits().

00128 {m_PDGCharge = charge;}

void BesEmcTruthHit::SetPDGCode ( G4int  code  )  [inline]

Definition at line 127 of file BesEmcHit.hh.

References m_PDGCode.

Referenced by BesEmcSD::ProcessHits().

00127 {m_PDGCode=code;}

void BesEmcTruthHit::SetPosition ( G4ThreeVector  pos  )  [inline]

Definition at line 133 of file BesEmcHit.hh.

References m_position.

Referenced by BesEmcSD::ProcessHits().

00133 { m_position=pos; }

void BesEmcTruthHit::SetTime ( G4double  time  )  [inline]

Definition at line 131 of file BesEmcHit.hh.

References m_time.

Referenced by BesEmcSD::ProcessHits().

00131 { m_time=time; }

void BesEmcTruthHit::SetTrackIndex ( G4int  index  )  [inline]

Definition at line 124 of file BesEmcHit.hh.

References m_trackIndex.

Referenced by BesEmcSD::ProcessHits().

00124 { m_trackIndex=index; }

G4int BesEmcTruthHit::Size (  )  const

Definition at line 207 of file BesEmcHit.cc.

References m_hitMap.

00208 {
00209   return m_hitMap.size();
00210 }


Member Data Documentation

G4double BesEmcTruthHit::m_edep [private]

Definition at line 173 of file BesEmcHit.hh.

Referenced by BesEmcTruthHit(), GetEDep(), operator=(), Print(), and SetEDep().

G4int BesEmcTruthHit::m_g4TrackId [private]

Definition at line 163 of file BesEmcHit.hh.

Referenced by BesEmcTruthHit(), GetG4TrackId(), operator=(), Print(), and SetG4TrackId().

G4int BesEmcTruthHit::m_hitEmc [private]

Definition at line 165 of file BesEmcHit.hh.

Referenced by BesEmcTruthHit(), GetHitEmc(), operator=(), Print(), and SetHitEmc().

std::map<Identifier,G4double> BesEmcTruthHit::m_hitMap [private]

Definition at line 177 of file BesEmcHit.hh.

Referenced by AddEHit(), Begin(), BesEmcTruthHit(), End(), Find(), GetEHit(), Insert(), operator=(), Print(), and Size().

Identifier BesEmcTruthHit::m_identify [private]

Definition at line 159 of file BesEmcHit.hh.

Referenced by GetIdentify(), operator=(), Print(), and SetIdentify().

G4ThreeVector BesEmcTruthHit::m_momentum [private]

Definition at line 175 of file BesEmcHit.hh.

Referenced by BesEmcTruthHit(), GetMomentum(), operator=(), Print(), and SetMomentum().

G4String BesEmcTruthHit::m_particleName [private]

Definition at line 171 of file BesEmcHit.hh.

Referenced by BesEmcTruthHit(), GetParticleName(), operator=(), Print(), and SetParticleName().

G4double BesEmcTruthHit::m_PDGCharge [private]

Definition at line 169 of file BesEmcHit.hh.

Referenced by BesEmcTruthHit(), GetPDGCharge(), operator=(), Print(), and SetPDGCharge().

G4int BesEmcTruthHit::m_PDGCode [private]

Definition at line 167 of file BesEmcHit.hh.

Referenced by BesEmcTruthHit(), GetPDGCode(), operator=(), Print(), and SetPDGCode().

G4ThreeVector BesEmcTruthHit::m_position [private]

Definition at line 176 of file BesEmcHit.hh.

Referenced by BesEmcTruthHit(), GetPosition(), operator=(), Print(), and SetPosition().

G4double BesEmcTruthHit::m_time [private]

Definition at line 174 of file BesEmcHit.hh.

Referenced by BesEmcTruthHit(), GetTime(), operator=(), Print(), and SetTime().

G4int BesEmcTruthHit::m_trackIndex [private]

Definition at line 161 of file BesEmcHit.hh.

Referenced by BesEmcTruthHit(), GetTrackIndex(), operator=(), Print(), and SetTrackIndex().


Generated on Tue Nov 29 23:17:30 2016 for BOSS_7.0.2 by  doxygen 1.4.7