All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
BoosterFluxSysts.h
Go to the documentation of this file.
1 #pragma once
2 
4 
5 #include "TString.h"
6 
7 class TH1;
8 
9 namespace ana {
10 
12 {
13 public:
14  virtual ~BoosterFluxHadronSyst();
15 
16  void Shift(double sigma, caf::SRSliceProxy* slc, double& weight) const override;
17 
18 protected:
19  friend const BoosterFluxHadronSyst* GetBoosterFluxHadronSyst(unsigned int);
20 
22  : ISyst(TString::Format("booster_%i", i).Data(),
23  TString::Format("Booster flux hadron syst #%i", i).Data()),
24  fIdx(i), fScale() {}
25 
26  int fIdx;
27 
28  mutable TH1* fScale[3];
29 };
30 
31 const BoosterFluxHadronSyst* GetBoosterFluxHadronSyst(unsigned int i);
32 
33 // Because vector<T*> won't automatically convert to vector<U*> even when U
34 // inherits from V.
35 struct BoosterFluxHadronSystVector : public std::vector<const BoosterFluxHadronSyst*> {
36  operator std::vector<const ISyst*>() {
37  return std::vector<const ISyst*>(begin(), end());
38  }
39 };
40 
41 /// \param N total number of systematics
42 BoosterFluxHadronSystVector GetBoosterFluxHadronSysts(unsigned int N);
43 
44 } // namespace ana
friend const BoosterFluxHadronSyst * GetBoosterFluxHadronSyst(unsigned int)
const BoosterFluxHadronSyst * GetBoosterFluxHadronSyst(unsigned int i)
void Shift(double sigma, caf::SRSliceProxy *slc, double &weight) const override
Perform the systematic shift.
process_name opflashCryoW ana
Encapsulate code to systematically shift a caf::StandardRecord.
Definition: ISyst.h:14
caf::Proxy< caf::SRSlice > SRSliceProxy
Definition: EpilogFwd.h:2
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Definition: DumpUtils.h:265
BoosterFluxHadronSystVector GetBoosterFluxHadronSysts(unsigned int N)
auto end(FixedBins< T, C > const &) noexcept
Definition: FixedBins.h:585
auto begin(FixedBins< T, C > const &) noexcept
Definition: FixedBins.h:573
process_name largeant stream1 can override from command line with o or output physics producers generator N