Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

LCDG4LumHit Class Reference

#include <LCDG4LumHit.hh>

Inheritance diagram for LCDG4LumHit:

Inheritance graph
[legend]
Collaboration diagram for LCDG4LumHit:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LCDG4LumHit ()
 ~LCDG4LumHit ()
 LCDG4LumHit (const LCDG4LumHit &right)
const LCDG4LumHitoperator= (const LCDG4LumHit &right)
bool operator== (const LCDG4LumHit &right) const
void * operator new (size_t)
void operator delete (void *aHit)
void Draw ()
void Print ()
void SetLayer (const G4int layer)
G4int GetLayer ()
void SetSystem (const G4int sysNo)
G4int GetSystem ()
void SetBarEnd (const G4int barend)
G4int GetBarEnd ()
void SetPhi (const G4int phi)
G4int GetPhi ()
void SetTheta (const G4int theta)
G4int GetTheta ()
void SetEdep (const G4double de)
G4double GetEdep ()
void SetEdepAbs (const G4double de)
G4double GetEdepAbs ()
void SetPos (const G4ThreeVector &xyz)
G4ThreeVector GetPos ()
G4int GetNMC ()
G4int GetTrkID (G4int idx)
G4double GetEMC (G4int idx)
G4int AddLayerLog (G4LogicalVolume *g4vxdlog, G4int startlayerNo)
G4int AddMcPart (G4int mcidx, G4double emc)
void AddMcPartAbs (G4double emc)

Private Attributes

G4int m_layer
G4int m_sysNo
G4int m_barend
G4int m_phi
G4int m_theta
G4float m_edep
G4float m_edepabs
G4ThreeVector m_pos
G4int m_nmc
std::vector< G4int > * m_trkid
std::vector< G4double > * m_emc

Constructor & Destructor Documentation

LCDG4LumHit::LCDG4LumHit  ) 
 

Definition at line 15 of file LCDG4LumHit.cc.

References m_edep, m_edepabs, m_emc, m_nmc, and m_trkid.

00015                          : G4VHit() {
00016   m_nmc=0;
00017   m_edep=0;
00018   m_edepabs=0;
00019   m_trkid=new std::vector<G4int>;
00020   m_trkid->clear();
00021   m_emc =new std::vector<G4double>;
00022   m_emc->clear();
00023 }

LCDG4LumHit::~LCDG4LumHit  ) 
 

Definition at line 28 of file LCDG4LumHit.cc.

References m_emc, and m_trkid.

00028                          {
00029   if (m_trkid) {
00030     m_trkid->clear();
00031     delete m_trkid;
00032     m_trkid=0;
00033   }
00034 
00035   if (m_emc) {
00036     m_emc->clear();
00037     delete m_emc;
00038     m_emc=0;
00039   }
00040 }

LCDG4LumHit::LCDG4LumHit const LCDG4LumHit right  ) 
 

Definition at line 45 of file LCDG4LumHit.cc.

References m_barend, m_edep, m_edepabs, m_emc, m_layer, m_nmc, m_phi, m_pos, m_sysNo, m_theta, and m_trkid.

00045                                                  : G4VHit() {
00046   m_layer  = right.m_layer;
00047   m_sysNo  = right.m_sysNo;
00048   m_barend = right.m_barend;
00049   m_edep   = right.m_edep;
00050   m_edepabs= right.m_edepabs;
00051   m_theta  = right.m_theta;
00052   m_phi    = right.m_phi;
00053   m_pos    = right.m_pos;
00054 
00055   m_trkid=new std::vector<G4int>;
00056   m_emc =new std::vector<G4double>;
00057   m_trkid->clear();
00058   m_emc->clear();
00059   int imc=0;
00060   m_nmc=right.m_nmc;
00061   for(imc=0 ; imc < right.m_nmc ; imc++) {
00062     m_trkid->push_back((*right.m_trkid)[imc]);
00063     m_emc->push_back((*right.m_emc)[imc]);
00064   }
00065 }


Member Function Documentation

G4int LCDG4LumHit::AddLayerLog G4LogicalVolume *  g4vxdlog,
G4int  startlayerNo
 

G4int LCDG4LumHit::AddMcPart G4int  mcidx,
G4double  emc
 

Definition at line 95 of file LCDG4LumHit.cc.

References m_edep, m_emc, m_nmc, and m_trkid.

00095                                                       {
00096   int flg_same=0;
00097   int imc=0;
00098   for (imc=0 ; imc < m_nmc ; imc++) {
00099     if ((*m_trkid)[imc] == mcidx) {
00100       flg_same=imc+1;
00101       break;
00102     }
00103   }
00104 
00105   m_edep+=emc;
00106   if (flg_same) {
00107     (*m_emc)[flg_same-1] += emc;
00108   } else {
00109     m_nmc++;
00110     m_trkid->push_back(mcidx);
00111     m_emc ->push_back(emc);
00112   }
00113 
00114   return m_nmc;
00115 }

void LCDG4LumHit::AddMcPartAbs G4double  emc  )  [inline]
 

Definition at line 56 of file LCDG4LumHit.hh.

References m_edepabs.

00056 { m_edepabs += emc; } // Absorber

void LCDG4LumHit::Draw  ) 
 

Definition at line 139 of file LCDG4LumHit.cc.

References m_pos.

00139                        {
00140   G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance();
00141   if(pVVisManager) {
00142     G4Circle circle(m_pos);
00143     circle.SetScreenSize(1.0);
00144     //circle.SetScreenSize(0.04);
00145     circle.SetFillStyle(G4Circle::filled);
00146     G4Colour colour(1.0,0.0,1.0); // Magenta
00147     G4VisAttributes attribs(colour);
00148     circle.SetVisAttributes(attribs);
00149     pVVisManager->Draw(circle);
00150   }
00151 }

G4int LCDG4LumHit::GetBarEnd  )  [inline]
 

Definition at line 36 of file LCDG4LumHit.hh.

References m_barend.

00036 { return m_barend; }

G4double LCDG4LumHit::GetEdep  )  [inline]
 

Definition at line 42 of file LCDG4LumHit.hh.

References m_edep.

00042 { return m_edep; }

G4double LCDG4LumHit::GetEdepAbs  )  [inline]
 

Definition at line 44 of file LCDG4LumHit.hh.

References m_edepabs.

00044 { return m_edepabs; }

G4double LCDG4LumHit::GetEMC G4int  idx  )  [inline]
 

Definition at line 51 of file LCDG4LumHit.hh.

00051 {return (*m_emc)[idx];}

G4int LCDG4LumHit::GetLayer  )  [inline]
 

Definition at line 32 of file LCDG4LumHit.hh.

References m_layer.

00032 { return m_layer; }

G4int LCDG4LumHit::GetNMC  )  [inline]
 

Definition at line 49 of file LCDG4LumHit.hh.

References m_nmc.

00049 {return m_nmc;}

G4int LCDG4LumHit::GetPhi  )  [inline]
 

Definition at line 38 of file LCDG4LumHit.hh.

References m_phi.

00038 { return m_phi; }

G4ThreeVector LCDG4LumHit::GetPos  )  [inline]
 

Definition at line 47 of file LCDG4LumHit.hh.

References m_pos.

00047 { return m_pos; }

G4int LCDG4LumHit::GetSystem  )  [inline]
 

Definition at line 34 of file LCDG4LumHit.hh.

References m_sysNo.

00034 { return m_sysNo; }

G4int LCDG4LumHit::GetTheta  )  [inline]
 

Definition at line 40 of file LCDG4LumHit.hh.

References m_theta.

00040 { return m_theta; }

G4int LCDG4LumHit::GetTrkID G4int  idx  )  [inline]
 

Definition at line 50 of file LCDG4LumHit.hh.

00050 {return (*m_trkid)[idx];}

void LCDG4LumHit::operator delete void *  aHit  )  [inline]
 

Definition at line 84 of file LCDG4LumHit.hh.

References LCDG4LumHitAllocator.

00084                                                    {
00085   LCDG4LumHitAllocator.FreeSingle((LCDG4LumHit*) aHit);
00086 }

void * LCDG4LumHit::operator new size_t   )  [inline]
 

Definition at line 78 of file LCDG4LumHit.hh.

References LCDG4LumHitAllocator.

00078                                              {
00079   void *aHit;
00080   aHit = (void *) LCDG4LumHitAllocator.MallocSingle();
00081   return aHit;
00082 }

const LCDG4LumHit & LCDG4LumHit::operator= const LCDG4LumHit right  ) 
 

Definition at line 70 of file LCDG4LumHit.cc.

References m_barend, m_edep, m_edepabs, m_emc, m_layer, m_nmc, m_phi, m_pos, m_sysNo, m_theta, and m_trkid.

00070                                                                   {
00071   m_layer  = right.m_layer;
00072   m_sysNo  = right.m_sysNo;
00073   m_barend = right.m_barend;
00074   m_edep   = right.m_edep;
00075   m_edepabs= right.m_edepabs;
00076   m_theta  = right.m_theta;
00077   m_phi    = right.m_phi;
00078   m_pos    = right.m_pos;
00079 
00080   int imc=0;
00081   m_trkid->clear();
00082   m_emc->clear();
00083   m_nmc=right.m_nmc;
00084   for(imc=0 ; imc < right.m_nmc ; imc++) {
00085     m_trkid->push_back((*right.m_trkid)[imc]);
00086     m_emc->push_back((*right.m_emc)[imc]);
00087   }
00088   return *this;
00089 }

bool LCDG4LumHit::operator== const LCDG4LumHit right  )  const
 

Definition at line 120 of file LCDG4LumHit.cc.

References m_barend, m_layer, m_phi, m_sysNo, and m_theta.

00120                                                            {
00121   if(m_layer!=right.m_layer) return false;
00122   if(m_sysNo!=right.m_sysNo) return false;
00123   if(m_barend!=m_barend) return false;
00124   if(m_phi!=m_phi) return false;
00125   if(m_theta!=m_theta) return false;
00126 //    if(m_edep!=m_edep) return false;
00127 //    if(m_edepabs!=m_edepabs) return false;
00128 
00129 //    G4int    m_nmc;
00130 //    std::vector<G4int>    *m_trkid;
00131 //    std::vector<G4double> *m_emc;
00132   return true;
00133 }

void LCDG4LumHit::Print  ) 
 

Definition at line 156 of file LCDG4LumHit.cc.

References m_barend, m_edep, m_layer, m_phi, m_sysNo, and m_theta.

00156                         {
00157   G4cout << "Layer:" << m_layer << G4endl;
00158   G4cout << "Sysno:" << m_sysNo << G4endl;
00159   G4cout << "Bar/End:" << m_barend << G4endl;
00160   G4cout << "Phi:" << m_phi << G4endl;
00161   G4cout << "Theta:" << m_theta << G4endl;
00162   G4cout << "Edep:" << m_edep << G4endl;
00163 }

void LCDG4LumHit::SetBarEnd const G4int  barend  )  [inline]
 

Definition at line 35 of file LCDG4LumHit.hh.

References m_barend.

00035 { m_barend = barend; }

void LCDG4LumHit::SetEdep const G4double  de  )  [inline]
 

Definition at line 41 of file LCDG4LumHit.hh.

References m_edep.

00041 { m_edep = de; }

void LCDG4LumHit::SetEdepAbs const G4double  de  )  [inline]
 

Definition at line 43 of file LCDG4LumHit.hh.

References m_edepabs.

00043 { m_edepabs = de; }

void LCDG4LumHit::SetLayer const G4int  layer  )  [inline]
 

Definition at line 31 of file LCDG4LumHit.hh.

References m_layer.

00031 { m_layer = layer; }

void LCDG4LumHit::SetPhi const G4int  phi  )  [inline]
 

Definition at line 37 of file LCDG4LumHit.hh.

References m_phi.

00037 { m_phi = phi; }

void LCDG4LumHit::SetPos const G4ThreeVector &  xyz  )  [inline]
 

Definition at line 46 of file LCDG4LumHit.hh.

References m_pos.

00046 { m_pos = xyz; }

void LCDG4LumHit::SetSystem const G4int  sysNo  )  [inline]
 

Definition at line 33 of file LCDG4LumHit.hh.

References m_sysNo.

00033 { m_sysNo = sysNo; }

void LCDG4LumHit::SetTheta const G4int  theta  )  [inline]
 

Definition at line 39 of file LCDG4LumHit.hh.

References m_theta.

00039 { m_theta = theta; }


Member Data Documentation

G4int LCDG4LumHit::m_barend [private]
 

Definition at line 61 of file LCDG4LumHit.hh.

Referenced by GetBarEnd(), LCDG4LumHit(), operator=(), operator==(), Print(), and SetBarEnd().

G4float LCDG4LumHit::m_edep [private]
 

Definition at line 65 of file LCDG4LumHit.hh.

Referenced by AddMcPart(), GetEdep(), LCDG4LumHit(), operator=(), Print(), and SetEdep().

G4float LCDG4LumHit::m_edepabs [private]
 

Definition at line 66 of file LCDG4LumHit.hh.

Referenced by AddMcPartAbs(), GetEdepAbs(), LCDG4LumHit(), operator=(), and SetEdepAbs().

std::vector<G4double>* LCDG4LumHit::m_emc [private]
 

Definition at line 71 of file LCDG4LumHit.hh.

Referenced by AddMcPart(), LCDG4LumHit(), operator=(), and ~LCDG4LumHit().

G4int LCDG4LumHit::m_layer [private]
 

Definition at line 59 of file LCDG4LumHit.hh.

Referenced by GetLayer(), LCDG4LumHit(), operator=(), operator==(), Print(), and SetLayer().

G4int LCDG4LumHit::m_nmc [private]
 

Definition at line 69 of file LCDG4LumHit.hh.

Referenced by AddMcPart(), GetNMC(), LCDG4LumHit(), and operator=().

G4int LCDG4LumHit::m_phi [private]
 

Definition at line 62 of file LCDG4LumHit.hh.

Referenced by GetPhi(), LCDG4LumHit(), operator=(), operator==(), Print(), and SetPhi().

G4ThreeVector LCDG4LumHit::m_pos [private]
 

Definition at line 67 of file LCDG4LumHit.hh.

Referenced by Draw(), GetPos(), LCDG4LumHit(), operator=(), and SetPos().

G4int LCDG4LumHit::m_sysNo [private]
 

Definition at line 60 of file LCDG4LumHit.hh.

Referenced by GetSystem(), LCDG4LumHit(), operator=(), operator==(), Print(), and SetSystem().

G4int LCDG4LumHit::m_theta [private]
 

Definition at line 63 of file LCDG4LumHit.hh.

Referenced by GetTheta(), LCDG4LumHit(), operator=(), operator==(), Print(), and SetTheta().

std::vector<G4int>* LCDG4LumHit::m_trkid [private]
 

Definition at line 70 of file LCDG4LumHit.hh.

Referenced by AddMcPart(), LCDG4LumHit(), operator=(), and ~LCDG4LumHit().


The documentation for this class was generated from the following files:
Generated on Thu Oct 7 18:45:05 2004 for LCDG4 by doxygen 1.3.4