Skip to content
Snippets Groups Projects

Add nu Q2 x plots for simulation

Merged Ziyue Zhang requested to merge dis_test into master
All threads resolved!
2 files
+ 10
10
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 6
6
@@ -159,28 +159,28 @@ get_y(const std::pair<ROOT::Math::PxPyPzMVector, ROOT::Math::PxPyPzMVector>&
@@ -159,28 +159,28 @@ get_y(const std::pair<ROOT::Math::PxPyPzMVector, ROOT::Math::PxPyPzMVector>&
//========================================================================================================
//========================================================================================================
//for structure functions
//for structure functions
struct structure_func{ //add more when needed
struct inv_quant{ //add more when needed
double nu, Q2, x;
double nu, Q2, x;
};
};
//for simu
//for simu
inline structure_func calc_structure_func_simu(const std::vector<ROOT::Math::PxPyPzMVector>& parts){
inline inv_quant calc_inv_quant_simu(const std::vector<ROOT::Math::PxPyPzMVector>& parts){
ROOT::Math::PxPyPzMVector q(parts[0] - parts[2]);
ROOT::Math::PxPyPzMVector q(parts[0] - parts[2]);
ROOT::Math::PxPyPzMVector P(parts[3]);
ROOT::Math::PxPyPzMVector P(parts[3]);
double nu = q.Dot(P) / P.mass();
double nu = q.Dot(P) / P.mass();
double Q2 = - q.Dot(q);
double Q2 = - q.Dot(q);
structure_func quantities = {nu, Q2, Q2/2./P.mass()/nu};
inv_quant quantities = {nu, Q2, Q2/2./P.mass()/nu};
return quantities;
return quantities;
}
}
inline double get_nu_simu(structure_func quantities) {
inline double get_nu_simu(inv_quant quantities) {
return quantities.nu/1000.;
return quantities.nu/1000.;
}
}
inline double get_Q2_simu(structure_func quantities) {
inline double get_Q2_simu(inv_quant quantities) {
return quantities.Q2;
return quantities.Q2;
}
}
inline double get_x_simu(structure_func quantities) {
inline double get_x_simu(inv_quant quantities) {
return quantities.x;
return quantities.x;
}
}
Loading