ATLAS Offline Software
Loading...
Searching...
No Matches
SCT_LorentzAngleFunc.h File Reference
#include <cmath>
#include "RtypesCore.h"
Include dependency graph for SCT_LorentzAngleFunc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

Double_t LA_func (Double_t *x, Double_t *par)

Function Documentation

◆ LA_func()

Double_t LA_func ( Double_t * x,
Double_t * par )

Definition at line 11 of file SCT_LorentzAngleFunc.h.

11 {
12 const Int_t n{1000}; // number of integration step
13 const Double_t xmin{x[0] - 5.0*par[3]};
14 const Double_t xmax{x[0] + 5.0*par[3]};
15 const Double_t h{(xmax - xmin)/(n - 1)};
16 const double piOver180 = M_PI/180.;
17 const double piNorm = 1./std::sqrt(2.*M_PI);
18 Double_t sum{0.};
19 Double_t x_{xmin};
20 Double_t LA_sum{0.};
21 for (Int_t i{1}; i<n; i++) {
22 LA_sum = par[0]*std::abs(std::tan(x_*piOver180)-std::tan(par[1]*piOver180))+par[2];
23 sum += LA_sum * 0.017455 * piNorm/(par[3]*piOver180)
24 * std::exp(-(x[0]*piOver180 - x_*piOver180 )*(x[0]*piOver180 - x_*piOver180 )/(2*par[3]*piOver180*par[3]*piOver180)) * h;
25 x_ += h;
26 }
27 return sum;
28}
#define M_PI
#define x
Header file for AthHistogramAlgorithm.
double xmax
Definition listroot.cxx:61
double xmin
Definition listroot.cxx:60