116 gSystem->ExpandPathName(input_list_file);
118 list<string> file_list;
119 ifstream list_file(input_list_file.
Data());
121 while (getline(list_file, s))
122 file_list.push_back(s);
123 if (file_list.empty()) {
124 cout <<
"WARNING: There are no files in the list of the input text file: " << input_list_file << endl;
129 for (
auto const& cur_file_path : file_list) {
130 TString strFilePath(cur_file_path);
131 gSystem->ExpandPathName(strFilePath);
133 chain.
Add(strFilePath);
182 ofstream file(output_file.
Data());
183 file <<
"event# firstVx firstVy firstVz lastVx lastVy lastVz firstTx firstTy lastTx lastTy firstQp lastQp "
184 "firstCov[0] firstCov[1] firstCov[2] firstCov[3] firstCov[4] firstCov[5] firstCov[6] firstCov[7] "
185 "firstCov[8] firstCov[9] firstCov[10] firstCov[11] firstCov[12] firstCov[13] firstCov[14] "
186 "lastCov[0] lastCov[1] lastCov[2] lastCov[3] lastCov[4] lastCov[5] lastCov[6] lastCov[7] "
187 "lastCov[8] lastCov[9] lastCov[10] lastCov[11] lastCov[12] lastCov[13] lastCov[14] "
188 "Chi2 NDF Length Nhits Beta400 Beta700 fDCAInVertex PDGCode"
198 if ((mass2 == -1000.0) || (qp == 0))
200 Double_t denominator = 1. + mass2 * qp * qp;
201 return (denominator > 0) ? 1. /
TMath::Sqrt(denominator) : -1000.0;
206 for (
int i = 0;
i < global_tracks.GetEntries();
i++) {
211 Double_t beta400 = get_beta(cur_global_track, 1), beta700 = get_beta(cur_global_track, 2);
212 if ((beta400 < -999.0) and (beta700 < -999.0))
224 FairTrackParam* param_first = cur_global_track->
GetParamFirst();
225 FairTrackParam* param_last = cur_global_track->
GetParamLast();
227 file << col_iter <<
" " << param_first->GetX() <<
" " << param_first->GetY() <<
" " << param_first->GetZ()
228 <<
" " << param_last->GetX() <<
" " << param_last->GetY() <<
" " << param_last->GetZ() <<
" "
229 << param_first->GetTx() <<
" " << param_first->GetTy() <<
" " << param_last->GetTx() <<
" "
230 << param_last->GetTy() <<
" " << param_first->GetQp() <<
" " << param_last->GetQp() <<
" ";
232 param_first->CovMatrix(cov_matrix1);
233 for (
int j = 0; j < 15; j++)
234 file << cov_matrix1[j] <<
" ";
237 param_last->CovMatrix(cov_matrix2);
238 for (
int j = 0; j < 15; j++)
239 file << cov_matrix2[j] <<
" ";
240 file << cur_global_track->
GetChi2() <<
" " << cur_global_track->
GetNDF() <<
" "
241 << cur_global_track->
GetLength() <<
" " << cur_global_track->
GetNHits() <<
" " << beta400 <<
" "
248 auto cutVertex = [](
const CbmVertex& vtx) {
return (vtx.GetNTracks() > 1); };
253 data.
Filter(cutVertex, {
"PrimaryVertex."})
255 .Define(
"col_iter", [&col_iter] {
return ++col_iter; });
258 w_iterator.Foreach(save_to_txt, {
"BmnGlobalTrack",
"StsVector",
"StsTrackMatch",
"BmnMCInfo.",
"col_iter"});
263 printf(
"RealTime=%f seconds, CpuTime=%f seconds\n", rtime, ctime);
static FairField * GetDSTField(TString fileName, Double_t &fieldScale, Int_t &fieldType, TString *beam=nullptr, TString *target=nullptr, Double_t *beam_energy=nullptr, Int_t *beam_a=nullptr, Int_t *beam_z=nullptr, Int_t *target_a=nullptr, Int_t *target_z=nullptr)
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault, Int_t netopt=0)