DAS  3.0
Das Analysis System
BF.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <vector>
4 #include <list>
5 #include <optional>
6 
7 #include <TUnfoldBinning.h>
8 #include <TTreeReaderArray.h>
9 #include <TH1.h>
10 #include <TH2.h>
11 
12 #if !defined(__CLING__) || defined(__ROOTCLING__)
17 #endif
18 
20 
21 #if !defined(__CLING__) || defined(__ROOTCLING__)
22 struct BF : public Observable {
25  BF ();
26 
29  std::unique_ptr<Filler> getFiller (TTreeReader& reader) const override;
30 
33  void setLmatrix (const std::unique_ptr<TH1>&, std::unique_ptr<TH2>&) override {}
34 
35  std::optional<int> process;
36 };
37 
38 template<int PROCESS> struct BFprocessT : public BF {
39  BFprocessT () { process = PROCESS; }
40 };
41 
46 using WW = BFprocessT<5>;
47 using WZ = BFprocessT<6>;
48 using ZZ = BFprocessT<7>;
49 static const std::vector<const char *> processes {"Z#to#mu#mu", "Z#to#tau#tau", "t#bar{t}#to2l2#nu", "QCD", "WW", "WZ", "ZZ"};
50 static const std::vector<const char *> channels {"#mu#mu", "#mu#mu#gamma"};
51 
52 struct BFFiller final : public Filler {
53  BF obs;
54 
55  std::optional<TTreeReaderArray<GenMuon>> genMuons;
56  std::optional<TTreeReaderArray<GenPhoton>> genPhotons;
57  TTreeReaderArray<RecMuon> recMuons;
58  TTreeReaderArray<RecPhoton> recPhotons;
59  std::optional<TTreeReaderValue<GenEvent>> gEv;
60  TTreeReaderValue<RecEvent> rEv;
61 
64  BFFiller (const BF& obs, TTreeReader& reader);
65 
68  template<typename Muon>
69  bool selection (const TTreeReaderArray<Muon>& muons,
70  const DistVariation& v);
71 
74  std::list<int> fillRec (DistVariation&) override;
75 
78  void match () override {}
79 
82  void fillMC (DistVariation&) override;
83 
84 private:
85  std::optional<int> irecbin;
86  std::optional<float> recZW;
87 };
88 #endif
89 
90 } // end of DAS::Unfolding::ZmmY namespace
DAS::Unfolding::ZmmY::channels
static const std::vector< const char * > channels
Definition: BF.h:50
DAS::Unfolding::ZmmY::BF::getFiller
std::unique_ptr< Filler > getFiller(TTreeReader &reader) const override
Constructs a filler for the observable.
Definition: BF.cc:179
DAS::Unfolding::ZmmY::BFFiller
Definition: BF.h:52
DAS::Unfolding::ZmmY::BFFiller::recPhotons
TTreeReaderArray< RecPhoton > recPhotons
Definition: BF.h:58
DAS::Unfolding::ZmmY::BFFiller::irecbin
std::optional< int > irecbin
Definition: BF.h:85
Ntupliser_cfg.muons
string muons
Definition: Ntupliser_cfg.py:43
Event.h
DAS::Unfolding::ZmmY::BFprocessT::BFprocessT
BFprocessT()
Definition: BF.h:39
DAS::Unfolding::DistVariation
Definition: DistVariation.h:25
DAS::Unfolding::Filler
Definition: Observable.h:56
DAS::Unfolding::ZmmY::BFFiller::rEv
TTreeReaderValue< RecEvent > rEv
Definition: BF.h:60
DAS::Unfolding::ZmmY::BFprocessT
Definition: BF.h:38
DAS::Unfolding::ZmmY::BFFiller::obs
BF obs
Backreference to the observable.
Definition: BF.h:53
DAS::Unfolding::ZmmY::BFFiller::recMuons
TTreeReaderArray< RecMuon > recMuons
Definition: BF.h:57
DAS::Unfolding::ZmmY::BFFiller::recZW
std::optional< float > recZW
Definition: BF.h:86
DAS::Unfolding::ZmmY::BFFiller::fillRec
std::list< int > fillRec(DistVariation &) override
See Filler::fillRec
Definition: BF.cc:47
DAS::Unfolding::ZmmY::BF::setLmatrix
void setLmatrix(const std::unique_ptr< TH1 > &, std::unique_ptr< TH2 > &) override
See Observable::setLmatrix
Definition: BF.h:33
DAS::Unfolding::ZmmY
Definition: BF.h:19
DAS::Unfolding::ZmmY::BFFiller::selection
bool selection(const TTreeReaderArray< Muon > &muons, const DistVariation &v)
Makes selection on muons, but not on the dimuon system.
Definition: BF.cc:32
DAS::Unfolding::ZmmY::BF
Definition: BF.h:22
Observable.h
DAS::Unfolding::ZmmY::BF::process
std::optional< int > process
Definition: BF.h:35
Photon.h
DAS::Unfolding::ZmmY::BF::BF
BF()
Constructor.
Definition: BF.cc:168
DAS::Unfolding::ZmmY::processes
static const std::vector< const char * > processes
Definition: BF.h:49
DAS::Unfolding::ZmmY::BFFiller::genPhotons
std::optional< TTreeReaderArray< GenPhoton > > genPhotons
Definition: BF.h:56
DAS::Unfolding::ZmmY::BFFiller::BFFiller
BFFiller(const BF &obs, TTreeReader &reader)
Constructor.
Definition: BF.cc:20
DAS::Unfolding::ZmmY::BFFiller::match
void match() override
Definition: BF.h:78
Lepton.h
DAS::Unfolding::Observable
Definition: Observable.h:142
DAS::Unfolding::ZmmY::BFFiller::fillMC
void fillMC(DistVariation &) override
See Filler::fillMC
Definition: BF.cc:108
DAS::Unfolding::ZmmY::BFFiller::genMuons
std::optional< TTreeReaderArray< GenMuon > > genMuons
Definition: BF.h:55
DAS::Unfolding::ZmmY::BFFiller::gEv
std::optional< TTreeReaderValue< GenEvent > > gEv
Definition: BF.h:59