Garfield++ v1r0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
manip_absvol_treeid Class Reference

#include <volume.h>

Public Member Functions

 manip_absvol_treeid (void)
 
const manip_absvol_eidG_laeid () const
 
manip_absvolG_lamvol () const
 
absvolG_lavol () const
 
void down_absref (absref *f)
 
void up_absref (absref *f)
 
int check_manip_absvol_registered (manip_absvol *amvol)
 
int check_absvol_registered (absvol *avol)
 
void print (std::ostream &file, int l) const
 

Public Attributes

int qeid
 
manip_absvol_eid eid [pqamvol]
 

Friends

int operator== (manip_absvol_treeid &tid1, manip_absvol_treeid &tid2)
 
int operator!= (manip_absvol_treeid &tid1, manip_absvol_treeid &tid2)
 

Detailed Description

Definition at line 45 of file volume.h.

Constructor & Destructor Documentation

◆ manip_absvol_treeid()

manip_absvol_treeid::manip_absvol_treeid ( void  )
inline

Definition at line 48 of file volume.h.

48: qeid(0) { ; }

Member Function Documentation

◆ check_absvol_registered()

int manip_absvol_treeid::check_absvol_registered ( absvol avol)

Definition at line 49 of file volume.cpp.

49 {
50 for (int n = 0; n < qeid; ++n) {
51 if (eid[n].amvol->Gavol() == avol) return 1;
52 }
53 return 0;
54}
manip_absvol_eid eid[pqamvol]
Definition: volume.h:52

◆ check_manip_absvol_registered()

int manip_absvol_treeid::check_manip_absvol_registered ( manip_absvol amvol)

Definition at line 42 of file volume.cpp.

42 {
43 for (int n = 0; n < qeid; ++n) {
44 if (eid[n].amvol.get() == amvol) return 1;
45 }
46 return 0;
47}

◆ down_absref()

void manip_absvol_treeid::down_absref ( absref f)

Definition at line 32 of file volume.cpp.

32 {
33 for (int n = qeid - 1; n >= 1; n--)
34 eid[n].amvol->down_absref(f);
35}

Referenced by stvpoint::stvpoint().

◆ G_laeid()

const manip_absvol_eid * manip_absvol_treeid::G_laeid ( ) const
inline

Definition at line 54 of file volume.h.

54 {
55 return qeid > 0 ? &eid[qeid - 1] : 0;
56 }

Referenced by gparticle::calc_step_to_bord(), and stvpoint::G_laeid().

◆ G_lamvol()

manip_absvol * manip_absvol_treeid::G_lamvol ( ) const
inline

Definition at line 58 of file volume.h.

58 {
59 return qeid > 0 ? eid[qeid - 1].amvol.get() : 0;
60 }
PassivePtr< manip_absvol > amvol
Definition: volume.h:39

Referenced by stvpoint::G_lamvol().

◆ G_lavol()

absvol * manip_absvol_treeid::G_lavol ( ) const

Definition at line 28 of file volume.cpp.

28 {
29 return qeid > 0 ? eid[qeid - 1].amvol->Gavol() : 0;
30}

Referenced by gparticle::calc_step_to_bord(), gparticle::change_vol(), stvpoint::G_lavol(), Heed::HeedCluster::print(), and gparticle::switch_new_vol().

◆ print()

void manip_absvol_treeid::print ( std::ostream &  file,
int  l 
) const

Definition at line 70 of file volume.cpp.

70 {
71 if (l >= 0) {
72 if (qeid <= 0) {
73 Ifile << "no volume defined, qeid=" << qeid << '\n';
74 } else {
75 if (l > 0) {
76 for (int n = 0; n < qeid - 1; ++n) {
77 Ifile << "n=" << n;
78 eid[n].print(file, 0);
79 }
80 }
81 Ifile << "n=" << qeid - 1;
82 eid[qeid - 1].print(file, 0);
83 }
84 file.flush();
85 }
86}
void print(std::ostream &file, int l) const
Definition: volume.cpp:20
#define Ifile
Definition: prstream.h:207

Referenced by stvpoint::print().

◆ up_absref()

Friends And Related Function Documentation

◆ operator!=

int operator!= ( manip_absvol_treeid tid1,
manip_absvol_treeid tid2 
)
friend

Definition at line 80 of file volume.h.

80 {
81 if (tid1 == tid2) return 0;
82 return 1;
83}

◆ operator==

int operator== ( manip_absvol_treeid tid1,
manip_absvol_treeid tid2 
)
friend

Definition at line 56 of file volume.cpp.

56 {
57 // checks total route
58 // first to make fast rejection
59 if (tid1.qeid != tid2.qeid) return 0;
60 if (tid1.G_laeid()->nembed != tid2.G_laeid()->nembed) return 0;
61 if (tid1.G_lamvol() != tid2.G_lamvol()) return 0;
62 // more thoroughly
63 for (int n = 0; n < tid1.qeid - 1; ++n) {
64 // the last is checked
65 if (tid1.eid[n].amvol.get() != tid2.eid[n].amvol.get()) return 0;
66 }
67 return 1;
68}
const manip_absvol_eid * G_laeid() const
Definition: volume.h:54
manip_absvol * G_lamvol() const
Definition: volume.h:58

Member Data Documentation

◆ eid

◆ qeid


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