EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
EicCadWizardCut.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file EicCadWizardCut.h
1 
2 #include <vector>
3 
4 #ifndef _EIC_CAD_WIZARD_CUT_
5 #define _EIC_CAD_WIZARD_CUT_
6 
7 class TGeoCombiTrans;
8 class TopoDS_Shape;
9 class gp_Ax3;
10 
11 // FIXME: make them configurable later;
12 #define _ANGULAR_TOLERANCE_ (1E-10)
13 #define _SPATIAL_TOLERANCE_ (1E-10)
14 
15 #define SQR(x) ((x)*(x))
16 
17 TGeoCombiTrans *Ax3ToCombiTrans(const char *name, const gp_Ax3 &ax3, double offset);
18 
20  public:
21  EicCadWizardCut(): /*mSubtractionFlag(true),*/ mSolid(0), mDimension(0.0), mMultiplicity(1) {};
23 
24  virtual bool IsEqual(const EicCadWizardCut *cut) const = 0;
25  virtual TGeoCombiTrans *BuildRootVolume(const char *vname, const char *tname) = 0;
26 
27  const TopoDS_Shape &GetSolid( void ) const { return *mSolid; };
28  void IncrementMultiplicity( void ) { mMultiplicity++; };
29  unsigned GetMultiplicity( void ) const { return mMultiplicity; }
30 
31  void AddCommonSolid(TopoDS_Shape *solid) { mCommonSolids.push_back(solid); };
32  void AddCutSolid(TopoDS_Shape *solid) { mCutSolids.push_back(solid); };
33 
34  unsigned GetCommonSolidsCount( void ) const { return mCommonSolids.size(); };
35  unsigned GetCutSolidsCount(void ) const { return mCutSolids.size(); };
36 
37  //bool mSubtractionFlag;
38 
39  protected:
40  double mDimension;
41 
42  TopoDS_Shape *mSolid;
43 
44  unsigned mMultiplicity;
45 
46  public:
47  std::vector<TopoDS_Shape*> mCutSolids, mCommonSolids;
48 };
49 
50 
51 #endif