CPulse.C
//-----------------------------------------------------------------------------
// $Header: /asis/offline/ceres/cool/project/RCS/CPulse.C,v 1.3 1997/05/30 12:12:26 messer Exp messer $
//
// COOL Program Library
// Copyright (C) CERES collaboration, 1996
//
// Implementation of class CPulse.
//
//-----------------------------------------------------------------------------
#include "CPulse.h"
CPulse::CPulse()
{
anode = 0;
tStart = 0;
tStop = 0;
maxTime = 0;
minTime = 0;
maxAmp = 0.0;
center = 0.0;
amp = 0.0;
rmsTime = 0.0;
isUsedForHit = False;
hit = 0;
}
CPulse::CPulse(int a, int ts)
{
anode = a;
tStart = ts;
tStop = 0;
maxTime = 0;
minTime = 0;
maxAmp = 0.0;
center = 0.0;
amp = 0.0;
rmsTime = 0.0;
isUsedForHit = False;
hit = 0;
}
CPulse::CPulse(int an, int t1, int t2, int maxT, int minT, double maxA, double c,
double am, double rms)
{
anode = an;
tStart = t1;
tStop = t2;
maxTime = maxT;
minTime = minT;
maxAmp = maxA;
center = c;
amp = am;
rmsTime = rms;
isUsedForHit = False;
hit = 0;
}
//
// Correct pulse data for stop phase to FADC clock and time shifts
//
void CPulse::applyStopPulseCorrection(double* stopPulseCoGOffset)
{
int icrate = getAnode()/90;
setCenter(getCenter() + stopPulseCoGOffset[icrate]);
}