Page Menu
Home
HEPForge
Search
Configure Global Search
Log In
Files
F8725492
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
View Options
diff --git a/src/ScaleFunction.cc b/src/ScaleFunction.cc
index 018e56a..fafee46 100644
--- a/src/ScaleFunction.cc
+++ b/src/ScaleFunction.cc
@@ -1,56 +1,56 @@
#include "RHEJ/ScaleFunction.hh"
#include <numeric>
#include <cassert>
namespace RHEJ{
namespace{
double ht(Event const & ev){
double result = 0.;
for(size_t i = 0; i < ev.outgoing().size(); ++i){
auto const decay_products = ev.decays().find(i);
if(decay_products == end(ev.decays())){
result += ev.outgoing()[i].perp();
}
else{
for(auto const & particle: decay_products->second){
result += particle.perp();
}
}
}
return result;
}
}
EventParameters Ht::operator()(Event const & ev) const{
const double mu = ht(ev);
return {mu, mu, ev.central().weight};
}
EventParameters MaxJetPperp::operator()(Event const & ev) const{
const double mu = sorted_by_pt(ev.jets()).front().pt();
return {mu, mu, ev.central().weight};
}
EventParameters JetInvariantMass::operator()(Event const & ev) const{
- const double mu = std::accumulate(
- begin(ev.jets()), end(ev.jets()), fastjet::PseudoJet{}
- ).m();
+ fastjet::PseudoJet sum;
+ for(const auto & jet: ev.jets()) sum+=jet;
+ const double mu = sum.m();
return {mu, mu, ev.central().weight};
}
EventParameters HardestJetsInvariantMass::operator()(Event const & ev) const{
const auto jets = sorted_by_pt(ev.jets());
assert(jets.size() >= 2);
const double mu = (jets[0] + jets[1]).m();
return {mu, mu, ev.central().weight};
};
EventParameters Product::operator()(Event const &ev) const{
EventParameters s = (*base_scale_)(ev);
s.muf *= factor_;
s.mur *= factor_;
return s;
}
}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Tue, Jan 21, 1:46 AM (1 d, 14 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4207455
Default Alt Text
(1 KB)
Attached To
rHEJ HEJ
Event Timeline
Log In to Comment