Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DDIRCGeometry.h
Go to the documentation of this file.
1 // $Id$
2 //
3 // File: DDIRCGeometry.h
4 //
5 
6 #ifndef _DDIRCGeometry_
7 #define _DDIRCGeometry_
8 
9 #include <JANA/JFactory.h>
10 #include <JANA/JObject.h>
11 #include <JANA/JCalibration.h>
12 
13 using namespace jana;
14 
15 class DDIRCGeometry : public JObject {
16 
17 public:
18 
19  JOBJECT_PUBLIC(DDIRCGeometry);
20 
21  DDIRCGeometry(int runnumber);
23 
24  // these numbers are fixed for the DIRC as constructed
25  // it probably doesn't make sense to retrieve them
26  // from a database as they aren't going to change unless
27  // the detector is reconstructed
28 
29  // get bar # from y positions
30  int GetBar ( float y ) const;
31  // get bar X, Y and Length from bar #
32  double GetBarY ( int locBar ) const;
33  double GetBarEnd ( int locBar ) const;
34  double GetBarLength ( int locBar ) const;
35 
36  // get PMT and Pixel indices
37  int GetPmtID ( int channel ) const;
38  int GetPmtRow ( int channel ) const;
39  int GetPmtColumn ( int channel ) const;
40  int GetPixelID ( int channel ) const;
41  int GetPmtPixelRow ( int channel ) const;
42  int GetPmtPixelColumn ( int channel ) const;
43  int GetPixelRow ( int channel ) const;
44  int GetPixelColumn ( int channel ) const;
45  int GetPixelX ( int channel ) const;
46  int GetPixelY ( int channel ) const;
47 
48  void toStrings(vector<pair<string,string> > &items) const {
49  //AddString(items, "kBlocksWide", "%d", (int)kBlocksWide);
50  //AddString(items, "kBlocksTall", "%d", (int)kBlocksTall);
51  //AddString(items, "kMaxChannels", "%d", (int)kMaxChannels);
52  //AddString(items, "kBeamHoleSize", "%2.3f", (int)kBeamHoleSize);
53  }
54 
55 private:
56 
57  DDIRCGeometry(); // forbid default constructor
58  void Initialize(int runnumber);
59 
60  int CHANNEL_PER_PMT, PMT_ROWS, PMT_COLUMNS;
61 
62  double DIRC_BAR_END[48], DIRC_BAR_Y[48], DIRC_BAR_L[48];
63  double DIRC_LUT_Z;
64  double DIRC_QZBL_DY;
65 };
66 
67 #endif // _DDIRCGeometry_
68 
#define y
void toStrings(vector< pair< string, string > > &items) const
Definition: DDIRCGeometry.h:48
double DIRC_LUT_Z
Definition: DDIRCGeometry.h:63
double DIRC_QZBL_DY
Definition: DDIRCGeometry.h:64