FairRoot/PandaRoot
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
detectors
sds
SdsFEModel
PndSdsFEAmpModelSimple.cxx
Go to the documentation of this file.
1
/*
2
* SdsFEAmpModelSimple.cpp
3
*
4
* Created on: Apr 4, 2011
5
* Author: esch
6
*/
7
8
#include "
PndSdsFEAmpModelSimple.h
"
9
#include "TMath.h"
10
11
PndSdsFEAmpModelSimple::PndSdsFEAmpModelSimple
(): fModelNumber(1) {
12
}
13
14
PndSdsFEAmpModelSimple::~PndSdsFEAmpModelSimple
() {
15
}
16
17
double
PndSdsFEAmpModelSimple::Definition
(
double
*
x
,
double
*params) {
18
19
// params[0] = charge time [ns]
20
// params[1] = constant current to discharge the capacitor of the amplifier [e/ns]
21
// params[2] = charge [e]
22
23
if
( *x <= 0 )
24
{
25
return
0;
26
}
27
else
if
(*x <= params[0])
28
{
29
return
*x * params[2] / params[0];
30
}
31
else
32
{
33
return
TMath::Max
( params[2]- ((*x- params[0])* params[1]),0.0);
34
}
35
}
36
37
int
PndSdsFEAmpModelSimple::GetModelNumber
(){
38
39
return
fModelNumber
;
40
}
41
42
PndSdsFEAmpModelSimple.h
PndSdsFEAmpModelSimple::Definition
double Definition(double *x, double *params)
Definition:
PndSdsFEAmpModelSimple.cxx:17
PndSdsFEAmpModelSimple::GetModelNumber
int GetModelNumber()
Definition:
PndSdsFEAmpModelSimple.cxx:37
CAMath::Max
static T Max(const T &x, const T &y)
Definition:
PndCAMath.h:36
x
Double_t x
Definition:
createRootFscGeometryFile.C:159
PndSdsFEAmpModelSimple::~PndSdsFEAmpModelSimple
virtual ~PndSdsFEAmpModelSimple()
Definition:
PndSdsFEAmpModelSimple.cxx:14
PndSdsFEAmpModelSimple::fModelNumber
const int fModelNumber
Definition:
PndSdsFEAmpModelSimple.h:23
PndSdsFEAmpModelSimple::PndSdsFEAmpModelSimple
PndSdsFEAmpModelSimple()
Definition:
PndSdsFEAmpModelSimple.cxx:11
Generated on Sun Aug 18 2019 03:01:44 for FairRoot/PandaRoot by
1.8.8