DAS  3.0
Das Analysis System
Variation.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <iostream>
4 #include <memory>
5 
6 #include <TString.h>
7 
8 #include "Math/Vector4D.h"
9 
11 
12 namespace DAS {
13 
14 typedef ROOT::Math::LorentzVector<ROOT::Math::PtEtaPhiM4D<float>> FourVector;
15 
16 namespace Uncertainties {
17 
22 struct Variation {
23 
24  const TString group;
25  const TString name;
26 
27  const std::size_t index;
28  const int bit;
29 
32  ~Variation () = default;
33 
36  Variation (const TString& group, const TString& name, size_t index = 0, int bit = 0) :
38  { }
39 
42  Variation (const Variation& v) :
43  group(v.group), name(v.name), index(v.index), bit(v.bit)
44  { }
45 
49  group(std::move(v.group)), name(std::move(v.name)),
50  index(std::move(v.index)), bit(std::move(v.bit))
51  { }
52 
53 };
54 
55 const Variation nominal {"", "nominal"};
56 
57 inline std::ostream& operator<< (std::ostream& s, const DAS::Uncertainties::Variation& v)
58 {
59  return s << v.group << ' ' << v.name << ' ' << v.index << ' ' << v.bit;
60 }
61 
62 } // end of namespace Uncertainties
63 
64 } // end of namespace DAS
DAS
Definition: applyBTagSF.cc:31
DAS::Uncertainties::Variation::Variation
Variation(const TString &group, const TString &name, size_t index=0, int bit=0)
Normal constructor.
Definition: Variation.h:36
DAS::Uncertainties::Variation::name
const TString name
variation name (including "Up" or "Down")
Definition: Variation.h:25
DAS::Uncertainties::operator<<
std::ostream & operator<<(std::ostream &s, const DAS::Uncertainties::Variation &v)
Definition: Variation.h:57
DAS::Uncertainties::Variation::Variation
Variation(const Variation &v)
Copy constructor.
Definition: Variation.h:42
DAS::Uncertainties::nominal
const Variation nominal
Definition: Variation.h:55
DAS::Uncertainties::Variation::~Variation
~Variation()=default
Destructor.
DAS::Uncertainties::Variation::bit
const int bit
correlation bit
Definition: Variation.h:28
Weight.h
DAS::Uncertainties::Variation::Variation
Variation(Variation &&v)
Move constructor.
Definition: Variation.h:48
DAS::Uncertainties::Variation::group
const TString group
e.g. event, recjet
Definition: Variation.h:24
DAS::FourVector
ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiM4D< float > > FourVector
Definition: PhysicsObject.h:15
DAS::Uncertainties::Variation
Definition: Variation.h:22
DAS::Uncertainties::Variation::index
const std::size_t index
index in the vector where the variation factor is stored
Definition: Variation.h:27