EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
EIC Software
Deprecated List
Modules
Namespaces
Classes
Files
File List
acts
BeastMagneticField
delphes_EIC
Doxygen_Assist
east
eic-smear
EicRoot
blob
master
base
cbmbase
cbmdata
dbase
eic
ayk
base
cad
elmer
tetgen
wizard
EicCadFile.cxx
EicCadFile.h
EicCadFileConfig.cxx
EicCadFileConfig.h
eiccadLinkDef.h
EicCompositeShape.cxx
EicCompositeShape.h
EicStlFacet.cxx
EicStlFacet.h
EicStlFacetAssembly.h
EicStlFacetEdge.cxx
EicStlFacetEdge.h
EicStlFactory.cxx
EicStlFactory.h
EicStlKey.h
EicStlMediaGroup.cxx
EicStlMediaGroup.h
EicStlVertex.cxx
EicStlVertex.h
calorimetry
detectors
event
field
htc
htree
infrastructure
jana
proto
tracking
eventdisplay
examples
fairtools
field
gconfig
geane
genfit
GenfitTools
geobase
geometry
input
littrack
parbase
passive
pCDR-2018
pid
pnddata
PndTools
rich
trackbase
eicsmear-jetexample
eicsmeardetectors
EicToyModel
estarlight
Fun4All-lmon
fun4all_coresoftware
fun4all_eic_qa
fun4all_eic_tutorials
fun4all_eicdetectors
fun4all_eicmacros
fun4all_g4jleic
fun4all_GenFit
fun4all_macros
fun4all_tutorials
g4exampledetector
g4lblvtx
online_distribution
PEPSI
doxygen_mainpage.h
File Members
External Links
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
EicStlFacet.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file EicStlFacet.h
1
//
2
// AYK (ayk@bnl.gov), 2014/01/08; revamped in Oct'2017;
3
//
4
// EicRoot CAD manipulation routines; STL facet class;
5
//
6
7
#include <TVector3.h>
8
9
#include <
EicStlVertex.h
>
10
11
class
EicStlFacetEdge
;
12
class
EicStlAssembly
;
13
14
#ifndef _EIC_STL_FACET_
15
#define _EIC_STL_FACET_
16
24
class
EicStlFacet
{
25
public
:
31
EicStlFacet
(
EicStlVertex
*
const
v1
,
EicStlVertex
*
const
v2
,
EicStlVertex
*
const
v3
);
34
~EicStlFacet
() {
35
if
(
mVertices
) {
36
mVertices
->clear();
37
delete
mVertices
;
38
}
//if
39
40
if
(
mKey
)
delete
mKey
;
41
};
42
45
const
EicStlKey
*
key
()
const
{
return
mKey
;};
46
49
//void Print() const { vertices[0]->Print(); vertices[1]->Print(); vertices[2]->Print(); };
50
51
// Basic calculations of the facet (normal, etc);
52
int
Calculate
();
53
54
void
SetCounter
(
unsigned
counter) {
mCounter
= counter; };
55
void
DecrementCounter
(
void
) {
mCounter
--; };
56
void
IncrementCounter
(
void
) {
mCounter
++; };
57
unsigned
GetCounter
(
void
)
const
{
return
mCounter
; };
58
59
const
vEntry
*
vertices
(
void
)
const
{
return
mVertices
; };
60
const
TVector3 &
GetNormal
(
void
)
const
{
return
mNormal
; };
61
62
void
SetEdge
(
unsigned
iq,
EicStlFacetEdge
*
edge
) {
63
if
(iq <= 2)
mEdges
[iq] =
edge
;
64
};
65
const
EicStlFacetEdge
*
edge
(
unsigned
iq)
const
{
return
(iq <= 2 ?
mEdges
[iq] : NULL); };
66
67
//private:
68
// Intermediate vector of vertices; since vertices can be merged later, ordering is
69
// not known at a time of the STL file import;
70
std::vector<EicStlVertex*>
mVbuffer
;
71
73
EicStlKey
*
mKey
;
75
TVector3
mNormal
;
76
77
// Vertex pointers; they are ordered in vertex mKey keys;
78
vEntry
*
mVertices
;
79
80
// Edge pointers; since they are v1->v2, v2->v3 & v3->v1 in 1-2-3 order as in the
81
// "mVertices" map (see above), first two edges are always oriented "in sync" with the
82
// facet normal while the third one is "out of sync", because condition
83
// "mKey(v3)>mKey(v1)" is always "true";
84
EicStlFacetEdge
*
mEdges
[3];
85
86
// There can be more than one identical facet; as long as this running counter
87
// is greater than 1, assembly builder can attach it to the current assembly;
88
unsigned
mCounter
;
89
};
90
91
#endif
EicRoot
blob
master
eic
cad
EicStlFacet.h
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:34
using
1.8.2 with
EIC GitHub integration