AttenCurve.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 // \file AttenCurve.h
3 // \brief Store the results of the attenuation fits
4 // \version $Id: AttenCurve.h,v 1.3 2012-11-11 23:44:14 gsdavies Exp $
5 ////////////////////////////////////////////////////////////////////////
6 #ifndef CALIB_ATTENCURVE_H
7 #define CALIB_ATTENCURVE_H
8 
9 #include <string>
10 #include <vector>
11 
14 #include "NovaDAQConventions/DAQConventions.h"
15 
16 namespace calib{
17 
18  class AttenCurve
19  {
20  public:
21  // Named constructors
22 
23  /// Return a new AttenCurve objects with fields uninitialized
25 
26  /// Mean response of this channel at this distance from detector centre
27  float MeanPEPerCmAt(double w) const;
28  float MeanPEPerCmAt(double w, std::string version) const;
29 
30  // Are the constants in this channel good? If not, calibrated quantities
31  // will be -1
32  bool IsCalibrated() const;
33 
34  void AddInterpPoint(float w, float factor);
35 
36  void WriteToCSVs(FILE* fConsts, FILE* fPoints, bool mc) const;
37 
38  struct Pt
39  {
40  float w, factor;
41  bool operator<(float rhs_w) const {return w < rhs_w;}
42  };
43  std::vector<Pt> interp_pts;
44 
48  float chisq;
49  float cell_length;
50  /// Nonzero in short muon-catcher cells. Positive is closer to readout
52  int det;
55 
56  protected:
58  };
59 
60  std::ostream& operator<<(std::ostream& os, const AttenCurve& res);
61 
62 } // end namespace calib
63 
64 #endif
65 ////////////////////////////////////////////////////////////////////
bool operator<(float rhs_w) const
Definition: AttenCurve.h:41
bool IsCalibrated() const
Definition: AttenCurve.cxx:97
static AttenCurve * Uninitialized(int det, geo::OfflineChan chan)
Return a new AttenCurve objects with fields uninitialized.
Definition: AttenCurve.cxx:25
float center_offset
Nonzero in short muon-catcher cells. Positive is closer to readout.
Definition: AttenCurve.h:51
CDPStorage service.
const XML_Char * version
Definition: expat.h:187
geo::OfflineChan chan
Definition: AttenCurve.h:53
::xsd::cxx::tree::string< char, simple_type > string
Definition: Database.h:154
A (plane, cell) pair.
Definition: OfflineChan.h:17
float MeanPEPerCmAt(double w) const
Mean response of this channel at this distance from detector centre.
Definition: AttenCurve.cxx:37
Float_t w
Definition: plot.C:20
Simple object representing a (plane, cell) pair.
void WriteToCSVs(FILE *fConsts, FILE *fPoints, bool mc) const
Definition: AttenCurve.cxx:129
std::ostream & operator<<(std::ostream &os, const AttenCurve &res)
Definition: AttenCurve.cxx:149
std::vector< Pt > interp_pts
Definition: AttenCurve.h:43
void AddInterpPoint(float w, float factor)
Definition: AttenCurve.cxx:122