GEAR  1.9.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Friends Pages
GearMgrImpl.h
1 #ifndef GEAR_GearMgrImpl_H
2 #define GEAR_GearMgrImpl_H 1
3 
4 #include <string>
5 #include <map>
6 
7 #include "gear/GearMgr.h"
8 #include "gear/GearParameters.h"
9 #include "gear/TPCParameters.h"
10 #include "gear/SimpleMaterial.h"
11 #include "gearsurf/MeasurementSurfaceStore.h"
12 
13 namespace gear {
14 
15 
23  class GearMgrImpl : public GearMgr {
24 
25  typedef std::map< std::string , GearParameters* > ParameterMap ;
26 
27  public:
28 
29  // C'tor
30  GearMgrImpl() ;
31 
32 
34  virtual ~GearMgrImpl() ;
35 
38  virtual const std::string& getDetectorName() const ;
39 
40 
46  virtual const GearParameters & getGearParameters(const std::string & key) const
47  ;
48 
51  virtual const BField & getBField() const
52  ;
53 
56  virtual const TPCParameters & getTPCParameters() const
57  ;
58 
63  virtual const CalorimeterParameters & getEcalBarrelParameters() const
64  ;
65 
70  virtual const CalorimeterParameters & getEcalEndcapParameters() const
71  ;
72 
77  virtual const CalorimeterParameters & getEcalPlugParameters() const
78  ;
79 
84  virtual const CalorimeterParameters & getYokeBarrelParameters() const
85  ;
86 
91  virtual const CalorimeterParameters & getYokeEndcapParameters() const
92  ;
93 
98  virtual const CalorimeterParameters & getYokePlugParameters() const
99  ;
100 
105  virtual const CalorimeterParameters & getHcalBarrelParameters() const
106  ;
107 
108 
113  virtual const CalorimeterParameters & getHcalEndcapParameters() const
114  ;
115 
116 
121  virtual const CalorimeterParameters & getHcalRingParameters() const
122  ;
123 
124 
129  virtual const CalorimeterParameters & getLcalParameters() const
130  ;
131 
136  virtual const CalorimeterParameters & getLHcalParameters() const
137  ;
138 
143  virtual const CalorimeterParameters & getBeamCalParameters() const
144  ;
145 
150  virtual const ZPlanarParameters & getVXDParameters() const
151  ;
152 
157  virtual const FTDParameters & getFTDParameters() const
158  ;
159 
164  virtual const ZPlanarParameters & getSITParameters() const
165  ;
166 
171  virtual const ZPlanarParameters & getSETParameters() const
172  ;
173 
174 
180  ;
181 
186  virtual const SiPlanesParameters & getSiPlanesParameters() const
187  ;
188 
193  virtual const GearPointProperties & getPointProperties() const
194  ;
195 
196 
201  virtual const GearDistanceProperties & getDistanceProperties() const
202  ;
203 
204 
207  virtual const std::vector<std::string> & getGearParameterKeys() const ;
208 
209 
211  virtual const SimpleMaterial& getSimpleMaterial( const std::string name ) const
212  ;
213 
216  virtual const std::vector<std::string> & getMaterialNames() const ;
217 
218 
222  virtual void registerSimpleMaterial( const SimpleMaterial* material) ;
223 
226  virtual MeasurementSurfaceStore& getMeasurementSurfaceStore() const {return *_surfaceStore;}
227 
228 
229  virtual void setDetectorName(const std::string& name) { _detectorName = name ; }
230 
234  virtual void setGearParameters( const std::string & key, GearParameters* parameters ) ;
235 
238  virtual void setTPCParameters( TPCParameters* tpcParameters ) ;
239 
240 
243  virtual void setEcalBarrelParameters( CalorimeterParameters* ecalBarrelParameters ) ;
244 
247  virtual void setEcalEndcapParameters( CalorimeterParameters* ecalEndcapParameters ) ;
248 
251  virtual void setEcalPlugParameters( CalorimeterParameters* ecalPlugParameters ) ;
252 
255  virtual void setYokeBarrelParameters( CalorimeterParameters* yokeBarrelParameters ) ;
256 
259  virtual void setYokeEndcapParameters( CalorimeterParameters* yokeEndcapParameters ) ;
260 
263  virtual void setYokePlugParameters( CalorimeterParameters* yokePlugParameters ) ;
264 
265 
268  virtual void setHcalBarrelParameters( CalorimeterParameters* hcalBarrelParameters ) ;
269 
272  virtual void setHcalEndcapParameters( CalorimeterParameters* hcalEndcapParameters ) ;
273 
276  virtual void setHcalRingParameters( CalorimeterParameters* hcalRingParameters ) ;
277 
280  virtual void setLcalParameters(CalorimeterParameters * lcalParameters) ;
281 
284  virtual void setLHcalParameters(CalorimeterParameters * lhcalParameters) ;
285 
288  virtual void setBeamCalParameters(CalorimeterParameters * beamcalParameters) ;
289 
292  virtual void setVXDParameters( ZPlanarParameters * vxdParameters ) ;
293 
296  virtual void setFTDParameters( FTDParameters * ftdParameters ) ;
297 
300  virtual void setSITParameters( ZPlanarParameters * sitParameters ) ;
301 
304  virtual void setSETParameters( ZPlanarParameters * setParameters ) ;
305 
306 
309  virtual void setTrackerPlanesParameters( TrackerPlanesParameters * trackerplanesParameters ) ;
310 
313  virtual void setSiPlanesParameters( SiPlanesParameters * siplanesParameters ) ;
314 
317  virtual void setPointProperties( GearPointProperties* pointProperties) ;
318 
321  virtual void setDistanceProperties( GearDistanceProperties* distanceProperties) ;
322 
325  virtual void setBField( BField* bField ) ;
326 
327  protected:
328 
329  // Copy constructor. Needed because the mgr own the objects it has pointer to
330  // problem: since some are base class pointers
331  // the actual qualification in copying needs a different scheme
332  // solution: too much work, make private
333  GearMgrImpl(const GearMgrImpl &);
334 
335  // we also need an assigment operator
336  GearMgrImpl& operator = (const GearMgrImpl&);
337 
338 
339  ParameterMap _map{} ;
340  TPCParameters* _tpcParameters = nullptr ;
341  CalorimeterParameters* _ecalBarrelParameters = nullptr ;
342  CalorimeterParameters* _ecalEndcapParameters = nullptr ;
343  CalorimeterParameters* _ecalPlugParameters = nullptr ;
344  CalorimeterParameters* _yokeBarrelParameters = nullptr ;
345  CalorimeterParameters* _yokeEndcapParameters = nullptr ;
346  CalorimeterParameters* _yokePlugParameters = nullptr ;
347  CalorimeterParameters* _hcalBarrelParameters = nullptr ;
348  CalorimeterParameters* _hcalEndcapParameters = nullptr ;
349  CalorimeterParameters* _hcalRingParameters = nullptr ;
350  CalorimeterParameters* _lcalParameters = nullptr ;
351  CalorimeterParameters* _lhcalParameters = nullptr ;
352  CalorimeterParameters* _beamcalParameters = nullptr ;
353  ZPlanarParameters* _vxdParameters = nullptr ;
354  ZPlanarParameters* _sitParameters = nullptr ;
355  ZPlanarParameters* _setParameters = nullptr ;
356  FTDParameters* _ftdParameters;
357  TrackerPlanesParameters* _trackerplanesParameters = nullptr ;
358  SiPlanesParameters* _siplanesParameters = nullptr ;
359  GearPointProperties* _pointProperties = nullptr ;
360  GearDistanceProperties* _distanceProperties = nullptr ;
361  BField* _bField = nullptr ;
362  std::string _detectorName{} ;
363 
364  typedef std::map< std::string,const SimpleMaterial* > MatMap ;
365  MatMap _matMap{} ;
366 
367  MeasurementSurfaceStore* _surfaceStore = nullptr ;
368 
369  mutable StringVec _keys{} ;
370 
371  mutable StringVec _matNames{} ;
372 
373 
379  //void copy_and_assign(const GearMgrImpl & );
380 
385  void cleanup();
386 
387 
388  }; // class
389 } // namespace gear
390 #endif /* ifndef GEAR_GEARMGR_H */
virtual void setPointProperties(GearPointProperties *pointProperties)
Set the point properties object.
Definition: GearMgrImpl.cc:557
virtual void setHcalRingParameters(CalorimeterParameters *hcalRingParameters)
Set the HcalRingParameters.
Definition: GearMgrImpl.cc:459
virtual MeasurementSurfaceStore & getMeasurementSurfaceStore() const
Return the MeasurementSurfaceStore.
Definition: GearMgrImpl.h:226
virtual const std::vector< std::string > & getGearParameterKeys() const
Keys of all GearParameters.
Definition: GearMgrImpl.cc:567
Geometry properties of a vertex detector needed for reconstruction code.
Abstract interface for a class that returns the (material) properties along a given distance between ...
virtual const TPCParameters & getTPCParameters() const
Get the TPCParameters.
Definition: GearMgrImpl.cc:188
virtual void setYokeBarrelParameters(CalorimeterParameters *yokeBarrelParameters)
Set the YokeBarrelParameters.
Definition: GearMgrImpl.cc:434
Proposal for an abstract interface that defines the geometry properties of a TPC like detector needed...
Definition: TPCParameters.h:24
virtual void setHcalEndcapParameters(CalorimeterParameters *hcalEndcapParameters)
Set the HcalEndcapParameters.
Definition: GearMgrImpl.cc:454
virtual void setSITParameters(ZPlanarParameters *sitParameters)
Set the SITParameters.
Definition: GearMgrImpl.cc:537
virtual void setYokePlugParameters(CalorimeterParameters *yokePlugParameters)
Set the YokePlugParameters.
Definition: GearMgrImpl.cc:443
Abstract interface for a simple material description tjhat hold s the following properties: A...
virtual const CalorimeterParameters & getHcalEndcapParameters() const
Get the Hcal endcap parameters.
Definition: GearMgrImpl.cc:268
virtual const ZPlanarParameters & getVXDParameters() const
Get the VXD parameters.
Definition: GearMgrImpl.cc:314
virtual const BField & getBField() const
Get the BField.
Definition: GearMgrImpl.cc:197
virtual const std::vector< std::string > & getMaterialNames() const
Names of registered materials.
Definition: GearMgrImpl.cc:578
Proposal for an abstract interface that defines geometry properties of a typical sampling calorimeter...
virtual const CalorimeterParameters & getYokePlugParameters() const
Get the Yoke plug parameters.
Definition: GearMgrImpl.cc:249
Manager class that returns the Gear classes for the relevant subdetectors.
Definition: GearMgrImpl.h:23
virtual void setLHcalParameters(CalorimeterParameters *lhcalParameters)
Set the LHcalParameters.
Definition: GearMgrImpl.cc:485
virtual const TrackerPlanesParameters & getTrackerPlanesParameters() const
Get the TrackerPlanes parameters.
Definition: GearMgrImpl.cc:349
virtual const CalorimeterParameters & getBeamCalParameters() const
Get the BeamCal parameters.
Definition: GearMgrImpl.cc:305
virtual void setEcalBarrelParameters(CalorimeterParameters *ecalBarrelParameters)
Set the EcalBarrelParameters.
Definition: GearMgrImpl.cc:420
virtual void setSiPlanesParameters(SiPlanesParameters *siplanesParameters)
Set the SiPlanesParameters.
Definition: GearMgrImpl.cc:552
virtual const GearPointProperties & getPointProperties() const
Get the point properties object.
Definition: GearMgrImpl.cc:367
virtual void setLcalParameters(CalorimeterParameters *lcalParameters)
Set the LcalParameters.
Definition: GearMgrImpl.cc:464
virtual void setEcalPlugParameters(CalorimeterParameters *ecalPlugParameters)
Set the EcalPlugParameters.
Definition: GearMgrImpl.cc:429
virtual void registerSimpleMaterial(const SimpleMaterial *material)
Register the SimpleMaterial with SimpleMaterial::getName() - throws Exception if a material of the gi...
Definition: GearMgrImpl.cc:607
virtual const std::string & getDetectorName() const
The unique detector name - typically the model name used in the simulation program.
Definition: GearMgrImpl.cc:169
virtual void setVXDParameters(ZPlanarParameters *vxdParameters)
Set the VXDParameters.
Definition: GearMgrImpl.cc:527
void cleanup()
function to copy all internal variables, incl.
Definition: GearMgrImpl.cc:121
virtual const FTDParameters & getFTDParameters() const
Get the FTD parameters.
Definition: GearMgrImpl.cc:323
virtual const CalorimeterParameters & getEcalPlugParameters() const
Get the Ecal plug parameters.
Definition: GearMgrImpl.cc:223
virtual const GearDistanceProperties & getDistanceProperties() const
Get the distance properties object.
Definition: GearMgrImpl.cc:377
Abstract interface for a set of parameters that can be used to describe the geometrical properties of...
virtual const CalorimeterParameters & getHcalBarrelParameters() const
Get the Hcal barrel parameters.
Definition: GearMgrImpl.cc:260
virtual const CalorimeterParameters & getHcalRingParameters() const
Get the Hcal ring parameters.
Definition: GearMgrImpl.cc:277
virtual void setGearParameters(const std::string &key, GearParameters *parameters)
Set the GearParameters for the given key - overwrites any existing entries.
Definition: GearMgrImpl.cc:386
virtual const CalorimeterParameters & getLHcalParameters() const
Get the LHcal parameters.
Definition: GearMgrImpl.cc:296
virtual const CalorimeterParameters & getEcalEndcapParameters() const
Get the Ecal endcap parameters.
Definition: GearMgrImpl.cc:214
virtual const SiPlanesParameters & getSiPlanesParameters() const
Get the SiPlanes parameters.
Definition: GearMgrImpl.cc:358
virtual const CalorimeterParameters & getLcalParameters() const
Get the Lcal parameters.
Definition: GearMgrImpl.cc:287
virtual const ZPlanarParameters & getSITParameters() const
Get the SIT parameters.
Definition: GearMgrImpl.cc:332
virtual void setHcalBarrelParameters(CalorimeterParameters *hcalBarrelParameters)
Set the HcalBarrelParameters.
Definition: GearMgrImpl.cc:449
virtual const GearParameters & getGearParameters(const std::string &key) const
Get named parameters for key.
Definition: GearMgrImpl.cc:179
Geometry properties of a FTD detector needed for reconstruction code.
Definition: FTDParameters.h:29
virtual void setSETParameters(ZPlanarParameters *setParameters)
Set the SETParameters.
Definition: GearMgrImpl.cc:542
virtual void setTPCParameters(TPCParameters *tpcParameters)
Set the TPCParameters.
Definition: GearMgrImpl.cc:407
virtual void setEcalEndcapParameters(CalorimeterParameters *ecalEndcapParameters)
Set the EcalEndcapParameters.
Definition: GearMgrImpl.cc:424
virtual void setTrackerPlanesParameters(TrackerPlanesParameters *trackerplanesParameters)
Set the TrackerPlanesParameters.
Definition: GearMgrImpl.cc:547
virtual void setYokeEndcapParameters(CalorimeterParameters *yokeEndcapParameters)
Set the YokeEndcapParameters.
Definition: GearMgrImpl.cc:438
virtual void setFTDParameters(FTDParameters *ftdParameters)
Set the FTDParameters.
Definition: GearMgrImpl.cc:532
virtual const ZPlanarParameters & getSETParameters() const
Get the SET parameters.
Definition: GearMgrImpl.cc:340
virtual const SimpleMaterial & getSimpleMaterial(const std::string name) const
Return the SimpleMaterial for the given name throws UnknownParameterException if no material is unkno...
Definition: GearMgrImpl.cc:591
virtual void setDistanceProperties(GearDistanceProperties *distanceProperties)
Set the distance properties object.
Definition: GearMgrImpl.cc:562
virtual void setBeamCalParameters(CalorimeterParameters *beamcalParameters)
Set the BeamCalParameters.
Definition: GearMgrImpl.cc:506
Abstract interface for a manager class that returns the Gear classes for the relevant subdetectors...
Definition: GearMgr.h:36
Geometry properties of a pixel beam telescope needed for reconstruction code.
virtual const CalorimeterParameters & getYokeBarrelParameters() const
Get the Yoke barrel parameters.
Definition: GearMgrImpl.cc:232
Geometry properties of a pixel beam telescope needed for reconstruction code.
virtual void setBField(BField *bField)
Set the b field object.
Definition: GearMgrImpl.cc:415
virtual const CalorimeterParameters & getEcalBarrelParameters() const
Get the Ecal barrel parameters.
Definition: GearMgrImpl.cc:206
virtual ~GearMgrImpl()
Destructor.
Definition: GearMgrImpl.cc:116
virtual const CalorimeterParameters & getYokeEndcapParameters() const
Get the Yoke endcap parameters.
Definition: GearMgrImpl.cc:240
Abstract interface for a class that returns the (material) properties of a given point in in world co...
virtual void setDetectorName(const std::string &name)
Set detector name.
Definition: GearMgrImpl.h:229
Global B field map.
Definition: BField.h:16