Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 11:57:33

0001 #ifndef CALIBCALORIMETRY_CASTORALGOS_CASTORPULSESHAPES_H
0002 #define CALIBCALORIMETRY_CASTORALGOS_CASTORPULSESHAPES_H 1
0003 
0004 #include <vector>
0005 
0006 /** \class CastorPulseShapes
0007   *  
0008   * \author P. Katsas - Univ. of Athens
0009   */
0010 class CastorPulseShapes {
0011 public:
0012   CastorPulseShapes();
0013 
0014   class Shape {
0015   public:
0016     Shape();
0017     void setNBin(int n);
0018     void setShapeBin(int i, float f);
0019     float getTpeak() const { return tpeak_; }
0020     float operator()(double time) const;
0021     float at(double time) const;
0022     float integrate(double tmin, double tmax) const;
0023 
0024   private:
0025     std::vector<float> shape_;
0026     int nbin_;
0027     float tpeak_;
0028   };
0029 
0030   const Shape& castorShape() const { return castorShape_; }
0031 
0032 private:
0033   Shape castorShape_;
0034   void computeCastorShape(Shape& s);
0035 };
0036 #endif