|
||||
File indexing completed on 2024-04-06 12:05:23
0001 #ifndef DETECTOR_DESCRIPTION_CORE_DD_DIVISION_H 0002 #define DETECTOR_DESCRIPTION_CORE_DD_DIVISION_H 0003 0004 // The following is based on G4PVDivision of Gean4 as of 4/2004 0005 // 0006 // The elements' positions are calculated by means of a simple 0007 // linear formula. 0008 // 0009 // G4PVDivision(const G4String& pName, 0010 // G4LogicalVolume* pLogical, 0011 // G4LogicalVolume* pMother, 0012 // const EAxis pAxis, 0013 // const G4int nReplicas, 0014 // const G4double width, 0015 // const G4double offset=0) 0016 // 0017 // Division may occur along: 0018 // 0019 // o Cartesian axes (kXAxis,kYAxis,kZAxis) 0020 // 0021 // The divisions, of specified width have coordinates of 0022 // form (-width*(nReplicas-1)*0.5+n*width,0,0) where n=0.. nReplicas-1 0023 // for the case of kXAxis, and are unrotated. 0024 // 0025 // o Radial axis (cylindrical polar) (kRho) 0026 // 0027 // The divisions are cons/tubs sections, centred on the origin 0028 // and are unrotated. 0029 // They have radii of width*n+offset to width*(n+1)+offset 0030 // where n=0..nReplicas-1 0031 // 0032 // o Phi axis (cylindrical polar) (kPhi) 0033 // The divisions are `phi sections' or wedges, and of cons/tubs form 0034 // They have phi of offset+n*width to offset+(n+1)*width where 0035 // n=0..nReplicas-1 0036 0037 // GEANT4 History: 0038 // 09.05.01 - P.Arce Initial version 0039 // 0040 // DDD History: 0041 // 13.04.04 - M. Case Initial DDD version. 0042 // ******************************************************************** 0043 0044 //! A DDDivision contains the parameterization that Geant4 needs in order to do its divisions. 0045 /** 0046 A DDDivision simply holds the division information for Geant4 or other 0047 client software to recover. The actual dividing of one solid into a set of 0048 identical shapes placed in different positions is performed in a 0049 DDAlgorithm which (in the default DDD/CMS way of running) is called by the 0050 parser. In other words, someone who wants to use this part of the DDD must 0051 reproduce the algorithms (or in the case of Geant4, re-use) or use the 0052 DDAlgorithm (i.e. load up the appropriate parameters and put run the DDAlgorithm. 0053 */ 0054 0055 #include <iosfwd> 0056 #include <map> 0057 #include <memory> 0058 #include <string> 0059 #include <vector> 0060 0061 #include "DetectorDescription/Core/interface/Singleton.h" 0062 #include "DetectorDescription/Core/interface/DDAxes.h" 0063 #include "DetectorDescription/Core/interface/DDBase.h" 0064 #include "DetectorDescription/Core/interface/DDLogicalPart.h" 0065 #include "DetectorDescription/Core/interface/DDName.h" 0066 0067 class DDDivision; 0068 class DDMaterial; 0069 class DDPartSelection; 0070 class DDSolid; 0071 0072 namespace DDI { 0073 class Division; 0074 } 0075 0076 std::ostream &operator<<(std::ostream &, const DDDivision &); 0077 0078 class DDDivision : public DDBase<DDName, std::unique_ptr<DDI::Division> > { 0079 public: 0080 //! The default constructor provides an uninitialzed reference object. 0081 DDDivision(); 0082 0083 //! Creates a refernce object referring to the appropriate XML specification. 0084 DDDivision(const DDName &name); 0085 0086 //! Registers (creates) a reference object representing a Division 0087 /** ... Constructor with number of divisions and width 0088 */ 0089 DDDivision(const DDName &name, const DDLogicalPart &parent, DDAxes axis, int nReplicas, double width, double offset); 0090 0091 //! Registers (creates) a reference object representing a Division 0092 /** ... Constructor with number of divisions 0093 */ 0094 DDDivision(const DDName &name, const DDLogicalPart &parent, DDAxes axis, int nReplicas, double offset); 0095 0096 //! Registers (creates) a reference object representing a Division 0097 /** ... Constructor with width 0098 */ 0099 DDDivision(const DDName &name, const DDLogicalPart &parent, DDAxes axis, double width, double offset); 0100 0101 DDAxes axis() const; 0102 int nReplicas() const; 0103 double width() const; 0104 double offset() const; 0105 const DDLogicalPart &parent() const; 0106 }; 0107 0108 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.2.1 LXR engine. The LXR team |