Przeglądaj źródła

Added reader for EPOS4 ROOT files

Petr Parfenov 1 rok temu
rodzic
commit
2d015d59ee
4 zmienionych plików z 723 dodań i 0 usunięć
  1. 2 0
      CMakeLists.txt
  2. 1 0
      qaTools.LinkDef.h
  3. 663 0
      readers/qaReader_epos4_root.cxx
  4. 57 0
      readers/qaReader_epos4_root.h

+ 2 - 0
CMakeLists.txt

@@ -65,6 +65,7 @@ set(QATOOLS_LIBRARY_h_files
   ${CMAKE_CURRENT_SOURCE_DIR}/format/qaParticleLight.h
   ${CMAKE_CURRENT_SOURCE_DIR}/format/qaEvent.h
   ${CMAKE_CURRENT_SOURCE_DIR}/readers/qaReader_smash_root.h
+  ${CMAKE_CURRENT_SOURCE_DIR}/readers/qaReader_epos4_root.h
   ${CMAKE_CURRENT_SOURCE_DIR}/readers/qaReader_mcpico.h
   ${CMAKE_CURRENT_SOURCE_DIR}/readers/qaReader_manager.h
   ${CMAKE_CURRENT_SOURCE_DIR}/utility/Utility.h
@@ -75,6 +76,7 @@ set(QATOOLS_LIBRARY_cxx_files
   ${CMAKE_CURRENT_SOURCE_DIR}/format/qaParticleLight.cxx
   ${CMAKE_CURRENT_SOURCE_DIR}/format/qaEvent.cxx
   ${CMAKE_CURRENT_SOURCE_DIR}/readers/qaReader_smash_root.cxx
+  ${CMAKE_CURRENT_SOURCE_DIR}/readers/qaReader_epos4_root.cxx
   ${CMAKE_CURRENT_SOURCE_DIR}/readers/qaReader_mcpico.cxx
   ${CMAKE_CURRENT_SOURCE_DIR}/readers/qaReader_manager.cxx
   ${CMAKE_CURRENT_SOURCE_DIR}/utility/Utility.cxx

+ 1 - 0
qaTools.LinkDef.h

@@ -12,6 +12,7 @@
 #pragma link C++ class qaParticleLight+;
 #pragma link C++ class qaEvent+;
 #pragma link C++ class qaReader_smash_root+;
+#pragma link C++ class qaReader_epos4_root+;
 #pragma link C++ class qaReader_mcpico+;
 #ifdef _MCINI_
 #pragma link C++ class qaReader_mcini+;

+ 663 - 0
readers/qaReader_epos4_root.cxx

@@ -0,0 +1,663 @@
+#include <qaReader_epos4_root.h>
+
+ClassImp(qaReader_epos4_root);
+
+qaReader_epos4_root::qaReader_epos4_root(/* args */) : is_init(false), fCurrentEvent(-1)
+{
+    SetPidMap();
+}
+
+qaReader_epos4_root::~qaReader_epos4_root()
+{
+    fId2pdg.clear();
+}
+
+Bool_t qaReader_epos4_root::ChainCheck()
+{
+    if (!is_init)
+    {
+        return false;
+    }
+
+    if (fCurrentEvent == -1)
+    {
+        return false;
+    }
+
+    if (!fChain->GetEntry(fCurrentEvent))
+    {
+        return false;
+    }
+
+    return true;
+}
+
+void qaReader_epos4_root::SetChain(const TString &inputFileName)
+{
+    fChain = (TChain *)qaUtility::GetInstance()->initChain(inputFileName, fChainName);
+
+    fChain->SetBranchAddress("np", &np);
+    fChain->SetBranchAddress("bim", &bim);
+    fChain->SetBranchAddress("phi", &phi);
+    fChain->SetBranchAddress("id", id);
+    fChain->SetBranchAddress("e", e);
+    fChain->SetBranchAddress("px", px);
+    fChain->SetBranchAddress("py", py);
+    fChain->SetBranchAddress("pz", pz);
+    fChain->SetBranchAddress("t", t);
+    fChain->SetBranchAddress("x", x);
+    fChain->SetBranchAddress("y", y);
+    fChain->SetBranchAddress("z", z);
+
+    is_init = kTRUE;
+}
+
+qaEvent *qaReader_epos4_root::ReadEvent(Long64_t iev)
+{
+    fCurrentEvent = iev;
+
+    if (!ChainCheck())
+    {
+        return nullptr;
+    }
+
+    qaEvent *event = new qaEvent();
+
+    event->SetB(bim);
+    event->SetPhiRP(phi);
+    event->SetNparticles(np);
+
+    return event;
+}
+
+qaParticle *qaReader_epos4_root::ReadParticle(Int_t ipart)
+{
+    if (!ChainCheck())
+    {
+        return nullptr;
+    }
+
+    if (ipart >= np)
+    {
+        return nullptr;
+    }
+
+    qaParticle *particle = new qaParticle();
+
+    particle->SetEnergy(e[ipart]);
+    particle->SetPdg(fId2pdg.at(id[ipart]));
+    particle->SetPxPyPz(px[ipart], py[ipart], pz[ipart]);
+    particle->SetTime(t[ipart]);
+    particle->SetXYZ(x[ipart], y[ipart], z[ipart]);
+    particle->SetCharge(qaUtility::GetInstance()->GetCharge(fId2pdg.at(id[ipart])));
+
+    return particle;
+}
+
+void qaReader_epos4_root::SetPidMap()
+{
+    // Clear map - just in case
+    fId2pdg.clear();
+
+    // Fill id - pdg particles map
+    // leptons & quarks
+    fId2pdg.insert({1, 2});
+    fId2pdg.insert({2, 1});
+    fId2pdg.insert({3, 3});
+    fId2pdg.insert({4, 4});
+    fId2pdg.insert({5, 5});
+    fId2pdg.insert({6, 6});
+    fId2pdg.insert({-1, -2});
+    fId2pdg.insert({-2, -1});
+    fId2pdg.insert({-3, -3});
+    fId2pdg.insert({-4, -4});
+    fId2pdg.insert({-5, -5});
+    fId2pdg.insert({-6, -6});
+    fId2pdg.insert({10, 22});
+    fId2pdg.insert({9, 21});
+    fId2pdg.insert({12, 11});
+    fId2pdg.insert({-12, -11});
+    fId2pdg.insert({11, 12});
+    fId2pdg.insert({-11, -12});
+    fId2pdg.insert({14, 13});
+    fId2pdg.insert({-14, -13});
+    fId2pdg.insert({13, 14});
+    fId2pdg.insert({-13, -14});
+    fId2pdg.insert({16, 15});
+    fId2pdg.insert({-16, -15});
+    fId2pdg.insert({15, 16});
+    fId2pdg.insert({-15, -16});
+    fId2pdg.insert({5, 7});
+    fId2pdg.insert({6, 8});
+    fId2pdg.insert({16, 17});
+    fId2pdg.insert({15, 18});
+    fId2pdg.insert({90, 23});
+    fId2pdg.insert({80, 24});
+    fId2pdg.insert({81, 25});
+    fId2pdg.insert({85, 32});
+    fId2pdg.insert({86, 33});
+    fId2pdg.insert({87, 34});
+    fId2pdg.insert({82, 35});
+    fId2pdg.insert({83, 36});
+    fId2pdg.insert({84, 37});
+    fId2pdg.insert({17, 1000010020});
+    fId2pdg.insert({18, 1000010030});
+    fId2pdg.insert({19, 1000010040});
+    fId2pdg.insert({0, 0});
+    fId2pdg.insert({99, 99});
+    // Mesons
+    fId2pdg.insert({110, 111});
+    fId2pdg.insert({120, 211});
+    fId2pdg.insert({-120, -211});
+    fId2pdg.insert({220, 221});
+    fId2pdg.insert({130, 321});
+    fId2pdg.insert({-130, -321});
+    fId2pdg.insert({230, 311});
+    fId2pdg.insert({-230, -311});
+    fId2pdg.insert({20, 310});
+    fId2pdg.insert({-20, 130});
+    fId2pdg.insert({330, 331});
+    fId2pdg.insert({111, 113});
+    fId2pdg.insert({121, 213});
+    fId2pdg.insert({-121, -213});
+    fId2pdg.insert({221, 223});
+    fId2pdg.insert({131, 323});
+    fId2pdg.insert({-131, -323});
+    fId2pdg.insert({231, 313});
+    fId2pdg.insert({-231, -313});
+    fId2pdg.insert({331, 333});
+    fId2pdg.insert({-140, 421});
+    fId2pdg.insert({140, -421});
+    fId2pdg.insert({-240, 411});
+    fId2pdg.insert({240, -411});
+    fId2pdg.insert({-340, 431});
+    fId2pdg.insert({340, -431});
+    fId2pdg.insert({-241, 413});
+    fId2pdg.insert({241, -413});
+    fId2pdg.insert({-141, 423});
+    fId2pdg.insert({141, -423});
+    fId2pdg.insert({-341, 433});
+    fId2pdg.insert({341, -433});
+    fId2pdg.insert({250, 511});
+    fId2pdg.insert({150, 521});
+    fId2pdg.insert({350, 531});
+    fId2pdg.insert({450, 541});
+    fId2pdg.insert({251, 513});
+    fId2pdg.insert({151, 523});
+    fId2pdg.insert({351, 533});
+    fId2pdg.insert({451, 543});
+    fId2pdg.insert({440, -441});
+    fId2pdg.insert({440, 441});
+    fId2pdg.insert({441, -443});
+    fId2pdg.insert({441, 443});
+    fId2pdg.insert({550, 551});
+    fId2pdg.insert({551, 553});
+    fId2pdg.insert({112, 10223});
+    fId2pdg.insert({113, 225});
+    fId2pdg.insert({114, 20223});
+    fId2pdg.insert({115, 100111});
+    fId2pdg.insert({116, 10221});
+    fId2pdg.insert({117, 100113});
+    fId2pdg.insert({118, 9020113});
+    fId2pdg.insert({119, 10115});
+    fId2pdg.insert({222, 10113});
+    fId2pdg.insert({223, 20113});
+    fId2pdg.insert({224, 115});
+    fId2pdg.insert({225, 10111});
+    fId2pdg.insert({226, 9030221});
+    fId2pdg.insert({227, 117});
+    fId2pdg.insert({228, 30113});
+    fId2pdg.insert({229, 9000115});
+    fId2pdg.insert({332, 30221});
+    fId2pdg.insert({333, 10333});
+    fId2pdg.insert({334, 20333});
+    fId2pdg.insert({335, 9000225});
+    fId2pdg.insert({336, 9000223});
+    fId2pdg.insert({337, 335});
+    fId2pdg.insert({338, 9010225});
+    fId2pdg.insert({339, 10331});
+    fId2pdg.insert({122, 10213});
+    fId2pdg.insert({-122, -10213});
+    fId2pdg.insert({123, 20213});
+    fId2pdg.insert({124, 100211});
+    fId2pdg.insert({125, 215});
+    fId2pdg.insert({-125, -215});
+    fId2pdg.insert({126, 100213});
+    fId2pdg.insert({127, 10211});
+    fId2pdg.insert({128, 9020213});
+    fId2pdg.insert({129, 10215});
+    fId2pdg.insert({212, 217});
+    fId2pdg.insert({213, 30213});
+    fId2pdg.insert({214, 9000215});
+    fId2pdg.insert({215, 9010211});
+    fId2pdg.insert({216, 9030213});
+    fId2pdg.insert({217, 9000217});
+    fId2pdg.insert({218, 219});
+    fId2pdg.insert({219, 9010215});
+    fId2pdg.insert({132, 9000321});
+    fId2pdg.insert({133, 10323});
+    fId2pdg.insert({134, 20323});
+    fId2pdg.insert({135, 100323});
+    fId2pdg.insert({136, 10321});
+    fId2pdg.insert({137, 325});
+    fId2pdg.insert({138, 100321});
+    fId2pdg.insert({139, 9000325});
+    fId2pdg.insert({312, 9000323});
+    fId2pdg.insert({313, 30323});
+    fId2pdg.insert({314, 10325});
+    fId2pdg.insert({315, 327});
+    fId2pdg.insert({316, 20325});
+    fId2pdg.insert({317, 9010321});
+    fId2pdg.insert({318, 9020321});
+    fId2pdg.insert({319, 9010325});
+    fId2pdg.insert({232, 9000311});
+    fId2pdg.insert({233, 10313});
+    fId2pdg.insert({234, 20313});
+    fId2pdg.insert({235, 100313});
+    fId2pdg.insert({236, 10311});
+    fId2pdg.insert({237, 315});
+    fId2pdg.insert({238, 100311});
+    fId2pdg.insert({239, 9000315});
+    fId2pdg.insert({322, 9000313});
+    fId2pdg.insert({323, 30313});
+    fId2pdg.insert({324, 10315});
+    fId2pdg.insert({325, 317});
+    fId2pdg.insert({326, 20315});
+    fId2pdg.insert({327, 9010311});
+    fId2pdg.insert({328, 9020311});
+    fId2pdg.insert({329, 9010315});
+    fId2pdg.insert({142, -10421});
+    fId2pdg.insert({-142, 10421});
+    fId2pdg.insert({143, -10423});
+    fId2pdg.insert({-143, 10423});
+    fId2pdg.insert({144, -20423});
+    fId2pdg.insert({-144, 20423});
+    fId2pdg.insert({145, -425});
+    fId2pdg.insert({-145, 425});
+    fId2pdg.insert({242, -10411});
+    fId2pdg.insert({-242, 10411});
+    fId2pdg.insert({243, -10413});
+    fId2pdg.insert({-243, 10413});
+    fId2pdg.insert({244, -20413});
+    fId2pdg.insert({-244, 20413});
+    fId2pdg.insert({245, -415});
+    fId2pdg.insert({-245, 415});
+    fId2pdg.insert({342, -10431});
+    fId2pdg.insert({-342, 10431});
+    fId2pdg.insert({343, -20433});
+    fId2pdg.insert({-343, 20433});
+    fId2pdg.insert({344, -10433});
+    fId2pdg.insert({-344, 10433});
+    fId2pdg.insert({345, -435});
+    fId2pdg.insert({-345, 435});
+    fId2pdg.insert({442, 10441});
+    fId2pdg.insert({-442, 10441});
+    fId2pdg.insert({443, 20443});
+    fId2pdg.insert({-443, 20443});
+    fId2pdg.insert({444, -10443});
+    fId2pdg.insert({-444, 10443});
+    fId2pdg.insert({445, -445});
+    fId2pdg.insert({445, 445});
+    fId2pdg.insert({446, 100441});
+    fId2pdg.insert({447, 100443});
+    fId2pdg.insert({448, 30443});
+    fId2pdg.insert({449, 100445});
+    fId2pdg.insert({552, 10551});
+    fId2pdg.insert({553, 20553});
+    fId2pdg.insert({554, 10553});
+    fId2pdg.insert({555, 555});
+    fId2pdg.insert({556, 100553});
+    fId2pdg.insert({557, 200553});
+    fId2pdg.insert({558, 300553});
+    fId2pdg.insert({559, 9000553});
+    fId2pdg.insert({252, 20513});
+    fId2pdg.insert({253, 10513});
+    fId2pdg.insert({254, 515});
+    fId2pdg.insert({255, 10515});
+    fId2pdg.insert({152, 20523});
+    fId2pdg.insert({153, 10523});
+    fId2pdg.insert({154, 525});
+    fId2pdg.insert({155, 20525});
+    fId2pdg.insert({352, 10531});
+    fId2pdg.insert({353, 535});
+    fId2pdg.insert({354, 20533});
+    fId2pdg.insert({355, 10533});
+    fId2pdg.insert({452, 10541});
+    fId2pdg.insert({453, 10543});
+    fId2pdg.insert({454, 20543});
+    fId2pdg.insert({455, 545});
+    // baryons
+    fId2pdg.insert({1120, 2212});
+    fId2pdg.insert({1220, 2112});
+    fId2pdg.insert({2130, 3122});
+    fId2pdg.insert({1130, 3222});
+    fId2pdg.insert({1230, 3212});
+    fId2pdg.insert({2230, 3112});
+    fId2pdg.insert({1330, 3322});
+    fId2pdg.insert({2330, 3312});
+    fId2pdg.insert({1111, 2224});
+    fId2pdg.insert({1121, 2214});
+    fId2pdg.insert({1221, 2114});
+    fId2pdg.insert({2221, 1114});
+    fId2pdg.insert({1131, 3224});
+    fId2pdg.insert({1231, 3214});
+    fId2pdg.insert({2231, 3114});
+    fId2pdg.insert({1331, 3324});
+    fId2pdg.insert({2331, 3314});
+    fId2pdg.insert({3331, 3334});
+    fId2pdg.insert({1112, 32224});
+    fId2pdg.insert({1113, 2222});
+    fId2pdg.insert({1114, 12224});
+    fId2pdg.insert({1115, 12222});
+    fId2pdg.insert({1116, 2226});
+    fId2pdg.insert({1117, 22222});
+    fId2pdg.insert({1118, 22224});
+    fId2pdg.insert({1119, 12226});
+    fId2pdg.insert({2222, 31114});
+    fId2pdg.insert({2223, 1112});
+    fId2pdg.insert({2224, 11114});
+    fId2pdg.insert({2225, 11112});
+    fId2pdg.insert({2226, 1116});
+    fId2pdg.insert({2227, 21112});
+    fId2pdg.insert({2228, 21114});
+    fId2pdg.insert({2229, 11116});
+    fId2pdg.insert({1122, 12212});
+    fId2pdg.insert({1123, 2124});
+    fId2pdg.insert({1124, 22212});
+    fId2pdg.insert({1125, 32214});
+    fId2pdg.insert({1126, 2122});
+    fId2pdg.insert({1127, 32212});
+    fId2pdg.insert({1128, 2216});
+    fId2pdg.insert({1129, 12216});
+    fId2pdg.insert({2112, 12214});
+    fId2pdg.insert({2113, 22124});
+    fId2pdg.insert({2114, 42212});
+    fId2pdg.insert({2115, 32124});
+    fId2pdg.insert({2116, 12122});
+    fId2pdg.insert({2117, 2126});
+    fId2pdg.insert({2118, 22122});
+    fId2pdg.insert({2119, 22214});
+    fId2pdg.insert({1212, 12126});
+    fId2pdg.insert({1213, 2218});
+    fId2pdg.insert({1214, 2128});
+    fId2pdg.insert({1215, 903128});
+    fId2pdg.insert({1216, 5128});
+    fId2pdg.insert({1217, 9298});
+    fId2pdg.insert({1218, 9401});
+    fId2pdg.insert({1222, 12112});
+    fId2pdg.insert({1223, 1214});
+    fId2pdg.insert({1224, 22112});
+    fId2pdg.insert({1225, 32114});
+    fId2pdg.insert({1226, 1212});
+    fId2pdg.insert({1227, 32112});
+    fId2pdg.insert({1228, 2116});
+    fId2pdg.insert({1229, 12116});
+    fId2pdg.insert({2212, 12114});
+    fId2pdg.insert({2213, 21214});
+    fId2pdg.insert({2214, 42112});
+    fId2pdg.insert({2215, 31214});
+    fId2pdg.insert({2216, 11212});
+    fId2pdg.insert({2217, 1216});
+    fId2pdg.insert({2218, 21212});
+    fId2pdg.insert({2219, 22114});
+    fId2pdg.insert({2122, 11216});
+    fId2pdg.insert({2123, 2118});
+    fId2pdg.insert({2124, 1218});
+    fId2pdg.insert({2125, 903218});
+    fId2pdg.insert({2126, 5218});
+    fId2pdg.insert({2127, 9299});
+    fId2pdg.insert({2128, 9400});
+    fId2pdg.insert({1233, 13122});
+    fId2pdg.insert({1234, 3124});
+    fId2pdg.insert({1235, 23122});
+    fId2pdg.insert({1236, 33122});
+    fId2pdg.insert({1237, 13124});
+    fId2pdg.insert({1238, 13212});
+    fId2pdg.insert({1239, 13214});
+    fId2pdg.insert({3122, 23212});
+    fId2pdg.insert({3123, 3216});
+    fId2pdg.insert({3124, 43122});
+    fId2pdg.insert({3125, 53122});
+    fId2pdg.insert({3126, 3126});
+    fId2pdg.insert({3127, 13126});
+    fId2pdg.insert({3128, 23124});
+    fId2pdg.insert({3129, 13216});
+    fId2pdg.insert({3212, 23214});
+    fId2pdg.insert({3213, 3218});
+    fId2pdg.insert({3214, 23126});
+    fId2pdg.insert({3215, 4228});
+    fId2pdg.insert({3216, 9001});
+    fId2pdg.insert({3217, 3128});
+    fId2pdg.insert({1132, 13222});
+    fId2pdg.insert({1133, 13224});
+    fId2pdg.insert({1134, 23222});
+    fId2pdg.insert({1135, 3226});
+    fId2pdg.insert({1136, 13226});
+    fId2pdg.insert({1137, 23224});
+    fId2pdg.insert({1138, 3228});
+    fId2pdg.insert({1139, 4028});
+    fId2pdg.insert({2232, 13112});
+    fId2pdg.insert({2233, 13114});
+    fId2pdg.insert({2234, 23112});
+    fId2pdg.insert({2235, 3116});
+    fId2pdg.insert({2236, 13116});
+    fId2pdg.insert({2237, 23114});
+    fId2pdg.insert({2238, 3118});
+    fId2pdg.insert({2239, 4128});
+    fId2pdg.insert({1332, 45553});
+    fId2pdg.insert({1333, 203322});
+    fId2pdg.insert({1334, 13324});
+    fId2pdg.insert({1335, 103326});
+    fId2pdg.insert({1336, 203326});
+    fId2pdg.insert({2332, 46653});
+    fId2pdg.insert({2333, 203312});
+    fId2pdg.insert({2334, 13314});
+    fId2pdg.insert({2335, 103316});
+    fId2pdg.insert({2336, 203316});
+    fId2pdg.insert({3332, 203338});
+    // Baryons - charm and bottom
+    fId2pdg.insert({2140, 4122});
+    fId2pdg.insert({2240, 4112});
+    fId2pdg.insert({1240, 4212});
+    fId2pdg.insert({1140, 4222});
+    fId2pdg.insert({2241, 4114});
+    fId2pdg.insert({1241, 4214});
+    fId2pdg.insert({1141, 4224});
+    fId2pdg.insert({3240, 4132});
+    fId2pdg.insert({2340, 4312});
+    fId2pdg.insert({3140, 4232});
+    fId2pdg.insert({1340, 4322});
+    fId2pdg.insert({3340, 4332});
+    fId2pdg.insert({2341, 4314});
+    fId2pdg.insert({1341, 4324});
+    fId2pdg.insert({3341, 4334});
+    fId2pdg.insert({2440, 4412});
+    fId2pdg.insert({2441, 4414});
+    fId2pdg.insert({1440, 4422});
+    fId2pdg.insert({1441, 4424});
+    fId2pdg.insert({3440, 4432});
+    fId2pdg.insert({3441, 4434});
+    fId2pdg.insert({4441, 4444});
+    fId2pdg.insert({2250, 5112});
+    fId2pdg.insert({2150, 5122});
+    fId2pdg.insert({1250, 5212});
+    fId2pdg.insert({1150, 5222});
+    fId2pdg.insert({3350, 5332});
+    fId2pdg.insert({3351, 5334});
+    fId2pdg.insert({1350, 5232});
+    fId2pdg.insert({3250, 5132});
+    fId2pdg.insert({2350, 5312});
+    fId2pdg.insert({1351, 5324});
+    fId2pdg.insert({2351, 5314});
+    fId2pdg.insert({2251, 5114});
+    fId2pdg.insert({1251, 5214});
+    fId2pdg.insert({1151, 5224});
+    fId2pdg.insert({2151, 5124});
+    fId2pdg.insert({2152, 5126});
+    fId2pdg.insert({1242, 14122});
+    fId2pdg.insert({2142, 104122});
+    fId2pdg.insert({2143, 204126});
+    fId2pdg.insert({2342, 104314});
+    fId2pdg.insert({2343, 104312});
+    fId2pdg.insert({1342, 104324});
+    fId2pdg.insert({1343, 104322});
+    fId2pdg.insert({3150, 5322});
+    fId2pdg.insert({4250, 5142});
+    fId2pdg.insert({2450, 5412});
+    fId2pdg.insert({4150, 5242});
+    fId2pdg.insert({1450, 5422});
+    fId2pdg.insert({2451, 5414});
+    fId2pdg.insert({1451, 5424});
+    fId2pdg.insert({4350, 5342});
+    fId2pdg.insert({3450, 5432});
+    fId2pdg.insert({3451, 5434});
+    fId2pdg.insert({4450, 5442});
+    fId2pdg.insert({4451, 5444});
+    fId2pdg.insert({2550, 5512});
+    fId2pdg.insert({1550, 5522});
+    fId2pdg.insert({2551, 5514});
+    fId2pdg.insert({1551, 5524});
+    fId2pdg.insert({3550, 5532});
+    fId2pdg.insert({3551, 5534});
+    fId2pdg.insert({3450, 5542});
+    fId2pdg.insert({4551, 5544});
+    fId2pdg.insert({5551, 5554});
+    // top mesons & baryons
+    fId2pdg.insert({160, 99});
+    fId2pdg.insert({260, 99});
+    fId2pdg.insert({360, 99});
+    fId2pdg.insert({161, 99});
+    fId2pdg.insert({261, 99});
+    fId2pdg.insert({361, 99});
+    fId2pdg.insert({320, 99});
+    fId2pdg.insert({1160, 99});
+    fId2pdg.insert({1260, 99});
+    fId2pdg.insert({2260, 99});
+    fId2pdg.insert({2160, 99});
+    fId2pdg.insert({1360, 99});
+    fId2pdg.insert({2360, 99});
+    fId2pdg.insert({3360, 99});
+    fId2pdg.insert({1161, 99});
+    fId2pdg.insert({1261, 99});
+    fId2pdg.insert({2261, 99});
+    fId2pdg.insert({2161, 99});
+    fId2pdg.insert({1361, 99});
+    fId2pdg.insert({2361, 99});
+    fId2pdg.insert({3361, 99});
+    // 7xx and 8xx mesons
+    fId2pdg.insert({702, 9010221});
+    fId2pdg.insert({703, 9000221});
+    fId2pdg.insert({704, 9010223});
+    fId2pdg.insert({705, 9000225});
+    fId2pdg.insert({706, 10225});
+    fId2pdg.insert({707, 30223});
+    fId2pdg.insert({708, 227});
+    fId2pdg.insert({709, 9040221});
+    fId2pdg.insert({712, 9030225});
+    fId2pdg.insert({713, 9040225});
+    fId2pdg.insert({714, 9050225});
+    fId2pdg.insert({715, 9060225});
+    fId2pdg.insert({716, 9050221});
+    fId2pdg.insert({717, 229});
+    fId2pdg.insert({718, 9060221});
+    fId2pdg.insert({719, 9070225});
+    fId2pdg.insert({722, 9070221});
+    fId2pdg.insert({723, 9000229});
+    fId2pdg.insert({724, 9080221});
+    fId2pdg.insert({725, 9080225});
+    fId2pdg.insert({726, 9010229});
+    fId2pdg.insert({727, 9090221});
+    fId2pdg.insert({728, 9090225});
+    fId2pdg.insert({729, 100221});
+    fId2pdg.insert({732, 9020221});
+    fId2pdg.insert({733, 1000223});
+    fId2pdg.insert({734, 9020225});
+    fId2pdg.insert({776, 329});
+    fId2pdg.insert({742, 9020325});
+    fId2pdg.insert({743, 9010327});
+    fId2pdg.insert({744, 9000329});
+    fId2pdg.insert({752, 9000443});
+    fId2pdg.insert({753, 9010443});
+    fId2pdg.insert({754, 9020443});
+    fId2pdg.insert({762, 30553});
+    fId2pdg.insert({763, 110551});
+    fId2pdg.insert({764, 120553});
+    fId2pdg.insert({765, 100555});
+    fId2pdg.insert({766, 9010553});
+    fId2pdg.insert({772, 9010217});
+    fId2pdg.insert({773, 9000211});
+    fId2pdg.insert({774, 9000213});
+    fId2pdg.insert({775, 9040213});
+    fId2pdg.insert({777, 9010213});
+    fId2pdg.insert({782, 9000111});
+    fId2pdg.insert({783, 9030113});
+    fId2pdg.insert({784, 9000117});
+    fId2pdg.insert({785, 119});
+    fId2pdg.insert({786, 9010115});
+    fId2pdg.insert({787, 9040113});
+    fId2pdg.insert({788, 9010117});
+    fId2pdg.insert({789, 9010111});
+    fId2pdg.insert({792, 9000113});
+    fId2pdg.insert({793, 9010113});
+    fId2pdg.insert({794, 337});
+    fId2pdg.insert({795, 10335});
+    fId2pdg.insert({796, 100331});
+    fId2pdg.insert({797, 100333});
+    fId2pdg.insert({802, 9020315});
+    fId2pdg.insert({803, 9010317});
+    fId2pdg.insert({804, 9000319});
+    fId2pdg.insert({805, 319});
+    // 7xxx baryons
+    fId2pdg.insert({7002, 2228});
+    fId2pdg.insert({7003, 1118});
+    fId2pdg.insert({7004, 9297});
+    fId2pdg.insert({7005, 9300});
+    // Diquarks
+    fId2pdg.insert({1200, 2101});
+    fId2pdg.insert({2300, 3101});
+    fId2pdg.insert({1300, 3201});
+    fId2pdg.insert({2400, 4101});
+    fId2pdg.insert({1400, 4201});
+    fId2pdg.insert({3400, 4301});
+    fId2pdg.insert({2500, 5101});
+    fId2pdg.insert({1500, 5201});
+    fId2pdg.insert({3500, 5301});
+    fId2pdg.insert({4500, 5401});
+    fId2pdg.insert({2200, 1103});
+    fId2pdg.insert({2100, 2103});
+    fId2pdg.insert({1100, 2203});
+    fId2pdg.insert({3200, 3103});
+    fId2pdg.insert({3100, 3203});
+    fId2pdg.insert({3300, 3303});
+    fId2pdg.insert({4200, 4103});
+    fId2pdg.insert({4100, 4203});
+    fId2pdg.insert({4300, 4303});
+    fId2pdg.insert({4400, 4403});
+    fId2pdg.insert({5200, 5103});
+    fId2pdg.insert({5100, 5203});
+    fId2pdg.insert({5300, 5303});
+    fId2pdg.insert({5400, 5403});
+    fId2pdg.insert({5500, 5503});
+    // Special particles
+    fId2pdg.insert({800000088, 88});
+    fId2pdg.insert({800099999, 99999});
+    fId2pdg.insert({800000090, 90});
+    fId2pdg.insert({800000091, 91});
+    fId2pdg.insert({800000092, 92});
+    fId2pdg.insert({800000093, 93});
+    fId2pdg.insert({800000094, 94});
+    fId2pdg.insert({11099, 9900110});
+    fId2pdg.insert({12099, 9900210});
+    fId2pdg.insert({13099, 9900320});
+    fId2pdg.insert({22099, 9900220});
+    fId2pdg.insert({23099, 9900311});
+    fId2pdg.insert({2099, 9900310});
+    fId2pdg.insert({-2099, 9900130});
+    fId2pdg.insert({33099, 9900330});
+    fId2pdg.insert({44099, 9900440});
+    fId2pdg.insert({112099, 9902210});
+    fId2pdg.insert({122099, 9902110});
+    fId2pdg.insert({213099, 9903120});
+    fId2pdg.insert({800000110, 110});
+    fId2pdg.insert({800000990, 990});
+}

+ 57 - 0
readers/qaReader_epos4_root.h

@@ -0,0 +1,57 @@
+#ifndef QATOOLS_READERS_EPOS4_ROOT_H
+#define QATOOLS_READERS_EPOS4_ROOT_H
+
+#include <Rtypes.h>
+#include <TChain.h>
+
+#include <qaEvent.h>
+#include <qaParticle.h>
+#include <Utility.h>
+
+#include <qaReader_manager.h>
+
+#define MAX_TRACKS 15000
+
+class qaReader_epos4_root : virtual public qaReader_manager
+{
+private:
+  TChain *fChain;
+
+  const char *fChainName = "teposevent";
+
+  bool is_init;
+  Long64_t fCurrentEvent;
+
+  Int_t np;
+  Float_t bim;
+  Float_t phi;
+  Int_t nev;
+  Int_t id[MAX_TRACKS]; //[np]
+  Double_t e[MAX_TRACKS];   //[np]
+  Double_t px[MAX_TRACKS];   //[np]
+  Double_t py[MAX_TRACKS];   //[np]
+  Double_t pz[MAX_TRACKS];   //[np]
+  Double_t t[MAX_TRACKS];    //[np]
+  Double_t x[MAX_TRACKS];    //[np]
+  Double_t y[MAX_TRACKS];    //[np]
+  Double_t z[MAX_TRACKS];    //[np]
+
+  std::map<int,int> fId2pdg;
+
+  void SetPidMap();
+
+  Bool_t ChainCheck();
+
+public:
+  qaReader_epos4_root(/* args */);
+  virtual ~qaReader_epos4_root();
+
+  virtual void SetChain(const TString &inputFileName);
+  virtual Long64_t GetEntries() { return fChain->GetEntries(); }
+  virtual qaEvent *ReadEvent(Long64_t iev);
+  virtual qaParticle* ReadParticle(Int_t ipart);
+
+  ClassDef(qaReader_epos4_root, 0);
+};
+
+#endif