Fiber.h
Go to the documentation of this file.
1 #ifndef _mdet_Fiber_h
2 #define _mdet_Fiber_h
3 
4 #include <det/MPositionable.h>
5 #include <mdet/MDetectorComponent.h>
6 
7 #include <det/VManager.h>
8 #include <det/MPositionable.h>
9 #include <mdet/MComponentGroup.h>
10 #include <mdet/MDetectorComponent.h>
11 #include <mdet/Scintillator.h>
12 #include <mdet/Fiber.h>
13 #include <mdet/Pixel.h>
14 #include <utl/Point.h>
15 #include <utl/CoordinateSystemPtr.h>
16 #include <utl/Validated.h>
17 #include <utl/AugerException.h>
18 #include <utl/ConsecutiveEnumFactory.h>
19 
20 
21 namespace mdet {
22 
23  class Module;
24 
54  class Fiber :
55  public MDetectorComponent<Fiber>::Type,
56  public det::MPositionable<Fiber>
57  {
58  public:
59 
60  static const char* const kComponentName;
61 
62  static const char* const kComponentId;
77  /*
78  * Possible further methods.
79  *
80  * bool Contains(const utl::Point& point) const;
81  * bool IntersectedBy(const utl::Line& line) const;
82  * utl::Vector ComputeIntersectionWith(const utl::Line& line) const;
83  */
88  template<class V>
89  V& VisitShape(V& v) const {
90  // Up to now, just a cylinder: the onManifoldLength is disregarded.
91  v.Cylinder(*this, GetOnScintillatorLength(), GetRadius());
92  return v;
93  }
95 
104  double GetOnManifoldLength() const;
108  double GetNumericalAperture() const;
112  double GetRefractionIndex() const;
116  double ComputeDecayDelay() const;
129  double GetDecayDelayMean() const;
135  double GetDecayDelayStdDev() const;
140  unsigned int ComputeSPENumber(double x, double l, double e) const;
144  const Module& GetModule() const {
145  return fModule;
146  }
147  private:
155  double GetDecayTime() const;
159  double GetOnScintillatorLength() const;
163  double GetRadius() const;
168  enum AttenuationReference {
172  };
177 
179  static const char * const AttenuationReferenceTags[];
183  // See the following friendship: repeats class name.
187  /*
188  * It isn't possible to define friendship through a typedef: so we need a little verbosity here.
189  * http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1791.pdf
190  */
191  // See the previous typedef: repeats class name.
193 
194  double GetAttenuationLengthA() const;
195 
196  double GetAttenuationLengthB() const;
197 
198  double GetAttenuationAmplitudeA() const;
199 
200  double GetAttenuationAmplitudeB() const;
201 
202  double GetAttenuationLengthASiPM() const;
203 
204  double GetAttenuationLengthBSiPM() const;
205 
206  double GetAttenuationAmplitudeASiPM() const;
207 
208  double GetAttenuationAmplitudeBSiPM() const;
209 
210  double GetAttenuationReferenceThickness() const;
211 
212  double GetAttenuationReferenceEnergy() const;
214 
227  Fiber(int fId, const det::VManager::IndexMap& parentMap, const Module& parent);
231  ~Fiber(){ }
235  friend class det::MPositionable<Fiber>;
239  friend struct det::ParentCreator;
245  template<class T>
246  friend void boost::checked_delete(T*) BOOST_NOEXCEPT;
248  friend struct det::ComponentUpdater;
249 
250  mutable utl::Validated<double> fOnScintillatorLength;
251 
252  mutable utl::Validated<double> fOnManifoldLength;
253 
254  mutable utl::Validated<double> fNumericalAperture;
255 
256  mutable utl::Validated<double> fRadius;
257 
258  mutable utl::Validated<double> fRefractionIndex;
259 
260  mutable utl::Validated<double> fDecayTime;
261 
262  mutable utl::Validated<double> fAttenuationLengthA;
263 
264  mutable utl::Validated<double> fAttenuationLengthB;
265 
266  mutable utl::Validated<double> fAttenuationAmplitudeA;
267 
268  mutable utl::Validated<double> fAttenuationAmplitudeB;
269 
270  mutable utl::Validated<double> fAttenuationLengthASiPM;
271 
272  mutable utl::Validated<double> fAttenuationLengthBSiPM;
273 
274  mutable utl::Validated<double> fAttenuationAmplitudeASiPM;
275 
276  mutable utl::Validated<double> fAttenuationAmplitudeBSiPM;
277 
278  mutable utl::Validated<double> fAttenuationReferenceThickness;
279 
280  mutable utl::Validated<double> fAttenuationReferenceEnergy;
281 
286  typedef std::string AttenuationReferenceForConfig;
287 
288  mutable utl::Validated<AttenuationReferenceForConfig> fAttenuationReference;
289 
291 
292  /*
293  * Other possible further properties:
294  * double GetTrappingEficiency() const;
295  * double GetLightYield() const;
296  */
297 
298  };
299 
300 }
301 
302 #endif // _mdet_Fiber_h
Simple factory to create an enumerator for a given enumeration.
double GetAttenuationLengthASiPM() const
Definition: Fiber.cc:172
AttenuationReference GetAttenuationReference() const
Return the type of refrence to use.
Definition: Fiber.cc:220
double GetOnScintillatorLength() const
The length of the fiber along its scintillator.
Definition: Fiber.cc:72
int fId
Id of the component.
double GetAttenuationAmplitudeA() const
Definition: Fiber.cc:158
utl::Validated< double > fRefractionIndex
Definition: Fiber.h:258
utl::Validated< double > fAttenuationAmplitudeBSiPM
Definition: Fiber.h:276
unsigned int ComputeSPENumber(double x, double l, double e) const
Computes a number of SPE given the impinging distance, the length of the track and the energy of the ...
Definition: Fiber.cc:227
Mixin class to be inherited from objects that have a position.
Defines within it the common (templated) type for muon detector hierarchy components.
utl::Validated< double > fAttenuationAmplitudeASiPM
Definition: Fiber.h:274
double GetRadius() const
The radius of the fiber.
Definition: Fiber.cc:88
utl::Validated< double > fAttenuationReferenceEnergy
Definition: Fiber.h:280
friend void boost::checked_delete(T *) BOOST_NOEXCEPT
Friendship for destruction.
static const char *const AttenuationReferenceTags[]
Tags for textual representation.
Definition: Fiber.h:179
double GetAttenuationLengthA() const
Definition: Fiber.cc:144
std::string AttenuationReferenceForConfig
Alias for a type considered within the config hierarchy, to be converted to the actual enum...
Definition: Fiber.h:286
double GetAttenuationLengthBSiPM() const
Definition: Fiber.cc:179
utl::Validated< double > fAttenuationLengthB
Definition: Fiber.h:264
#define V
~Fiber()
Definition: Fiber.h:231
boost::shared_ptr< const CoordinateTransformer > CoordinateSystemPtr
Shared pointer for coordinate systems.
double GetDecayTime() const
The characteristic decay time of the fiber.
Definition: Fiber.cc:109
double GetNumericalAperture() const
The numerical aperture of the fiber.
Definition: Fiber.cc:95
utl::Validated< double > fAttenuationLengthASiPM
Definition: Fiber.h:270
Array of Scintillator.
AttenuationReference
Kinds of possible attenuation references.
Definition: Fiber.h:169
utl::Validated< double > fOnScintillatorLength
Definition: Fiber.h:250
double GetAttenuationReferenceThickness() const
Definition: Fiber.cc:200
utl::Validated< double > fAttenuationAmplitudeB
Definition: Fiber.h:268
utl::Validated< double > fAttenuationLengthA
Definition: Fiber.h:262
utl::CoordinateSystemPtr GetReferenceCoordinateSystem() const
The reference is the local coordinate system of mdet::Scintillator.
Definition: Fiber.cc:57
double GetAttenuationAmplitudeASiPM() const
Definition: Fiber.cc:186
double GetDecayDelayMean() const
The mean value of the delay time.
Definition: Fiber.cc:128
double GetDecayDelayStdDev() const
The standard deviation fo the delay time.
Definition: Fiber.cc:136
utl::Validated< AttenuationReferenceForConfig > fAttenuationReference
Definition: Fiber.h:288
V & VisitShape(V &v) const
Callback method to query shape specific properties.
Definition: Fiber.h:89
utl::Validated< double > fRadius
Definition: Fiber.h:256
utl::Validated< double > fAttenuationLengthBSiPM
Definition: Fiber.h:272
const Module & GetModule() const
Retrieve the parent mdet::Module.
Definition: Fiber.h:144
std::string const
Returns the message that identifies this component.
static const char *const kComponentId
Definition: Fiber.h:62
utl::ConsecutiveEnumFactory< AttenuationReference, eEnergy, AttenuationReferenceTags > AttenuationReferenceCreator
Convenience typedef for creation of AttenuatioReference enums.
Definition: Fiber.h:185
double GetAttenuationAmplitudeBSiPM() const
Definition: Fiber.cc:193
std::map< std::string, std::string > IndexMap
Definition: VManager.h:133
double GetAttenuationAmplitudeB() const
Definition: Fiber.cc:165
utl::Validated< double > fDecayTime
Definition: Fiber.h:260
double GetAttenuationLengthB() const
Definition: Fiber.cc:151
const Module & fModule
Definition: Fiber.h:290
utl::Validated< double > fOnManifoldLength
Definition: Fiber.h:252
double ComputeDecayDelay() const
Computes a delay due to decay process.
Definition: Fiber.cc:116
utl::Validated< double > fNumericalAperture
Definition: Fiber.h:254
Optical mdet::Fiber used to conect mdet::Scintillator to mdet::Pixel.
Definition: Fiber.h:54
Type
The type of file that we are acutally opening.
Definition: IoCodes.h:33
static const char *const kComponentName
Definition: Fiber.h:60
utl::Validated< double > fAttenuationAmplitudeA
Definition: Fiber.h:266
double GetAttenuationReferenceEnergy() const
Definition: Fiber.cc:207
Fiber(int fId, const det::VManager::IndexMap &parentMap, const Module &parent)
Constructs the Fiber (obviously!).
Definition: Fiber.cc:267
utl::Validated< double > fAttenuationReferenceThickness
Definition: Fiber.h:278
double GetRefractionIndex() const
The refraction (or refractive) index of the fiber.
Definition: Fiber.cc:102
double GetOnManifoldLength() const
The length of the fiber along the path that joins the scintillator to its pixel on the PMT...
Definition: Fiber.cc:65
The child the information from the parent upon construction.

, generated on Tue Sep 26 2023.