CbmRoot
ImpactParameterModel.cxx
Go to the documentation of this file.
1 #include "ImpactParameterModel.h"
2 #include <fstream>
3 #include <iostream>
4 
5 
7  : bfromN(), bfromNerror() {
8  std::fstream fin(filename.c_str(), std::fstream::in);
9  int tot = 0;
10  fin >> tot;
11  bfromN.resize(tot + 1);
12  bfromNerror.resize(tot + 1);
13  bfromN[0] = 1000.;
14  bfromNerror[0] = 1000.;
15  int N = 0;
16  for (int i = 0; i < tot; ++i) {
17  fin >> N >> bfromN[i + 1] >> bfromNerror[i + 1];
18  bfromNerror[i + 1] = TMath::Sqrt(bfromNerror[i + 1]);
19  }
20  fin.close();
21 }
ImpactParameterModel.h
ImpactParameterModel::bfromN
std::vector< double > bfromN
Definition: ImpactParameterModel.h:12
i
int i
Definition: L1/vectors/P4_F32vec4.h:25
ImpactParameterModel::ImpactParameterModel
ImpactParameterModel(std::string filename="")
Definition: ImpactParameterModel.cxx:6
ImpactParameterModel::bfromNerror
std::vector< double > bfromNerror
Definition: ImpactParameterModel.h:13