FEDRA emulsion software from the OPERA Collaboration
Deriv Class Reference

#include <deriv.h>

Inheritance diagram for Deriv:
Collaboration diagram for Deriv:

Public Member Functions

 Deriv ()
 
float derivate (EdbFrame *fpred, EdbFrame *f, EdbFrame *fsuc)
 
float GetD ()
 
void GetDerivate (float *Z, float *D)
 
float GetZ ()
 
virtual ~Deriv ()
 

Private Attributes

float eDp
 
float eZp
 

Constructor & Destructor Documentation

◆ Deriv()

Deriv::Deriv ( )
inline
15{}

◆ ~Deriv()

virtual Deriv::~Deriv ( )
inlinevirtual
17{}

Member Function Documentation

◆ derivate()

float Deriv::derivate ( EdbFrame fpred,
EdbFrame f,
EdbFrame fsuc 
)
10 {
11
12 float d;
13 int ncl_pred, ncl, ncl_suc;
14 float z_pred, z, z_suc;
15 z = f->GetZ();
16 ncl = f->GetNcl();
17 if (fpred==NULL) {
18 ncl_suc = fsuc->GetNcl();
19 z_suc = f->GetZ();
20 if (z_suc==z) d=0.;
21 else d = (ncl_suc-ncl)/(z_suc-z);
22 }
23 else if (fsuc==NULL) {
24 ncl_pred = fpred->GetNcl();
25 z_pred = fpred->GetZ();
26 if (z_pred==z) d=0.;
27 else d = (ncl-ncl_pred)/(z-z_pred);
28 }
29 else {
30 ncl_suc = fsuc->GetNcl();
31 ncl_pred = fpred->GetNcl();
32 z_suc = fsuc->GetZ();
33 z_pred = fpred->GetZ();
34 if (z_suc==z_pred) d=0.;
35 else d = (ncl_suc-ncl_pred)/(z_suc-z_pred);
36 }
37 eDp = d;
38 eZp = z;
39 return eDp;
40}
void d()
Definition: RecDispEX.C:381
FILE * f
Definition: RecDispMC.C:150
float eDp
Definition: deriv.h:11
float eZp
Definition: deriv.h:10
float GetZ() const
Definition: EdbFrame.h:42
int GetNcl() const
Definition: EdbFrame.h:43
#define NULL
Definition: nidaqmx.h:84

◆ GetD()

float Deriv::GetD ( )
inline
22{return eDp;}

◆ GetDerivate()

void Deriv::GetDerivate ( float *  Z,
float *  D 
)
inline
20{*Z = eZp; *D = eDp;}
Double_t Z
Definition: tlg2couples.C:104

◆ GetZ()

float Deriv::GetZ ( void  )
inline
21{return eZp;}

Member Data Documentation

◆ eDp

float Deriv::eDp
private

◆ eZp

float Deriv::eZp
private

The documentation for this class was generated from the following files: