CSidcHit.h
//-----------------------------------------------------------------------------
// $Header: CSidcHit.h,v 3.1 97/04/22 11:09:34 messer Exp $
//
// COOL Program Library
// Copyright (C) CERES collaboration, 1996
//
// Declarations for CSidcHit class.
//
//-----------------------------------------------------------------------------
#ifndef CSIDCHIT_H
#define CSIDCHIT_H
#include "cool.h"
#include "CCoordinate.h"
class CSidcCluster;
class CSidcHit {
public:
friend void robustChi2(int *npar, double gin[3], double *f, double qs[3], int *iflag, void *fext); // for vertex fit.
public:
CSidcHit() { }
CSidcHit(const CLabCylinderCoord, const double);
CSidcHit(const CLabXYZCoord, const double);
~CSidcHit() { }
CSidcHit & operator = (const CSidcHit &);
//
// needed in order to use CSortedList
//
virtual CBoolean operator== (const CSidcHit& ) const;
virtual CBoolean operator< (const CSidcHit& ) const;
virtual double operator- (const CSidcHit& ) const;
public:
CSidcCluster* getCluster() const { return cluster; }
CLabCylinderCoord getCenter() const { return center; }
CLabCylinderCoord getSigmaCenter() const { return sigmaCenter; }
CLabXYZCoord getCenterInXYZ() const { return centerInXYZ; }
float getAmp() const { return amp; }
float getSumAmp() const { return sumAmp; }
short getFirstPulse() const { return firstPulse; }
short getNPulses() const { return nPulses; }
short getLengthOfLongestPulse() const { return lengthOfLongestPulse; }
void setCluster(CSidcCluster* c ) { cluster = c; }
void setCenter(const CLabCylinderCoord&);
void setCenterInXYZ(const CLabXYZCoord&);
void setSigmaCenter(const CLabCylinderCoord& sp) { sigmaCenter = sp; }
void setAmp(const float newAmp) { amp = newAmp; }
void setSumAmp(const float newAmp) { sumAmp = newAmp; }
void setFirstPulse(const short val) { firstPulse = val; }
void setNPulses(const short val) { nPulses = val; }
void setLengthOfLongestPulse(const short newL) { lengthOfLongestPulse = newL; }
protected:
CSidcCluster* cluster; // cluster containing the hit
CLabCylinderCoord center;
CLabCylinderCoord sigmaCenter;
CLabXYZCoord centerInXYZ;
float amp; // amp either from CoG of pulses or from regression
float sumAmp; // amplitude from summing all timebins (CoG)
short firstPulse; // indes of first pulse in pulselist
short nPulses; // # of pulses used for this hit
short lengthOfLongestPulse; // in tbins
};
#endif /* CSIDCHIT_H */