Skip to content
Snippets Groups Projects
Unverified Commit 8e096d9d authored by Dmitry Kalinkin's avatar Dmitry Kalinkin Committed by GitHub
Browse files

demp,diffractive_vm: MCParticles.momentum is now double, not float (#73)

parent e8b535ea
Branches
No related tags found
No related merge requests found
Pipeline #123097 passed
......@@ -62,13 +62,14 @@ void demp_analysis(const std::string& config_name)
TTreeReader tree_reader(mychain);
// Get weight information
TTreeReaderArray<pair<string,vector<string>>> weight_map(tree_reader,"_stringMap");
TTreeReaderArray<std::string> weight_keys(tree_reader,"GPStringKeys");
TTreeReaderArray<std::vector<std::string>> weight_values(tree_reader,"GPStringValues");
// Get Particle Information
TTreeReaderArray<int> partGenStat(tree_reader, "MCParticles.generatorStatus");
TTreeReaderArray<float> partMomX(tree_reader, "MCParticles.momentum.x");
TTreeReaderArray<float> partMomY(tree_reader, "MCParticles.momentum.y");
TTreeReaderArray<float> partMomZ(tree_reader, "MCParticles.momentum.z");
TTreeReaderArray<double> partMomX(tree_reader, "MCParticles.momentum.x");
TTreeReaderArray<double> partMomY(tree_reader, "MCParticles.momentum.y");
TTreeReaderArray<double> partMomZ(tree_reader, "MCParticles.momentum.z");
TTreeReaderArray<int> partPdg(tree_reader, "MCParticles.PDG");
TTreeReaderArray<double> partMass(tree_reader,"MCParticles.mass");
......@@ -82,11 +83,11 @@ void demp_analysis(const std::string& config_name)
TTreeReaderArray<float> trackCharge(tree_reader,"ReconstructedChargedParticles.charge");
// ZDC Neutrons
TTreeReaderArray<float> neutEng(tree_reader, "ReconstructedFarForwardZDCNeutrons.energy");
TTreeReaderArray<float> neutMomX(tree_reader, "ReconstructedFarForwardZDCNeutrons.momentum.x");
TTreeReaderArray<float> neutMomY(tree_reader, "ReconstructedFarForwardZDCNeutrons.momentum.y");
TTreeReaderArray<float> neutMomZ(tree_reader, "ReconstructedFarForwardZDCNeutrons.momentum.z");
TTreeReaderArray<unsigned int> neutClus(tree_reader, "ReconstructedFarForwardZDCNeutrons.clusters_end");
TTreeReaderArray<float> neutEng(tree_reader, "ReconstructedFarForwardZDCNeutrals.energy");
TTreeReaderArray<float> neutMomX(tree_reader, "ReconstructedFarForwardZDCNeutrals.momentum.x");
TTreeReaderArray<float> neutMomY(tree_reader, "ReconstructedFarForwardZDCNeutrals.momentum.y");
TTreeReaderArray<float> neutMomZ(tree_reader, "ReconstructedFarForwardZDCNeutrals.momentum.z");
TTreeReaderArray<unsigned int> neutClus(tree_reader, "ReconstructedFarForwardZDCNeutrals.clusters_end");
// ZDC SiPM-on-tile HCal
TTreeReaderArray<float> neutPosX_hcal(tree_reader, "HcalFarForwardZDCClusters.position.x");
......@@ -299,8 +300,8 @@ void demp_analysis(const std::string& config_name)
x = false, y = false, z = false;
std::string weight_name = weight_map[0].first; // accessing weights of particles
vector<string> weight_value = weight_map[0].second;
std::string weight_name = weight_keys[0]; // accessing weights of particles
std::vector<std::string> weight_value = weight_values[0];
weight = std::stod( *(weight_value.begin()) );
......
......@@ -84,9 +84,9 @@ int diffractive_vm(const std::string& config_name)
TTreeReaderArray<int> mc_genStatus_array = {tree_reader, "MCParticles.generatorStatus"};
// MC particle pz array for each MC particle
TTreeReaderArray<float> mc_px_array = {tree_reader, "MCParticles.momentum.x"};
TTreeReaderArray<float> mc_py_array = {tree_reader, "MCParticles.momentum.y"};
TTreeReaderArray<float> mc_pz_array = {tree_reader, "MCParticles.momentum.z"};
TTreeReaderArray<double> mc_px_array = {tree_reader, "MCParticles.momentum.x"};
TTreeReaderArray<double> mc_py_array = {tree_reader, "MCParticles.momentum.y"};
TTreeReaderArray<double> mc_pz_array = {tree_reader, "MCParticles.momentum.z"};
TTreeReaderArray<double> mc_mass_array = {tree_reader, "MCParticles.mass"};
TTreeReaderArray<int> mc_pdg_array = {tree_reader, "MCParticles.PDG"};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment