BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
TRadCor.h
Go to the documentation of this file.
1#ifndef RAD_TRadCor
2#define RAD_TRadCor
3
4#include "TKinemCut.h"
5#include "TVCrossPart.h"
6
7class TRadCor {
8protected:
9 unsigned int fNPart; // number of cross-section parts
10 unsigned int fNEvents; // number events to calculate integral
11 double* fMax; //[fNPart] array with maximum of matrix elements
12 double* fMin; //[fNPart] array with minimum of matrix elements must
13 // be greater than 0
14 double* fSigma; //[fNPart] array with fMax error
15 double* fCross; //[fNPart] array with part cross-section
16 double* fCross2; //[fNPart] array with part cross-section
17 double* fECross; //[fNPart] array with part cross-section
18 double* fECross2; //[fNPart] array with part cross-section
19 double* fSM; //[fNPart] array with part sum of matrix elements
20 double* fSM2; //[fNPart] array with part sum of matrix elements
21 double* fPart; //[fNPart]
22 unsigned int* fNSim; //[fNPart] array with number of selected events
23 unsigned int* fN; //[fNPart] array with number of selected events
24 unsigned int* fWN; //[fNPart] array with number of selected events
25 bool* fInList; // [fNPart] array of selected parts of cross section
26 TVCrossPart* fMatrix; // reference to matrix elements
27 bool fNew;
28 double fTheta_Aver_0; // special case of Theta for elactic
29 // cross-section to increase efficiency of
30 // bhabha generation
31 bool fIsSmear; // to smear or not to smear that is a question
32 void SetSpecialCase( unsigned int i ) {
33 if ( i == 0 && !fIsSmear ) fMatrix->SetThetaMin( fTheta_Aver_0 );
34 else fMatrix->SetThetaMin( gCut->ThetaMin() );
35 }
36
37public:
41
42 void MakeMaximum( const unsigned int& );
43 void MakeIntegral( const unsigned int& );
44 void SetCuts(){};
46 double Norm( const unsigned int& );
47 void SetNEvents( const unsigned int& n ) { fNEvents = n; }
50 void Init();
51 unsigned int MakeEvent();
52 void MakePart();
53 unsigned int GetNPart() { return fNPart; }
54 double GetMax( unsigned int i ) { return fMax[i]; }
55 double GetMin( unsigned int i ) { return fMin[i]; }
56 unsigned int GetNSim( unsigned int i ) { return fNSim[i]; }
57 unsigned int GetN( unsigned int i ) { return fN[i]; }
58 unsigned int GetWN( unsigned int i ) { return fWN[i]; }
59 double GetCross( unsigned int i ) { return fCross[i]; }
60 double GetECross( unsigned int i ) { return fECross[i]; }
61 double GetCross2( unsigned int i ) { return fCross2[i]; }
62 double GetECross2( unsigned int i ) { return fECross2[i]; }
63 inline void GetEvent( double& p0, double& t0, double& ph0, double& p1, double& t1,
64 double& ph ) {
65 fMatrix->GetEvent( p0, t0, ph0, p1, t1, ph );
66 }
67 inline void MakeEvent( double& p0, double& t0, double& ph0, double& p1, double& t1,
68 double& ph, unsigned int& ipart ) {
69 ipart = MakeEvent();
70 fMatrix->GetEvent( p0, t0, ph0, p1, t1, ph );
71 }
72 inline void MakeEvent( double* m, int& n ) {
73 MakeEvent();
74 fMatrix->GetEvent( m, n );
75 }
76 inline TVCrossPart* GetCrossPart() { return fMatrix; }
77 void SetMType( const bool& x ) { fNew = x; }
78 void SetSmear( const bool& x ) { fIsSmear = x; }
80 void SetPartList( const bool* InList ) {
81 for ( unsigned int i = 0; i < fNPart; i++ ) fInList[i] = InList[i];
82 }
83};
84
85#endif // #ifndef RAD_TRadCor
double p1[4]
const Int_t n
int ph0
TKinemCut * gCut
Definition Mcgpj.cxx:48
void SetAuxiliaryParameters()
Definition TRadCor.h:45
unsigned int GetNSim(unsigned int i)
Definition TRadCor.h:56
TVCrossPart * GetCrossPart()
Definition TRadCor.h:76
double * fMax
Definition TRadCor.h:11
void MakeIntegral(const unsigned int &)
unsigned int * fNSim
Definition TRadCor.h:22
void SetNEvents(const unsigned int &n)
Definition TRadCor.h:47
double * fCross
Definition TRadCor.h:15
double GetECross2(unsigned int i)
Definition TRadCor.h:62
double GetCross(unsigned int i)
Definition TRadCor.h:59
unsigned int * fN
Definition TRadCor.h:23
double * fCross2
Definition TRadCor.h:16
double GetMin(unsigned int i)
Definition TRadCor.h:55
double * fSM2
Definition TRadCor.h:20
TVCrossPart * fMatrix
Definition TRadCor.h:26
bool * fInList
Definition TRadCor.h:25
TRadCor(TVCrossPart *)
void MakeCrossSection()
void SetCuts()
Definition TRadCor.h:44
void MakeAllMaximums()
void MakeMaximum(const unsigned int &)
void MakeAllIntegrals()
unsigned int GetNPart()
Definition TRadCor.h:53
double GetMax(unsigned int i)
Definition TRadCor.h:54
double GetECross(unsigned int i)
Definition TRadCor.h:60
double GetCross2(unsigned int i)
Definition TRadCor.h:61
unsigned int fNPart
Definition TRadCor.h:9
unsigned int GetWN(unsigned int i)
Definition TRadCor.h:58
double Norm(const unsigned int &)
void MakeEvent(double *m, int &n)
Definition TRadCor.h:72
double * fMin
Definition TRadCor.h:12
double * fECross2
Definition TRadCor.h:18
unsigned int MakeEvent()
void MakeEvent(double &p0, double &t0, double &ph0, double &p1, double &t1, double &ph, unsigned int &ipart)
Definition TRadCor.h:67
void SetSmear(const bool &x)
Definition TRadCor.h:78
double * fECross
Definition TRadCor.h:17
void GetEvent(double &p0, double &t0, double &ph0, double &p1, double &t1, double &ph)
Definition TRadCor.h:63
double * fSigma
Definition TRadCor.h:14
bool fNew
Definition TRadCor.h:27
void SetPartList(const bool *InList)
Definition TRadCor.h:80
void Init()
unsigned int fNEvents
Definition TRadCor.h:10
double * fPart
Definition TRadCor.h:21
bool fIsSmear
Definition TRadCor.h:31
double fTheta_Aver_0
Definition TRadCor.h:28
void SetSpecialCase(unsigned int i)
Definition TRadCor.h:32
void SetMType(const bool &x)
Definition TRadCor.h:77
void MakePart()
double * fSM
Definition TRadCor.h:19
unsigned int GetN(unsigned int i)
Definition TRadCor.h:57
unsigned int * fWN
Definition TRadCor.h:24