Skip to content
Snippets Groups Projects
Commit c6312802 authored by Ziyue Zhang's avatar Ziyue Zhang
Browse files

WIP: Test on PID instead of pmass

parent 10afb7b2
No related branches found
No related tags found
1 merge request!39Replacing nu with y
This commit is part of merge request !39. Comments created here will be created in the context of that merge request.
......@@ -38,6 +38,19 @@ namespace util {
inv_quant quantities = {nu, Q2, Q2/2./P.mass()/nu, t};
return quantities;
}
//========================================test on using pid and re-structure the function========================
inline auto momenta_sim_ordered(const std::vector<eic::ReconstructedParticleData>& parts, std::string_view mother, std::string_view daughter){
std::vector<ROOT::Math::PxPyPzMVector> momenta{7};
//0:e0 1:p0 2:e1 3:p1 4:recoil system (without p1) 5:l1 from 4 6:l2 from 4
int order_map[7] = {0, 3, 2, 6, 5, 7, 8};
//for(int i = 0 ; i < 7 ; i++) order_map[i] = -1;//-1 by default, meaning absense
for(int i = 0 ; i < 7 ; i++){
momenta[i].SetXYZM(parts[order_map[i]].p.x, parts[order_map[i]].p.y, parts[order_map[i]].p.z, parts[order_map[i]].p.mass);
}
return momenta;
}
//for Dummy rc
inline inv_quant calc_inv_quant_rec(const std::vector<ROOT::Math::PxPyPzMVector>& parts, const double pdg_mass, const double daughter_mass){
......
......@@ -74,7 +74,9 @@ int vm_invar(const std::string& config_name)
auto calc_inv_quant_rec = [vm_mass, decay_mass](const std::vector<ROOT::Math::PxPyPzMVector>& parts) {
return util::calc_inv_quant_rec(parts, vm_mass, decay_mass);
};
auto momenta_sim_ordered = [vm_name, decay_name](const std::vector<eic::ReconstructedParticleData>& parts){
return util::momenta_sim_ordered(momenta_sim_ordered, vm_name, decay_name);
};
//====================================================================
// Define analysis flow
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment