43using std::setprecision;
176 std::transform(EngineDID.begin(), EngineDID.end(), EngineDID.begin(), ::toupper);
178 static const char*
const here =
"Init()";
179 Error(
Here(here),
"Error filling detectormap for %s.", EngineDID.c_str());
195 static const char*
const here =
"ReadDatabase()";
196 Warning(
Here(here),
"Hodoscope \"%s\" not found. ",
"hod");
216 std::transform(prefix.begin(), prefix.end(), prefix.begin(), ::tolower);
222 DBRequest list_1[] = {
326 {
"numAdcHits",
"Number of ADC Hits Per PMT",
"fNumAdcHits"},
327 {
"totNumAdcHits",
"Total Number of ADC Hits",
"fTotNumAdcHits"},
328 {
"adcPedRaw",
"Raw ADC pedestals",
"frAdcPedRaw.THcSignalHit.GetData()"},
329 {
"adcPulseIntRaw",
"Raw ADC pulse integrals",
"frAdcPulseIntRaw.THcSignalHit.GetData()"},
330 {
"adcPulseAmpRaw",
"Raw ADC pulse amplitudes",
"frAdcPulseAmpRaw.THcSignalHit.GetData()"},
331 {
"adcPulseTimeRaw",
"Raw ADC pulse times",
"frAdcPulseTimeRaw.THcSignalHit.GetData()"},
332 {
"adcPed",
"ADC pedestals",
"frAdcPed.THcSignalHit.GetData()"},
333 {
"adcPulseInt",
"ADC pulse integrals",
"frAdcPulseInt.THcSignalHit.GetData()"},
334 {
"adcPulseAmp",
"ADC pulse amplitudes",
"frAdcPulseAmp.THcSignalHit.GetData()"},
335 {
"adcPulseTime",
"ADC pulse times",
"frAdcPulseTime.THcSignalHit.GetData()"},
336 {
"adcSampPedRaw",
"Raw ADCSAMP pedestals",
"frAdcSampPedRaw.THcSignalHit.GetData()"},
337 {
"adcSampPulseIntRaw",
"Raw ADCSAMP pulse integrals",
"frAdcSampPulseIntRaw.THcSignalHit.GetData()"},
338 {
"adcSampPulseAmpRaw",
"Raw ADCSAMP pulse amplitudes",
"frAdcSampPulseAmpRaw.THcSignalHit.GetData()"},
339 {
"adcSampPulseTimeRaw",
"Raw ADCSAMP pulse times",
"frAdcSampPulseTimeRaw.THcSignalHit.GetData()"},
340 {
"adcSampPed",
"ADCSAMP pedestals",
"frAdcSampPed.THcSignalHit.GetData()"},
341 {
"adcSampPulseInt",
"ADCSAMP pulse integrals",
"frAdcSampPulseInt.THcSignalHit.GetData()"},
342 {
"adcSampPulseAmp",
"ADCSAMP pulse amplitudes",
"frAdcSampPulseAmp.THcSignalHit.GetData()"},
343 {
"adcSampPulseTime",
"ADCSAMP pulse times",
"frAdcSampPulseTime.THcSignalHit.GetData()"},
351 {
"adcSampWaveform",
"FADC Sample Waveform",
"fSampWaveform"},
358 {
"adcCounter",
"ADC counter numbers",
"frAdcPulseIntRaw.THcSignalHit.GetPaddleNumber()"},
359 {
"adcSampleCounter",
"ADC SAMP counter numbers",
"frAdcSampPulseIntRaw.THcSignalHit.GetPaddleNumber()"},
360 {
"adcErrorFlag",
"Error Flag for When FPGA Fails",
"fAdcErrorFlag.THcSignalHit.GetData()"},
362 {
"numGoodAdcHits",
"Number of Good ADC Hits Per PMT",
"fNumGoodAdcHits"},
363 {
"totNumGoodAdcHits",
"Total Number of Good ADC Hits",
"fTotNumGoodAdcHits"},
365 {
"numTracksMatched",
"Number of Tracks Matched Per Region",
"fNumTracksMatched"},
366 {
"numTracksFired",
"Number of Tracks that Fired Per Region",
"fNumTracksFired"},
367 {
"totNumTracksMatched",
"Total Number of Tracks Matched Per Region",
"fTotNumTracksMatched"},
368 {
"totNumTracksFired",
"Total Number of Tracks that Fired",
"fTotNumTracksFired"},
370 {
"xAtCer",
"Track X at Cherenkov mirror",
"fXAtCer"},
371 {
"yAtCer",
"Track Y at Cherenkov mirror",
"fYAtCer"},
373 {
"npe",
"Number of PEs",
"fNpe"},
374 {
"npeSum",
"Total Number of PEs",
"fNpeSum"},
376 {
"goodAdcPed",
"Good ADC pedestals",
"fGoodAdcPed"},
377 {
"goodAdcMult",
"Good ADC Multiplicity",
"fGoodAdcMult"},
378 {
"goodAdcHitUsed",
"Good ADC Hit Used",
"fGoodAdcHitUsed"},
379 {
"goodAdcPulseInt",
"Good ADC pulse integrals",
"fGoodAdcPulseInt"},
380 {
"goodAdcPulseIntRaw",
"Good ADC raw pulse integrals",
"fGoodAdcPulseIntRaw"},
381 {
"goodAdcPulseAmp",
"Good ADC pulse amplitudes",
"fGoodAdcPulseAmp"},
382 {
"goodAdcPulseTime",
"Good ADC pulse times",
"fGoodAdcPulseTime"},
383 {
"goodAdcTdcDiffTime",
"Good Hodo Start - ADC pulse times",
"fGoodAdcTdcDiffTime"},
384 {
"RefTime",
"Raw ADC RefTime (chan) ",
"fRefTime"},
445 fNpe.at(ielem) = 0.0;
604 Double_t adctdcdiffTime = StartTime-pulseTime+OffsetTime;
607 if (errorFlag == 0 || errorFlag == 3) {
612 }
else if (errorFlag == 1) {
625 Double_t adctdcdiffTime = StartTime-pulseTime+OffsetTime;
650 for (
Int_t itrack = 0; itrack < nTracks; itrack++) {
653 if (track->
GetIndex() != 0)
continue;
657 Double_t trackRedChi2 = trackChi2/trackNDoF;
662 Double_t trackENorm = trackEnergy/trackMom;
675 if (trackRedChi2Cut && trackBetaCut && trackENormCut && trackDpCut) {
737 while(ihit < nrawhits) {
797 cout <<
"Cherenkov Pedestals" << endl;
799 cout <<
"No. ADC" << endl;
801 cout <<
" " << i <<
" " <<
fPed[i] << endl;
Option_t Option_t TPoint TPoint const char mode
R__EXTERN class THaVarList * gHaVars
R__EXTERN class THaCutList * gHaCuts
ClassImp(VDC::AnalyticTTDConv) using namespace std
R__EXTERN class THcParmList * gHcParms
R__EXTERN class THcDetectorMap * gHcDetectorMap
char * Form(const char *fmt,...)
void Clear(Option_t *option="") override
TObject * ConstructedAt(Int_t idx)
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
virtual void Print(Option_t *opt="") const
virtual Int_t Result(const char *cutname="", EWarnMode mode=kWarn)
UInt_t GetTotNumChan() const
THaApparatus * GetApparatus() const
Double_t GetEnergy() const
Double_t GetTheta() const
virtual THaVar * Find(const char *name) const
const void * GetValuePointer() const
Class representing a Cherenkov PMT hit.
Class for gas Cherenkov detectors.
virtual void CalculatePedestals()
vector< Double_t > fGoodAdcPulseTime
TClonesArray * frAdcPulseTimeRaw
vector< Double_t > fGoodAdcPulseIntRaw
vector< Int_t > fNumGoodAdcHits
TClonesArray * frAdcSampPulseInt
virtual void Print(const Option_t *opt) const
virtual Int_t Decode(const THaEvData &)
Int_t fTotNumTracksMatched
virtual void Clear(Option_t *opt="")
virtual Int_t ApplyCorrections(void)
virtual void InitializePedestals()
Int_t End(THaRunBase *run)
virtual Int_t FineProcess(TClonesArray &tracks)
TClonesArray * frAdcPulseAmp
vector< Double_t > fGoodAdcTdcDiffTime
virtual Int_t CoarseProcess(TClonesArray &tracks)
TClonesArray * frAdcSampPedRaw
vector< Double_t > fSampWaveform
virtual void AccumulatePedestals(TClonesArray *rawhits)
Int_t GetIndex(Int_t nRegion, Int_t nValue)
vector< Int_t > fNumAdcHits
vector< Double_t > fGoodAdcMult
vector< Double_t > fGoodAdcPulseInt
TClonesArray * frAdcSampPulseTime
TClonesArray * frAdcPedRaw
TClonesArray * frAdcPulseIntRaw
Double_t * fAdcPulseAmpTest
static const Int_t MaxNumCerPmt
TClonesArray * frAdcPulseTime
TClonesArray * frAdcSampPulseAmpRaw
vector< Int_t > fNumTracksMatched
Double_t * fAdcTimeWindowMax
TClonesArray * frAdcSampPulseIntRaw
TClonesArray * frAdcSampPulseTimeRaw
Double_t * fAdcTimeWindowMin
vector< Double_t > fGoodAdcHitUsed
TClonesArray * frAdcSampPulseAmp
static const Int_t MaxNumAdcPulse
TClonesArray * fAdcErrorFlag
TClonesArray * frAdcSampPed
virtual Int_t ReadDatabase(const TDatime &date)
vector< Double_t > fGoodAdcPed
vector< Int_t > fNumTracksFired
vector< Double_t > fGoodAdcPulseAmp
TClonesArray * frAdcPulseInt
virtual Int_t DefineVariables(EMode mode=kDefine)
TClonesArray * frAdcPulseAmpRaw
Int_t fOutputSampWaveform
virtual Int_t FillMap(THaDetMap *detmap, const char *detectorname)
A standard Hall C spectrometer apparatus.
virtual Int_t DecodeToHitList(const THaEvData &evdata, Bool_t suppress=kFALSE)
Populate the hitlist from the raw event data.
TClonesArray * fRawHitList
void CreateMissReportParms(const char *prefix) const
void InitHitList(THaDetMap *detmap, const char *hitclass, Int_t maxhits, Int_t tdcref_cut=0, Int_t adcref_cut=0)
Save the electronics module to detector mapping and initialize a hit array of hits of class hitclass.
void MissReport(const char *name) const
Generic hodoscope consisting of multiple planes with multiple paddles with phototubes on both ends.
Double_t GetStartTime() const
Double_t GetOffsetTime() const
Int_t LoadParmValues(const DBRequest *list, const char *prefix="")
Retrieve parameter values from the parameter cache.
Class representing a single raw ADC hit.
Int_t GetSampPulseIntRaw(UInt_t iPulse=0) const
UInt_t GetNSampPulses() const
Double_t GetSampPulseInt(UInt_t iPulse=0) const
Int_t GetPedRaw() const
Gets raw signal pedestal. In channels.
Int_t GetSampPulseAmpRaw(UInt_t iPulse=0) const
Double_t GetSampPulseTime(UInt_t iPulse=0) const
UInt_t GetNPulses() const
Gets number of set pulses.
Int_t GetF250_NSB() const
UInt_t GetNSamples() const
Gets number of set samples.
Int_t GetSampPedRaw() const
Bool_t HasRefTime() const
void SetSampNSAT(Int_t nsat)
static constexpr Double_t GetAdcTopC()
void SetSampThreshold(Double_t thres)
Double_t GetPulseAmp(UInt_t iPulse=0) const
Gets pedestal subtracted pulse amplitude. In channels.
Double_t GetSample(UInt_t iSample=0) const
void SetSampIntTimePedestalPeak()
Int_t GetPulseAmpRaw(UInt_t iPulse=0) const
Gets raw pulse amplitude. In channels.
Double_t GetPed() const
Gets sample pedestal. In channels.
Double_t GetF250_PeakPedestalRatio() const
Int_t GetPulseTimeRaw(UInt_t iPulse=0) const
Gets raw pulse time. In subsamples.
Double_t GetSampPulseAmp(UInt_t iPulse=0) const
Double_t GetPulseTime(UInt_t iPulse=0) const
Int_t GetF250_NPedestalSamples() const
Int_t GetPulseIntRaw(UInt_t iPulse=0) const
Gets raw pulse integral. In channels.
Int_t GetSampPulseTimeRaw(UInt_t iPulse=0) const
Double_t GetSampPed() const
Int_t GetF250_NSA() const
static constexpr Double_t GetAdcTomV()
void SetF250Params(Int_t NSA, Int_t NSB, Int_t NPED)
Sets F250 parameters used for pedestal subtraction.
Double_t GetPulseInt(UInt_t iPulse=0) const
Gets pedestal subtracted pulse integral. In channels.
THcRawAdcHit & GetRawAdcHitPos()
const char * GetName() const override
Int_t GetEntries() const override
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
Double_t Max(Double_t a, Double_t b)