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

WIP: Last commit before rebase

parent 97199e25
Branches
No related tags found
1 merge request!39Replacing nu with y
......@@ -133,9 +133,9 @@ namespace util {
double Q2 = -q.Dot(q);
double t = 0.;
//if(parts[4].px() == 0. && parts[4].py() == 0. && parts[4].pz() == 0. && parts[4].mass() == 0.){
t = Delta_prime.Dot(Delta_prime);
//t = Delta_prime.Dot(Delta_prime);
//}else{
//t = Delta.Dot(Delta);
t = Delta.Dot(Delta);
//}
double y = q.Dot(P) / k.Dot(P);
inv_quant quantities = {nu, Q2, Q2/2./P.mass()/nu, y, t};
......
......@@ -71,9 +71,6 @@ int vm_invar(const std::string& config_name)
// utility lambda functions to bind the vector meson and decay particle
// types
/*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_sort_sim = [vm_name, decay_name](const std::vector<dd4pod::Geant4ParticleData>& parts){
return util::momenta_sort_sim(parts, vm_name, decay_name);
};
......@@ -83,17 +80,11 @@ int vm_invar(const std::string& config_name)
//====================================================================
// Define analysis flow
auto d_im = d//Define("p_rec", util::momenta_RC, {"DummyReconstructedParticles"})
//.Define("p_sim", util::momenta_from_simulation, {"mcparticles2"})
.Define("p_rec_sorted", momenta_sort_rec, {"DummyReconstructedParticles"})
auto d_im = d.Define("p_rec_sorted", momenta_sort_rec, {"DummyReconstructedParticles"})
.Define("p_sim_sorted", momenta_sort_sim, {"mcparticles2"})
.Define("N", "p_rec_sorted.size()")
.Define("invariant_quantities_rec", util::calc_inv_quant, {"p_rec_sorted"})
.Define("invariant_quantities_sim", util::calc_inv_quant, {"p_sim_sorted"})
//.Define("p_sim", util::momenta_from_simulation, {"mcparticles2"})
//================================================================
//.Define("invariant_quantities_rec", calc_inv_quant_rec, {"p_rec"})
//.Define("invariant_quantities_sim", util::calc_inv_quant_sim, {"p_sim"})
.Define("y_rec", util::get_y, {"invariant_quantities_rec"})
.Define("Q2_rec", util::get_Q2, {"invariant_quantities_rec"})
.Define("x_rec", util::get_x, {"invariant_quantities_rec"})
......
......@@ -175,17 +175,17 @@ int vm_mass(const std::string& config_name)
h21.GetXaxis()->CenterTitle();
h21.GetYaxis()->CenterTitle();
// draw everything
TF1* mfPt = new TF1("mfPt", "[0]*exp(-[1]*x)", 1.2, 10.);
mfPt->SetParameters(5., 1.);
mfPt->SetParLimits(0, 0., 1000000.);
mfPt->SetParLimits(1, 0., 1000000.);
mfPt->SetNpx(1000);
mfPt->SetLineColor(2);
mfPt->SetLineStyle(7);
h21.Fit(mfPt, "", "", 1.2, 10.);
//TF1* mfPt = new TF1("mfPt", "[0]*exp(-[1]*x)", 1.2, 10.);
//mfPt->SetParameters(5., 1.);
//mfPt->SetParLimits(0, 0., 1000000.);
//mfPt->SetParLimits(1, 0., 1000000.);
//mfPt->SetNpx(1000);
//mfPt->SetLineColor(2);
//mfPt->SetLineStyle(7);
//h21.Fit(mfPt, "", "", 1.2, 10.);
h21.DrawClone("hist");
h22.DrawClone("hist same");
mfPt->Draw("same");
//mfPt->Draw("same");
// FIXME hardcoded beam configuration
......
......@@ -56,8 +56,7 @@ podioinput = PodioInput("PodioReader",
dummy = MC2DummyParticle("MC2Dummy",
inputCollection="mcparticles",
outputCollection="DummyReconstructedParticles",
smearing = 0.1)
outputCollection="DummyReconstructedParticles")
## copiers to get around input --> output copy bug. Note the "2" appended to the output collection.
copier = MCCopier("MCCopier",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment