Functions | Variables
test_resdec_piangle_rew.C File Reference

Go to the source code of this file.

Functions

 for (int i=0;i< ndial;i++)
 

Variables

double p12iso = 0.50
 
double p32rs = 0.75
 
double p12rs = 0.25
 
const int ndial = 11
 
const double dial_step = 2./(ndial-1)
 
double epsilon = 1E-6
 
const int ncosthetabins =1000
 
TH1D * h [ndial]
 

Function Documentation

for ( )

Definition at line 16 of file test_resdec_piangle_rew.C.

References dial_step, MECModelEnuComparisons::i, calib::j, and ndial.

16  {
17  double dial = -1. + i*dial_step;
18  h[i] = new TH1D("a","",ncosthetabins,-1.,1.);
19  h[i]->SetDirectory(0);
20  if( TMath::Abs(dial) < epsilon ) { h[i]->SetLineWidth(3); }
21  if( TMath::Abs(dial-1.) < epsilon ) { h[i]->SetLineWidth(3); h[i]->SetLineStyle(kDashed); }
22  for(int j=1; j<=h[i]->GetNbinsX(); j++) {
23  double costheta = h[i]->GetBinCenter(j);
24  double P2 = 0.5 * (3.*costheta*costheta - 1.);
25  double Wiso = 1 - p32iso * P2 + p12iso * P2; // = 1.0
26  double Wrs = 1 - p32rs * P2 + p12rs * P2;
27  double Wdef = Wiso;
28  double Wtwk = dial*Wrs + (1-dial)*Wiso;
29  double wght = 1.;
30  if(Wdef>0. && Wtwk>0.) {
31  wght = Wtwk/Wdef;
32  }
33  h[i]->SetBinContent(j,wght);
34  }//j
35  }//i
double p32rs
TH1D * h[ndial]
const double j
Definition: BetheBloch.cxx:29
double p12rs
const int ncosthetabins
const double dial_step
double epsilon
double p12iso

Variable Documentation

const double dial_step = 2./(ndial-1)

Definition at line 8 of file test_resdec_piangle_rew.C.

Referenced by for().

double epsilon = 1E-6
TH1D* h[ndial]

Definition at line 14 of file test_resdec_piangle_rew.C.

const int ncosthetabins =1000

Definition at line 12 of file test_resdec_piangle_rew.C.

const int ndial = 11

Definition at line 7 of file test_resdec_piangle_rew.C.

Referenced by for().

double p12iso = 0.50

Definition at line 3 of file test_resdec_piangle_rew.C.

double p12rs = 0.25

Definition at line 5 of file test_resdec_piangle_rew.C.

double p32rs = 0.75

Definition at line 4 of file test_resdec_piangle_rew.C.