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!
4 files
+ 249
5
Compare changes
  • Side-by-side
  • Inline
Files
4
+ 37
0
@@ -156,6 +156,43 @@ get_y(const std::pair<ROOT::Math::PxPyPzMVector, ROOT::Math::PxPyPzMVector>&
@@ -156,6 +156,43 @@ get_y(const std::pair<ROOT::Math::PxPyPzMVector, ROOT::Math::PxPyPzMVector>&
return 0.5*log((energy_pair + pz_pair)/(energy_pair - pz_pair));
return 0.5*log((energy_pair + pz_pair)/(energy_pair - pz_pair));
}
}
 
//========================================================================================================
 
//for structure functions
 
 
struct inv_quant{ //add more when needed
 
double nu, Q2, x;
 
};
 
 
//for simu
 
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 P(parts[3]);
 
 
double nu = q.Dot(P) / P.mass();
 
double Q2 = - q.Dot(q);
 
inv_quant quantities = {nu, Q2, Q2/2./P.mass()/nu};
 
return quantities;
 
}
 
 
inline double get_nu_simu(inv_quant quantities) {
 
return quantities.nu/1000.;
 
}
 
inline double get_Q2_simu(inv_quant quantities) {
 
return quantities.Q2;
 
}
 
inline double get_x_simu(inv_quant quantities) {
 
return quantities.x;
 
}
 
 
//for tracking, add later
 
 
//=========================================================================================================
 
 
 
 
 
 
} // namespace util
} // namespace util
#endif
#endif
Loading