Skip to content
Snippets Groups Projects
Commit 442ef59d authored by Maria Zurek's avatar Maria Zurek
Browse files

Add momentum smearing

parent 92ad5dc6
No related branches found
No related tags found
1 merge request!153Draft: Resolve "Add energy scan for Barrel Ecal"
...@@ -170,7 +170,7 @@ std::tuple <double, double, double, double, double, double, double, double> extr ...@@ -170,7 +170,7 @@ std::tuple <double, double, double, double, double, double, double, double> extr
hErecImg->SetLineWidth(2); hErecImg->SetLineWidth(2);
hErecImg->SetLineColor(kBlue); hErecImg->SetLineColor(kBlue);
hErecImg->DrawClone(); hErecImg->DrawClone();
set_histo_range(hErecImg); //set_histo_range(hErecImg);
c2->cd(4); c2->cd(4);
hErecScFi->GetYaxis()->SetTitleOffset(1.4); hErecScFi->GetYaxis()->SetTitleOffset(1.4);
hErecScFi->SetLineWidth(2); hErecScFi->SetLineWidth(2);
......
...@@ -83,15 +83,15 @@ std::tuple <double, double> extract_sampling_fraction_parameters(std::string E_l ...@@ -83,15 +83,15 @@ std::tuple <double, double> extract_sampling_fraction_parameters(std::string E_l
auto p = input[2]; auto p = input[2];
auto momentum = TMath::Sqrt(p.ps.x * p.ps.x + p.ps.y * p.ps.y + p.ps.z * p.ps.z); auto momentum = TMath::Sqrt(p.ps.x * p.ps.x + p.ps.y * p.ps.y + p.ps.z * p.ps.z);
return momentum; return momentum;
} };
// Smeared Momentum [GeV/c] // Smeared Momentum [GeV/c]
auto momentum_smeared = [](const double momentum) { auto momentum_smeared = [](const double momentum) {
TRandom *smear = new TRandom(); TRandom *smear = new TRandom();
auto sigma_relative = 0.005; auto sigma_relative = 0.005;
auto sigma = smear->Gauss(0, sigma_relative*momentum); auto sigma = smear->Gaus(0, sigma_relative*momentum);
return momentum + sigma; return momentum + sigma;
} };
// Reconstructed Energy [GeV] // Reconstructed Energy [GeV]
auto Erec = [](const std::vector<eic::CalorimeterHitData>& evt) { auto Erec = [](const std::vector<eic::CalorimeterHitData>& evt) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment