3 #ifndef STROOT_STFCSPOINTMAKER_STFCSPOINTMAKER_H_
4 #define STROOT_STFCSPOINTMAKER_STFCSPOINTMAKER_H_
21 int InitRun(
int runNumber);
23 void Clear(Option_t* option =
"");
30 void setMinuitPrintLevel(
int v) {mMinuit.SetPrintLevel(v);}
32 void setShowerShape(
int v) {mShowerShape=v;}
33 void setShowerShapeScale(
float v) {mShowerShapeScale=v;}
36 void set_PH1_FixEnergy(
int v) {m_PH1_FixEnergy=v;}
37 void set_PH1_Delta_X(
double v) {m_PH1_Delta_X=v;}
38 void set_PH1_Delta_E(
double v) {m_PH1_Delta_E=v;}
41 void set_PH2_FixEnergy(
int v) {m_PH2_FixEnergy=v;}
42 void set_PH2_FixTheta(
int v) {m_PH2_FixTheta=v;}
43 void set_PH2_Delta_X(
double v) {m_PH2_Delta_X=v;}
44 void set_PH2_Delta_E(
double v) {m_PH2_Delta_E=v;}
45 void set_PH2_Low_Dgg(
double v) {m_PH2_Low_Dgg=v;}
46 void set_PH2_High_Dgg(
double v) {m_PH2_High_Dgg=v;}
47 void set_PH2_MaxTheta_F(
double v){m_PH2_MaxTheta_F=v;}
48 void set_PH2_StartDggFactor(
double v) {m_PH2_StartDggFactor=v;}
51 void setShowerShapeParameters(
int det);
52 void fitClusters(
int det);
57 static void minimizationFunctionNPhoton(
int& npar,
double* grad,
double& fval,
double* par,
int flag);
58 static void minimizationFunction2Photon(
int& npar,
double* grad,
double& fval,
double* par,
int flag);
59 static double energyDepositionInTower(
double x,
double y,
double xun,
double yun);
65 float mShowerShapeScale=1.0;
70 int m_PH1_FixEnergy=1;
71 double m_PH1_Delta_X=0.5;
72 double m_PH1_Delta_E=1.15;
75 int m_PH2_FixEnergy=1;
77 double m_PH2_Delta_X=0.2;
78 double m_PH2_Delta_E=1.05;
79 double m_PH2_Low_Dgg=0.8;
80 double m_PH2_High_Dgg=3.0;
81 double m_PH2_MaxTheta_F=TMath::PiOver2();
82 double m_PH2_StartDggFactor=1.1;
84 virtual const Char_t *GetCVS()
const {
static const Char_t cvs[]=
"Tag " __DATE__
" " __TIME__ ;
return cvs;}
89 inline double showerShapeComponent(
double x,
double y,
double a,
double b) {
90 if(a==0.0)
return 0.0;
91 return a * atan(x * y / (b * sqrt(b * b + x * x + y * y)));
95 inline double energyDepositionDistribution(
double x,
double y,
double* parameters){
96 constexpr
double ootwopi = 1.0/2.0/3.14159265358979323846;
97 return ( showerShapeComponent(x, y, parameters[1], parameters[4])
98 + showerShapeComponent(x, y, parameters[2], parameters[5])
99 + showerShapeComponent(x, y, parameters[3], parameters[6]) ) * ootwopi;
103 inline double energyDepositionInTowerSingleLayer(
double x,
double y,
double* parameters){
104 return energyDepositionDistribution(x-0.5, y-0.5, parameters)
105 - energyDepositionDistribution(x-0.5, y+0.5, parameters)
106 - energyDepositionDistribution(x+0.5, y-0.5, parameters)
107 + energyDepositionDistribution(x+0.5, y+0.5, parameters);
110 #endif // STROOT_STFCSPOINTMAKER_STFCSPOINTMAKER_H_
void Clear(Option_t *option="")
User defined functions.