EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
EtmVacuumChamber.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file EtmVacuumChamber.h
1 
2 #include <vector>
3 
4 #include <TString.h>
5 #include <TVector2.h>
6 #include <TGeoManager.h>
7 
8 #ifndef _EIC_VACUUM_CHAMBER_
9 #define _EIC_VACUUM_CHAMBER_
10 
11 class G4VSolid;
12 class EicToyModel;
13 
14 #define _ACCELERATOR_VACUUM_ ("AcceleratorVacuum")
15 #define _UNIVERSE_VACUUM_ ("UniverseVacuum")
16 
17 class EtmVacuumChamber: public TObject {
18  public:
19  EtmVacuumChamber( void );
21 
22  void DrawMe( void );// const;
23 
25  double GetHadronBeamPipeOpening ( void ) const { return mHadronBeamPipeOpening; };
26 
27  double GetRadialSize(double z, double phi);// const;
28 
29  TGeoManager *GetWorld( void ) const { return mTGeoModel; };
30  void CheckGeometry(bool force = false);
31  void Export(const char *fname);
32 
33  // The idea behind all this is to allow dynamic creation of the vacuum chamber volumes;
34  // if the respective inherited class is not flexible enough to make use of the
35  // EicToyModel::mCrossingAngle, certain operations will be prohibited;
36  virtual bool ConfigurableCrossingAngle( void ) const = 0;
37  virtual double FixedCrossingAngle( void ) const { return 0.0; };
38  bool CrossingAngleResetPossible(double value) const;
39 
40  G4VSolid *CutThisSolid(G4VSolid *solid, double dz);
41 
42  void StoreGDMLdump( void );
43 
44  protected:
45  virtual void CreateGeometry( void ) = 0;
46 
47  // It looks like there is no need to serialize the TGeoManager (?); the model can be
48  // re-created upon EicToyModel instance, and the model is dumped as a separate object
49  // in EtmToyModel::write() anyway;
50  TGeoManager *mTGeoModel;
51 
52  // It looks like this parameter will always be there (?);
54 
56 
57  //std::vector<std::pair<TGeoShape*, TGeoMatrix*> > mCuttingSolids; //!
58 
59  private:
60  void CreateWorld( void );
61  void CreateMedium(const char *name, double A, double Z, double density);
62 
64 
65  //Geant4GM::Factory *g4Factory;
66  // FIXME: void* here is not good, but suffices; Geant4GM::Factory*?;
67  void *g4Factory;
68 
69  //TString mGDMLdump;
70 
71  ClassDef(EtmVacuumChamber, 1)
72 };
73 
74 #if 0
75 class XString: public TObject, public TString {
76 public:
77  XString() {};
78  ~XString() {};
79 
80  ClassDef(XString, 1)
81 };
82 #endif
83 #endif