FairRoot/PandaRoot
PndEmcAsicPulseshape.cxx
Go to the documentation of this file.
1 //-----------------------------------------------------------
2 // Description:
3 // Pulseshape from an APFEL ASIC preamplifier shaper
4 // Circuit is described in EMC TDR and consists of charge-sensitive preamplifier,
5 // with the following pole-zero cancelation of its feedback ad 3rd order integrator.
6 // The pulseshape is determined by the integration time of single intagrator stage
7 // and scintillation time of the crystal, with exponential input convoluted with
8 // response of the circuit
9 //
10 //-----------------------------------------------------------
11 
12 
13 // This Class' Header ------------------
14 #include "PndEmcAsicPulseshape.h"
15 
16 // C/C++ Headers ----------------------
17 #include "assert.h"
18 #include "math.h"
19 
20 // Collaborating Class Headers --------
21 
22 
23 // Class Member definitions -----------
25  : fTint(0), fTsig(0)
26 {
27 }
28 
30  : fTint(Tint), fTsig(Tsig)
31 {
32  assert(fTint!=fTsig);
33 }
34 
35 double
37  const double amp, const double toffset) const {
38  if(fTsig==0)return degenerate_solution(t,amp,toffset);
39 
40  return general_solution(t,amp,toffset);
41 }
42 
43 
44 double
46  const double amp,
47  const double toffset) const
48 {
49  double dt=t-toffset;
50  if(dt<0) return 0; // piecewise definition!
51 
52  double l_int=1.0/fTint;
53  double l_sig=1.0/fTsig;
54 
55  double term1=exp(-dt*l_int)*dt*dt*dt/(6*(l_sig-l_int));
56  double term2=exp(-dt*l_int)*dt*dt/(2*pow(l_sig-l_int,2));
57  double term3=exp(-dt*l_int)*dt/(pow(l_sig-l_int,3));
58  double term4=exp(-dt*l_int)/(pow(l_sig-l_int,4));
59  double term5=exp(-dt*l_sig)/(pow(l_sig-l_int,4));
60 
61  return amp*(term1-term2+term3-term4+term5);
62 }
63 
64 
65 double
66 PndEmcAsicPulseshape::degenerate_solution(const double t, // for Tsig=0
67  const double amp,
68  const double toffset) const
69 {
70  double dt=t-toffset;
71  if(dt<0) return 0; // piecewise definition!
72 
73  double l_shaper=1.0/fTint;
74 
75  double term1 = exp(-l_shaper*dt)*pow(dt,3);
76 
77  return amp*term1;
78 }
79 
friend F32vec4 exp(const F32vec4 &a)
Definition: P4_F32vec4.h:109
double general_solution(const double t, const double amp, const double toffset) const
virtual double operator()(const double t, const double amp, const double toffset) const
Pulseshape from an APFEL ASIC preamplifier shaper.
double degenerate_solution(const double t, const double amp, const double toffset) const
ClassImp(PndAnaContFact)
TTree * t
Definition: bump_analys.C:13