34 const char* description,
38 fParentHitList(0), fCluster(0),frPosAdcErrorFlag(0), frNegAdcErrorFlag(0),
39 frPosTDCHits(0), frNegTDCHits(0), frPosADCHits(0), frNegADCHits(0),
40 frPosADCSums(0), frNegADCSums(0), frPosADCPeds(0), frNegADCPeds(0),
41 fHodoHits(0), frPosTdcTimeRaw(0), frPosAdcPedRaw(0),
42 frPosAdcPulseIntRaw(0), frPosAdcPulseAmpRaw(0),
43 frPosAdcPulseTimeRaw(0), frPosTdcTime(0), frPosAdcPed(0),
44 frPosAdcPulseInt(0), frPosAdcPulseAmp(0), frPosAdcPulseTime(0),
45 frNegTdcTimeRaw(0), frNegAdcPedRaw(0), frNegAdcPulseIntRaw(0),
46 frNegAdcPulseAmpRaw(0), frNegAdcPulseTimeRaw(0), frNegTdcTime(0),
47 frNegAdcPed(0), frNegAdcPulseInt(0), frNegAdcPulseAmp(0),
48 frNegAdcPulseTime(0), fPosCenter(0), fHodoPosMinPh(0),
49 fHodoNegMinPh(0), fHodoPosPhcCoeff(0), fHodoNegPhcCoeff(0),
50 fHodoPosTimeOffset(0), fHodoNegTimeOffset(0), fHodoVelLight(0),
51 fHodoPosInvAdcOffset(0), fHodoNegInvAdcOffset(0),
52 fHodoPosAdcTimeWindowMin(0), fHodoPosAdcTimeWindowMax(0),
53 fHodoNegAdcTimeWindowMin(0), fHodoNegAdcTimeWindowMax(0),
54 fHodoPosInvAdcLinear(0), fHodoNegInvAdcLinear(0),
55 fHodoPosInvAdcAdc(0), fHodoNegInvAdcAdc(0), fHodoVelFit(0),
56 fHodoCableFit(0), fHodo_LCoeff(0), fHodoPos_c1(0), fHodoNeg_c1(0),
57 fHodoPos_c2(0), fHodoNeg_c2(0), fHodoSigma(0), fPosPedSum(0),
58 fPosPedSum2(0), fPosPedLimit(0), fPosPedCount(0), fNegPedSum(0),
59 fNegPedSum2(0), fNegPedLimit(0), fNegPedCount(0), fPosPed(0),
60 fPosSig(0), fPosThresh(0), fNegPed(0), fNegSig(0), fNegThresh(0)
67 frPosAdcErrorFlag =
new TClonesArray(
"THcSignalHit", 16);
68 frNegAdcErrorFlag =
new TClonesArray(
"THcSignalHit", 16);
81 frPosAdcPulseIntRaw =
new TClonesArray(
"THcSignalHit", 16);
82 frPosAdcPulseAmpRaw =
new TClonesArray(
"THcSignalHit", 16);
83 frPosAdcPulseTimeRaw =
new TClonesArray(
"THcSignalHit", 16);
89 frPosAdcPulseTime =
new TClonesArray(
"THcSignalHit", 16);
93 frNegAdcPulseIntRaw =
new TClonesArray(
"THcSignalHit", 16);
94 frNegAdcPulseAmpRaw =
new TClonesArray(
"THcSignalHit", 16);
95 frNegAdcPulseTimeRaw =
new TClonesArray(
"THcSignalHit", 16);
100 frNegAdcPulseAmp =
new TClonesArray(
"THcSignalHit", 16);
101 frNegAdcPulseTime =
new TClonesArray(
"THcSignalHit", 16);
103 frPosAdcSampPedRaw =
new TClonesArray(
"THcSignalHit", 16);
104 frPosAdcSampPulseIntRaw =
new TClonesArray(
"THcSignalHit", 16);
105 frPosAdcSampPulseAmpRaw =
new TClonesArray(
"THcSignalHit", 16);
106 frPosAdcSampPulseTimeRaw =
new TClonesArray(
"THcSignalHit", 16);
108 frPosAdcSampPulseInt =
new TClonesArray(
"THcSignalHit", 16);
109 frPosAdcSampPulseAmp =
new TClonesArray(
"THcSignalHit", 16);
110 frPosAdcSampPulseTime =
new TClonesArray(
"THcSignalHit", 16);
112 frNegAdcSampPedRaw =
new TClonesArray(
"THcSignalHit", 16);
113 frNegAdcSampPulseIntRaw =
new TClonesArray(
"THcSignalHit", 16);
114 frNegAdcSampPulseAmpRaw =
new TClonesArray(
"THcSignalHit", 16);
115 frNegAdcSampPulseTimeRaw =
new TClonesArray(
"THcSignalHit", 16);
117 frNegAdcSampPulseInt =
new TClonesArray(
"THcSignalHit", 16);
118 frNegAdcSampPulseAmp =
new TClonesArray(
"THcSignalHit", 16);
119 frNegAdcSampPulseTime =
new TClonesArray(
"THcSignalHit", 16);
121 fPlaneNum = planenum;
122 fTotPlanes = planenum;
273 string parname =
"scin_" + string(
GetName()) +
"_nr";
274 DBRequest list_1[] = {
282 char tmpleft[6], tmpright[6];
284 strcpy(tmpleft,
"left");
285 strcpy(tmpright,
"right");
288 strcpy(tmpleft,
"bot");
289 strcpy(tmpright,
"top");
334 if (
fCosmicFlag==1) cout <<
" setup for cosmics in scint plane"<< endl;
490 {
"posAdcErrorFlag",
"Error Flag for When FPGA Fails",
"frPosAdcErrorFlag.THcSignalHit.GetData()"},
491 {
"negAdcErrorFlag",
"Error Flag for When FPGA Fails",
"frNegAdcErrorFlag.THcSignalHit.GetData()"},
493 {
"posTdcTimeRaw",
"List of positive raw TDC values.",
"frPosTdcTimeRaw.THcSignalHit.GetData()"},
494 {
"posAdcPedRaw",
"List of positive raw ADC pedestals",
"frPosAdcPedRaw.THcSignalHit.GetData()"},
495 {
"posAdcPulseIntRaw",
"List of positive raw ADC pulse integrals.",
"frPosAdcPulseIntRaw.THcSignalHit.GetData()"},
496 {
"posAdcPulseAmpRaw",
"List of positive raw ADC pulse amplitudes.",
"frPosAdcPulseAmpRaw.THcSignalHit.GetData()"},
497 {
"posAdcPulseTimeRaw",
"List of positive raw ADC pulse times.",
"frPosAdcPulseTimeRaw.THcSignalHit.GetData()"},
499 {
"posTdcTime",
"List of positive TDC values.",
"frPosTdcTime.THcSignalHit.GetData()"},
500 {
"posAdcPed",
"List of positive ADC pedestals",
"frPosAdcPed.THcSignalHit.GetData()"},
501 {
"posAdcPulseInt",
"List of positive ADC pulse integrals.",
"frPosAdcPulseInt.THcSignalHit.GetData()"},
502 {
"posAdcPulseAmp",
"List of positive ADC pulse amplitudes.",
"frPosAdcPulseAmp.THcSignalHit.GetData()"},
503 {
"posAdcPulseTime",
"List of positive ADC pulse times.",
"frPosAdcPulseTime.THcSignalHit.GetData()"},
505 {
"posAdcSampPedRaw",
"Positive Raw Samp ADC pedestals",
"frPosAdcSampPedRaw.THcSignalHit.GetData()"},
506 {
"posAdcSampPulseIntRaw",
"Positive Raw Samp ADC pulse integrals",
"frPosAdcSampPulseIntRaw.THcSignalHit.GetData()"},
507 {
"posAdcSampPulseAmpRaw",
"Positive Raw Samp ADC pulse amplitudes",
"frPosAdcSampPulseAmpRaw.THcSignalHit.GetData()"},
508 {
"posAdcSampPulseTimeRaw",
"Positive Raw Samp ADC pulse times",
"frPosAdcSampPulseTimeRaw.THcSignalHit.GetData()"},
509 {
"posAdcSampPed",
"Positive Samp ADC pedestals",
"frPosAdcSampPed.THcSignalHit.GetData()"},
510 {
"posAdcSampPulseInt",
"Positive Samp ADC pulse integrals",
"frPosAdcSampPulseInt.THcSignalHit.GetData()"},
511 {
"posAdcSampPulseAmp",
"Positive Samp ADC pulse amplitudes",
"frPosAdcSampPulseAmp.THcSignalHit.GetData()"},
512 {
"posAdcSampPulseTime",
"Positive Samp ADC pulse times",
"frPosAdcSampPulseTime.THcSignalHit.GetData()"},
514 {
"negTdcTimeRaw",
"List of negative raw TDC values.",
"frNegTdcTimeRaw.THcSignalHit.GetData()"},
515 {
"negAdcPedRaw",
"List of negative raw ADC pedestals",
"frNegAdcPedRaw.THcSignalHit.GetData()"},
516 {
"negAdcPulseIntRaw",
"List of negative raw ADC pulse integrals.",
"frNegAdcPulseIntRaw.THcSignalHit.GetData()"},
517 {
"negAdcPulseAmpRaw",
"List of negative raw ADC pulse amplitudes.",
"frNegAdcPulseAmpRaw.THcSignalHit.GetData()"},
518 {
"negAdcPulseTimeRaw",
"List of negative raw ADC pulse times.",
"frNegAdcPulseTimeRaw.THcSignalHit.GetData()"},
520 {
"negTdcTime",
"List of negative TDC values.",
"frNegTdcTime.THcSignalHit.GetData()"},
521 {
"negAdcPed",
"List of negative ADC pedestals",
"frNegAdcPed.THcSignalHit.GetData()"},
522 {
"negAdcPulseInt",
"List of negative ADC pulse integrals.",
"frNegAdcPulseInt.THcSignalHit.GetData()"},
523 {
"negAdcPulseAmp",
"List of negative ADC pulse amplitudes.",
"frNegAdcPulseAmp.THcSignalHit.GetData()"},
524 {
"negAdcPulseTime",
"List of negative ADC pulse times.",
"frNegAdcPulseTime.THcSignalHit.GetData()"},
526 {
"negAdcSampPedRaw",
"Negative Raw Samp ADC pedestals",
"frNegAdcSampPedRaw.THcSignalHit.GetData()"},
527 {
"negAdcSampPulseIntRaw",
"Negative Raw Samp ADC pulse integrals",
"frNegAdcSampPulseIntRaw.THcSignalHit.GetData()"},
528 {
"negAdcSampPulseAmpRaw",
"Negative Raw Samp ADC pulse amplitudes",
"frNegAdcSampPulseAmpRaw.THcSignalHit.GetData()"},
529 {
"negAdcSampPulseTimeRaw",
"Negative Raw Samp ADC pulse times",
"frNegAdcSampPulseTimeRaw.THcSignalHit.GetData()"},
530 {
"negAdcSampPed",
"Negative Samp ADC pedestals",
"frNegAdcSampPed.THcSignalHit.GetData()"},
531 {
"negAdcSampPulseInt",
"Negative Samp ADC pulse integrals",
"frNegAdcSampPulseInt.THcSignalHit.GetData()"},
532 {
"negAdcSampPulseAmp",
"Negative Samp ADC pulse amplitudes",
"frNegAdcSampPulseAmp.THcSignalHit.GetData()"},
533 {
"negAdcSampPulseTime",
"Negative Samp ADC pulse times",
"frNegAdcSampPulseTime.THcSignalHit.GetData()"},
535 {
"totNumPosAdcHits",
"Total Number of Positive ADC Hits",
"fTotNumPosAdcHits"},
536 {
"totNumNegAdcHits",
"Total Number of Negative ADC Hits",
"fTotNumNegAdcHits"},
537 {
"totNumAdcHits",
"Total Number of PMTs Hit (as measured by ADCs)",
"fTotNumAdcHits"},
539 {
"totNumPosTdcHits",
"Total Number of Positive TDC Hits",
"fTotNumPosTdcHits"},
540 {
"totNumNegTdcHits",
"Total Number of Negative TDC Hits",
"fTotNumNegTdcHits"},
541 {
"totNumTdcHits",
"Total Number of PMTs Hits (as measured by TDCs)",
"fTotNumTdcHits"},
549 {
"adcNegSampWaveform",
"FADC Neg ADCSample Waveform",
"fNegAdcSampWaveform"},
550 {
"adcPosSampWaveform",
"FADC Pos ADCSample Waveform",
"fPosAdcSampWaveform"},
557 {
"nhits",
"Number of paddle hits (passed TDC && ADC Min and Max cuts for either end)",
"GetNScinHits() "},
559 {
"posTdcCounter",
"List of positive TDC counter numbers.",
"frPosTdcTimeRaw.THcSignalHit.GetPaddleNumber()"},
560 {
"posAdcCounter",
"List of positive ADC counter numbers.",
"frPosAdcPulseIntRaw.THcSignalHit.GetPaddleNumber()"},
561 {
"negTdcCounter",
"List of negative TDC counter numbers.",
"frNegTdcTimeRaw.THcSignalHit.GetPaddleNumber()"},
562 {
"negAdcCounter",
"List of negative ADC counter numbers.",
"frNegAdcPulseIntRaw.THcSignalHit.GetPaddleNumber()"},
564 {
"fptime",
"Time at focal plane",
"GetFpTime()"},
566 {
"numGoodPosAdcHits",
"Number of Good Positive ADC Hits Per PMT",
"fNumGoodPosAdcHits"},
567 {
"numGoodNegAdcHits",
"Number of Good Negative ADC Hits Per PMT",
"fNumGoodNegAdcHits"},
569 {
"numGoodPosTdcHits",
"Number of Good Positive TDC Hits Per PMT",
"fNumGoodPosTdcHits"},
570 {
"numGoodNegTdcHits",
"Number of Good Negative TDC Hits Per PMT",
"fNumGoodNegTdcHits"},
573 {
"totNumGoodPosAdcHits",
"Total Number of Good Positive ADC Hits",
"fTotNumGoodPosAdcHits"},
574 {
"totNumGoodNegAdcHits",
"Total Number of Good Negative ADC Hits",
"fTotNumGoodNegAdcHits"},
575 {
"totNumGoodAdcHits",
"TotalNumber of Good ADC Hits Per PMT",
"fTotNumGoodAdcHits"},
577 {
"totNumGoodPosTdcHits",
"Total Number of Good Positive TDC Hits",
"fTotNumGoodPosTdcHits"},
578 {
"totNumGoodNegTdcHits",
"Total Number of Good Negative TDC Hits",
"fTotNumGoodNegTdcHits"},
579 {
"totNumGoodTdcHits",
"TotalNumber of Good TDC Hits Per PMT",
"fTotNumGoodTdcHits"},
585 {
"GoodPosAdcPed",
"List of Positive ADC pedestals (passed TDC && ADC Min and Max cuts for either end)",
"fGoodPosAdcPed"},
586 {
"GoodNegAdcPed",
"List of Negative ADC pedestals (passed TDC && ADC Min and Max cuts for either end)",
"fGoodNegAdcPed"},
587 {
"GoodPosAdcMult",
"List of Positive ADC Mult (passed TDC && ADC Min and Max cuts for either end)",
"fGoodPosAdcMult"},
588 {
"GoodNegAdcMult",
"List of Negative ADC Mult (passed TDC && ADC Min and Max cuts for either end)",
"fGoodNegAdcMult"},
589 {
"GoodPosAdcHitUsed",
"List of Positive ADC Hit Used (passed TDC && ADC Min and Max cuts for either end)",
"fGoodPosAdcHitUsed"},
590 {
"GoodNegAdcHitUsed",
"List of Negative ADC Hit Used (passed TDC && ADC Min and Max cuts for either end)",
"fGoodNegAdcHitUsed"},
592 {
"GoodNegTdcTimeUnCorr",
"List of negative TDC values (passed TDC && ADC Min and Max cuts for either end)",
"fGoodNegTdcTimeUnCorr"},
593 {
"GoodNegTdcTimeCorr",
"List of negative corrected TDC values (corrected for PMT offset and ADC)",
"fGoodNegTdcTimeCorr"},
594 {
"GoodNegTdcTimeTOFCorr",
"List of negative corrected TDC values (corrected for TOF)",
"fGoodNegTdcTimeTOFCorr"},
595 {
"GoodNegTdcTimeWalkCorr",
"List of negative corrected TDC values (corrected for Time-Walk)",
"fGoodNegTdcTimeWalkCorr"},
596 {
"GoodNegAdcPulseInt",
"List of negative ADC values (passed TDC && ADC Min and Max cuts for either end)",
"fGoodNegAdcPulseInt"},
597 {
"GoodPosTdcTimeUnCorr",
"List of positive TDC values (passed TDC && ADC Min and Max cuts for either end)",
"fGoodPosTdcTimeUnCorr"},
598 {
"GoodPosTdcTimeCorr",
"List of positive corrected TDC values (corrected for PMT offset and ADC)",
"fGoodPosTdcTimeCorr"},
599 {
"GoodPosTdcTimeTOFCorr",
"List of positive corrected TDC values (corrected for TOF)",
"fGoodPosTdcTimeTOFCorr"},
600 {
"GoodPosTdcTimeWalkCorr",
"List of positive corrected TDC values (corrected for Time-Walk)",
"fGoodPosTdcTimeWalkCorr"},
601 {
"GoodPosAdcPulseInt",
"List of positive ADC values (passed TDC && ADC Min and Max cuts for either end)",
"fGoodPosAdcPulseInt"},
602 {
"GoodPosAdcPulseAmp",
"List of positive ADC peak amp (passed TDC && ADC Min and Max cuts for either end)",
"fGoodPosAdcPulseAmp"},
603 {
"GoodNegAdcPulseAmp",
"List of Negative ADC peak amp (passed TDC && ADC Min and Max cuts for either end)",
"fGoodNegAdcPulseAmp"},
604 {
"GoodPosAdcPulseTime",
"List of positive ADC time (passed TDC && ADC Min and Max cuts for either end)",
"fGoodPosAdcPulseTime"},
605 {
"GoodNegAdcPulseTime",
"List of Negative ADC time (passed TDC && ADC Min and Max cuts for either end)",
"fGoodNegAdcPulseTime"},
606 {
"GoodPosAdcTdcDiffTime",
"List of positive TDC - ADC time (passed TDC && ADC Min and Max cuts for either end)",
"fGoodPosAdcTdcDiffTime"},
607 {
"GoodNegAdcTdcDiffTime",
"List of Negative TDC - ADC time (passed TDC && ADC Min and Max cuts for either end)",
"fGoodNegAdcTdcDiffTime"},
608 {
"DiffDisTrack",
"Difference between track and scintillator position (cm)",
"fHitDistance"},
609 {
"DiffDisTrackCorr",
"TW Corrected Dist Difference between track and scintillator position (cm)",
"fGoodDiffDistTrack"},
610 {
"TrackXPos",
"Track X position at plane (cm)",
"fTrackXPosition"},
611 {
"TrackYPos",
"Track Y position at plane (cm)",
"fTrackYPosition"},
612 {
"ScinXPos",
"Scint Average Y position at plane (cm)",
"fScinXPos"},
613 {
"ScinYPos",
"Scint Average Xposition at plane (cm)",
"fScinYPos"},
614 {
"NumClus",
"Number of clusters",
"fNumberClusters"},
615 {
"Clus.Pos",
"Position of each paddle clusters",
"fCluster.THcScintPlaneCluster.GetClusterPosition()"},
616 {
"Clus.Size",
"Size of each paddle clusters",
"fCluster.THcScintPlaneCluster.GetClusterSize()"},
617 {
"Clus.Flag",
"Flag of each paddle clusters",
"fCluster.THcScintPlaneCluster.GetClusterFlag()"},
618 {
"Clus.UsedFlag",
"USed Flag of each paddle clusters",
"fCluster.THcScintPlaneCluster.GetClusterUsedFlag()"},
619 {
"PosTdcRefTime",
"Reference time of Pos TDC",
"fPosTdcRefTime"},
620 {
"NegTdcRefTime",
"Reference time of Neg TDC",
"fNegTdcRefTime"},
621 {
"PosAdcRefTime",
"Reference time of Pos ADC",
"fPosAdcRefTime"},
622 {
"NegAdcRefTime",
"Reference time of Neg aDC",
"fNegAdcRefTime"},
623 {
"PosTdcRefDiffTime",
"Reference Diff time of Pos TDC",
"fPosTdcRefDiffTime"},
624 {
"NegTdcRefDiffTime",
"Reference Diff time of Neg TDC",
"fNegTdcRefDiffTime"},
625 {
"PosAdcRefDiffTime",
"Reference Diff time of Pos ADC",
"fPosAdcRefDiffTime"},
626 {
"NegAdcRefDiffTime",
"Reference Diff time of Neg aDC",
"fNegAdcRefDiffTime"},
769 cout <<
" Calling THcScintillatorPlane::Decode " <<
GetName() << endl;
779 cout <<
"*******************************\n";
780 cout <<
"NOW IN THcScintilatorPlane::CoarseProcess!!!!\n";
781 cout <<
"*******************************\n";
824 Int_t nrPosTDCHits=0;
825 Int_t nrNegTDCHits=0;
826 Int_t nrPosADCHits=0;
827 Int_t nrNegADCHits=0;
832 UInt_t nrSampPosAdcHits = 0;
833 UInt_t nrSampNegAdcHits = 0;
912 Int_t ihit = nexthit;
923 while(ihit < nrawhits) {
1070 cout <<
"THcScintillatorPlane: " <<
GetName()<<
" Neg ADC reftime problem at paddle num = " << padnum <<
" TDC pos hits = " << rawNegAdcHit.
GetNPulses() << endl;
1159 Int_t adcmult_pos=0;
1160 Int_t adcmult_neg=0;
1161 Int_t adchitused_pos=0;
1162 Int_t adchitused_neg=0;
1183 btdcraw_pos =
kTRUE;
1184 good_ielem_postdc = thit;
1191 btdcraw_neg =
kTRUE;
1192 good_ielem_negtdc = thit;
1198 Int_t good_ielem_negadc_test2=-1;
1199 Int_t good_ielem_posadc_test2=-1;
1201 if (good_ielem_negtdc != -1) {
1203 Double_t max_adctdcdiff_test=1000.;
1210 if (pulseTimeCut && pulseAmp>max_adcamp_test) {
1211 good_ielem_negadc = ielem;
1212 max_adcamp_test=pulseAmp;
1214 if (
abs(TdcAdcTimeDiff) < max_adctdcdiff_test) {
1215 good_ielem_negadc_test2 = ielem;
1216 max_adctdcdiff_test=
abs(TdcAdcTimeDiff);
1222 if ( good_ielem_negadc == -1 && good_ielem_negadc_test2 != -1) good_ielem_negadc=good_ielem_negadc_test2;
1223 if ( good_ielem_negadc == -1 && good_ielem_negadc_test2 == -1 && rawNegAdcHit.
GetNPulses()>0) {
1224 good_ielem_negadc=0;
1227 if (good_ielem_negadc != -1 && good_ielem_negadc<rawNegAdcHit.
GetNPulses()) {
1228 adcped_neg = rawNegAdcHit.
GetPed();
1230 adchitused_neg = good_ielem_negadc+1;
1231 adcint_neg = rawNegAdcHit.
GetPulseInt(good_ielem_negadc);
1232 adcamp_neg = rawNegAdcHit.
GetPulseAmp(good_ielem_negadc);
1233 if (rawNegAdcHit.
GetPulseAmpRaw(good_ielem_negadc) <= 0) adcamp_neg= 200.;
1235 badcraw_neg =
kTRUE;
1240 if (good_ielem_postdc != -1) {
1242 Double_t max_adctdcdiff_test=1000.;
1250 if (pulseTimeCut && pulseAmp>max_adcamp_test) {
1251 good_ielem_posadc = ielem;
1252 max_adcamp_test=pulseAmp;
1254 if (
abs(TdcAdcTimeDiff) < max_adctdcdiff_test) {
1255 good_ielem_posadc_test2 = ielem;
1256 max_adctdcdiff_test=
abs(TdcAdcTimeDiff);
1260 if ( good_ielem_posadc == -1 && good_ielem_posadc_test2 != -1) good_ielem_posadc=good_ielem_posadc_test2;
1261 if ( good_ielem_posadc == -1 && good_ielem_posadc_test2 == -1 && rawPosAdcHit.
GetNPulses()>0) good_ielem_posadc=0;
1262 if (good_ielem_posadc != -1 && good_ielem_posadc<rawPosAdcHit.
GetNPulses()) {
1263 adcped_pos = rawPosAdcHit.
GetPed();
1265 adchitused_pos = good_ielem_posadc+1;
1266 adcint_pos = rawPosAdcHit.
GetPulseInt(good_ielem_posadc);
1267 adcamp_pos = rawPosAdcHit.
GetPulseAmp(good_ielem_posadc);
1268 if (rawPosAdcHit.
GetPulseAmpRaw(good_ielem_posadc) <= 0) adcamp_pos= 200.;
1270 badcraw_pos =
kTRUE;
1277 badcraw_pos = badcraw_neg =
kTRUE;
1281 badcraw_pos = badcraw_neg =
kTRUE;
1285 badcraw_pos = badcraw_neg =
kTRUE;
1302 if((btdcraw_pos && badcraw_pos) || (btdcraw_neg && badcraw_neg )) {
1303 if (good_ielem_posadc != -1) {
1317 if (good_ielem_negadc != -1) {
1333 if (good_ielem_postdc != -1) {
1341 if (good_ielem_negtdc != -1) {
1348 adcint_pos, adcint_neg,
1357 if(btdcraw_pos&&badcraw_pos) {
1365 if(btdcraw_neg&&badcraw_neg) {
1378 if( (btdcraw_pos && btdcraw_neg) && (badcraw_pos && badcraw_neg) ) {
1380 Double_t adc_timec_pos= adctime_pos;
1381 Double_t adc_timec_neg= adctime_neg;
1407 Double_t dist_from_center=0.5*(timec_neg-timec_pos)*vellight;
1409 Double_t hit_position=scint_center+dist_from_center;
1412 Double_t scin_corrected_time, postime, negtime;
1413 Double_t adc_postime=adc_timec_pos;
1414 Double_t adc_negtime=adc_timec_neg;
1416 timec_pos -= (
fPosLeft-hit_position)/
1420 scin_corrected_time = 0.5*(timec_pos+timec_neg);
1429 scin_corrected_time = 0.5*(timec_neg+timec_pos);
1430 timec_pos= scin_corrected_time;
1431 timec_neg= scin_corrected_time;
1432 Double_t adc_time_corrected = 0.5*(adc_timec_pos+adc_timec_neg);
1448 scin_corrected_time);
1463 if(btdcraw_pos&& badcraw_pos) {
1472 if(btdcraw_neg && badcraw_neg) {
1482 if (badcraw_neg) adc_neg=adcamp_neg;
1483 if (badcraw_pos) adc_pos=adcamp_pos;
1512 cout <<
"THcScintillatorPlane::ProcessHits " <<
fPlaneNum <<
" " << nexthit <<
"/" << nrawhits << endl;
1513cout <<
" Ref problem end *******" << endl;
1528 Int_t ihit = nexthit;
1529 while(ihit < nrawhits) {
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
Option_t Option_t TPoint TPoint const char mode
ClassImp(VDC::AnalyticTTDConv) using namespace std
R__EXTERN class THcParmList * gHcParms
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="")
const char * GetPrefix() const
THaDetectorBase * GetParent() const
Class representing a single hit for the Hodoscopes.
Generic hodoscope consisting of multiple planes with multiple paddles with phototubes on both ends.
Double_t GetHodoNegInvAdcOffset(Int_t iii) const
Double_t GetStartTimeSlop() const
Double_t GetTDCThrs() const
Double_t GetHodoPosMinPh(Int_t iii) const
Double_t GetHodoPos_c2(Int_t iii) const
Double_t GetHodoPosAdcTimeWindowMin(Int_t iii) const
Double_t GetHodoPosPhcCoeff(Int_t iii) const
Double_t GetTdcMin() const
Double_t GetHodoPosAdcTimeWindowMax(Int_t iii) const
Double_t GetHodoPosInvAdcOffset(Int_t iii) const
Double_t GetHodoPosInvAdcLinear(Int_t iii) const
Double_t GetHodoNeg_c2(Int_t iii) const
Double_t GetHodoLCoeff(Int_t iii) const
Double_t GetHodoNegSigma(Int_t iii) const
Double_t GetHodoVelLight(Int_t iii) const
Double_t GetHodoNegAdcTimeWindowMax(Int_t iii) const
Double_t GetHodoPosInvAdcAdc(Int_t iii) const
Double_t GetHodoPos_c1(Int_t iii) const
Double_t GetHodoNeg_c1(Int_t iii) const
Double_t GetHodoNegMinPh(Int_t iii) const
Double_t GetAdcTdcOffset(Int_t ip) const
Double_t GetHodoVelFit(Int_t iii) const
Double_t GetTdcMax() const
Double_t GetHodoNegInvAdcLinear(Int_t iii) const
Double_t GetStartTimeCenter() const
Int_t GetScinIndex(Int_t nPlane, Int_t nPaddle)
Double_t GetHodoNegAdcTimeWindowMin(Int_t iii) const
Double_t GetHodoSlop(Int_t ip)
Double_t GetHodoPosSigma(Int_t iii) const
Double_t GetHodoNegTimeOffset(Int_t iii) const
Double_t GetHodoNegInvAdcAdc(Int_t iii) const
Double_t GetTdcToTime() const
Double_t GetHodoCableFit(Int_t iii) const
Double_t GetHodoPosTimeOffset(Int_t iii) const
Double_t GetTofTolerance() const
Double_t GetHodoNegPhcCoeff(Int_t iii) const
Int_t GetTdcOffset(Int_t ip) const
Double_t GetBetaNominal() 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)
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.
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
Double_t GetSampleInt() const
Gets pedestal subtracted integral of samples. In channels.
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 GetRefDiffTime() const
Int_t GetF250_NSA() const
void SetF250Params(Int_t NSA, Int_t NSB, Int_t NPED)
Sets F250 parameters used for pedestal subtraction.
Int_t GetSampleIntRaw() const
Gets raw integral of sTimeFacamples. In channels.
Double_t GetPulseInt(UInt_t iPulse=0) const
Gets pedestal subtracted pulse integral. In channels.
Class representing a single raw hit for a hodoscope paddle.
THcRawAdcHit & GetRawAdcHitPos()
THcRawAdcHit & GetRawAdcHitNeg()
THcRawTdcHit & GetRawTdcHitNeg()
THcRawTdcHit & GetRawTdcHitPos()
Class representing a single raw TDC hit.
Int_t GetRefTime() const
Gets reference time. In channels.
Int_t GetTimeRaw(UInt_t iHit=0) const
Gets raw TDC time. In channels.
Int_t GetTime(UInt_t iHit=0) const
Gets TDC time. In channels.
UInt_t GetNHits() const
Gets the number of set hits.
Bool_t HasRefTime() const
Queries whether reference time has been set.
Int_t GetRefDiffTime() const
A single plane of scintillators.
TClonesArray * frPosAdcSampPulseInt
vector< Double_t > fGoodPosAdcPulseTime
vector< Double_t > fGoodNegAdcHitUsed
Double_t * fHodoPosInvAdcAdc
TClonesArray * frPosAdcPulseAmpRaw
TClonesArray * frPosTdcTime
vector< Double_t > fGoodNegTdcTimeTOFCorr
TClonesArray * frNegAdcSampPulseInt
vector< Double_t > fGoodPosAdcPulseInt
vector< Double_t > fGoodPosTdcTimeUnCorr
vector< Double_t > fGoodNegAdcTdcDiffTime
Double_t * fHodoPosTimeOffset
virtual Int_t FineProcess(TClonesArray &tracks)
TClonesArray * frPosAdcSampPulseIntRaw
TClonesArray * frNegADCHits
TClonesArray * frPosAdcSampPulseAmp
virtual void Clear(Option_t *opt="")
TClonesArray * frNegAdcPulseTimeRaw
Double_t * fHodoPosInvAdcOffset
TClonesArray * frNegAdcSampPulseTimeRaw
Double_t * fHodoNegPhcCoeff
virtual void CalculatePedestals()
Double_t * fHodoNegAdcTimeWindowMin
vector< Double_t > fNegAdcSampWaveform
vector< Double_t > fGoodNegAdcPulseAmp
TClonesArray * frPosAdcPulseTime
TClonesArray * frPosAdcPulseTimeRaw
TClonesArray * frPosADCHits
TClonesArray * frNegTdcTimeRaw
THcScintillatorPlane(const char *name, const char *description, Int_t planenum, THaDetectorBase *parent=NULL)
vector< Int_t > fNumGoodNegTdcHits
static const Int_t kADCDynamicPedestal
virtual Int_t ReadDatabase(const TDatime &date)
TClonesArray * frPosAdcSampPed
TClonesArray * frNegAdcSampPedRaw
vector< Double_t > fGoodPosAdcPed
vector< Double_t > fGoodPosAdcPulseAmp
Double_t fPosTdcRefDiffTime
Double_t fADCPedScaleFactor
TClonesArray * frNegAdcPulseAmp
TClonesArray * frNegAdcSampPed
Double_t * fHodoPosPhcCoeff
TClonesArray * frNegTdcTime
Double_t * fHodoPosAdcTimeWindowMin
vector< Int_t > fNumGoodPosAdcHits
virtual Int_t ProcessHits(TClonesArray *rawhits, Int_t nexthit)
TClonesArray * frNegAdcSampPulseTime
TClonesArray * frNegAdcPulseIntRaw
TClonesArray * frPosAdcPulseInt
TClonesArray * frPosAdcSampPedRaw
virtual Int_t Decode(const THaEvData &)
TClonesArray * frPosTdcTimeRaw
vector< Int_t > fNumGoodPosTdcHits
TClonesArray * frPosAdcSampPulseTime
vector< Int_t > fNumGoodNegAdcHits
Double_t * fHodoNegTimeOffset
TClonesArray * frPosAdcSampPulseAmpRaw
Int_t fTotNumGoodNegTdcHits
static const Int_t kADCSampleIntegral
virtual Int_t AccumulatePedestals(TClonesArray *rawhits, Int_t nexthit)
Int_t fTotNumGoodPosTdcHits
virtual Int_t DefineVariables(EMode mode=kDefine)
Int_t fTotNumGoodNegAdcHits
vector< Double_t > fGoodDiffDistTrack
vector< Double_t > fGoodPosTdcTimeWalkCorr
TClonesArray * frNegADCSums
Double_t * fHodoNegInvAdcOffset
TClonesArray * frNegAdcPulseTime
TClonesArray * frNegAdcPulseAmpRaw
TClonesArray * frNegTDCHits
TClonesArray * frPosAdcErrorFlag
virtual void InitializePedestals()
TClonesArray * frNegAdcSampPulseAmp
TClonesArray * frPosAdcSampPulseTimeRaw
Double_t * fHodoPosAdcTimeWindowMax
vector< Double_t > fGoodNegAdcPed
TClonesArray * frNegADCPeds
Double_t fNegAdcRefDiffTime
vector< Double_t > fGoodPosAdcTdcDiffTime
Double_t * fHodoNegAdcTimeWindowMax
vector< Double_t > fGoodNegTdcTimeUnCorr
TClonesArray * frNegAdcPed
TClonesArray * frPosADCSums
vector< Double_t > fGoodNegTdcTimeCorr
TClonesArray * frNegAdcPedRaw
vector< Double_t > fGoodNegAdcPulseInt
vector< Double_t > fGoodPosAdcHitUsed
TClonesArray * frNegAdcSampPulseIntRaw
vector< Double_t > fGoodPosAdcMult
vector< Double_t > fGoodNegAdcPulseTime
TClonesArray * frNegAdcPulseInt
vector< Double_t > fGoodPosTdcTimeCorr
vector< Double_t > fGoodNegAdcMult
static const Int_t kADCSampIntDynPed
Double_t fStartTimeCenter
Double_t * fHodoNegInvAdcLinear
virtual Int_t CoarseProcess(TClonesArray &tracks)
TClonesArray * frPosAdcPulseAmp
Int_t fTotNumGoodPosAdcHits
TClonesArray * frNegAdcSampPulseAmpRaw
Double_t * fHodoNegInvAdcAdc
TClonesArray * frPosADCPeds
TClonesArray * frPosTDCHits
Double_t fPosAdcRefDiffTime
Int_t fOutputSampWaveform
virtual ~THcScintillatorPlane()
TClonesArray * frPosAdcPedRaw
TClonesArray * frNegAdcErrorFlag
vector< Double_t > fGoodNegTdcTimeWalkCorr
TClonesArray * frPosAdcPulseIntRaw
Double_t * fHodoPosInvAdcLinear
vector< Double_t > fPosAdcSampWaveform
TClonesArray * frPosAdcPed
Double_t fNegTdcRefDiffTime
vector< Double_t > fGoodPosTdcTimeTOFCorr
const char * GetName() const override
TObject * At(Int_t idx) const override
Int_t GetLast() const override
R__ALWAYS_INLINE Bool_t IsZombie() const
RVec< PromoteType< T > > abs(const RVec< T > &v)
RVec< PromoteTypes< T0, T1 > > pow(const RVec< T0 > &v, const T1 &y)
Double_t Min(Double_t a, Double_t b)
Double_t Sqrt(Double_t x)
Double_t Max(Double_t a, Double_t b)