34 class DictionaryManager;
36 class SettingsHandler;
161 void readCards(
const std::string& fileDecays,
const std::string& fileOptions);
166 void saveOptionCard(
const std::string& fileOptions,
bool useDefault =
true)
const;
180 void setHeader(
const std::string& options);
195 void addHistogram(
const std::string& name,
const std::vector<uint16_t>& binSizes,
bool hasUnderOverFlow =
true,
196 const std::vector<std::pair<double, double>>& ranges = {});
204 void addHistogram(
const std::string& name,
const std::vector<std::vector<double>>& binEdges,
bool hasUnderOverFlow);
211 const std::vector<std::complex<double>>& values);
214 const std::map<std::string, std::complex<double>>& settings);
219 const std::vector<std::complex<double>>& values);
222 const std::map<std::string, std::complex<double>>& settings);
225 const std::vector<double>& values);
228 const std::map<std::string, double>& settings);
233 const std::set<uint16_t>& collapsedIndexPositions);
242 void addFFScheme(
const std::string& schemeName,
const std::map<std::string, std::string>& schemes);
259 void includeDecay(
const std::vector<std::string>& names);
267 void forbidDecay(
const std::vector<std::string>& names);
285 void setUnits(std::string name =
"GeV");
308 const std::map<std::string, std::complex<double>>& settings);
319 void setFFEigenvectors(
const std::string& process,
const std::string& group,
const std::vector<double>& values);
325 void setFFEigenvectors(
const std::string& process,
const std::string& group,
const std::map<std::string, double>& settings);
331 void setFFEigenvectorsLocal(
const std::string& process,
const std::string& group,
const std::vector<double>& values);
338 const std::map<std::string, double>& settings);
349 double getWeight(
const std::string& scheme,
const std::vector<size_t>& processes = {})
const;
355 double getWeight(
const std::string& scheme,
const std::vector<std::vector<std::string>>& processes)
const;
360 std::map<size_t, double>
getWeights(
const std::string& scheme)
const;
366 double getRate(
const HashId&
id,
const std::string& scheme)
const;
373 double getRate(
const PdgId& parent,
const std::vector<PdgId>& daughters,
const std::string& scheme)
const;
379 double getRate(
const std::string& vertex,
const std::string& scheme)
const;
420 std::unique_ptr<TH1D> getHistogram1D(
const std::string& name,
const std::string& scheme)
const;
426 std::unique_ptr<TH2D> getHistogram2D(
const std::string& name,
const std::string& scheme)
const;
432 std::unique_ptr<TH3D> getHistogram3D(
const std::string& name,
const std::string& scheme)
const;
439 const std::string& scheme)
const;
446 const std::string& scheme)
const;
453 const std::string& scheme)
const;
461 void setHistogram1D(
const std::string& name,
const std::string& scheme, TH1D& histogram)
const;
468 void setHistogram2D(
const std::string& name,
const std::string& scheme, TH2D& histogram)
const;
475 void setHistogram3D(
const std::string& name,
const std::string& scheme, TH3D& histogram)
const;
482 void setHistograms1D(
const std::string& name,
const std::string& scheme,
490 void setHistograms2D(
const std::string& name,
const std::string& scheme,
498 void setHistograms3D(
const std::string& name,
const std::string& scheme,
517 std::unique_ptr<flatbuffers::FlatBufferBuilder>
_builder;
size_t addProcess(Process &p)
Adds a process to the _event container.
bool loadRunHeader(IOBuffer &buffer, bool merge=false)
void setEventBaseWeight(double weight)
void specializeWCInWeights(const std::string &process, const std::vector< std::complex< double >> &values)
Forward declaration of serialization related typedefs and includes.
void specializeWCInHistogram(const std::string &name, const std::string &process, const std::vector< std::complex< double >> &values)
void addPurePSVertices(const std::set< std::string > &vertices, WTerm what=WTerm::NUMERATOR)
Sets pure PS by vertex.
void clearPurePSVertices(WTerm what=WTerm::NUMERATOR)
IOBuffer saveRunHeader() const
void collapseProcessesInHistogram(const std::string &name)
std::vector< uint16_t > getHistogramShape(const std::string &name) const
void addHistogram(const std::string &name, const std::vector< uint16_t > &binSizes, bool hasUnderOverFlow=true, const std::vector< std::pair< double, double >> &ranges={})
Adds a tensor histogram.
std::vector< BinContents > IOHistogram
Hammer & operator=(const Hammer &other)=delete
virtual void defineSettings()
purely virtual function for a class to define new settings
EventIdGroupDict< IOHistogram > getHistograms(const std::string &name, const std::string &scheme) const
void includeDecay(const std::vector< std::string > &names)
Adds a combinatoric set to included process specifications.
std::set< EventUID > EventUIDGroup
void saveOptionCard(const std::string &fileOptions, bool useDefault=true) const
Reads settings in the cards.
bool histogramHasUnderOverFlows(const std::string &name) const
double getDenominatorRate(const HashId &id) const
void setUnits(std::string name="GeV")
Sets the units.
Hammer configuration definitions.
double getWeight(const std::string &scheme, const std::vector< size_t > &processes={}) const
void specializeFFInHistogram(const std::string &name, const std::string &process, const std::string &group, const std::vector< double > &values)
void setHeader(const std::string &options)
Log & getLog() const
logging facility
void setFFEigenvectors(const std::string &process, const std::string &group, const std::vector< double > &values)
HistoInfo loadHistogram(IOBuffer &buffer, bool merge=false)
Base class to access the settings repository.
void resetWilsonCoefficients(const std::string &process, WTerm what=WTerm::NUMERATOR)
void setFFEigenvectorsLocal(const std::string &process, const std::string &group, const std::vector< double > &values)
std::unique_ptr< SettingsHandler > _settings
bool loadRates(IOBuffer &buffer, bool merge=false)
Pdg forward declarations.
bool loadEventWeights(IOBuffer &buffer, bool merge=false)
std::vector< std::vector< double > > getHistogramBinEdges(const std::string &name) const
void forbidDecay(const std::vector< std::string > &names)
Adds a combinatoric set to forbidden process specifications.
void setEventHistogramBin(const std::string &name, const std::vector< uint16_t > &bins)
void addTotalSumOfWeights(const bool compress=false, const bool witherrors=false)
Add total weight sum histogram with compression and errors.
std::unique_ptr< Event > _event
UMap< EventUIDGroup, T > EventIdGroupDict
std::map< size_t, double > getWeights(const std::string &scheme) const
Base class for accessing Hammer settings repository.
void saveReferences(const std::string &fileRefs) const
void resetFFEigenvectors(const std::string &process, const std::string &group)
void setOptions(const std::string &options)
IOHistogram getHistogram(const std::string &name, const std::string &scheme) const
std::unique_ptr< DictionaryManager > _containers
std::string loadHistogramDefinition(IOBuffer &buffer, bool merge=false)
void keepErrorsInHistogram(const std::string &name, bool value=true)
void createProjectedHistogram(const std::string &oldName, const std::string &newName, const std::set< uint16_t > &collapsedIndexPositions)
IOBuffer saveRates() const
void readCards(const std::string &fileDecays, const std::string &fileOptions)
Reads settings in the cards.
void resetSpecializeWCInWeights(const std::string &process)
void resetSpecializationInHistogram(const std::string &name)
IOBuffer saveEventWeights() const
std::unique_ptr< Histos > _histograms
Declarations for Hammer IO structs.
void addFFScheme(const std::string &schemeName, const std::map< std::string, std::string > &schemes)
Adds a form factor scheme.
void setWilsonCoefficients(const std::string &process, const std::vector< std::complex< double >> &values, WTerm what=WTerm::NUMERATOR)
void fillEventHistogram(const std::string &name, const std::vector< double > &values)
std::unique_ptr< flatbuffers::FlatBufferBuilder > _builder
void saveHeaderCard(const std::string &fileDecays) const
Reads settings in the cards.
std::vector< std::string > getFFSchemeNames() const
ROOT forward declarations.
void setFFInputScheme(const std::map< std::string, std::string > &schemes)
Sets the FF schemes for the denominator.
void removeFFScheme(const std::string &schemeName)
Removes a form factor scheme Example: hammer.removeFFScheme("MixedBag")
EventUIDGroup getHistogramEventIds(const std::string &name, const std::string &scheme) const
void initEvent(double weight=1.0)
Clears the _event container.
void removeHistogram(const std::string &name)
void setWilsonCoefficientsLocal(const std::string &process, const std::vector< std::complex< double >> &values)
double getRate(const HashId &id, const std::string &scheme) const
void removeProcess(size_t id)
Removes a process to the _event container.
IOBuffers saveHistogram(const std::string &name) const