CDF II
CDF KITS
source navigation ]
diff markup ]
identifier search ]
freetext search ]
file search ]
 
Architecture: i386 ]
Version: 4.10.4 ] [ 4.10.5 ] [ 4.8.4 ] [ 4.8.4l3s ] [ 4.8.5 ] [ 4.9.0 ] [ 4.9.1 ] [ 4.9.1.hpt3 ] [ 4.9.1hpt3 ] [ 4.9.1top1 ] [ 5.0.0 ] [ 5.1.0 ] [ 5.1.0beamonly ] [ 5.1.1 ] [ 5.2.0 ] [ 5.3.0 ] [ 5.3.1 ] [ 5.3.1dsp ] [ 5.3.3 ] [ 5.3.3_nt ] [ 5.3.4 ] [ 6.1.1 ] [ 6.1.1b ] [ 6.1.2 ] [ 6.1.3 ] [ 6.1.4 ] [ 6.1.4int3 ] [ 6.1.4mc ] [ 6.1.4mc_a ] [ 6.1.6 ] [ development ]

001 //--------------------------------------------------------------------------
002 // File and Version Information:
003 //                      $Id: CdfDetector.hh,v 1.31 2005/01/03 20:14:26 murat Exp $
004 //
005 // Description:
006 //                      Class CdfDetector
007 //
008 //                      This is the mother node for all sub-detectors that make up the
009 //                      CdfDetector. Via it's base class (see CdfDetectorNode.hh) it
010 //                      contains a list of pointers to sub-systems which in turn form
011 //                      the heads of geometry trees under them.
012 //
013 // Environment:
014 //                      Software developed for CDF
015 //
016 #ifndef CDFDETECTOR_HH
017 #define CDFDETECTOR_HH
018 
019 #include <list>
020 #include <memory>
021 
022 #include "GeometryBase/Bfield.hh"
023 #include "CLHEP/Geometry/Vector3D.h"
024 // #include "QuickSim/Geometry/SimpleCotDetectorNode.hh"
025 // #include "QuickSim/Geometry/SimpleSiliconDetectorNode.hh"
026 
027 class HepPoint3D;
028 class CdfPhysicalVolume;
029 class CdfLogicalVolume;
030 class CdfDetectorNode;
031 class CdfTangible;
032 
033 class AbsSiDetectorNode;
034 class CotDetectorNode;
035 class SimpleCotDetectorNode;
036 class SimpleSiliconDetectorNode;
037 ////////////////////////////////////
038 // These two are obselete and will be replaced
039 class AbsCentralMuonDetectorNode;
040 class AbsForwardMuonDetectorNode;
041 // ... by this:
042 class MuonDetectorNode;
043 ////////////////////////////////////
044 
045 class AbsCalorDetectorNode;
046 class AbsClcDetectorNode;
047 class AbsPassiveDetectorNode;
048 class AbsBeampipeDetectorNode;
049 class AbsTofDetectorNode;
050 class AbsScDetectorNode;
051 class AbsCprDetectorNode;
052 class AluminumPlateDetectorNode;
053 class AbsMplgDetectorNode;
054 
055 class CdfDetector {
056 
057 public:
058 
059         // Get the instance:
060         inline static CdfDetector* instance();
061 
062         // Access the ``official'' CDF B-Field 
063         inline const Bfield* getBfield() const {
064     return &_bField;
065   }
066 
067 private:
068         inline void setUniformField(bool uniform=true) {
069                 _bField.setUniform(uniform);
070         } 
071 
072   inline bool setBfieldMag(double bfieldMag) 
073          {return _bField.setBfield(bfieldMag);}
074 
075 
076 public:
077 
078         // The World physical volume
079         const CdfPhysicalVolume* worldPV() const;
080         CdfPhysicalVolume* worldPV();
081 
082         // The World logical volume
083         const CdfLogicalVolume* worldLV() const;
084         CdfLogicalVolume* worldLV();
085 
086         // The World CdfTangible
087         const CdfTangible* worldTangible() const;
088         CdfTangible* worldTangible();
089 
090         // Do the work to complete the geometry, *after* all subdetectors are
091         // added.
092         void makeWhole();
093 
094         // Accessors to the list of DetectorNodes
095         typedef std::list<CdfDetectorNode*> NodeList;
096         typedef NodeList::iterator Iterator;
097         typedef NodeList::const_iterator ConstIterator;
098 
099         Iterator      beginningChild();
100         ConstIterator beginningChild() const;
101         Iterator      endingChild();
102         ConstIterator endingChild() const;
103 
104         // run through the detector nodes and call there update method
105         int update(int run_number);
106 
107   const CdfDetectorNode* find(std::string name) const;
108 
109         void setDefault(AbsSiDetectorNode* newNode);
110         const AbsSiDetectorNode *getSiDetector() const;
111 
112         void setDefault(SimpleSiliconDetectorNode* newNode);
113         const SimpleSiliconDetectorNode *getSimpleSiDetector() const;
114 
115   void setDefault(CotDetectorNode* newNode);
116         const CotDetectorNode *getCotDetector() const;
117 
118   void setDefault(SimpleCotDetectorNode* newNode);
119         const SimpleCotDetectorNode *getSimpleCotDetector() const;
120 
121   void setDefault(AbsCentralMuonDetectorNode* newNode);
122         const AbsCentralMuonDetectorNode *getCentralMuonDetector() const;
123 
124   void setDefault(AbsForwardMuonDetectorNode* newNode);
125         const AbsForwardMuonDetectorNode *getForwardMuonDetector() const;
126 
127   void setDefault(MuonDetectorNode* newNode);
128         const MuonDetectorNode *getMuonDetector() const;
129 
130   void setDefault(AbsCalorDetectorNode* newNode);
131         const AbsCalorDetectorNode *getCalorDetector() const;
132 
133   void setDefault(AbsClcDetectorNode* newNode);
134         const AbsClcDetectorNode *getClcDetector() const;
135 
136   void setDefault(AbsPassiveDetectorNode* newNode);
137         const AbsPassiveDetectorNode *getPassiveDetector() const;
138 
139   void setDefault(AbsBeampipeDetectorNode* newNode);
140         const AbsBeampipeDetectorNode *getBeampipeDetector() const;
141 
142   void setDefault(AbsTofDetectorNode* newNode);
143         const AbsTofDetectorNode *getTofDetector() const; 
144 
145   void setDefault(AbsScDetectorNode* newNode);
146         const AbsScDetectorNode *getScDetector() const;
147 
148   void setDefault(AbsCprDetectorNode* newNode);
149         const AbsCprDetectorNode *getCprDetector() const;
150 
151   void setDefault(AluminumPlateDetectorNode* newNode);
152         const AluminumPlateDetectorNode *getAluminumPlateDetector() const;      
153 
154   void setDefault(AbsMplgDetectorNode* newNode);
155         const AbsMplgDetectorNode *getMplgDetector() const;     
156 
157         void append(CdfDetectorNode * newNode);
158 
159 private:
160 
161   ////////////////////////////////////////////////////////////////////////
162   // Specific append functions. Register the node as the default for
163   // that type of subdetector.
164   const AbsSiDetectorNode* _siDetector;             
165   const CotDetectorNode* _cotDetector;              
166   const SimpleCotDetectorNode* _simpleCotDetector;              
167   const SimpleSiliconDetectorNode* _simpleSiDetector;
168   const AbsCentralMuonDetectorNode* _cmuonDetector; 
169   const AbsForwardMuonDetectorNode* _fmuonDetector; 
170   const MuonDetectorNode* _muonDetector;
171   const AbsCalorDetectorNode* _calorDetector;       
172   const AbsClcDetectorNode* _clcDetector;           
173   const AbsPassiveDetectorNode* _passiveDetector;   
174   const AbsBeampipeDetectorNode* _beampipeDetector;   
175   const AbsTofDetectorNode* _tofDetector;           
176   const AbsScDetectorNode* _scDetector;             
177   const AbsCprDetectorNode* _cprDetector;          
178         const AbsMplgDetectorNode* _mplgDetector;
179   const AluminumPlateDetectorNode* _apDetector;          
180    
181   ////////////////////////////////////////////////////////////////////////
182 
183         // Constructor
184         CdfDetector();
185                         
186         // Destructor
187         ~CdfDetector();
188         
189         // An error routine to signal that the detector has not been 
190         // constructed.
191         void _printError1(const std::string systemName) const;
192 
193         void fillParentPointers(CdfPhysicalVolume* parent);
194         
195         static CdfDetector* _theInstance;
196                 
197         Bfield _bField; // interface to the B field parameters and calculations
198         
199         // List of sub-DetectorNodes
200         NodeList  _nodeList;
201 
202         // The root of the CdfTangible tree, owned by the CdfDetector
203         std::auto_ptr<CdfTangible>  _geom_a_tree;
204         
205         friend class GeometryManager;   
206 
207   CdfPhysicalVolume* _worldPV;
208   CdfLogicalVolume* _worldLV;
209 
210   class Cleaner {
211   public:
212     ~Cleaner() {
213       if (CdfDetector::_theInstance) {
214         delete CdfDetector::_theInstance;
215         CdfDetector::_theInstance=0;
216       }
217     }
218   };
219 
220   friend class Cleaner;
221 
222 };
223 
224 #include "GeometryBase/CdfDetector.icc"
225 
226 #endif // CDFDETECTOR_HH
227 
228 /*
229 ** Local Variables: --
230 ** mode: c++ --
231 ** c-file-style: "gnu" --
232 ** tab-width: 2 --
233 ** End: --
234 */

source navigation ] diff markup ] identifier search ] freetext search ] file search ]

This page was automatically generated by the LXR engine.
The LXR team
Valid HTML 4.01!

Send problems or questions to cdfcode@fnal.gov