#include "pdg_kludge.h"#include <TDatabasePDG.h>#include <TSystem.h>#include <iostream>Go to the source code of this file.
Functions | |
| void | pdg_kludge () |
|
|
Definition at line 9 of file pdg_kludge.cxx. References Form(), and gSystem(). Referenced by MCText::MCText(), MCTree::MCTree(), and MCVectors::MCVectors(). 00010 {
00011 gSystem->Load("libEG");
00012
00013 // ripped from RerootExodus/RerootToTruthModule
00014 TDatabasePDG* pdg = TDatabasePDG::Instance();
00015
00016 // Try to get a neutrino
00017 if (!pdg->GetParticle(12)) {
00018 cerr << "No default root\n";
00019
00020 // Default ROOT
00021 const char* def = Form("%s/etc/pdg_table.txt",
00022 gSystem->Getenv("ROOTSYS"));
00023 cerr << "Using " << def << endl;
00024 pdg->ReadPDGTable(def);
00025 }
00026
00027 // Try to get MINOS special H1
00028 if (!pdg->GetParticle(1001001000)) {
00029 cerr << "No default minos\n";
00030
00031 // MINOS extra
00032 const char *minos_etc = gSystem->Getenv("MINOS_ETC");
00033 if (!minos_etc) minos_etc = "$SRT_PUBLIC_CONTEXT/RerootExodus";
00034 char *minos_pdg = gSystem->Which(minos_etc,
00035 "minos_extra_pdg.txt", kReadPermission);
00036 if ( minos_pdg ) pdg->ReadPDGTable(minos_pdg);
00037 else cerr << "No \"minos_extra_pdg.txt\" file found " << endl
00038 << "MINOS_ETC was \"" << minos_etc << "\"" << endl;
00039 delete [] minos_pdg;
00040 }
00041 }
|
1.3.9.1