StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StFgtQaClusterChargePerAPV.h
1 
6 /***************************************************************************
7  *
8  * $Id: StFgtQaClusterChargePerAPV.h,v 1.2 2012/01/31 09:31:37 sgliske Exp $
9  * Author: S. Gliske, Oct 2011
10  *
11  ***************************************************************************
12  *
13  * Description: Maker to make a histogram of the charge per cluster,
14  * combined for all r (or phi) strips connected to single APV.
15  *
16  ***************************************************************************
17  *
18  * $Log: StFgtQaClusterChargePerAPV.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.2 2011/11/01 19:07:24 sgliske
26  * Updated to correspond with StEvent containers, take 2.
27  *
28  * Revision 1.1 2011/10/10 17:40:36 sgliske
29  * creation
30  *
31  *
32  **************************************************************************/
33 
34 #ifndef _ST_FGT_QA_CLUSTER_CHARGE_PER_APV_
35 #define _ST_FGT_QA_CLUSTER_CHARGE_PER_APV_
36 
37 #include <string>
38 #include <TH2F.h>
39 
40 #include "StFgtQaMaker.h"
41 #include "StRoot/StFgtPool/StFgtPedMaker/StFgtPedReader.h"
42 #include "StRoot/StFgtPool/StFgtPedMaker/StFgtPedReader.h"
43 
44 
46  public:
47  // constructors
48  StFgtQaClusterChargePerAPV( const Char_t* name = "FGT_QA_Adc_vs_Channel",
49  Short_t discId = 0,
50  Short_t quadId = 0,
51  Short_t apvID = 0,
52  const Char_t* quadName = "000" );
54 
55  // deconstructor
57 
58  // equals operator
60 
61  Int_t Init();
62  Int_t Make();
63  Int_t Finish();
64 
65  // accessor/modifers
66  TH1F* getHistR(Int_t i);
67  TH1F* getHistPhi(Int_t i);
68 
69  // modifiers
70  void setNbins( Int_t nbins );
71  void setRange( Float_t min, Float_t max );
72  void setUnits( const Char_t *units );
73 
74  protected:
75  // the histograms
76  TH1F *mHistR[10], *mHistPhi[10];
77 
78  // histo parameters
79  Int_t mNbins;
80  Float_t mChargeMin, mChargeMax;
81  std::string mUnits;
82 
83  private:
84  ClassDef(StFgtQaClusterChargePerAPV,1);
85 };
86 
87 // inline functions
88 
89 // accessors
90 inline TH1F* StFgtQaClusterChargePerAPV::getHistR(Int_t i){
91  return (i<10 && i > -1) ? mHistR[i] : 0;
92 };
93 inline TH1F* StFgtQaClusterChargePerAPV::getHistPhi(Int_t i){
94  return (i<10 && i > -1) ? mHistPhi[i] : 0;
95 };
96 
97 inline void StFgtQaClusterChargePerAPV::setNbins( Int_t nbins ){ mNbins = nbins; };
98 inline void StFgtQaClusterChargePerAPV::setRange( Float_t min, Float_t max ){ mChargeMin = min; mChargeMax = max; };
99 inline void StFgtQaClusterChargePerAPV::setUnits( const Char_t* units ){ mUnits = units; };
100 
101 #endif