StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StFgtQaMaker.h
1 
6 /***************************************************************************
7  *
8  * $Id: StFgtQaMaker.h,v 1.2 2012/01/31 09:31:37 sgliske Exp $
9  * Author: S. Gliske, Sept 2011
10  *
11  ***************************************************************************
12  *
13  * Description: Common parent for QA makers. Defines certain member
14  * functions commonly used by QA makers.
15  *
16  ***************************************************************************
17  *
18  * $Log: StFgtQaMaker.h,v $
19  * Revision 1.2 2012/01/31 09:31:37 sgliske
20  * includes updated for things moved to StFgtPooll
21  *
22  * Revision 1.1 2012/01/31 09:26:17 sgliske
23  * StFgtQaMakers moved to StFgtPool
24  *
25  * Revision 1.4 2011/11/01 19:07:24 sgliske
26  * Updated to correspond with StEvent containers, take 2.
27  *
28  * Revision 1.3 2011/09/29 18:39:21 sgliske
29  * Update for geoId->elecCoord function now in StFgtCosmicTestStandGeom
30  *
31  * Revision 1.2 2011/09/28 17:48:50 sgliske
32  * minor updates
33  *
34  * Revision 1.1 2011/09/27 15:28:17 sgliske
35  * added common StFgtQaMaker parent
36  *
37  *
38  **************************************************************************/
39 
40 #ifndef _ST_FGT_QA_MAKER_H_
41 #define _ST_FGT_QA_MAKER_H_
42 
43 #include <string>
44 #include "StMaker.h"
45 
46 #include "StRoot/StFgtPool/StFgtPedMaker/StFgtPedReader.h"
47 #include "StRoot/StFgtPool/StFgtPedMaker/StFgtPedReader.h"
48 class StFgtCollection;
49 
50 class StFgtQaMaker : public StMaker {
51  public:
52  // constructors
53  StFgtQaMaker( const Char_t* name = "FGT_QA_Adc_vs_Channel",
54  Short_t discId = 0,
55  Short_t quadId = 0,
56  const Char_t* quadName = "000" );
57  StFgtQaMaker(const StFgtQaMaker&);
58 
59  // deconstructor
60  virtual ~StFgtQaMaker();
61 
62  // equals operator
63  StFgtQaMaker& operator=(const StFgtQaMaker&);
64 
65  virtual Int_t Init();
66  virtual Int_t Make();
67 
68  // modifiers
69  void setDisc( Short_t discId );
70  void setQuad( Short_t quadId );
71  void setTimeBin( Short_t timeBin );
72  void setQuadName( const Char_t* quadName );
73  void setToPlotVsStrip( Char_t strip = 'R' ); // set anything besides 'r', 'R', or 'P' to do vs channel
74  // r is chamber 1 radial, 'R' is chamber 2 radial
75  void setToSubtrPeds( Bool_t doIt );
76  void setPedReaderFile( const Char_t* filename );
77  void setPedThres( Float_t thres );
78  void setXbins( Int_t nbins );
79  void setXrange( Float_t low, Float_t high );
80  void setYbins( Int_t nbins );
81  void setYrange( Float_t low, Float_t high );
82  void setBinFactors( Int_t factorX, Int_t factorY );
83 
84  protected:
85  // for accessing the data
86  StFgtCollection *mFgtCollectionPtr;
87 
88  // for knowing what & how to plot
89  Short_t mDiscId, mQuadId, mTimeBin;
90  Char_t mDoVsStrip;
91  Bool_t mDoSubtrPeds;
92  Int_t mXbins, mYbins;
93  Float_t mXmin, mXmax, mYmin, mYmax;
94  Int_t mBinFactorX, mBinFactorY;
95 
96  // for labeling the plot
97  std::string mQuadName;
98 
99  // for the ped reader
100  StFgtPedReader *mPedReader;
101  std::string mPedFile;
102 
103  // threshold, in units of # sigma above average
104  Float_t mPedThres;
105 
106  private:
107  ClassDef(StFgtQaMaker,1);
108 
109 };
110 
111 // inline functions
112 
113 // modifiers
114 inline void StFgtQaMaker::setDisc( Short_t discId ){ mDiscId = discId; };
115 inline void StFgtQaMaker::setQuad( Short_t quadId ){ mQuadId = quadId; };
116 inline void StFgtQaMaker::setTimeBin( Short_t timeBin ){ mTimeBin = timeBin; };
117 inline void StFgtQaMaker::setQuadName( const Char_t* quadName ){ mQuadName = quadName; };
118 inline void StFgtQaMaker::setToSubtrPeds( Bool_t doIt ){ mDoSubtrPeds = doIt; };
119 inline void StFgtQaMaker::setPedReaderFile( const Char_t* filename ){ mPedFile = filename; };
120 inline void StFgtQaMaker::setPedThres( Float_t thres ){ mPedThres = thres; };
121 
122 inline void StFgtQaMaker::setXbins( Int_t nbins ){ mXbins = nbins; };
123 inline void StFgtQaMaker::setXrange( Float_t low, Float_t high ){ mXmin = low; mXmax = high; };
124 inline void StFgtQaMaker::setYbins( Int_t nbins ){ mYbins = nbins; };
125 inline void StFgtQaMaker::setYrange( Float_t low, Float_t high ){ mYmin = low; mYmax = high; };
126 
127 inline void StFgtQaMaker::setBinFactors( Int_t factorX, Int_t factorY ){
128  mBinFactorX = factorX;
129  mBinFactorY = factorY;
130 };
131 
132 inline void StFgtQaMaker::setToPlotVsStrip( Char_t strip ){
133  mDoVsStrip = ( (strip == 'R' || strip == 'P' || strip == 'r' ) ? strip : 'c' );
134 };
135 
136 #endif
virtual Int_t Make()