ChannelMapStandardAlg.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 /// \file ChannelMapStandardAlg.h
3 /// \brief Interface to algorithm class for a specific detector channel mapping
4 ///
5 /// \version $Id: $
6 /// \author brebel@fnal.gov
7 ////////////////////////////////////////////////////////////////////////
8 #ifndef GEO_CHANNELSTANDARDMAPALG_H
9 #define GEO_CHANNELSTANDARDMAPALG_H
10 
11 #include <vector>
12 #include <set>
13 #include <iostream>
14 
16 #include "fhiclcpp/ParameterSet.h"
18 #include "Geometry/GeometryGAr.h"
19 #include "CoreUtils/ServiceUtil.h"
20 
21 namespace gar{
22  namespace geo{
23  namespace seg{
24 
25  struct XYZPos
26  {
27  XYZPos(float xPos,
28  float yPos,
29  float zPos)
30  : x(xPos)
31  , y(yPos)
32  , z(zPos)
33  {};
34 
35  XYZPos() {x=0; y=0; z=0; };
36 
37  float x;
38  float y;
39  float z;
40 
41  };
42 
44 
45  public:
46 
48 
49  void Initialize(GeometryCore & geo) override;
50  void Uninitialize() override;
51  unsigned int Nchannels() const override;
52  unsigned int NearestChannel(float const* xyz) const override;
53  void NearestChannelInfo(float const* xyz, gar::geo::ChanWithNeighbors &cwn) const override;
54  void ChannelToPosition(unsigned int chan, float *xyz) const override;
55  unsigned int GapChannelNumber() const override { return fGapChannelNumber; };
56  float GetIROCInnerRadius() const override {return fIROCInnerRadius;};
57  float GetIROCOuterRadius() const override {return fIROCOuterRadius;};
58  float GetOROCInnerRadius() const override {return fOROCInnerRadius;};
59  float GetOROCOuterRadius() const override {return fOROCOuterRadius;};
60  float GetOROCPadHeightChangeRadius() const override {return fOROCPadHeightChangeRadius;};
61 
62  private:
63 
64  const gar::geo::GeometryCore* fGeo;
65 
66  void NearestChannelWithROCType(float const *xyz, gar::geo::ROCType &roctype, unsigned int &nearestchannel) const;
67 
68  AliTPCROC *fROC; ///< TPC Readout geometry from ALICE software stack
69  UInt_t fNumSectors; ///< Number of sectors -- should be 18
70  float fSectorOffsetAngleDeg; ///< Angle to rotate to the middle of the first sector -- should be 10 degrees
71  float fPhiSectorWidth; ///< width of a sector in phi (in radians)
72 
73  UInt_t fNumPadRowsIROC; ///< Number of pad rows in the inner ROC -- 64 (TDR) or 63 (ALICE code)
74  UInt_t fNumPadRowsOROCI; ///< Number of small-pitch pad rows in the outer ROC
75  UInt_t fNumPadRowsOROCO; ///< Number of large-pitch pad rows in the outer ROC
76  float fPadHeightIROC; ///< Pad height in the inner ROC (cm)
77  float fPadWidthIROC; ///< Pad width in the inner ROC (cm)
78  float fPadHeightOROCI; ///< Pad height in the outer ROC inner part (cm)
79  float fPadHeightOROCO; ///< Pad height in the outer ROC outer part (cm)
80  float fPadWidthOROC; ///< Pad width in the OROC (assumed same for both sections)
81 
82  float fIROCInnerRadius; ///< Radius from the beam in cm along the midline of the sector to the inner IROC row inner edge
83  float fIROCOuterRadius; ///< Radius from the beam in cm along the midline of the sector to the outer IROC row outer edge
84  float fOROCInnerRadius; ///< Radius from the beam in cm along the midline of the sector to the inner OROC row inner edge
85  float fOROCPadHeightChangeRadius; ///< Radius from the beam in cm along the midline of the sector to the OROC pad height change
86  float fOROCOuterRadius; ///< Radius from the beam in cm along the midline of the sector to the outer OROC row outer edge
87 
88  float fXPlaneLoc; ///< Location of pixel plane in X (only positive. Assume other one is at -X)
89 
90  std::vector<UInt_t> fNumPadsPerRow; ///< indexed by "global" pad row number for a single sector
91  std::vector<UInt_t> fFirstPadInRow; ///< indexed by "global" pad row number for a single sector
92 
93  std::vector<XYZPos> fPixelCenters; ///< pixel centers (in cm) -- for the entire detector
94 
95  UInt_t fNumChansPerSector; ///< Number of TPC pad channels per sector
96 
97  // variables for the hole filler grid
98 
99  std::vector<UInt_t> fCenterNumPadsPerRow; ///< pads per row for the center hole filler
100  std::vector<UInt_t> fCenterFirstPadInRow; ///< first pad in row for center hole filler
101 
102  float fCenterPadWidth; ///< Width of square pads in center hole filler
103  UInt_t fNumChansCenter; ///< Number of channels in center hole filler
104 
105  void CheckPositions(); ///< Method to check consistency of NearestChannel and ChannelToPosition
106 
107  XYZPos fTPCCenter; ///< Location of the center of the TPC
108 
109  UInt_t fGapChannelNumber; ///< channel number GetNearestChannel returns when xyz is in a gap
110  };
111 
112  }
113  } // end namespace geo
114 } // end namespace gar
115 #endif // GEO_CHANNELMAPSTANDARDALG_H
std::vector< gar::geo::ChanWithPos > ChanWithNeighbors
Definition: GeometryCore.h:91
float fPadWidthOROC
Pad width in the OROC (assumed same for both sections)
UInt_t fNumChansPerSector
Number of TPC pad channels per sector.
UInt_t fNumPadRowsOROCO
Number of large-pitch pad rows in the outer ROC.
std::vector< UInt_t > fCenterNumPadsPerRow
pads per row for the center hole filler
float fPhiSectorWidth
width of a sector in phi (in radians)
XYZPos(float xPos, float yPos, float zPos)
float fPadHeightOROCI
Pad height in the outer ROC inner part (cm)
unsigned int GapChannelNumber() const override
float fPadHeightOROCO
Pad height in the outer ROC outer part (cm)
float fIROCOuterRadius
Radius from the beam in cm along the midline of the sector to the outer IROC row outer edge...
Description of geometry of one entire detector.
Definition: GeometryCore.h:436
AliTPCROC * fROC
TPC Readout geometry from ALICE software stack.
std::vector< UInt_t > fFirstPadInRow
indexed by "global" pad row number for a single sector
std::vector< UInt_t > fCenterFirstPadInRow
first pad in row for center hole filler
float fXPlaneLoc
Location of pixel plane in X (only positive. Assume other one is at -X)
float fOROCInnerRadius
Radius from the beam in cm along the midline of the sector to the inner OROC row inner edge...
float fPadWidthIROC
Pad width in the inner ROC (cm)
float fOROCPadHeightChangeRadius
Radius from the beam in cm along the midline of the sector to the OROC pad height change...
XYZPos fTPCCenter
Location of the center of the TPC.
float fIROCInnerRadius
Radius from the beam in cm along the midline of the sector to the inner IROC row inner edge...
enum gar::geo::ROCType_ ROCType
p
Definition: test.py:223
void Initialize(void)
float GetOROCPadHeightChangeRadius() const override
float fCenterPadWidth
Width of square pads in center hole filler.
UInt_t fNumPadRowsIROC
Number of pad rows in the inner ROC – 64 (TDR) or 63 (ALICE code)
float fOROCOuterRadius
Radius from the beam in cm along the midline of the sector to the outer OROC row outer edge...
UInt_t fNumSectors
Number of sectors – should be 18.
float fPadHeightIROC
Pad height in the inner ROC (cm)
std::vector< UInt_t > fNumPadsPerRow
indexed by "global" pad row number for a single sector
General GArSoft Utilities.
Geometry class for a single ROC.
Definition: AliTPCROC.h:14
std::vector< XYZPos > fPixelCenters
pixel centers (in cm) – for the entire detector
UInt_t fNumChansCenter
Number of channels in center hole filler.
float fSectorOffsetAngleDeg
Angle to rotate to the middle of the first sector – should be 10 degrees.
UInt_t fGapChannelNumber
channel number GetNearestChannel returns when xyz is in a gap
LArSoft geometry interface.
Definition: ChannelGeo.h:16
art framework interface to geometry description
UInt_t fNumPadRowsOROCI
Number of small-pitch pad rows in the outer ROC.