source: GLBFrejus/tags/v7r1/data/4.5GeV/convert.C @ 449

Last change on this file since 449 was 153, checked in by campagne, 18 years ago

add fluxes for 4.5GeV option

File size: 1021 bytes
Line 
1{
2  ifstream vInput("spectreMinus.out");
3  ofstream vOutput("SPL45GeVMinus.dat");
4 
5  Int_t ibin;
6  Float_t ene;
7  Float_t nue, numu, nutau; 
8  Float_t anue, anumu, anutau; 
9  nutau = 0.;
10  anutau = 0.;
11
12  Int_t line=0;
13  while (1) {
14    vInput >> ibin >> ene >> numu >> anumu >> nue >> anue;
15    if (!vInput.good()) break;
16    line++;
17    vOutput.width(8);
18    vOutput.precision(4);
19    vOutput.setf(ios_base::scientific, ios_base::floatfield);
20    vOutput << ene << " " 
21            << nue << " "
22            << numu << " "
23            << nutau << " "
24            << anue << " "
25            << anumu << " "
26            << anutau << "\n";
27  }//while
28 
29  nue  = 0.;
30  numu = 0.;
31  anue  = 0.;
32  anumu = 0.;
33  for (; line<501; line++) {
34    ene += 0.020;
35    vOutput.width(8);
36    vOutput.precision(4);
37    vOutput.setf(ios_base::scientific, ios_base::floatfield);
38    vOutput << ene << " " 
39            << nue << " "
40            << numu << " "
41            << nutau << " "
42            << anue << " "
43            << anumu << " "
44            << anutau << "\n";
45  }
46
47  vOutput.close();
48  vInput.close();
49
50}
Note: See TracBrowser for help on using the repository browser.