Hall A ROOT/C++ Analyzer (podd)
Loading...
Searching...
No Matches
THaScintillator.cxx
Go to the documentation of this file.
1
2// //
3// THaScintillator //
4// //
5// Class for a generic scintillator (hodoscope) consisting of multiple //
6// paddles with phototubes on both ends. //
7// //
9
10#include "THaScintillator.h"
11#include "THaEvData.h"
12#include "THaDetMap.h"
13#include "THaTrackProj.h"
14#include "VarDef.h"
15#include "VarType.h"
16#include "Helper.h"
17#include "THaTrack.h"
18#include "TClonesArray.h"
19#include "TMath.h"
20
21#include <iostream>
22#include <cassert>
23#include <iomanip>
24#include <cstdlib>
25#include <algorithm>
26#include <memory>
27
28using namespace std;
29using namespace Podd;
30
31#if __cplusplus >= 201402L
32# define MKPMTDATA(name,title,nelem) make_unique<PMTData>((name),(title),(nelem))
33#else
34# define MKPMTDATA(name,title,nelem) unique_ptr<PMTData>(new PMTData((name),(title),(nelem)))
35#endif
36
37//_____________________________________________________________________________
38THaScintillator::THaScintillator( const char* name, const char* description,
39 THaApparatus* apparatus )
40 : THaNonTrackingDetector(name,description,apparatus), fCn(0),
41 fAttenuation(0), fResolution(0), fRightPMTs(nullptr), fLeftPMTs(nullptr)
42{
43 // Constructor
44
45 fNviews = 2;
46}
47
48//_____________________________________________________________________________
50 : THaNonTrackingDetector(), fCn(0), fAttenuation(0), fResolution(0),
51 fRightPMTs(nullptr), fLeftPMTs(nullptr)
52{
53 // Default constructor (for ROOT RTTI)
54
55 fNviews = 2;
56}
57
58//_____________________________________________________________________________
60{
61 // Read this detector's parameters from the database
62
63 const char* const here = "ReadDatabase";
64
65 VarType kDataType = std::is_same<Data_t, Float_t>::value ? kFloat : kDouble;
66 VarType kDataTypeV = std::is_same<Data_t, Float_t>::value ? kFloatV : kDoubleV;
67
68 FILE* file = OpenFile( date );
69 if( !file ) return kFileError;
70
71 // Read fOrigin and fSize (required!)
72 Int_t err = ReadGeometry( file, date, true );
73 if( err ) {
74 fclose(file);
75 return err;
76 }
77
78 enum { kModeUnset = -255, kCommonStop = 0, kCommonStart = 1 };
79
80 vector<Int_t> detmap;
81 Int_t nelem = 0;
82 Int_t tdc_mode = kModeUnset;
83 Data_t tdc2t = 5e-10; // TDC resolution (s/channel), for reference, required anyway
84
85 // Read configuration parameters
86 DBRequest config_request[] = {
87 { "detmap", &detmap, kIntV },
88 { "npaddles", &nelem, kInt },
89 { "tdc.res", &tdc2t, kDataType },
90 { "tdc.cmnstart", &tdc_mode, kInt, 0, true },
91 { nullptr }
92 };
93 err = LoadDB( file, date, config_request, fPrefix );
94
95 // Sanity checks
96 if( !err && nelem <= 0 ) {
97 Error( Here(here), "Invalid number of paddles: %d", nelem );
98 err = kInitError;
99 }
100
101 // Reinitialization only possible for same basic configuration
102 if( !err ) {
103 if( fIsInit && nelem != fNelem ) {
104 Error( Here(here), "Cannot re-initialize with different number of paddles. "
105 "(was: %d, now: %d). Detector not re-initialized.", fNelem, nelem );
106 err = kInitError;
107 } else
108 fNelem = nelem;
109 }
110
112 if( !err && FillDetMap(detmap, flags, here) <= 0 ) {
113 err = kInitError; // Error already printed by FillDetMap
114 }
115
116 UInt_t nval = fNelem;
117 if( !err ) {
118 UInt_t tot_nchan = fDetMap->GetTotNumChan();
119 if( tot_nchan != 4 * nval ) {
120 Error(Here(here), "Number of detector map channels (%u) "
121 "inconsistent with 4*number of paddles (%d)",
122 tot_nchan, 4*fNelem);
123 err = kInitError;
124 }
125 }
126
127 // Deal with the TDC mode (common stop (default) vs. common start).
128 if( tdc_mode == kModeUnset ) {
129 // TDC mode not specified. Mimic the behavior of previous analyzer versions.
130 // TDCs are always common stop unless c.start mode is explicitly requested.
131 tdc_mode = kCommonStop;
132 } else {
133 // TDC mode IS explicitly specified
134 if( tdc_mode != kCommonStop && tdc2t < 0.0 ) {
135 // A negative TDC resolution, tdc2t, in a legacy databases indicates
136 // common stop mode. Warn user if tdc_mode and tdc2t are inconsistent.
137 // tdc_mode takes preference.
138 Warning(Here(here), "Negative TDC resolution = %lf converted to "
139 "positive since TDC mode explicitly set to common start.",tdc2t);
140 }
141 }
142 assert( tdc_mode != kModeUnset );
143 // Ensure tdc2t is positive. The tdc_mode flag handles the sign now.
144 tdc2t = TMath::Abs(tdc2t);
145
146 // Set module capability flags for legacy databases without model info
147 // This implementation makes the following assumptions about the detector map:
148 // - The first half of the map entries corresponds to ADCs,
149 // the second half, to TDCs.
150 // - The first fNelem detector channels correspond to the PMTs on the
151 // right hand side, the next fNelem channels, to the left hand side.
152 // (Thus channel numbering for each module must be consecutive.)
153 UInt_t nmodules = fDetMap->GetSize();
154 for( UInt_t i = 0; i < nmodules; i++ ) {
156 if( !d->model ) {
157 if( i < nmodules/2 ) d->MakeADC(); else d->MakeTDC();
158 }
159 if( d->IsTDC() )
160 d->SetTDCMode(tdc_mode);
161 }
162
163 if( err ) {
164 fclose(file);
165 return err;
166 }
167
168 // Set up storage for basic detector data
169 // Per-event data
170 fDetectorData.clear();
171 for( int i = kRight; i <= kLeft; ++i ) {
172 auto detdata = MKPMTDATA(GetPrefixName(), fTitle, nval);
173 // Keep pointers to the elements around for convenient access
174 PMTData*& pmtData = (i == kRight) ? fRightPMTs : fLeftPMTs;
175 pmtData = detdata.get();
176 assert(pmtData->GetSize() - nval == 0);
177 fDetectorData.emplace_back(std::move(detdata));
178 }
179 fPadData.resize(nval);
180 fHits.reserve(nval);
181
182 // Read calibration parameters
183
184 // Reset calibrations. In particular, this will set the default TDC offsets (0),
185 // ADC pedestals (0) and ADC gains (1).
186 Reset();
187
188 // Set other DEFAULT values here
189 fResolution = kBig; // actual timing resolution
190 // Speed of light in the scintillator material
191 fCn = 1.7e+8; // meters/second (for reference, required anyway)
192 // Attenuation length
193 fAttenuation = 0.7; // inverse meters
194 Data_t adcmip = 1.e10; // large number for offset, so reference is effectively disabled
195
196 vector<Data_t> loff, roff, lped, rped, lgain, rgain, twalk;
197 DBRequest calib_request[] = {
198 { "L.off", &loff, kDataTypeV, nval, true },
199 { "R.off", &roff, kDataTypeV, nval, true },
200 { "L.ped", &lped, kDataTypeV, nval, true },
201 { "R.ped", &rped, kDataTypeV, nval, true },
202 { "L.gain", &lgain, kDataTypeV, nval, true },
203 { "R.gain", &rgain, kDataTypeV, nval, true },
204 { "Cn", &fCn, kDataType },
205 { "MIP", &adcmip, kDataType, 0, true },
206 // timewalk coefficients for tw = coeff*(1./sqrt(ADC-Ped)-1./sqrt(ADCMip))
207 // TODO: Perhaps the timewalk parameters should be split into L/R blocks?
208 // Currently, these need to be 2*nelem numbers, first nelem for the RPMTs,
209 // then another nelem for the LPMTs. Easy to mix up.
210 { "timewalk_params", &twalk, kDataTypeV, 2*nval, true },
211 { "avgres", &fResolution, kDataType, 0, true },
212 { "atten", &fAttenuation, kDataType, 0, true },
213 { nullptr }
214 };
215 err = LoadDB( file, date, calib_request, fPrefix );
216 fclose(file);
217 if( err )
218 return err;
219
220 // Copy calibration constants to the PMTData in fDetectorData
221 for( UInt_t i = 0; i < nval; ++i ) {
222 auto& calibR = fRightPMTs->GetCalib(i);
223 auto& calibL = fLeftPMTs->GetCalib(i);
224 calibR.tdc2t = tdc2t;
225 calibR.off = roff[i];
226 calibR.ped = rped[i];
227 calibR.gain = rgain[i];
228 calibR.mip = adcmip;
229 calibL.tdc2t = tdc2t;
230 calibL.off = loff[i];
231 calibL.ped = lped[i];
232 calibL.gain = lgain[i];
233 calibR.mip = adcmip;
234 if( !twalk.empty() ) {
235 calibR.twalk = twalk[i];
236 calibL.twalk = twalk[nval+i];
237 } else {
238 calibR.twalk = calibL.twalk = 0;
239 }
240 }
241 if( fResolution == kBig )
242 fResolution = 3.*tdc2t; // guess at timing resolution
243
244#ifdef WITH_DEBUG
245 // Debug printout
246 if ( fDebug > 2 ) {
247 const auto N = static_cast<UInt_t>(fNelem);
248 Double_t pos[3]; fOrigin.GetXYZ(pos);
249 DBRequest list[] = {
250 { "Number of paddles", &fNelem, kInt },
251 { "Detector position", pos, kDouble, 3 },
252 { "Detector size", fSize, kDouble, 3 },
253 { "TDC offsets Left", &loff, kDataTypeV, N },
254 { "TDC offsets Right", &roff, kDataTypeV, N },
255 { "ADC pedestals Left", &lped, kDataTypeV, N },
256 { "ADC pedestals Right", &rped, kDataTypeV, N },
257 { "ADC gains Left", &lgain, kDataTypeV, N },
258 { "ADC gains Right", &rgain, kDataTypeV, N },
259 { "TDC resolution", &tdc2t, kDataType },
260 { "TDC mode", &tdc_mode, kInt },
261 { "Light propag. speed", &fCn, kDataType },
262 { "ADC MIP", &adcmip, kDataType },
263 { "Timewalk params", &twalk, kDataTypeV, 2*N },
264 { "Time resolution", &fResolution, kDataType },
265 { "Attenuation", &fAttenuation, kDataType },
266 { nullptr }
267 };
268 DebugPrint( list );
269 }
270#endif
271
272 fIsInit = true;
273 return kOK;
274}
275
276//_____________________________________________________________________________
278{
279 // Define global analysis variables
280
281 // Add variables for left- and right-side PMT raw data
282 class VarDefInfo {
283 public:
284 PMTData* pmtData;
285 const char* key_prefix;
286 const char* comment_subst;
287 Int_t DefineVariables( EMode mode ) const // Convenience function
288 { return pmtData->DefineVariables(mode, key_prefix, comment_subst); }
289 };
290 const vector<VarDefInfo> sides = {
291 { fRightPMTs, "r", "right-side" },
292 { fLeftPMTs, "l", "left-side" }
293 };
294 for( const auto& side : sides )
295 if( Int_t ret = side.DefineVariables(mode) )
296 return ret;
297
298 // Define variables on the remaining event data
299 RVarDef vars[] = {
300 { "nthit", "Number of paddles with L&R TDCs", "GetNHits()" },
301 { "t_pads", "Paddles with L&R coincidence TDCs", "fHits.pad" },
302 { "y_t", "y-position from timing (m)", "fPadData.yt" },
303 { "y_adc", "y-position from amplitudes (m)", "fPadData.ya" },
304 { "time", "Time of hit at plane (s)", "fPadData.time" },
305 { "dtime", "Est. uncertainty of time (s)", "fPadData.dtime" },
306 { "dedx", "dEdX-like deposited in paddle", "fPadData.ampl" },
307 { "hit.y_t","y-position from timing (m)", "fHits.yt" },
308 { "hit.y_adc", "y-position from amplitudes (m)", "fHits.ya" },
309 { "hit.time", "Time of hit at plane (s)", "fHits.time" },
310 { "hit.dtime", "Est. uncertainty of time (s)", "fHits.dtime" },
311 { "hit.dedx" ,"dEdX-like deposited in paddle", "fHits.ampl" },
312 { "trdx", "track deviation in x-position (m)", "fTrackProj.THaTrackProj.fdX" },
313 { "trpad", "paddle-hit associated with track", "fTrackProj.THaTrackProj.fChannel" },
314 { nullptr }
315 };
316 Int_t ret = DefineVarsFromList( vars, mode );
317 if( ret )
318 return ret;
319
320 // Define general detector variables (track crossing coordinates etc.)
321 // Objects in fDetectorData whose variables are not yet set up will be set up
322 // as well. Our PMTData have already been initialized above & will be skipped.
324}
325
326//_____________________________________________________________________________
328{
329 // Destructor. Remove variables from global list.
330
332}
333
334//_____________________________________________________________________________
336{
337 // Reset per-event data.
338
340 fHitIdx.clear();
341 for_each(ALL(fPadData), []( HitData_t& d ) { d.clear(); });
342 fHits.clear();
343}
344
345//_____________________________________________________________________________
347{
348 // Put decoded frontend data into fDetectorData.
349 // Called from ThaDetectorBase::Decode().
350 //
351 // hitinfo: channel info (crate/slot/channel/hit/type)
352 // data: data registered in this channel
353
354 static_assert(kRight == 0 || kLeft == 0, "kRight or kLeft must be 0");
355 assert(fNviews == abs(kLeft - kRight) + 1);
356
357 Int_t pad = hitinfo.lchan % fNelem;
358 auto side = static_cast<ESide>(GetView(hitinfo));
359
360 // Make a note that this side/pad registered some kind of data
361 fHitIdx.emplace(side, pad);
362
363 // Store data for either left or right PMTs, as determined by 'side'
364 Podd::PMTData* pmtData = (side == kRight) ? fRightPMTs : fLeftPMTs;
365 if( !pmtData->HitDone() )
366 pmtData->StoreHit(hitinfo, data);
367
368 return 0;
369}
370
371//_____________________________________________________________________________
373{
374 // Print decoded data (for debugging). Called form Decode()
375
376 // cout << endl << endl;
377 cout << "Event " << evdata.GetEvNum() << " Trigger " << evdata.GetEvType()
378 << " Scintillator " << GetPrefix() << endl;
379 cout << " paddle Left(TDC ADC ADC_p) Right(TDC ADC ADC_p)" << endl;
380 cout << right;
381 for( int i = 0; i < fNelem; i++ ) {
382 const auto& LPMT = fLeftPMTs->GetPMT(i);
383 const auto& RPMT = fRightPMTs->GetPMT(i);
384 cout << " " << setw(2) << i + 1;
385 cout << " "; WriteValue(LPMT.tdc);
386 cout << " "; WriteValue(LPMT.adc);
387 cout << " "; WriteValue(LPMT.adc_p);
388 cout << " "; WriteValue(RPMT.tdc);
389 cout << " "; WriteValue(RPMT.adc);
390 cout << " "; WriteValue(RPMT.adc_p);
391 cout << endl;
392 }
393 cout << left;
394}
395
396//_____________________________________________________________________________
398{
399 // Decode scintillator data, correct TDC times and ADC amplitudes, and copy
400 // the data to the local data members.
401 // Additionally, apply timewalk corrections and find "paddle hits" (= hits
402 // with TDC signals on both sides).
403
405
408
409 return static_cast<Int_t>(fRightPMTs->GetHitCount().tdc +
411}
412
413//_____________________________________________________________________________
415{
416 // Apply ADC/TDC corrections which are possible without tracking.
417 //
418 // Currently only TDC timewalk corrections are applied, and those only if
419 // the database parameters "MIP" and "timewalk_params" are set.
420
421 for( const auto& idx : fHitIdx ) {
422 ESide side = idx.first;
423 Int_t pad = idx.second;
424 auto& PMT = (side == kRight) ? fRightPMTs->GetPMT(pad)
425 : fLeftPMTs->GetPMT(pad);
426 if( PMT.nadc > 0 && PMT.ntdc > 0 )
427 PMT.tdc_c -= TimeWalkCorrection(idx, PMT.adc_p);
428 }
429
430 return 0;
431}
432
433//_____________________________________________________________________________
435{
436 // Calculate TDC timewalk correction.
437 // The timewalk parameters depend on the specific PMT given by 'idx'.
438 // 'adc' is the PMT's ADC value above pedestal (adc_p).
439
440 ESide side = idx.first;
441 Int_t pad = idx.second;
442
443 const PMTCalib_t& calib = (side == kRight) ? fRightPMTs->GetCalib(pad)
444 : fLeftPMTs->GetCalib(pad);
445 Data_t par = calib.twalk;
446 Data_t ref = calib.mip;
447 if ( adc <=0 || ref <= 0 || par == 0)
448 return 0;
449
450 // Traditional correction according to
451 // J.S.Brown et al., NIM A221, 503 (1984); T.Dreyer et al., NIM A309, 184 (1991)
452 // Assumes that for a MIP (peak ~2000 ADC channels) the correction is 0
453 Data_t corr = par * ( 1./TMath::Sqrt(adc) - 1./TMath::Sqrt(ref) );
454
455 return corr;
456}
457
458//_____________________________________________________________________________
460{
461 // Find paddles with TDC hits on both sides (likely true hits)
462
463 static const Double_t sqrt2 = TMath::Sqrt(2.);
464
465 fHits.clear();
466 for( const auto& idx : fHitIdx ) {
467 const ESide side = idx.first;
468 if( side == kLeft )
469 // std::pair is sorted by first, then second, so from this point on only
470 // kLeft elements will follow, the matching ones of which we've already
471 // paired up. So, no more work to do :)
472 break;
473 assert(side == kRight);
474 const Int_t pad = idx.second;
475 if( fHitIdx.find(make_pair(kLeft, pad)) != fHitIdx.end()) {
476 // There are data from both PMTs of this paddle
477 const auto &RPMT = fRightPMTs->GetPMT(pad), &LPMT = fLeftPMTs->GetPMT(pad);
478
479 // Calculate mean time and rough transverse (y) position
480 if( RPMT.ntdc > 0 && LPMT.ntdc > 0 ) {
481 Data_t time = 0.5 * (RPMT.tdc_c + LPMT.tdc_c) - fSize[1] / fCn;
482 Data_t dtime = fResolution / sqrt2;
483 Data_t yt = 0.5 * fCn * (RPMT.tdc_c - LPMT.tdc_c);
484
485 // Record a hit on this paddle
486 fHits.emplace_back(pad, time, dtime, yt, kBig, kBig);
487 // Also save the hit data in the per-paddle array
488 fPadData[pad] = fHits.back();
489 }
490 }
491 }
492
493 // Sort hits by mean time, earliest first
494 std::sort( ALL(fHits) );
495
496 return 0;
497}
498
499//_____________________________________________________________________________
501{
502 // Scintillator coarse processing:
503 //
504 // - Calculate rough transverse position and energy deposition from ADC data
505 // - Calculate rough track crossing points
506
507 for( const auto& idx : fHitIdx ) {
508 const ESide side = idx.first;
509 if( side == kLeft )
510 break;
511 assert(side == kRight);
512 const Int_t pad = idx.second;
513 if( fHitIdx.find(make_pair(kLeft, pad)) != fHitIdx.end()) {
514 const auto &RPMT = fRightPMTs->GetPMT(pad), &LPMT = fLeftPMTs->GetPMT(pad);
515
516 // rough calculation of position from ADC reading
517 if( RPMT.nadc > 0 && RPMT.adc_c > 0 && LPMT.nadc > 0 && LPMT.adc_c > 0 ) {
518 auto& thePad = fPadData[pad];
519 thePad.ya = TMath::Log(LPMT.adc_c / RPMT.adc_c) / (2. * fAttenuation);
520
521 // rough dE/dX-like quantity, not correcting for track angle
522 thePad.ampl = TMath::Sqrt(LPMT.adc_c * RPMT.adc_c *
523 TMath::Exp(fAttenuation * 2. * fSize[1])) / fSize[2];
524
525 // Save these ADC-derived values to the entry in the hit array as well
526 // (may not exist if TDCs didn't fire on both sides)
527 auto theHit = find_if(ALL(fHits),
528 [pad]( const HitData_t& h ) { return h.pad == pad; });
529 if( theHit != fHits.end() ) {
530 theHit->yt = thePad.yt;
531 theHit->ampl = thePad.ampl;
532 }
533 }
534 }
535 }
536
537 // Project tracks onto scintillator plane
539
540 return 0;
541}
542
543//_____________________________________________________________________________
545{
546 // Scintillator fine processing:
547 //
548 // - Reconstruct coordinates of track cross point with scintillator plane
549 // - For each crossing track, determine position residual and paddle number
550 //
551 // The position residuals are calculated along the x-coordinate (dispersive
552 // direction) only. They are useful to determine whether a track has a
553 // matching hit ( if abs(dx) <= 0.5*paddle x-width ) and, if so, how close
554 // to the edge of the paddle the track crossed. This assumes scintillator
555 // paddles oriented along the transverse (non-dispersive, y) direction.
556
557 // Redo projection of tracks since FineTrack may have changed tracks
558 Int_t n_cross = CalcTrackProj(tracks);
559
560 // Find the closest hits to the track crossing points
561 if( n_cross > 0 ) {
562 Double_t dpadx = 2.0 * fSize[0] / fNelem; // Width of a paddle
563 Double_t padx0 = -fSize[0] + 0.5 * dpadx; // center of paddle '0'
564 for( Int_t i = 0; i < fTrackProj->GetLast() + 1; i++ ) {
565 auto* proj = static_cast<THaTrackProj*>( fTrackProj->At(i));
566 assert(proj);
567 if( !proj->IsOK())
568 continue;
569 Int_t pad = -1; // paddle number of closest hit
570 Double_t xc = proj->GetX(); // track intercept x-coordinate
571 Double_t dx = kBig; // xc - distance paddle center
572 for( const auto& h : fHits ) {
573 Double_t dx2 = xc - (padx0 + h.pad * dpadx);
574 if( TMath::Abs(dx2) < TMath::Abs(dx)) {
575 pad = h.pad;
576 dx = dx2;
577 }
578 }
579 assert(pad >= 0 || fHits.empty()); // Must find a pad unless no hits
580 if( pad >= 0 ) {
581 proj->SetdX(dx);
582 proj->SetChannel(pad);
583 }
584 }
585 }
586
587 return 0;
588}
589
590//_____________________________________________________________________________
#define kOK
Definition BdataLoc.cxx:40
#define kInitError
Definition BdataLoc.cxx:41
int Int_t
unsigned int UInt_t
Double_t Data_t
Definition DataType.h:13
const Data_t kBig
Definition DataType.h:15
size_t fSize
uint32_t time
#define d(i)
#define e(i)
double Double_t
const char Option_t
#define N
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
Option_t Option_t TPoint TPoint const char mode
char name[80]
#define MKPMTDATA(name, title, nelem)
static const char *const here
Definition THaVar.cxx:64
Bool_t HitDone() const
Int_t DefineVariables(THaAnalysisObject::EMode mode=THaAnalysisObject::kDefine, const char *key_prefix="", const char *comment_subst="")
HitCount_t & GetHitCount()
PMTData_t & GetPMT(size_t i)
UInt_t GetSize() const override
Int_t StoreHit(const DigitizerHitInfo_t &hitinfo, UInt_t data) override
PMTCalib_t & GetCalib(size_t i)
static Int_t LoadDB(FILE *file, const TDatime &date, const DBRequest *request, const char *prefix, Int_t search=0, const char *here="THaAnalysisObject::LoadDB")
static Int_t DefineVarsFromList(const void *list, EType type, EMode mode, const char *def_prefix, const TObject *obj, const char *prefix, const char *here, const char *comment_subst="")
virtual const char * Here(const char *) const
const char * GetPrefix() const
TString GetPrefixName() const
virtual FILE * OpenFile(const TDatime &date)
UInt_t GetSize() const
Definition THaDetMap.h:125
@ kFillLogicalChannel
Definition THaDetMap.h:96
Module * GetModule(UInt_t i) const
Definition THaDetMap.h:248
UInt_t GetTotNumChan() const
Int_t FillDetMap(const std::vector< Int_t > &values, UInt_t flags=0, const char *here="FillDetMap")
THaDetMap * fDetMap
virtual Int_t ReadGeometry(FILE *file, const TDatime &date, Bool_t required=false)
Double_t fSize[3]
VecDetData_t fDetectorData
virtual void Reset(Option_t *opt="")
virtual Int_t GetView(const DigitizerHitInfo_t &hitinfo) const
virtual Int_t Decode(const THaEvData &)
UInt_t GetEvType() const
Definition THaEvData.h:53
UInt_t GetEvNum() const
Definition THaEvData.h:56
virtual Int_t DefineVariables(EMode mode=kDefine)
Int_t CalcTrackProj(TClonesArray &tracks)
virtual void Clear(Option_t *="")
virtual Int_t Decode(const THaEvData &)
std::vector< HitData_t > fHits
Podd::PMTData * fRightPMTs
virtual Int_t DefineVariables(EMode mode=kDefine)
virtual Int_t StoreHit(const DigitizerHitInfo_t &hitinfo, UInt_t data)
virtual Data_t TimeWalkCorrection(Idx_t idx, Data_t adc)
virtual Int_t FineProcess(TClonesArray &tracks)
virtual void Clear(Option_t *opt="")
virtual Int_t FindPaddleHits()
Podd::PMTData * fLeftPMTs
virtual Int_t ReadDatabase(const TDatime &date)
std::set< Idx_t > fHitIdx
std::pair< ESide, Int_t > Idx_t
virtual void PrintDecodedData(const THaEvData &evdata) const
std::vector< HitData_t > fPadData
virtual Int_t ApplyCorrections()
virtual Int_t CoarseProcess(TClonesArray &tracks)
TString fTitle
TObject * At(Int_t idx) const override
Int_t GetLast() const override
virtual void Warning(const char *method, const char *msgfmt,...) const
virtual void Error(const char *method, const char *msgfmt,...) const
void GetXYZ(Double_t *carray) const
RVec< PromoteType< T > > abs(const RVec< T > &v)
TH1 * h
Double_t Exp(Double_t x)
Double_t Log(Double_t x)
Double_t Sqrt(Double_t x)
Double_t Abs(Double_t d)
STL namespace.
ClassImp(TPyArg)
void tracks()