Geometry.h
Go to the documentation of this file.
1 //File: Geometry.h
2 //Brief: A CRT::Geometry is a mapping from some channel numbering system
3 // to a labelling system for CRT detector components and a mapping
4 // from that labelling system to strip geometries. It serves as a
5 // channel-map-like abstraction that doesn't need to know about the
6 // offline framework.
7 //
8 // A CRT::Geometry is just an interface to such a mapping, so it needs
9 // concrete implmentation(s) to be used.
10 //Author: Andrew Olivier aolivier@ur.rochester.edu
11 
12 #ifndef CRT_GEOMETRY_H
13 #define CRT_GEOMETRY_H
14 
16 
17 namespace CRT
18 {
19  class Geometry
20  {
21  public:
22  //TODO: Decide on a construction process for Geometry
23  Geometry() = default;
24  virtual ~Geometry() = default;
25 
26  //Mapping from (module, channel) pair, like in CRT::Trigger, to strip identifier in
27  //"geometry space". StripID is designed to be more convenient for finding overlaps
28  //between CRT channels.
29  CRT::ModuleID ModuleID(const size_t module) const;
30  CRT::StripID StripID(const size_t module, const size_t channel) const;
31  //TODO: Some struct that encapsulates a (module, channel) pair to make it harder to
32  // get this wrong in the future. Probably entails an update to CRT::Trigger
33  // to do this right.
34 
35  //Mapping from StripID to StripGeo. StripGeos should give all of
36  //the information needed to turn a set of 4 overlapping StripIDs into
37  //a 3D position in the offline coordinate system.
38  //CRT::StripGeo& StripGeo(const CRT::StripID& id) const; //TODO: Write StripGeo
39 
40  private:
41  //Private implementation. Interface implementations must implement these pure
42  //virtual functions.
43  virtual CRT::StripID doStripID(const CRT::ModuleID module, const size_t channel) const = 0;
44  virtual CRT::ModuleID doModuleID(const size_t module) const = 0;
45 
46  //virtual CRT::StripGeo& StripGeo(const CRT::StripID& id) const = 0; //TODO: Write StripGeo
47  };
48 }
49 
50 #endif //CRT_GEOMETRY_H
virtual CRT::StripID doStripID(const CRT::ModuleID module, const size_t channel) const =0
uint8_t channel
Definition: CRTFragment.hh:201
CRT::StripID StripID(const size_t module, const size_t channel) const
Definition: Geometry.cpp:15
virtual ~Geometry()=default
Geometry()=default
CRT::ModuleID ModuleID(const size_t module) const
Definition: Geometry.cpp:10
virtual CRT::ModuleID doModuleID(const size_t module) const =0