test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
ZDCShape Class Reference

shaper for ZDC More...

#include <ZDCShape.h>

Inheritance diagram for ZDCShape:
CaloVShape

Public Member Functions

virtual double operator() (double time) const
 
virtual double timeToRise () const
 
 ZDCShape ()
 
 ZDCShape (const ZDCShape &d)
 
virtual ~ZDCShape ()
 
- Public Member Functions inherited from CaloVShape
 CaloVShape ()
 
virtual ~CaloVShape ()
 

Private Member Functions

void computeShapeZDC ()
 

Private Attributes

int nbin_
 
std::vector< float > nt_
 

Detailed Description

shaper for ZDC

Definition at line 16 of file ZDCShape.h.

Constructor & Destructor Documentation

ZDCShape::ZDCShape ( )

Definition at line 4 of file ZDCShape.cc.

References computeShapeZDC().

5 : nbin_(256),
6  nt_(nbin_, 0.)
7 {
9 }
int nbin_
Definition: ZDCShape.h:32
void computeShapeZDC()
Definition: ZDCShape.cc:26
std::vector< float > nt_
Definition: ZDCShape.h:33
ZDCShape::ZDCShape ( const ZDCShape d)

Definition at line 12 of file ZDCShape.cc.

13 : CaloVShape(d),
14  nbin_(d.nbin_),
15  nt_(d.nt_)
16 {
17 }
int nbin_
Definition: ZDCShape.h:32
std::vector< float > nt_
Definition: ZDCShape.h:33
virtual ZDCShape::~ZDCShape ( )
inlinevirtual

Definition at line 23 of file ZDCShape.h.

23 {}

Member Function Documentation

void ZDCShape::computeShapeZDC ( )
private

Definition at line 26 of file ZDCShape.cc.

References create_public_lumi_plots::exp, j, nbin_, and nt_.

Referenced by ZDCShape().

27 {
28 
29  // cout << endl << " ===== computeShapeZDC !!! " << endl << endl;
30 
31  const float ts = 3.0; // time constant in t * exp(-(t/ts)**2)
32 
33 
34  int j;
35  float norm;
36 
37  // ZDC SHAPE
38  norm = 0.0;
39  for( j = 0; j < 3 * ts && j < nbin_; j++){
40  //nt_[j] = ((float)j)*exp(-((float)(j*j))/(ts*ts));
41  nt_[j] = j * exp(-(j*j)/(ts*ts));
42  norm += nt_[j];
43  }
44  // normalize pulse area to 1.0
45  for( j = 0; j < 3 * ts && j < nbin_; j++){
46  nt_[j] /= norm;
47  }
48 }
int j
Definition: DBlmapReader.cc:9
int nbin_
Definition: ZDCShape.h:32
std::vector< float > nt_
Definition: ZDCShape.h:33
double ZDCShape::operator() ( double  time) const
virtual

Implements CaloVShape.

Definition at line 50 of file ZDCShape.cc.

References nbin_, and nt_.

51 {
52 
53  // return pulse amplitude for request time in ns
54  int jtime;
55  jtime = static_cast<int>(time+0.5);
56 
57  if(jtime >= 0 && jtime < nbin_)
58  return nt_[jtime];
59  else
60  return 0.0;
61 }
int nbin_
Definition: ZDCShape.h:32
std::vector< float > nt_
Definition: ZDCShape.h:33
double ZDCShape::timeToRise ( ) const
virtual

Implements CaloVShape.

Definition at line 20 of file ZDCShape.cc.

21 {
22  return 0. ;
23 }

Member Data Documentation

int ZDCShape::nbin_
private

Definition at line 32 of file ZDCShape.h.

Referenced by computeShapeZDC(), and operator()().

std::vector<float> ZDCShape::nt_
private

Definition at line 33 of file ZDCShape.h.

Referenced by computeShapeZDC(), and operator()().