EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
EtmDetector Class Reference

#include <EicToyModel/blob/master/include/EtmDetector.h>

+ Inheritance diagram for EtmDetector:
+ Collaboration diagram for EtmDetector:

Public Member Functions

 EtmDetector (const EtmDetectorStack *stack=0, const char *label=0, int fillcolor=0, int linecolor=0, double length=0.0)
 
 ~EtmDetector ()
 
EtmDetectortrim (double etamin, double etamax, bool preserve_modified=false)
 
EtmDetectortrim (double value)
 
EtmDetectorbrick (void)
 
EtmDetectordashed (void)
 
EtmDetectordotted (void)
 
EtmDetectortext (int value)
 
EtmPolygonGroupinsert (const char *tag, int linecolor=kBlack)
 
double length (void) const
 
void length (double value)
 
EtmDetectorstretch (EtmDetector *refdet, double toffset, etm::Stretch how=etm::kRecess)
 
EtmDetectorstretch (EtmDetector *refdet, etm::Stretch how=etm::kRecess)
 
EtmDetectorstretch (double tlength, etm::Stretch how=etm::kRecess)
 
EtmDetectorstretch (EtmDetectorStack *refstack, double tlength, etm::Stretch how=etm::kRecess)
 
EtmDetectorhighlight (double alpha=1.0)
 
double GetActualDistance (void) const
 
bool IsDummy (void) const
 
G4VPhysicalVolume * PlaceG4Volume (G4LogicalVolume *world, const char *name=0)
 
G4VPhysicalVolume * PlaceG4Volume (G4VPhysicalVolume *world, const char *name=0)
 
G4VPhysicalVolume * GetG4Volume (void)
 
void Export (const char *fname)
 
bool IsHighlighted (void) const
 
double GetColorAlpha (void) const
 
- Public Member Functions inherited from EtmPolygonGroup
 EtmPolygonGroup (int fillcolor=0, int linecolor=1)
 
 ~EtmPolygonGroup ()
 
void AddPolygon (const std::vector< TVector2 > &polygon)
 
void AddPolygon (unsigned dim, const double xx[], const double yy[])
 
void AddRectangle (double x0, double y0, double xsize, double ysize, unsigned xsplit=1, unsigned ysplit=1)
 
void AddRectangle (const TVector2 &bl, const TVector2 &tr, unsigned xsplit=1, unsigned ysplit=1)
 
int GetFillColor (void) const
 
int GetLineColor (void) const
 
etm::LineStyle GetLineStyle (void) const
 
void SetLineColor (int color)
 
void SetLineWidth (int width)
 
void SetLineStyle (etm::LineStyle style)
 
void SetTextColor (int color)
 
const std::vector< std::vector
< TVector2 > > & 
Polygons (void) const
 
void DrawPolygon (unsigned dim, const double xx[], const double yy[], bool line=true) const
 
void DrawPolygon (const std::vector< TVector2 > &polygon, bool line=true, const TVector2 *shift=0, unsigned tb=0) const
 
void DrawMe (const TVector2 *shift=0, unsigned tb=0) const
 
void ClearPolygons (void)
 
unsigned PolygonCount (void) const
 

Private Member Functions

TString * GetLabel (void) const
 
void RegisterFillColor (std::map< TString, int > &legend)
 
void Build (void)
 
std::vector< std::pair< const
TColor *, const TopoDS_Shape * > > 
BuildCADmodel (void)
 
unsigned GetOrder (void) const
 
void ClearPolygonBuffer (void)
 

Private Attributes

const EtmDetectorStackmStack
 
TString * mLabel
 
std::vector< EtmPolygonGroup * > mGraphicsElements
 
double mLength
 
double mOffset
 
double mActualDistance
 
double mEdgeTrimming [2]
 
G4VPhysicalVolume * mG4PhysicalVolume
 
double mColorAlpha
 

Friends

class EicToyModel
 
class EtmDetectorStack
 

Additional Inherited Members

- Protected Attributes inherited from EtmPolygonGroup
int mFillColor
 
int mLineColor
 
int mLineWidth
 
int mTextColor
 
etm::LineStyle mLineStyle
 
std::vector< std::vector
< TVector2 > > 
mPolygons
 

Detailed Description

Definition at line 22 of file EtmDetector.h.

View newest version in sPHENIX GitHub at line 22 of file EtmDetector.h

Constructor & Destructor Documentation

EtmDetector::EtmDetector ( const EtmDetectorStack stack = 0,
const char *  label = 0,
int  fillcolor = 0,
int  linecolor = 0,
double  length = 0.0 
)

Definition at line 61 of file EtmDetector.cc.

View newest version in sPHENIX GitHub at line 61 of file EtmDetector.cc

References _DEFAULT_TRIM_VALUE_, mLabel, and trim().

+ Here is the call graph for this function:

EtmDetector::~EtmDetector ( )
inline

Definition at line 30 of file EtmDetector.h.

View newest version in sPHENIX GitHub at line 30 of file EtmDetector.h

Member Function Documentation

EtmDetector* EtmDetector::brick ( void  )
inline

Definition at line 42 of file EtmDetector.h.

View newest version in sPHENIX GitHub at line 42 of file EtmDetector.h

References trim().

+ Here is the call graph for this function:

void EtmDetector::Build ( void  )
private

Definition at line 197 of file EtmDetector.cc.

View newest version in sPHENIX GitHub at line 197 of file EtmDetector.cc

References _GAP_COLOR_, _MARKER_, EtmPolygonGroup::AddPolygon(), EtmDetectorStack::AlignmentAxis(), ClearPolygonBuffer(), EtmLine2D::Cross(), d, EtmLine2D::Distance(), eic, EtmDetectorStack::EtaBoundary(), EtmPolygonGroup::GetFillColor(), EicToyModel::GetIntersection(), GetLabel(), EicToyModel::Instance(), ip(), length(), M_PI, mActualDistance, mEdgeTrimming, mStack, EtmLine2D::N(), sign(), trim(), vtx(), and EtmLine2D::X().

+ Here is the call graph for this function:

std::vector< std::pair< const TColor *, const TopoDS_Shape * > > EtmDetector::BuildCADmodel ( void  )
private

Definition at line 493 of file EtmDetector.cc.

View newest version in sPHENIX GitHub at line 493 of file EtmDetector.cc

References cos(), Acts::Test::dim, eic, EtmPolygonGroup::GetFillColor(), EicToyModel::Instance(), M_PI, and EtmPolygonGroup::Polygons().

Referenced by Export().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void EtmDetector::ClearPolygonBuffer ( void  )
private

Definition at line 91 of file EtmDetector.cc.

View newest version in sPHENIX GitHub at line 91 of file EtmDetector.cc

References EtmPolygonGroup::ClearPolygons().

Referenced by Build().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

EtmDetector* EtmDetector::dashed ( void  )
inline

Definition at line 45 of file EtmDetector.h.

View newest version in sPHENIX GitHub at line 45 of file EtmDetector.h

References etm::dashed, and EtmPolygonGroup::SetLineStyle().

+ Here is the call graph for this function:

EtmDetector* EtmDetector::dotted ( void  )
inline

Definition at line 46 of file EtmDetector.h.

View newest version in sPHENIX GitHub at line 46 of file EtmDetector.h

References etm::dotted, and EtmPolygonGroup::SetLineStyle().

+ Here is the call graph for this function:

void EtmDetector::Export ( const char *  fname)

Definition at line 591 of file EtmDetector.cc.

View newest version in sPHENIX GitHub at line 591 of file EtmDetector.cc

References BuildCADmodel(), EicToyModel::ExportCADmodelCore(), and EicToyModel::Instance().

+ Here is the call graph for this function:

double EtmDetector::GetActualDistance ( void  ) const
inline

Definition at line 71 of file EtmDetector.h.

View newest version in sPHENIX GitHub at line 71 of file EtmDetector.h

References mActualDistance.

double EtmDetector::GetColorAlpha ( void  ) const
virtual

Reimplemented from EtmPolygonGroup.

Definition at line 80 of file EtmDetector.cc.

View newest version in sPHENIX GitHub at line 80 of file EtmDetector.cc

References eic, EicToyModel::Instance(), and mColorAlpha.

+ Here is the call graph for this function:

G4VPhysicalVolume * EtmDetector::GetG4Volume ( void  )

Definition at line 473 of file EtmDetector.cc.

View newest version in sPHENIX GitHub at line 473 of file EtmDetector.cc

References eic, EicToyModel::Instance(), mG4PhysicalVolume, PlaceG4Volume(), printf(), and Acts::Test::world.

+ Here is the call graph for this function:

TString* EtmDetector::GetLabel ( void  ) const
inlineprivate

Definition at line 85 of file EtmDetector.h.

View newest version in sPHENIX GitHub at line 85 of file EtmDetector.h

References mLabel.

Referenced by Build(), GetOrder(), PlaceG4Volume(), and RegisterFillColor().

+ Here is the caller graph for this function:

unsigned EtmDetector::GetOrder ( void  ) const
private

Definition at line 341 of file EtmDetector.cc.

View newest version in sPHENIX GitHub at line 341 of file EtmDetector.cc

References EtmDetectorStack::DetectorCount(), EtmDetectorStack::GetDetector(), GetLabel(), and mStack.

Referenced by PlaceG4Volume().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

EtmDetector* EtmDetector::highlight ( double  alpha = 1.0)
inline

Definition at line 68 of file EtmDetector.h.

View newest version in sPHENIX GitHub at line 68 of file EtmDetector.h

References starlightConstants::alpha, and mColorAlpha.

EtmPolygonGroup * EtmDetector::insert ( const char *  tag,
int  linecolor = kBlack 
)

Definition at line 104 of file EtmDetector.cc.

View newest version in sPHENIX GitHub at line 104 of file EtmDetector.cc

References eic, EtmPolygonGroup::EtmPolygonGroup(), EicToyModel::Instance(), mGraphicsElements, and printf().

+ Here is the call graph for this function:

bool EtmDetector::IsDummy ( void  ) const
inline

Definition at line 72 of file EtmDetector.h.

View newest version in sPHENIX GitHub at line 72 of file EtmDetector.h

References mLabel.

bool EtmDetector::IsHighlighted ( void  ) const
virtual

Reimplemented from EtmPolygonGroup.

Definition at line 72 of file EtmDetector.cc.

View newest version in sPHENIX GitHub at line 72 of file EtmDetector.cc

References eic, EicToyModel::Instance(), and mColorAlpha.

+ Here is the call graph for this function:

double EtmDetector::length ( void  ) const
inline

Definition at line 55 of file EtmDetector.h.

View newest version in sPHENIX GitHub at line 55 of file EtmDetector.h

References mLength.

Referenced by Build().

+ Here is the caller graph for this function:

void EtmDetector::length ( double  value)
inline

Definition at line 56 of file EtmDetector.h.

View newest version in sPHENIX GitHub at line 56 of file EtmDetector.h

References mLength, and value.

G4VPhysicalVolume * EtmDetector::PlaceG4Volume ( G4LogicalVolume *  world,
const char *  name = 0 
)

Definition at line 362 of file EtmDetector.cc.

View newest version in sPHENIX GitHub at line 362 of file EtmDetector.cc

References EtmDetectorStack::AlignmentAxis(), etm::cm, Acts::UnitConstants::cm, Acts::Test::dim, eic, EtmPolygonGroup::GetFillColor(), EtmDetectorStack::GetLabel(), GetLabel(), GetOrder(), EicToyModel::Instance(), ip(), mActualDistance, mG4PhysicalVolume, mStack, EtmPolygonGroup::Polygons(), Acts::Test::world, and z.

Referenced by GetG4Volume(), and PlaceG4Volume().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4VPhysicalVolume * EtmDetector::PlaceG4Volume ( G4VPhysicalVolume *  world,
const char *  name = 0 
)

Definition at line 462 of file EtmDetector.cc.

View newest version in sPHENIX GitHub at line 462 of file EtmDetector.cc

References name, and PlaceG4Volume().

+ Here is the call graph for this function:

void EtmDetector::RegisterFillColor ( std::map< TString, int > &  legend)
private

Definition at line 122 of file EtmDetector.cc.

View newest version in sPHENIX GitHub at line 122 of file EtmDetector.cc

References EtmPolygonGroup::GetFillColor(), and GetLabel().

+ Here is the call graph for this function:

EtmDetector * EtmDetector::stretch ( EtmDetector refdet,
double  toffset,
etm::Stretch  how = etm::kRecess 
)

Definition at line 153 of file EtmDetector.cc.

View newest version in sPHENIX GitHub at line 153 of file EtmDetector.cc

References eic, EtmDetectorStack::get(), EicToyModel::Instance(), and mStack.

Referenced by stretch().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

EtmDetector* EtmDetector::stretch ( EtmDetector refdet,
etm::Stretch  how = etm::kRecess 
)
inline

Definition at line 62 of file EtmDetector.h.

View newest version in sPHENIX GitHub at line 62 of file EtmDetector.h

References stretch().

+ Here is the call graph for this function:

EtmDetector * EtmDetector::stretch ( double  tlength,
etm::Stretch  how = etm::kRecess 
)

Definition at line 185 of file EtmDetector.cc.

View newest version in sPHENIX GitHub at line 185 of file EtmDetector.cc

References EtmDetectorStack::get(), mStack, and stretch().

+ Here is the call graph for this function:

EtmDetector * EtmDetector::stretch ( EtmDetectorStack refstack,
double  tlength,
etm::Stretch  how = etm::kRecess 
)

Definition at line 190 of file EtmDetector.cc.

View newest version in sPHENIX GitHub at line 190 of file EtmDetector.cc

References EtmDetectorStack::get(), and stretch().

+ Here is the call graph for this function:

EtmDetector* EtmDetector::text ( int  value)
inline

Definition at line 47 of file EtmDetector.h.

View newest version in sPHENIX GitHub at line 47 of file EtmDetector.h

References EtmPolygonGroup::SetTextColor().

+ Here is the call graph for this function:

EtmDetector * EtmDetector::trim ( double  etamin,
double  etamax,
bool  preserve_modified = false 
)

Definition at line 137 of file EtmDetector.cc.

View newest version in sPHENIX GitHub at line 137 of file EtmDetector.cc

References _DEFAULT_TRIM_VALUE_, and mEdgeTrimming.

Referenced by brick(), Build(), and EtmDetector().

+ Here is the caller graph for this function:

EtmDetector* EtmDetector::trim ( double  value)
inline

Definition at line 41 of file EtmDetector.h.

View newest version in sPHENIX GitHub at line 41 of file EtmDetector.h

References trim().

Referenced by trim().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Friends And Related Function Documentation

friend class EicToyModel
friend

Definition at line 23 of file EtmDetector.h.

View newest version in sPHENIX GitHub at line 23 of file EtmDetector.h

friend class EtmDetectorStack
friend

Definition at line 24 of file EtmDetector.h.

View newest version in sPHENIX GitHub at line 24 of file EtmDetector.h

Member Data Documentation

double EtmDetector::mActualDistance
private

Definition at line 110 of file EtmDetector.h.

View newest version in sPHENIX GitHub at line 110 of file EtmDetector.h

Referenced by Build(), GetActualDistance(), and PlaceG4Volume().

double EtmDetector::mColorAlpha
private

Definition at line 121 of file EtmDetector.h.

View newest version in sPHENIX GitHub at line 121 of file EtmDetector.h

Referenced by GetColorAlpha(), highlight(), and IsHighlighted().

double EtmDetector::mEdgeTrimming[2]
private

Definition at line 113 of file EtmDetector.h.

View newest version in sPHENIX GitHub at line 113 of file EtmDetector.h

Referenced by Build(), and trim().

G4VPhysicalVolume* EtmDetector::mG4PhysicalVolume
private

Definition at line 118 of file EtmDetector.h.

View newest version in sPHENIX GitHub at line 118 of file EtmDetector.h

Referenced by GetG4Volume(), and PlaceG4Volume().

std::vector<EtmPolygonGroup*> EtmDetector::mGraphicsElements
private

Definition at line 102 of file EtmDetector.h.

View newest version in sPHENIX GitHub at line 102 of file EtmDetector.h

Referenced by insert().

TString* EtmDetector::mLabel
private

Definition at line 100 of file EtmDetector.h.

View newest version in sPHENIX GitHub at line 100 of file EtmDetector.h

Referenced by EtmDetector(), GetLabel(), and IsDummy().

double EtmDetector::mLength
private

Definition at line 108 of file EtmDetector.h.

View newest version in sPHENIX GitHub at line 108 of file EtmDetector.h

Referenced by length().

double EtmDetector::mOffset
private

Definition at line 108 of file EtmDetector.h.

View newest version in sPHENIX GitHub at line 108 of file EtmDetector.h

const EtmDetectorStack* EtmDetector::mStack
private

Definition at line 98 of file EtmDetector.h.

View newest version in sPHENIX GitHub at line 98 of file EtmDetector.h

Referenced by Build(), GetOrder(), PlaceG4Volume(), and stretch().


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