Hall C ROOT/C++ Analyzer (hcana)
Loading...
Searching...
No Matches
THcHodoEff.cxx
Go to the documentation of this file.
1
7#include "THaEvData.h"
8#include "THaCutList.h"
9#include "VarDef.h"
10#include "VarType.h"
11#include "TClonesArray.h"
12
13#include <cstring>
14#include <cstdio>
15#include <cstdlib>
16#include <iostream>
17
18#include "THcHodoEff.h"
19#include "THaApparatus.h"
20#include "THcHodoHit.h"
21#include "THcGlobals.h"
22#include "THcParmList.h"
23
24using namespace std;
25
26//_____________________________________________________________________________
27THcHodoEff::THcHodoEff (const char *name, const char* description,
28 const char* hodname) :
29 THaPhysicsModule(name, description), fName(hodname), fHod(NULL), fNevt(0)
30{
31
32}
33
34//_____________________________________________________________________________
36{
37 // Destructor
38
39 delete [] fPlanes; fPlanes = 0;
40 delete [] fPosZ; fPosZ = 0;
41 delete [] fSpacing; fSpacing = 0;
42 delete [] fCenterFirst; fCenterFirst = 0;
43 delete [] fNCounters; fNCounters = 0;
44 delete [] fHodoSlop; fHodoSlop = 0;
45 delete [] fStatTrkSum; fStatTrkSum = 0;
46 delete [] fStatAndSum; fStatAndSum = 0;
47 delete [] fStatAndEff; fStatAndEff = 0;
48
49 delete [] fHodoPosEffi; fHodoPosEffi = 0;
50 delete [] fHodoNegEffi; fHodoNegEffi = 0;
51 delete [] fHodoOrEffi; fHodoOrEffi = 0;
52 delete [] fHodoAndEffi; fHodoAndEffi = 0;
53 delete [] fStatTrk; fStatTrk = 0;
54
55 delete [] fHitPlane; fHitPlane = 0;
56
58}
59
60//_____________________________________________________________________________
62// Clear event-by-event data
63{
64 Clear(opt);
65}
66
67//_____________________________________________________________________________
69{
70 // Start of analysis
71
72 if (!IsOK() ) return -1;
73
74 // Book any special histograms here
75
76 fNevt = 0;
77
78 // Clear all the accumulators here
79 for(Int_t ip=0;ip<fNPlanes;ip++) {
80 fHitPlane[ip] = 0;
81 for(Int_t ic=0;ic<fNCounters[ip];ic++) {
82 fStatPosHit[ip][ic] = 0;
83 fStatNegHit[ip][ic] = 0;
84 fStatAndHit[ip][ic] = 0;
85 fStatOrHit[ip][ic] = 0;
86 fBothGood[ip][ic] = 0;
87 fPosGood[ip][ic] = 0;
88 fNegGood[ip][ic] = 0;
89 for(Int_t idel=0;idel<20;idel++) {
90 fStatTrkDel[ip][ic][idel] = 0;
91 fStatAndHitDel[ip][ic][idel] = 0;
92 }
93 }
94 }
95
96 return 0;
97}
98
99//_____________________________________________________________________________
101{
102 // End of analysis
103 for(Int_t ip=0;ip<fNPlanes;ip++) {
104 fStatAndEff[ip]=0;
105 for(Int_t ic=0;ic<fNCounters[ip];ic++) {
108 }
109 if (fStatTrkSum[ip] !=0) fStatAndEff[ip]=float(fStatAndSum[ip])/float(fStatTrkSum[ip]);
110 }
111 //
112 Double_t p1=fStatAndEff[0];
113 Double_t p2=fStatAndEff[1];
114 Double_t p3=fStatAndEff[2];
115 Double_t p4=fStatAndEff[3];
116 // probability that ONLY the listed planes had triggers
117 Double_t p1234= p1*p2*p3*p4;
118 Double_t p123 = p1*p2*p3*(1.-p4);
119 Double_t p124 = p1*p2*(1.-p3)*p4;
120 Double_t p134 = p1*(1.-p2)*p3*p4;
121 Double_t p234 = (1.-p1)*p2*p3*p4;
122 fHodoEff_s1 = 1. - ((1.-p1)*(1.-p2));
123 fHodoEff_s2 = 1. - ((1.-p3)*(1.-p4));
125 fHodoEff_3_of_4=p1234+p123+p124+p134+p234;
126 fHodoEff_4_of_4=p1234;
127 return 0;
128}
129
130
131//_____________________________________________________________________________
133{
134 // Initialize THcHodoEff physics module
135
136 // const char* const here = "Init";
137
138 // Standard initialization. Calls ReadDatabase(), ReadRunDatabase(),
139 // and DefineVariables() (see THaAnalysisObject::Init)
140
141 fHod = dynamic_cast<THcHodoscope*>
142 ( FindModule( fName.Data(), "THcHodoscope"));
143
144 fSpectro = static_cast<THaSpectrometer*>(fHod->GetApparatus());
145
146 if( THaPhysicsModule::Init( run_time ) != kOK )
147 return fStatus;
148
149 cout << "THcHodoEff::Init nplanes=" << fHod->GetNPlanes() << endl;
150 cout << "THcHodoEff::Init Apparatus = " << fHod->GetName() <<
151 " " <<
152 (fHod->GetApparatus())->GetName() << endl;
153
154 return fStatus = kOK;
155}
156
157//_____________________________________________________________________________
159{
160 // Read database. Gets variable needed for efficiency calculation
161 // Get # of planes and their z positions here.
162
165 fPosZ = new Double_t[fNPlanes];
173
174 Int_t maxcountersperplane=0;
175 for(Int_t ip=0;ip<fNPlanes;ip++) {
176 fStatTrkSum[ip]=0.;
177 fStatAndSum[ip]=0.;
178 fStatAndEff[ip]=0.;
179 fPlanes[ip] = fHod->GetPlane(ip);
180 fPosZ[ip] = fPlanes[ip]->GetZpos() + 0.5*fPlanes[ip]->GetDzpos();
181 fSpacing[ip] = fPlanes[ip]->GetSpacing();
183 fNCounters[ip] = fPlanes[ip]->GetNelem();
184 maxcountersperplane = TMath::Max(maxcountersperplane,fNCounters[ip]);
185 }
186 Int_t totalpaddles = fNPlanes*maxcountersperplane;
187 fHodoPosEffi = new Int_t[totalpaddles];
188 fHodoNegEffi = new Int_t[totalpaddles];
189 fHodoOrEffi = new Int_t[totalpaddles];
190 fHodoAndEffi = new Int_t[totalpaddles];
191 fStatTrk = new Int_t[totalpaddles];
192
193 char prefix[2];
194 prefix[0] = tolower((fHod->GetApparatus())->GetName()[0]);
195 prefix[1] = '\0';
196
197 DBRequest list[]={
198 {"stat_slop", &fStatSlop, kDouble},
199 {"stat_maxchisq",&fMaxChisq, kDouble},
200 {"HodoEff_CalEnergy_Cut",&fHodoEff_CalEnergy_Cut, kDouble,0,1},
201 {"hodo_slop", fHodoSlop, kDouble, (UInt_t)fNPlanes},
202 {0}
203 };
204 fHodoEff_CalEnergy_Cut=0.050; // set default value
205 gHcParms->LoadParmValues((DBRequest*)&list,prefix);
206 cout << "\n\nTHcHodoEff::ReadDatabase nplanes=" << fHod->GetNPlanes() << endl;
207 // Setup statistics arrays
208 // Better method to put this in?
209 // These all need to be cleared in Begin
210 fHitPlane = new Int_t[fNPlanes];
211 fStatTrkDel.resize(fNPlanes);
212 fStatAndHitDel.resize(fNPlanes);
213 fStatPosHit.resize(fNPlanes);
214 fStatNegHit.resize(fNPlanes);
215 fStatAndHit.resize(fNPlanes);
216 fStatOrHit.resize(fNPlanes);
217 fBothGood.resize(fNPlanes);
218 fPosGood.resize(fNPlanes);
219 fNegGood.resize(fNPlanes);
220
221 for(Int_t ip=0;ip<fNPlanes;ip++) {
222
223 cout << "Plane = " << ip + 1 << " counters = " << fNCounters[ip] << endl;
224
225 fStatTrkDel[ip].resize(fNCounters[ip]);
226 fStatAndHitDel[ip].resize(fNCounters[ip]);
227 fStatPosHit[ip].resize(fNCounters[ip]);
228 fStatNegHit[ip].resize(fNCounters[ip]);
229 fStatAndHit[ip].resize(fNCounters[ip]);
230 fStatOrHit[ip].resize(fNCounters[ip]);
231 fBothGood[ip].resize(fNCounters[ip]);
232 fPosGood[ip].resize(fNCounters[ip]);
233 fNegGood[ip].resize(fNCounters[ip]);
234 for(Int_t ic=0;ic<fNCounters[ip];ic++) {
235 fStatTrkDel[ip][ic].resize(20); // Max this settable
236 fStatAndHitDel[ip][ic].resize(20); // Max this settable
237
238 fHodoPosEffi[fHod->GetScinIndex(ip,ic)] = 0;
239 fHodoNegEffi[fHod->GetScinIndex(ip,ic)] = 0;
240 fHodoOrEffi[fHod->GetScinIndex(ip,ic)] = 0;
241 fHodoAndEffi[fHod->GetScinIndex(ip,ic)] = 0;
242 fStatTrk[fHod->GetScinIndex(ip,ic)] = 0;
243 }
244 }
245
246 // Int_t fHodPaddles = fNCounters[0];
247 // gHcParms->Define(Form("%shodo_pos_hits[%d][%d]",fPrefix,fNPlanes,fHodPaddles),
248 // "Golden track's pos pmt hit",*&fStatPosHit);
249
250 gHcParms->Define(Form("%shodo_pos_eff[%d]", prefix,totalpaddles), "Hodo positive effi",*fHodoPosEffi);
251 gHcParms->Define(Form("%shodo_neg_eff[%d]", prefix,totalpaddles), "Hodo negative effi",*fHodoNegEffi);
252 gHcParms->Define(Form("%shodo_or_eff[%d]", prefix,totalpaddles), "Hodo or effi", *fHodoOrEffi);
253 gHcParms->Define(Form("%shodo_and_eff[%d]", prefix,totalpaddles), "Hodo and effi", *fHodoAndEffi);
254 gHcParms->Define(Form("%shodo_plane_AND_eff[%d]",prefix,fNPlanes), "Hodo plane AND eff", *fStatAndEff);
255 gHcParms->Define(Form("%shodo_gold_hits[%d]",prefix,totalpaddles), "Hodo golden hits", *fStatTrk);
256 gHcParms->Define(Form("%shodo_s1XY_eff",prefix), "Efficiency for S1XY",fHodoEff_s1);
257 gHcParms->Define(Form("%shodo_s2XY_eff",prefix), "Efficiency for S2XY",fHodoEff_s2);
258 gHcParms->Define(Form("%shodo_stof_eff",prefix), "Efficiency for STOF",fHodoEff_tof);
259 gHcParms->Define(Form("%shodo_3_of_4_eff",prefix), "Efficiency for 3 of 4",fHodoEff_3_of_4);
260 gHcParms->Define(Form("%shodo_4_of_4_eff",prefix), "Efficiency for 4 of 4",fHodoEff_4_of_4);
261
262 return kOK;
263}
264
265//_____________________________________________________________________________
267{
268
269 if( mode == kDefine && fIsSetup ) return kOK;
270 fIsSetup = ( mode == kDefine );
271
272 // fEffiTest = 0;
273 // gHcParms->Define(Form("hodoeffi"),"Testing effi",fEffiTest);
274
275 const RVarDef vars[] = {
276 // Move these into THcHallCSpectrometer using track fTracks
277 // {"effitestvar", "efficiency test var", "fEffiTest"},
278 // {"goldhodposhit", "pos pmt hit in hodo", "fStatPosHit"},
279 { 0 }
280 };
281 return DefineVarsFromList( vars, mode );
282 // return kOK;
283}
284
285//_____________________________________________________________________________
287{
288 // Accumulate statistics for efficiency
289
290 // const char* const here = "Process";
291
292 if( !IsOK() ) return -1;
293
294
295 // Project the golden track to each
296 // plane. Need to get track at Focal Plane, not tgt.
297 //
298 // Assumes that planes are X, Y, X, Y
299 THaTrack* theTrack = fSpectro->GetGoldenTrack();
300 // Since fSpectro knows the index of the golden track, we can
301 // get other information about the track from fSpectro.
302 // Need to remove the specialized stuff from fGoldenTrack
303
304 if(!theTrack) return 0;
305 Int_t trackIndex = theTrack->GetTrkNum()-1;
306
307 // May make these member variables
308 Double_t hitPos[fNPlanes];
309 Double_t hitDistance[fNPlanes];
310 Int_t hitCounter[fNPlanes];
311 Int_t checkHit[fNPlanes];
312 // Bool_t goodTdcBothSides[fNPlanes];
313 // Bool_t goodTdcOneSide[fNPlanes];
314
315 for(Int_t ip=0;ip<fNPlanes;ip++) {
316 // Should really have plane object self identify as X or Y
317 if(ip%2 == 0) { // X Plane
318 hitPos[ip] = theTrack->GetX() + theTrack->GetTheta()*fPosZ[ip];
319 hitCounter[ip] = TMath::Max(
321 TMath::Nint((hitPos[ip]-fCenterFirst[ip])/
322 fSpacing[ip]+1),fNCounters[ip] ),1);
323 hitDistance[ip] = hitPos[ip] - (fSpacing[ip]*(hitCounter[ip]-1) +
324 fCenterFirst[ip]);
325 } else { // Y Plane
326 hitPos[ip] = theTrack->GetY() + theTrack->GetPhi()*fPosZ[ip];
327 hitCounter[ip] = TMath::Max(
329 TMath::Nint((fCenterFirst[ip]-hitPos[ip])/
330 fSpacing[ip]+1), fNCounters[ip] ),1);
331 hitDistance[ip] = hitPos[ip] -(fCenterFirst[ip] -
332 fSpacing[ip]*(hitCounter[ip]-1));
333 }
334
335
336 }
337
338 // Fill dpos histograms and set checkHit for each plane.
339 // dpos stuff not implemented
340 // Why do dpos stuff here, does any other part need the dpos historgrams
341 // Look to VDCEff code to see how to create and fill histograms
342
343 for(Int_t ip=0;ip<fNPlanes;ip++) {
344 Int_t hitcounter=hitCounter[ip];
345 // goodTdcBothSides[ip] = kFALSE;
346 // goodTdcOneSide[ip] = kFALSE;
347 checkHit[ip] = 2;
348 Int_t nphits=fPlanes[ip]->GetNScinHits();
349 TClonesArray* hodoHits = fPlanes[ip]->GetHits();
350 for(Int_t ihit=0;ihit<nphits;ihit++) {
351 THcHodoHit* hit=(THcHodoHit*) hodoHits->At(ihit);
352 Int_t counter = hit->GetPaddleNumber();
353 if(counter == hitcounter) {
354 checkHit[ip] = 0;
355 } else {
356 if(TMath::Abs(counter-hitcounter) == 1 && checkHit[ip] != 0) {
357 checkHit[ip] = 1;
358 }
359 }
360 }
361 }
362
363 // Record position differences between track and center of scin
364 // and increment 'should have hit' counters
365 for(Int_t ip=0;ip<fNPlanes;ip++) {
366 // Int_t hitcounter = hitCounter[ip];
367 Double_t dist = hitDistance[ip];
368 if(TMath::Abs(dist) <= fStatSlop &&
369 theTrack->GetChi2()/theTrack->GetNDoF() <= fMaxChisq &&
370 theTrack->GetEnergy() >= fHodoEff_CalEnergy_Cut )
371 {
372 fStatTrk[fHod->GetScinIndex(ip,hitCounter[ip]-1)]++;
373 // Double_t delta = theTrack->GetDp();
374 // Int_t idel = TMath::Floor(delta+10.0);
375 // Should
376 // if(idel >=0 && idel < 20) {
377 // fStatTrkDel[ip][hitcounter][idel]++;
378 // }
379 // lookat[ip] = TRUE;
380 }
381 fHitPlane[ip] = 0;
382 }
383 // Is there a hit on or adjacent to paddle that track
384 // passes through?
385
386 // May collapse this loop into last
387
388 // record the hits as a "didhit" if track is near center of
389 // scintillator, the chisqared of the track is good and it is the
390 // first "didhit" in that plane.
391
392 for(Int_t ip=0;ip<fNPlanes;ip++) {
393 Int_t hitcounter = hitCounter[ip];
394 if (hitcounter>=fNCounters[ip]) hitcounter=fNCounters[ip]-1;
395 if (hitcounter<0) hitcounter=0;
396 Double_t dist = hitDistance[ip];
397 Int_t nphits=fPlanes[ip]->GetNScinHits();
398 TClonesArray* hodoHits = fPlanes[ip]->GetHits();
399 for(Int_t ihit=0;ihit<nphits;ihit++) {
400 THcHodoHit* hit=(THcHodoHit*) hodoHits->At(ihit);
401 Int_t counter = hit->GetPaddleNumber();
402 // Finds first best hit
403 Bool_t onTrack, goodScinTime, goodTdcNeg, goodTdcPos;
404 fHod->GetFlags(trackIndex,ip,ihit,
405 onTrack, goodScinTime, goodTdcNeg, goodTdcPos);
406 if(TMath::Abs(dist) <= fStatSlop &&
407 TMath::Abs(hitcounter-counter) <= checkHit[ip] &&
408 fHitPlane[ip] == 0 &&
409 theTrack->GetChi2()/theTrack->GetNDoF() <= fMaxChisq &&
410 theTrack->GetEnergy() >= fHodoEff_CalEnergy_Cut) {
411 fHitPlane[ip]++;
412
413 // Need to find out hgood_tdc_pos(igoldentrack,ihit) and neg
414 if(goodTdcPos) {
415 if(goodTdcNeg) { // Both fired
416 fStatPosHit[ip][hitcounter]++;
417 fStatNegHit[ip][hitcounter]++;
418 fStatAndHit[ip][hitcounter]++;
419 fStatOrHit[ip][hitcounter]++;
420
421 fHodoPosEffi[fHod->GetScinIndex(ip,hitCounter[ip]-1)]++;
422 fHodoNegEffi[fHod->GetScinIndex(ip,hitCounter[ip]-1)]++;
423 fHodoAndEffi[fHod->GetScinIndex(ip,hitCounter[ip]-1)]++;
424 fHodoOrEffi[fHod->GetScinIndex(ip,hitCounter[ip]-1)]++;
425
426 // Double_t delta = theTrack->GetDp();
427 // Int_t idel = TMath::Floor(delta+10.0);
428 // if(idel >=0 && idel < 20) {
429 // fStatAndHitDel[ip][hitcounter][idel]++;
430 // }
431 } else {
432 fStatPosHit[ip][hitcounter]++;
433 fStatOrHit[ip][hitcounter]++;
434 fHodoPosEffi[fHod->GetScinIndex(ip,hitCounter[ip]-1)]++;
435 fHodoOrEffi[fHod->GetScinIndex(ip,hitCounter[ip]-1)]++;
436 }
437 } else if (goodTdcNeg) {
438 fStatNegHit[ip][hitcounter]++;
439 fStatOrHit[ip][hitcounter]++;
440 fHodoNegEffi[fHod->GetScinIndex(ip,hitCounter[ip]-1)]++;
441 fHodoOrEffi[fHod->GetScinIndex(ip,hitCounter[ip]-1)]++;
442 }
443
444 // Increment pos/neg/both fired. Track independent, so
445 // no chisquared cut, but note that only scintillators on the
446 // track are examined.
447 if(goodTdcPos) {
448 if(goodTdcNeg) {
449 fBothGood[ip][hitcounter]++;
450 } else {
451 fPosGood[ip][hitcounter]++;
452 }
453 } else if (goodTdcNeg) {
454 fNegGood[ip][hitcounter]++;
455 }
456 // Determine if one or both PMTs had a good tdc
457
458 // if(goodTdcPos && goodTdcNeg) {
459 // goodTdcBothSides[ip] = kTRUE;
460 // }
461 // if(goodTdcPos || goodTdcNeg) {
462 // goodTdcOneSide[ip] = kTRUE;
463 // }
464 }
465
466 /*
467 For each plane, see of other 3 fired. This means that they were enough
468 to form a 3/4 trigger, and so the fraction of times this plane fired is
469 the plane trigger efficiency. NOTE: we only require a TDC hit, not a
470 TDC hit within the SCIN 3/4 trigger window, so high rates will make
471 this seem better than it is. Also, make sure we're not near the edge
472 of the hodoscope (at the last plane), using the same hhodo_slop param.
473 as for h_tof.f
474 NOTE ALSO: to make this check simpler, we are assuming that all planes
475 have identical active areas. y_scin = y_cent + y_offset, so shift track
476 position by offset for comparing to edges.
477 */
478
479 // Need to add calculation and cuts on
480 // xatback and yatback in order to set the
481 // htrig_hododidflag, htrig_hodoshouldflag and otherthreehit flags
482 //
483
484 ++fNevt;
485 }
486 }
487 return 0;
488}
489
490//_____________________________________________________________________________
491
494
int Int_t
unsigned int UInt_t
bool Bool_t
double Double_t
const char Option_t
Option_t Option_t TPoint TPoint const char mode
ClassImp(VDC::AnalyticTTDConv) using namespace std
R__EXTERN class THcParmList * gHcParms
Definition THcGlobals.h:11
char * Form(const char *fmt,...)
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="")
THaAnalysisObject * FindModule(const char *name, const char *classname, bool do_error=true)
Bool_t IsOK() const
Int_t RemoveVariables()
THaApparatus * GetApparatus() const
virtual void Clear(Option_t *opt="")
THaTrack * GetGoldenTrack() const
Double_t GetChi2() const
Int_t GetNDoF() const
Double_t GetX() const
Int_t GetTrkNum() const
Double_t GetPhi() const
Double_t GetEnergy() const
Double_t GetTheta() const
Double_t GetY() const
THaVar * Define(const char *name, const Byte_t &var, const Int_t *count=nullptr)
Class for accumulating statistics for and calculating hodoscope efficiencies.
Definition THcHodoEff.h:26
Double_t fStatSlop
Definition THcHodoEff.h:73
Int_t * fHodoAndEffi
Definition THcHodoEff.h:68
Int_t * fNCounters
Definition THcHodoEff.h:63
Int_t * fHodoPosEffi
Definition THcHodoEff.h:65
Int_t * fStatTrkSum
Definition THcHodoEff.h:70
vector< vector< vector< Int_t > > > fStatAndHitDel
Definition THcHodoEff.h:81
vector< vector< Int_t > > fNegGood
Definition THcHodoEff.h:88
vector< vector< Int_t > > fStatPosHit
Definition THcHodoEff.h:83
Double_t * fStatAndEff
Definition THcHodoEff.h:72
Double_t fHodoEff_s2
Definition THcHodoEff.h:77
Int_t * fStatTrk
Definition THcHodoEff.h:69
Double_t * fPosZ
Definition THcHodoEff.h:60
Double_t fHodoEff_4_of_4
Definition THcHodoEff.h:77
virtual Int_t DefineVariables(EMode mode=kDefine)
Double_t fHodoEff_3_of_4
Definition THcHodoEff.h:77
TString fName
Definition THcHodoEff.h:48
Int_t * fStatAndSum
Definition THcHodoEff.h:71
vector< vector< vector< Int_t > > > fStatTrkDel
Definition THcHodoEff.h:82
THaSpectrometer * fSpectro
Definition THcHodoEff.h:50
Double_t fMaxChisq
Definition THcHodoEff.h:75
Int_t * fHitPlane
Definition THcHodoEff.h:91
Double_t fHodoEff_tof
Definition THcHodoEff.h:77
virtual Int_t Begin(THaRunBase *r=0)
Double_t * fSpacing
Definition THcHodoEff.h:61
vector< vector< Int_t > > fStatNegHit
Definition THcHodoEff.h:84
Long64_t fNevt
Definition THcHodoEff.h:52
Double_t * fCenterFirst
Definition THcHodoEff.h:62
THcHodoEff(const char *name, const char *description, const char *hodname)
Int_t * fHodoOrEffi
Definition THcHodoEff.h:67
THcScintillatorPlane ** fPlanes
Definition THcHodoEff.h:59
THcHodoscope * fHod
Definition THcHodoEff.h:49
vector< vector< Int_t > > fBothGood
Definition THcHodoEff.h:87
vector< vector< Int_t > > fStatOrHit
Definition THcHodoEff.h:86
virtual Int_t ReadDatabase(const TDatime &date)
virtual Int_t End(THaRunBase *r=0)
vector< vector< Int_t > > fStatAndHit
Definition THcHodoEff.h:85
Double_t fHodoEff_s1
Definition THcHodoEff.h:77
Double_t fHodoEff_CalEnergy_Cut
Definition THcHodoEff.h:74
void Reset(Option_t *opt="")
Int_t fNPlanes
Definition THcHodoEff.h:58
Int_t * fHodoNegEffi
Definition THcHodoEff.h:66
virtual Int_t Process(const THaEvData &)
vector< vector< Int_t > > fPosGood
Definition THcHodoEff.h:89
virtual ~THcHodoEff()
Double_t * fHodoSlop
Definition THcHodoEff.h:76
Class representing a single hit for the Hodoscopes.
Definition THcHodoHit.h:16
Int_t GetPaddleNumber() const
Definition THcHodoHit.h:49
Generic hodoscope consisting of multiple planes with multiple paddles with phototubes on both ends.
THcScintillatorPlane * GetPlane(Int_t ip)
Int_t GetScinIndex(Int_t nPlane, Int_t nPaddle)
Bool_t GetFlags(Int_t itrack, Int_t iplane, Int_t ihit, Bool_t &onTrack, Bool_t &goodScinTime, Bool_t &goodTdcNeg, Bool_t &goodTdcPos) const
Int_t GetNPlanes()
Int_t LoadParmValues(const DBRequest *list, const char *prefix="")
Retrieve parameter values from the parameter cache.
A single plane of scintillators.
Double_t GetPosCenter(Int_t PaddleNo)
const char * GetName() const override
TObject * At(Int_t idx) const override
const char * Data() const
double dist(AxisAngle const &r1, AxisAngle const &r2)
Double_t Min(Double_t a, Double_t b)
Int_t Nint(T x)
Double_t Abs(Double_t d)
Double_t Max(Double_t a, Double_t b)
STL namespace.