Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SUPERPMT.hh
Go to the documentation of this file.
1 #ifndef __SUPERPMT__
2 #define __SUPERPMT__
3 
4 //Jpp
6 
7 //JNanobeacons
8 #include "NBPulse.hh"
9 
10 //namespaces
11 using namespace JDETECTOR;
12 using namespace std;
13 
14 /**
15  * \author rgruiz
16  */
17 
18 
19 /**
20  * Class containing a JPMT and a NBPulse object.
21  */
22 class SuperPMT {
23 
25 
26  int channel ;
27 
29 
30 public:
31 
32  /**
33  * Default constructor.
34  */
35  SuperPMT (){}
36 
37 
38 
39  /**
40  * Constructor.
41  * This constructor initializes the SUPERPMT with a JPMT.
42  *
43  * \param pmt_ A JPMT.
44  */
45  SuperPMT (JPMT pmt_){
46 
47  pmt = pmt_ ;
48 
49  }
50 
51 
52 
53  /**
54  * Constructor.
55  * This constructor initializes the SUPERPMT from a JPMT and a 2D histogram
56  *
57  * \param pmt_ A JPMT.
58  * \param timetot_ The time vs ToT distribution of hits detected by the pmt_
59  */
60  SuperPMT (JPMT pmt_ , TH2D* timetot_){
61 
62  pmt = pmt_ ;
63 
64  pulse = new NBPulse (timetot_) ;
65 
66  }
67 
68 
69  /**
70  * Constructor.
71  * This constructor initializes the SUPERPMT from a JPMT and a 2D histogram
72  *
73  * \param pmt_ A JPMT.
74  * \param timetot_ The time vs ToT distribution of hits detected by the pmt_
75  * \param ch FPGA channel of the PMT
76  */
77  SuperPMT (JPMT pmt_ , TH2D* timetot_ , int ch){
78 
79  pmt = pmt_ ;
80 
81  pulse = new NBPulse (timetot_) ;
82 
83  channel = ch ;
84 
85  }
86 
87 
88 
89  /**
90  * Destructor.
91  */
93 
94  delete(pulse) ;
95 
96  }
97 
98 
99 
100  /**
101  * Returns a pointer to the NBPulse of this SUPERPMT.
102  *
103  * \return A pulse and all its characteristics
104  */
106 
107  return pulse ;
108 
109  }
110 
111 
112 
113  /**
114  * Returns the JPMT from of this SUPERPMT.
115  *
116  * \return The corresponding JPMT
117  */
119 
120  return pmt ;
121 
122  }
123 
124 
125 
126  /**
127  * Returns the id of the JPMT of this SUPERPMT.
128  *
129  * \return The PMT id
130  */
131  int getID () {
132 
133  return pmt.getID();
134 
135  }
136 
137 
138  /**
139  * Returns the FPGA channel of the JPMT of this SUPERPMT.
140  *
141  * \return The PMT FPGA channel
142  */
143  int getChannel () {
144 
145  return channel;
146 
147  }
148 
149 
150 
151  /**
152  * Sets the time vs ToT distribution of the hits recorded by the JPMT of this SUPERPMT.
153  * \param timetot_ a pointer to a TH2D containing the time vs ToT distribution of the hits detected by the SUPERPMT.
154  */
155  void setNBPulse(TH2D* timetot_) {
156 
157  pulse = new NBPulse (timetot_) ;
158 
159  }
160 
161 
162 
163  /**
164  * Sets the JPMT of this SUPERPMT.
165  * \param pmt_ theJPMT of this SUPERPMT.
166  */
167  void setPMT (JPMT pmt_) {
168 
169  pmt = pmt_ ;
170 
171  }
172 
173 
174 
175  /**
176  * Performs a fast analysis of the NBPulse of this SUPERPMT
177  */
178  void analyzeFast() {
179 
180  pulse->analyzeFast() ;
181 
182  }
183 
184 
185 
186  /**
187  * Fits the NBPulse of this SUPERPMT
188  */
189  void fit() {
190 
191  pulse->fit() ;
192 
193  }
194 
195 };
196 
197 
198 #endif
SuperPMT()
Default constructor.
Definition: SUPERPMT.hh:35
void setPMT(JPMT pmt_)
Sets the JPMT of this SUPERPMT.
Definition: SUPERPMT.hh:167
void analyzeFast()
Performs a fast analysis of the NBPulse of this SUPERPMT.
Definition: SUPERPMT.hh:178
NBPulse * pulse
Definition: SUPERPMT.hh:28
int channel
Definition: SUPERPMT.hh:26
int getChannel()
Returns the FPGA channel of the JPMT of this SUPERPMT.
Definition: SUPERPMT.hh:143
Analyzes the signal of a nanobeacon in a PMT.
Definition: NBPulse.hh:33
int getID()
Returns the id of the JPMT of this SUPERPMT.
Definition: SUPERPMT.hh:131
void fit()
Fits the NBPulse of this SUPERPMT.
Definition: SUPERPMT.hh:189
void setNBPulse(TH2D *timetot_)
Sets the time vs ToT distribution of the hits recorded by the JPMT of this SUPERPMT.
Definition: SUPERPMT.hh:155
SuperPMT(JPMT pmt_)
Constructor.
Definition: SUPERPMT.hh:45
JPMT pmt
Definition: SUPERPMT.hh:24
Class containing a JPMT and a NBPulse object.
Definition: SUPERPMT.hh:22
Data structure for PMT geometry and calibration.
Definition: JPMT.hh:52
SuperPMT(JPMT pmt_, TH2D *timetot_)
Constructor.
Definition: SUPERPMT.hh:60
JPMT getPMT()
Returns the JPMT from of this SUPERPMT.
Definition: SUPERPMT.hh:118
~SuperPMT()
Destructor.
Definition: SUPERPMT.hh:92
SuperPMT(JPMT pmt_, TH2D *timetot_, int ch)
Constructor.
Definition: SUPERPMT.hh:77
NBPulse * getNBPulse()
Returns a pointer to the NBPulse of this SUPERPMT.
Definition: SUPERPMT.hh:105