Back to index

See source file

CPulse.h

 
//----------------------------------------------------------------------------- 
//  $Header: /asis/offline/ceres/cool/project/RCS/CPulse.h,v 1.4 1997/06/11 16:13:44 messer Exp $ 
// 
//  COOL Program Library   
//  Copyright (C) CERES collaboration, 1996 
// 
//  Declaration of class CPulse. 
// 
//----------------------------------------------------------------------------- 
#ifndef CPULSE_H 
#define CPULSE_H 
 
#include "cool.h"  
 
class CSidcHit; 
 
class CPulse {  
public: 
   CPulse(); 
   CPulse(int, int); 
   CPulse(int, int, int, int, int, double, double, double, double); 
   ~CPulse() {} 
    
public: 
   CBoolean operator== (const CPulse& otherPulse) const; 
   CBoolean operator< (const CPulse& otherPulse) const; 
   int operator- (const CPulse& otherPulse) const; 
    
   int getAnode() const { return anode; } 
   int getTStart() const { return tStart; } 
   int getTStop() const { return tStop; } 
   int getMaxTime() const { return maxTime; } 
   int getMinTime() const { return minTime; } 
   double getMaxAmp() const { return maxAmp; } 
   double getCenter() const { return center; } 
   double getAmp() const { return amp; } 
   double getRmsTime() const { return rmsTime; } 
   CBoolean getIsUsedForHit() const { return isUsedForHit; } 
   CSidcHit* getHit() const { return hit; } 
    
   void setAnode(int val) { anode = val; } 
   void setTStart(int val) { tStart = val; } 
   void setTStop(int val) { tStop = val; } 
   void setMaxTime(int val) { maxTime = val; } 
   void setMinTime(int val) { minTime = val; } 
   void setMaxAmp(double val) { maxAmp = val; } 
   void setCenter(double val) { center = val; } 
   void setAmp(double val) { amp = val; } 
   void setRmsTime(double val) { rmsTime = val; } 
   void setIsUsedForHit(CBoolean val) { isUsedForHit = val; } 
   void setHit(CSidcHit* val) { hit = val; } 
    
   void applyStopPulseCorrection(double*); 
    
private:  
   int      anode;             // pulse comes from this anode 
   int      tStart;            // start timebin of pulse 
   int      tStop;             // stop timebin of pulse 
   int      maxTime;           // timebin of maximum amp in pulse 
   int      minTime;           // timebin of local minimum amp in pulse (if exisiting) 
   double   maxAmp;            // maximum amp in pulse 
   double   center;            // center in time 
   double   amp;               // integral amplitude (sum amp of timebins) 
   double   rmsTime;           // rms in time 
   CBoolean isUsedForHit;      // mark if already used for construction of hit 
   CSidcHit *hit;              // pointer to associated hit 
};  
 
inline CBoolean CPulse::operator== (const CPulse& otherPulse) const 
{ 
   return (anode == otherPulse.getAnode() && tStart == otherPulse.getTStart() && 
	   tStop == otherPulse.getTStop()); 
} 
 
inline CBoolean CPulse::operator< (const CPulse& otherPulse) const 
{ 
   return (anode < otherPulse.getAnode()); 
} 
 
inline int CPulse::operator- (const CPulse& otherPulse) const 
{ 
   return (anode - otherPulse.getAnode()); 
} 
 
#endif /* CPULSE_H */  

Back to index

See source file