DAS  3.0
Das Analysis System
PtY.h
Go to the documentation of this file.
1 #ifndef DAS_UNFOLDING_PTY
2 #define DAS_UNFOLDING_PTY
3 
4 #include <vector>
5 #include <list>
6 #include <optional>
7 
8 #include <TUnfoldBinning.h>
9 #include <TTreeReaderArray.h>
10 #include <TH1.h>
11 #include <TH2.h>
12 
13 #if !defined(__CLING__) || defined(__ROOTCLING__)
17 
19 #endif
20 
22 
23 static const std::vector<double> recBins{/*74,84,*/97,114,133,153,174,196,220,245,272,300,330,362,395,430,468,507,548,592,638,686,737,790,846,905,967,1032,1101,1172,1248,1327,1410,1497,1588,1684,1784,1890,2000,2116,2238,2366,2500,2640,2787,2941,3103,3273,3450,3637,3832},
24  genBins{/*74 ,*/97 ,133 ,174 ,220 ,272 ,330 ,395 ,468 ,548 ,638 ,737 ,846 ,967 ,1101 ,1248 ,1410 ,1588 ,1784 ,2000 ,2238 ,2500 ,2787 ,3103 ,3450, 3832},
25  y_edges{0., 0.5, 1.0, 1.5, 2.0, 2.5, 3.0};
26 
27 static const int nRecBins = recBins.size()-1,
28  nGenBins = genBins.size()-1,
29  nYbins = y_edges.size()-1;
30 
31 static const double minpt = recBins.front(), maxpt = recBins.back(), maxy = y_edges.back();
32 
33 #if !defined(__CLING__) || defined(__ROOTCLING__)
34 struct PtY final : public Observable {
37  PtY ();
38 
41  std::unique_ptr<Filler> getFiller (TTreeReader& reader) const override;
42 
45  void setLmatrix (const std::unique_ptr<TH1>&, std::unique_ptr<TH2>&) override;
46 };
47 
48 struct PtYFiller final : public Filler {
49  PtY obs;
50 
51  std::optional<TTreeReaderArray<GenJet>> genJets;
52  TTreeReaderArray<RecJet> recJets;
53  std::optional<TTreeReaderValue<GenEvent>> gEv;
54  TTreeReaderValue<RecEvent> rEv;
55 
58  PtYFiller (const PtY& obs, TTreeReader& reader);
59 
62  inline bool selection (double pt, double absy)
63  {
64  return pt >= minpt && pt < maxpt && absy < maxy;
65  }
66 
69  std::list<int> fillRec (DistVariation&) override;
70 
71  std::optional<JMEmatching<TTreeReaderArray<DAS::RecJet>,TTreeReaderArray<DAS::GenJet>>> matching;
73 
76  void match () override;
77 
80  void fillMC (DistVariation&) override;
81 };
82 #endif
83 
84 } // end of DAS::Unfolding::InclusiveJet namespace
85 #endif
DAS::Unfolding::InclusiveJet::PtYFiller::PtYFiller
PtYFiller(const PtY &obs, TTreeReader &reader)
Constructor.
Definition: PtY.cc:13
jmarExample.pt
pt
Definition: jmarExample.py:19
DAS::Unfolding::InclusiveJet::PtYFiller::gEv
std::optional< TTreeReaderValue< GenEvent > > gEv
Definition: PtY.h:53
DAS::Unfolding::InclusiveJet::y_edges
static const std::vector< double > y_edges
Definition: PtY.h:25
DAS::Unfolding::InclusiveJet::PtYFiller::genJets
std::optional< TTreeReaderArray< GenJet > > genJets
Definition: PtY.h:51
DAS::Unfolding::InclusiveJet::PtYFiller::selection
bool selection(double pt, double absy)
Jet selection.
Definition: PtY.h:62
DAS::Unfolding::InclusiveJet::PtY
Definition: PtY.h:34
DAS::Unfolding::InclusiveJet::maxpt
static const double maxpt
Definition: PtY.h:31
DAS::Unfolding::InclusiveJet
Definition: PtY.h:21
DAS::Unfolding::InclusiveJet::nRecBins
static const int nRecBins
Definition: PtY.h:27
DAS::Unfolding::InclusiveJet::maxy
static const double maxy
Definition: PtY.h:31
Event.h
DAS::Unfolding::InclusiveJet::PtY::setLmatrix
void setLmatrix(const std::unique_ptr< TH1 > &, std::unique_ptr< TH2 > &) override
See Observable::setLmatrix
Definition: PtY.cc:129
Jet.h
DAS::Unfolding::InclusiveJet::recBins
static const std::vector< double > recBins
Definition: PtY.h:23
DAS::Unfolding::DistVariation
Definition: DistVariation.h:25
DAS::Unfolding::Filler
Definition: Observable.h:56
DAS::Unfolding::InclusiveJet::PtYFiller::obs
PtY obs
Backreference to the observable.
Definition: PtY.h:49
DAS::Unfolding::InclusiveJet::PtYFiller
Definition: PtY.h:48
DAS::Unfolding::InclusiveJet::PtY::getFiller
std::unique_ptr< Filler > getFiller(TTreeReader &reader) const override
Constructs a filler for the observable.
Definition: PtY.cc:124
DAS::Unfolding::InclusiveJet::PtYFiller::recJets
TTreeReaderArray< RecJet > recJets
Definition: PtY.h:52
DAS::Unfolding::InclusiveJet::PtYFiller::fillMC
void fillMC(DistVariation &) override
See Filler::fillMC
Definition: PtY.cc:53
DAS::Unfolding::InclusiveJet::PtY::PtY
PtY()
Constructor.
Definition: PtY.cc:115
Observable.h
DAS::Unfolding::InclusiveJet::minpt
static const double minpt
Definition: PtY.h:31
DAS::Unfolding::InclusiveJet::nGenBins
static const int nGenBins
Definition: PtY.h:28
DAS::Unfolding::InclusiveJet::nYbins
static const int nYbins
Definition: PtY.h:29
DAS::Unfolding::InclusiveJet::PtYFiller::matching
std::optional< JMEmatching< TTreeReaderArray< DAS::RecJet >, TTreeReaderArray< DAS::GenJet > > > matching
Definition: PtY.h:71
DAS::Unfolding::InclusiveJet::genBins
static const std::vector< double > genBins
Definition: PtY.h:24
JMEmatching.h
DAS::Unfolding::Observable
Definition: Observable.h:142
DAS::Unfolding::InclusiveJet::PtYFiller::match
void match() override
Using JME matching.
Definition: PtY.cc:47
DAS::Unfolding::InclusiveJet::PtYFiller::fillRec
std::list< int > fillRec(DistVariation &) override
See Filler::fillRec
Definition: PtY.cc:23
DAS::Unfolding::InclusiveJet::PtYFiller::rEv
TTreeReaderValue< RecEvent > rEv
Definition: PtY.h:54