ATLAS Offline Software
BTaggingTruthTaggingTool.h
Go to the documentation of this file.
1 // Dear emacs, this is -*- c++ -*-
3 // BTaggingTruthTaggingTool.h, (c) ATLAS Detector software
5 
14 #ifndef CPBTAGGINGTRUTHTAGGINGTOOL_H
15 #define CPBTAGGINGTRUTHTAGGINGTOOL_H
16 
18 #include "xAODBTagging/BTagging.h"
19 
20 #include "AsgTools/AsgTool.h"
22 
23 #include "TFile.h"
24 #include "TRandom3.h"
25 #include "TVector.h"
26 #include "TFile.h"
27 #include "TMatrixD.h"
28 #include <string>
29 #include <vector>
30 #include <map>
31 
32 // include xAODBtaggingEfficiency classes
36 #include "AsgTools/AnaToolHandle.h"
37 
38 // calibration data variable
41 
42 // xAOD jet
43 #include "xAODJet/JetContainer.h"
44 
46  public virtual IBTaggingTruthTaggingTool {
47  //typedef float (xAOD::BTagging::* tagWeight_member_t)() const;
48 
51 
52  private:
53 
54  struct TagBin{
55 
56  float bcut_low = -99.;
57  float bcut_hig = +99.;
58  float ccut_low = -99.;
59  float ccut_hig = +99.;
60  bool is_tagbin = false;
61 
62  //default constructor
63  TagBin(){ };
64 
65  //constructor
66  TagBin(bool is_tb, float b_low, float b_hig, float c_low = -99., float c_hig = +99){
67  bcut_low = b_low;
68  bcut_hig = b_hig;
69  ccut_low = c_low;
70  ccut_hig = c_hig;
71  is_tagbin = is_tb;
72  };
73 
74  //destructor
75  ~TagBin(){ };
76 
77  };
78 
79  struct jetVariable{
81  int flav;
82  };
83 
84  // all the results about a single event are stored in this object
85  struct TRFinfo {
86 
87  std::vector<jetVariable> jets;
88 
89  // features that will be used by the onnx tool
90  std::vector<std::vector<float> > node_feat;
91 
92  unsigned int njets;
93 
94  TRandom3 rand;
95 
96  std::vector<std::vector<bool> > perm_ex; // for each tag mult, vector of bool: is the i-th jet tagged or not?
97  std::vector<std::vector<bool> > perm_in;
98  std::vector<std::vector<int> > tbins_ex; //for each tag mult, vector of int: quantile of each jet
99  std::vector<std::vector<int> > tbins_in;
100 
101  std::vector<float> trfw_ex; // vector with truth-tag weights (pos = # of b-tags)
102  std::vector<float> trfw_in;
103 
104  std::map<int,std::vector<float>> effMC_allBins; // map of efficiencies for each tag-bin
105  std::vector<float> permprob_ex; // probablity of chosen perm with nominal SF
106  std::vector<float> permprob_in;
107  std::vector<float> binsprob_ex; // probability of chosen quantile with nominal SF
108  std::vector<float> binsprob_in;
109 
110  std::map<int,std::vector<std::vector<std::vector<bool> > > > perms;
111  std::vector<std::vector<float> > permsWeight;
112  std::vector<std::vector<float> > permsSumWeight;
113 
114  };
115 
116  public:
118  BTaggingTruthTaggingTool( const std::string& name );
119 
120  private:
122 
123  public:
124  StatusCode CalculateResults( std::vector<float>& pt, std::vector<float>& eta, std::vector<int>& flav, std::vector<float>& tagw, Analysis::TruthTagResults& results,int rand_seed = -1);
126 
127  // will use onnxtool
128  StatusCode CalculateResultsONNX( const std::vector<std::vector<float>>& node_feat, std::vector<float>& tagw, Analysis::TruthTagResults& results, int rand_seed=-1);
129  StatusCode CalculateResultsONNX( const xAOD::JetContainer& jets, const std::vector<std::vector<float>>& node_feat, Analysis::TruthTagResults& results, int rand_seed = -1);
130 
131  StatusCode setEffMapIndex(const std::string& flavour, unsigned int index);
132  void setUseSystematics(bool useSystematics);
133 
134  virtual ~BTaggingTruthTaggingTool();
135 
137 
141  bool isAffectedBySystematic( const CP::SystematicVariation & systematic ) const;
142 
143 
144  private:
145 
146  // set the jets in the event (pass same jets that satisfy kinematic criteria for b-tagging in pT and eta)
147  StatusCode setJets(TRFinfo &trfinf,std::vector<float>& pt, std::vector<float>& eta, std::vector<int>& flav, std::vector<float>& tagw);
149  StatusCode setJets(TRFinfo &trfinf,std::vector<int>& flav, std::vector<Analysis::CalibrationDataVariables>* vars);
150 
151  // overloaded with node_feat that is used by onnx tool
152  StatusCode setJets(TRFinfo &trfinf, const std::vector<std::vector<float>>& node_feat, std::vector<float>& tagw);
153  StatusCode setJets(TRFinfo &trfinf, const xAOD::JetContainer& jets, const std::vector<std::vector<float>>& node_feat);
154  StatusCode setJets(TRFinfo &trfinf,std::vector<int>& flav, const std::vector<Analysis::CalibrationDataVariables>* vars, const std::vector<std::vector<float>>& node_feat);
155 
156  // get truth tagging weights
157  // for one single systematic (including "Nominal")
158  StatusCode GetTruthTagWeights(TRFinfo &trfinf, std::vector<float> &trf_weight_ex, std::vector<float> &trf_weight_in);
159 
160  // tag permutation: trf_chosen_perm_ex.at(ntag).at(i) tells if the i-th jet is tagged in a selection requiring == ntag tags
161  StatusCode getTagPermutation(TRFinfo &trfinf, std::vector<std::vector<bool> > &trf_chosen_perm_ex, std::vector<std::vector<bool> > &trf_chosen_perm_in);
162 
163  // chosen quantile: trf_bin_ex.at(ntag).at(i) tells the quantile in which the i-th jet falls in a selection requiring == ntag tags
164  // returns 5 if between 60% and 0%
165  // returns 4 if between 70% and 60%
166  // returns 3 if between 77% and 70%
167  // returns 2 if between 85% and 77%
168  // returns 1 if between 100% and 85%
169  // returns 0 if smaller than -1e4-> should never happen --> not currently implemented
170  // return -1 if bigger than 1e4 or not in b-tagging acceptance --> not currently implemented
171  StatusCode getQuantiles(TRFinfo &trfinf,std::vector<std::vector<int> > &trf_bin_ex, std::vector<std::vector<int> > &trf_bin_in);
172 
173  // functions to make comparison with direct-tagging easier
174  float getEvtSF(TRFinfo &trfinf,std::vector<int> & quantiles);
175  StatusCode getDirectTaggedJets(TRFinfo &trfinf,std::vector<bool> &is_tagged);
176 
177  //These WP must be listed in ascending order of cut value, meaning 85 to 60
178  std::vector<std::string> m_availableOP_fixCut= {"FixedCutBEff_85", "FixedCutBEff_77","FixedCutBEff_70","FixedCutBEff_60"};
179 
180  TFile *m_inf; //file for reading the cut values from the CDI.
181 
182  //vector storing the cuts, one for each tag bin
183  std::vector<TagBin> m_cuts;
184 
186 
187  StatusCode getTRFweight(TRFinfo &trfinf,unsigned int nbtag, bool isInclusive);
188 
189  StatusCode getAllEffMC(TRFinfo &trfinf);
192 
193  StatusCode getAllEffSF(TRFinfo &trfinf,int =0);
194  std::vector<CP::SystematicSet> m_eff_syst;
195  std::vector<std::string> m_sys_name;
196 
197  // flav labelling
198  int jetFlavourLabel (const xAOD::Jet& jet);
199 
203  std::vector<std::string> split(const std::string& str, char token);
204  //*********************************//
205  // Prop. of BTaggingEfficiencyTool //
206  //*********************************//
207 
209  std::string m_SFFile;
211  std::string m_EffFile;
213  std::string m_SFBName;
215  std::string m_SFCName;
217  std::string m_SFTName;
219  std::string m_SFLightName;
221  std::string m_EVReductionB;
223  std::string m_EVReductionC;
225  std::string m_EVReductionLight;
227  std::string m_EffBName;
229  std::string m_EffCName;
231  std::string m_EffTName;
233  std::string m_EffLightName;
235  std::string m_excludeFromEV;
237  std::string m_taggerName;
239  std::string m_OP;
241  std::string m_cutBenchmark;
243  std::string m_jetAuthor;
245  std::string m_systStrategy;
253  std::string m_excludeEV;
257  std::string m_pathToONNX;
259  std::string m_taggingStrategy;
263 
264  //*********************************//
265  // Prop. of BTaggingSelectionTool //
266  //*********************************//
267 
268  float m_maxEta;
269  float m_minPt;
271  // std::string m_CutFileName;
272 
273  // properties of truth tagging
276  bool m_usePerm;
280  bool m_useSys;
281  int m_nbtag;
282  int m_nbins;
283  std::vector<int> m_OperatingBins;
284  unsigned int m_OP_index_for_GNN;
285 
286  std::map<int, asg::AnaToolHandle<IBTaggingEfficiencyTool> > m_effTool_allBins;
287 
288 
291 
292  StatusCode check_syst_range(unsigned int sys);
293 
294  std::vector<std::vector<bool> > generatePermutations(int njets, int tags, int start=0);
295 
296  float trfWeight(TRFinfo &trfinf,const std::vector<bool> &tags);
297 
298  StatusCode chooseAllTagPermutation(TRFinfo &trfinf,unsigned int nbtag);
299  StatusCode chooseTagPermutation(TRFinfo &trfinf,unsigned int nbtag, bool isIncl);
300 
302  StatusCode chooseTagBins_cum(TRFinfo &trfinf,std::vector<bool> &tagconf, bool isIncl, unsigned int nbtag);
303  StatusCode generateRandomTaggerScores(std::vector< std::vector<int> > &quantiles, std::vector< std::vector<float> > &btag_scores, std::vector< std::vector<float> > & ctag_scores);
304  float getTagBinsConfProb(TRFinfo &trfinf,std::vector<int> &tagws);
305 
307  StatusCode fillVariables(const float jetPt, const float jetEta, const float jetTagWeight, Analysis::CalibrationDataVariables& x);
308 
309 };
310 
311 #endif // CPBTAGGINGTRUTHTAGGINGTOOL_H
312 
BTaggingTruthTaggingTool::GAFinalHadronFlavourLabel
int GAFinalHadronFlavourLabel(const xAOD::Jet &jet)
Definition: BTaggingTruthTaggingTool.cxx:1113
BTaggingTruthTaggingTool::getAllEffMCGNN
StatusCode getAllEffMCGNN(TRFinfo &trfinf)
Definition: BTaggingTruthTaggingTool.cxx:611
BTaggingTruthTaggingTool::m_EffCName
std::string m_EffCName
semicolon-separated list of MC efficiency parametrisation names for charm jets
Definition: BTaggingTruthTaggingTool.h:229
BTaggingTruthTaggingTool::m_OP_index_for_GNN
unsigned int m_OP_index_for_GNN
Definition: BTaggingTruthTaggingTool.h:284
BTaggingTruthTaggingTool::jetVariable
Definition: BTaggingTruthTaggingTool.h:79
TruthTagResults.h
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
asg::AnaToolHandle< IBTaggingEfficiencyTool >
BTaggingTruthTaggingTool::m_inf
TFile * m_inf
Definition: BTaggingTruthTaggingTool.h:180
BTaggingTruthTaggingTool::TRFinfo::permprob_ex
std::vector< float > permprob_ex
Definition: BTaggingTruthTaggingTool.h:105
BTaggingTruthTaggingTool::m_minPt
float m_minPt
Definition: BTaggingTruthTaggingTool.h:269
BTaggingTruthTaggingTool::m_EVReductionC
std::string m_EVReductionC
specification of the eigenvector reduction strategy for c jets (if eigenvectors are used)
Definition: BTaggingTruthTaggingTool.h:223
BTaggingTruthTaggingTool::m_pathToONNX
std::string m_pathToONNX
if this string is empty, the onnx tool won't be used
Definition: BTaggingTruthTaggingTool.h:257
BTaggingTruthTaggingTool::m_cutBenchmark
std::string m_cutBenchmark
operating point when running in Continuous
Definition: BTaggingTruthTaggingTool.h:241
BTaggingTruthTaggingTool::setJets
StatusCode setJets(TRFinfo &trfinf, std::vector< float > &pt, std::vector< float > &eta, std::vector< int > &flav, std::vector< float > &tagw)
Definition: BTaggingTruthTaggingTool.cxx:308
BTaggingTruthTaggingTool::m_systStrategy
std::string m_systStrategy
systematics model to be used (current choices are "SFEigen" and "Envelope")
Definition: BTaggingTruthTaggingTool.h:245
BTagging.h
IBTaggingTruthTaggingTool.h
BTaggingTruthTaggingTool::TRFinfo::tbins_in
std::vector< std::vector< int > > tbins_in
Definition: BTaggingTruthTaggingTool.h:99
BTaggingTruthTaggingTool::TRFinfo::trfw_in
std::vector< float > trfw_in
Definition: BTaggingTruthTaggingTool.h:102
BTaggingTruthTaggingTool::TagBin::bcut_hig
float bcut_hig
Definition: BTaggingTruthTaggingTool.h:57
BTaggingTruthTaggingTool::Leading2SignalJets
@ Leading2SignalJets
Definition: BTaggingTruthTaggingTool.h:261
BTaggingTruthTaggingTool::fillVariables
StatusCode fillVariables(const xAOD::Jet &jet, Analysis::CalibrationDataVariables &x)
Definition: BTaggingTruthTaggingTool.cxx:431
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
index
Definition: index.py:1
BTaggingTruthTaggingTool::m_coneFlavourLabel
bool m_coneFlavourLabel
if true, use cone-based labelling (as opposed to ghost association)
Definition: BTaggingTruthTaggingTool.h:249
BTaggingTruthTaggingTool::m_cuts
std::vector< TagBin > m_cuts
Definition: BTaggingTruthTaggingTool.h:183
BTaggingEfficiencyTool.h
BTaggingTruthTaggingTool::CalculateResultsONNX
StatusCode CalculateResultsONNX(const std::vector< std::vector< float >> &node_feat, std::vector< float > &tagw, Analysis::TruthTagResults &results, int rand_seed=-1)
Definition: BTaggingTruthTaggingTool.cxx:579
mergePhysValFiles.start
start
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:14
BTaggingTruthTaggingTool::chooseTagPermutation
StatusCode chooseTagPermutation(TRFinfo &trfinf, unsigned int nbtag, bool isIncl)
Definition: BTaggingTruthTaggingTool.cxx:849
BTaggingTruthTaggingTool::m_initialised
bool m_initialised
Definition: BTaggingTruthTaggingTool.h:185
BTaggingTruthTaggingTool::m_OperatingBins
std::vector< int > m_OperatingBins
Definition: BTaggingTruthTaggingTool.h:283
BTaggingTruthTaggingTool::getTagBinsConfProb
float getTagBinsConfProb(TRFinfo &trfinf, std::vector< int > &tagws)
Definition: BTaggingTruthTaggingTool.cxx:1012
BTaggingTruthTaggingTool::m_useDevFile
bool m_useDevFile
if true, attempt to retrieve the data/MC efficiency scale factor calibration files from the @PathReso...
Definition: BTaggingTruthTaggingTool.h:247
test_pyathena.pt
pt
Definition: test_pyathena.py:11
CP::SystematicSet
Class to wrap a set of SystematicVariations.
Definition: SystematicSet.h:31
BTaggingTruthTaggingTool::m_EffTName
std::string m_EffTName
semicolon-separated list of MC efficiency parametrisation names for tau jets
Definition: BTaggingTruthTaggingTool.h:231
BTaggingTruthTaggingTool::TRFinfo::permsWeight
std::vector< std::vector< float > > permsWeight
Definition: BTaggingTruthTaggingTool.h:111
BTaggingTruthTaggingTool::TagBin::is_tagbin
bool is_tagbin
Definition: BTaggingTruthTaggingTool.h:60
BTaggingTruthTaggingTool::TagBin
Create a proper constructor for Athena.
Definition: BTaggingTruthTaggingTool.h:54
BTaggingTruthTaggingTool::TRFinfo::jets
std::vector< jetVariable > jets
Definition: BTaggingTruthTaggingTool.h:87
BTaggingTruthTaggingTool::TRFinfo::binsprob_ex
std::vector< float > binsprob_ex
Definition: BTaggingTruthTaggingTool.h:107
BTaggingTruthTaggingTool::ConeFinalPartonFlavourLabel
int ConeFinalPartonFlavourLabel(const xAOD::Jet &jet)
Definition: BTaggingTruthTaggingTool.cxx:1130
BTaggingTruthTaggingTool::TagBin::bcut_low
float bcut_low
Definition: BTaggingTruthTaggingTool.h:56
BTaggingTruthTaggingTool::m_maxEta
float m_maxEta
Definition: BTaggingTruthTaggingTool.h:268
BTaggingTruthTaggingTool::getDirectTaggedJets
StatusCode getDirectTaggedJets(TRFinfo &trfinf, std::vector< bool > &is_tagged)
Definition: BTaggingTruthTaggingTool.cxx:1033
BTaggingTruthTaggingTool::check_syst_range
StatusCode check_syst_range(unsigned int sys)
Definition: BTaggingTruthTaggingTool.cxx:1091
CP::SystematicVariation
Definition: SystematicVariation.h:47
CalibrationDataVariables.h
BTaggingTruthTaggingTool::m_SFLightName
std::string m_SFLightName
name of the data/MC scale factor calibration for light-flavour jets
Definition: BTaggingTruthTaggingTool.h:219
BTaggingTruthTaggingTool::jetFlavourLabel
int jetFlavourLabel(const xAOD::Jet &jet)
Definition: BTaggingTruthTaggingTool.cxx:1106
BTaggingTruthTaggingTool::NjetsTagStrategy
NjetsTagStrategy
will be set according to m_taggingStrategy
Definition: BTaggingTruthTaggingTool.h:261
x
#define x
BTaggingTruthTaggingTool::TRFinfo::tbins_ex
std::vector< std::vector< int > > tbins_ex
Definition: BTaggingTruthTaggingTool.h:98
BTaggingTruthTaggingTool::m_sys_name
std::vector< std::string > m_sys_name
Definition: BTaggingTruthTaggingTool.h:195
BTaggingTruthTaggingTool::recommendedSystematics
CP::SystematicSet recommendedSystematics() const
the list of all systematics this tool recommends to use
Definition: BTaggingTruthTaggingTool.cxx:117
BTaggingTruthTaggingTool::affectingSystematics
CP::SystematicSet affectingSystematics() const
the list of all systematics this tool can be affected by
Definition: BTaggingTruthTaggingTool.cxx:97
BTaggingTruthTaggingTool::m_eff_syst
std::vector< CP::SystematicSet > m_eff_syst
Definition: BTaggingTruthTaggingTool.h:194
mapkey::sys
@ sys
Definition: TElectronEfficiencyCorrectionTool.cxx:42
BTaggingTruthTaggingTool::setUseSystematics
void setUseSystematics(bool useSystematics)
Definition: BTaggingTruthTaggingTool.cxx:91
BTaggingTruthTaggingTool::TagBin::ccut_hig
float ccut_hig
Definition: BTaggingTruthTaggingTool.h:59
BTaggingTruthTaggingTool::TRFinfo::permprob_in
std::vector< float > permprob_in
Definition: BTaggingTruthTaggingTool.h:106
BTaggingTruthTaggingTool::TRFinfo::trfw_ex
std::vector< float > trfw_ex
Definition: BTaggingTruthTaggingTool.h:101
BTaggingTruthTaggingTool::getAllEffMC
StatusCode getAllEffMC(TRFinfo &trfinf)
Definition: BTaggingTruthTaggingTool.cxx:602
BTaggingTruthTaggingTool::m_jetAuthor
std::string m_jetAuthor
jet collection name
Definition: BTaggingTruthTaggingTool.h:243
IBTaggingEfficiencyTool.h
BTaggingTruthTaggingTool::m_effTool_allBins
std::map< int, asg::AnaToolHandle< IBTaggingEfficiencyTool > > m_effTool_allBins
Definition: BTaggingTruthTaggingTool.h:286
BTaggingTruthTaggingTool::getTRFweight
StatusCode getTRFweight(TRFinfo &trfinf, unsigned int nbtag, bool isInclusive)
Definition: BTaggingTruthTaggingTool.cxx:726
tags
std::vector< std::string > tags
Definition: hcg.cxx:102
BTaggingTruthTaggingTool::m_continuous
bool m_continuous
Definition: BTaggingTruthTaggingTool.h:278
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
BTaggingTruthTaggingTool::m_selTool
asg::AnaToolHandle< IBTaggingSelectionTool > m_selTool
Definition: BTaggingTruthTaggingTool.h:290
IBTaggingSelectionTool.h
BTaggingTruthTaggingTool::m_taggerName
std::string m_taggerName
tagger name
Definition: BTaggingTruthTaggingTool.h:237
BTaggingTruthTaggingTool::GetTruthTagWeights
StatusCode GetTruthTagWeights(TRFinfo &trfinf, std::vector< float > &trf_weight_ex, std::vector< float > &trf_weight_in)
Definition: BTaggingTruthTaggingTool.cxx:456
BTaggingTruthTaggingTool::Leading3SignalJets
@ Leading3SignalJets
Definition: BTaggingTruthTaggingTool.h:261
BTaggingTruthTaggingTool::~BTaggingTruthTaggingTool
virtual ~BTaggingTruthTaggingTool()
Definition: BTaggingTruthTaggingTool.cxx:1099
BTaggingTruthTaggingTool::m_excludeEV
std::string m_excludeEV
in case of continuous WP you can choose to ignore some of the eigenvectors
Definition: BTaggingTruthTaggingTool.h:253
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
BTaggingTruthTaggingTool::TagBin::TagBin
TagBin()
Definition: BTaggingTruthTaggingTool.h:63
MessageCheck.h
macros for messaging and checking status codes
BTaggingTruthTaggingTool::getQuantiles
StatusCode getQuantiles(TRFinfo &trfinf, std::vector< std::vector< int > > &trf_bin_ex, std::vector< std::vector< int > > &trf_bin_in)
Definition: BTaggingTruthTaggingTool.cxx:898
BTaggingTruthTaggingTool::m_continuous2D
bool m_continuous2D
Definition: BTaggingTruthTaggingTool.h:279
BTaggingTruthTaggingTool::m_useQuntile
bool m_useQuntile
Definition: BTaggingTruthTaggingTool.h:277
BTaggingTruthTaggingTool::m_SFTName
std::string m_SFTName
name of the data/MC scale factor calibration for tau jets
Definition: BTaggingTruthTaggingTool.h:217
BTaggingTruthTaggingTool::ExclusiveConeHadronFlavourLabel
int ExclusiveConeHadronFlavourLabel(const xAOD::Jet &jet)
Definition: BTaggingTruthTaggingTool.cxx:1140
BTaggingTruthTaggingTool::m_doDirectTag
bool m_doDirectTag
possibility to compute the direct tagging SFs map directly from the TruthTaggingTool
Definition: BTaggingTruthTaggingTool.h:255
BTaggingTruthTaggingTool::m_SFBName
std::string m_SFBName
name of the data/MC scale factor calibration for b jets
Definition: BTaggingTruthTaggingTool.h:213
Analysis::TruthTagResults
Definition: TruthTagResults.h:14
BTaggingTruthTaggingTool::m_nbtag
int m_nbtag
Definition: BTaggingTruthTaggingTool.h:281
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
BTaggingTruthTaggingTool::m_excludeFromEV
std::string m_excludeFromEV
semicolon-separated list of uncertainties to be excluded from the eigenvector variation procedure
Definition: BTaggingTruthTaggingTool.h:235
BTaggingTruthTaggingTool::initialize
StatusCode initialize()
Dummy implementation of the initialisation function.
Definition: BTaggingTruthTaggingTool.cxx:121
BTaggingTruthTaggingTool::getAllEffMCCDI
StatusCode getAllEffMCCDI(TRFinfo &trfinf)
Definition: BTaggingTruthTaggingTool.cxx:646
AnaToolHandle.h
BTaggingTruthTaggingTool::m_useSys
bool m_useSys
Definition: BTaggingTruthTaggingTool.h:280
BTaggingTruthTaggingTool::m_njetsTagStrategy
NjetsTagStrategy m_njetsTagStrategy
Definition: BTaggingTruthTaggingTool.h:262
BTaggingTruthTaggingTool::generateRandomTaggerScores
StatusCode generateRandomTaggerScores(std::vector< std::vector< int > > &quantiles, std::vector< std::vector< float > > &btag_scores, std::vector< std::vector< float > > &ctag_scores)
Definition: BTaggingTruthTaggingTool.cxx:1177
BTaggingTruthTaggingTool::m_availableOP_fixCut
std::vector< std::string > m_availableOP_fixCut
Definition: BTaggingTruthTaggingTool.h:178
BTaggingTruthTaggingTool
Definition: BTaggingTruthTaggingTool.h:46
BTaggingTruthTaggingTool::TagBin::ccut_low
float ccut_low
Definition: BTaggingTruthTaggingTool.h:58
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
BTaggingTruthTaggingTool::jetVariable::vars
Analysis::CalibrationDataVariables vars
Definition: BTaggingTruthTaggingTool.h:80
BTaggingTruthTaggingTool::m_oldConeFlavourLabel
bool m_oldConeFlavourLabel
when using cone-based labelling (see above), if true, use the "traditional" (parton-based) labelling ...
Definition: BTaggingTruthTaggingTool.h:251
BTaggingTruthTaggingTool::TRFinfo::perms
std::map< int, std::vector< std::vector< std::vector< bool > > > > perms
Definition: BTaggingTruthTaggingTool.h:110
BTaggingTruthTaggingTool::TRFinfo::njets
unsigned int njets
Definition: BTaggingTruthTaggingTool.h:92
BTaggingTruthTaggingTool::getTagPermutation
StatusCode getTagPermutation(TRFinfo &trfinf, std::vector< std::vector< bool > > &trf_chosen_perm_ex, std::vector< std::vector< bool > > &trf_chosen_perm_in)
Definition: BTaggingTruthTaggingTool.cxx:806
BTaggingTruthTaggingTool::TRFinfo::binsprob_in
std::vector< float > binsprob_in
Definition: BTaggingTruthTaggingTool.h:108
BTaggingTruthTaggingTool::chooseAllTagBins
StatusCode chooseAllTagBins(TRFinfo &trfinf)
Definition: BTaggingTruthTaggingTool.cxx:918
python.ami.results
def results
Definition: ami.py:386
BTaggingTruthTaggingTool::m_EffBName
std::string m_EffBName
semicolon-separated list of MC efficiency parametrisation names for b jets
Definition: BTaggingTruthTaggingTool.h:227
BTaggingTruthTaggingTool::chooseTagBins_cum
StatusCode chooseTagBins_cum(TRFinfo &trfinf, std::vector< bool > &tagconf, bool isIncl, unsigned int nbtag)
Definition: BTaggingTruthTaggingTool.cxx:940
BTaggingTruthTaggingTool::AllJets
@ AllJets
Definition: BTaggingTruthTaggingTool.h:261
BTaggingTruthTaggingTool::TRFinfo::rand
TRandom3 rand
Definition: BTaggingTruthTaggingTool.h:94
BTaggingTruthTaggingTool::m_effTool
asg::AnaToolHandle< IBTaggingEfficiencyTool > m_effTool
Definition: BTaggingTruthTaggingTool.h:289
BTaggingTruthTaggingTool::split
std::vector< std::string > split(const std::string &str, char token)
Definition: BTaggingTruthTaggingTool.cxx:1162
BTaggingTruthTaggingTool::isAffectedBySystematic
bool isAffectedBySystematic(const CP::SystematicVariation &systematic) const
Declare the interface that this class provides.
Definition: BTaggingTruthTaggingTool.cxx:111
BTaggingTruthTaggingTool::m_EVReductionB
std::string m_EVReductionB
specification of the eigenvector reduction strategy for b jets (if eigenvectors are used)
Definition: BTaggingTruthTaggingTool.h:221
IBTaggingTruthTaggingTool
Definition: IBTaggingTruthTaggingTool.h:30
BTaggingTruthTaggingTool::TRFinfo::node_feat
std::vector< std::vector< float > > node_feat
Definition: BTaggingTruthTaggingTool.h:90
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
BTaggingTruthTaggingTool::TRFinfo::perm_in
std::vector< std::vector< bool > > perm_in
Definition: BTaggingTruthTaggingTool.h:97
BTaggingTruthTaggingTool::m_EVReductionLight
std::string m_EVReductionLight
specification of the eigenvector reduction strategy for light-flavour jets (if eigenvectors are used)
Definition: BTaggingTruthTaggingTool.h:225
JetContainer.h
BTaggingTruthTaggingTool::TRFinfo::permsSumWeight
std::vector< std::vector< float > > permsSumWeight
Definition: BTaggingTruthTaggingTool.h:112
BTaggingTruthTaggingTool::generatePermutations
std::vector< std::vector< bool > > generatePermutations(int njets, int tags, int start=0)
Definition: BTaggingTruthTaggingTool.cxx:678
BTaggingTruthTaggingTool::CalculateResults
StatusCode CalculateResults(TRFinfo &trfinf, Analysis::TruthTagResults &results, int rand_seed=-1)
Definition: BTaggingTruthTaggingTool.cxx:475
BTaggingTruthTaggingTool::m_SFCName
std::string m_SFCName
name of the data/MC scale factor calibration for charm jets
Definition: BTaggingTruthTaggingTool.h:215
ASG_TOOL_CLASS3
#define ASG_TOOL_CLASS3(CLASSNAME, INT1, INT2, INT3)
Definition: AsgToolMacros.h:85
Analysis::CalibrationDataVariables
Definition: CalibrationDataVariables.h:42
BTaggingTruthTaggingTool::applySystematicVariation
StatusCode applySystematicVariation(const CP::SystematicSet &systConfig)
effects: configure this tool for the given list of systematic variations.
Definition: BTaggingTruthTaggingTool.cxx:101
CP::IReentrantSystematicsTool
interface for all CP tools supporting systematic variations within a reentrant algorithm
Definition: IReentrantSystematicsTool.h:58
BTaggingTruthTaggingTool::TRFinfo::perm_ex
std::vector< std::vector< bool > > perm_ex
Definition: BTaggingTruthTaggingTool.h:96
BTaggingTruthTaggingTool::setEffMapIndex
StatusCode setEffMapIndex(const std::string &flavour, unsigned int index)
Declare the interface that the class provides.
Definition: BTaggingTruthTaggingTool.cxx:86
BTaggingTruthTaggingTool::chooseAllTagPermutation
StatusCode chooseAllTagPermutation(TRFinfo &trfinf, unsigned int nbtag)
Definition: BTaggingTruthTaggingTool.cxx:823
BTaggingTruthTaggingTool::m_EffFile
std::string m_EffFile
name of the optional MC efficiency file (may be changed by the PathResolver)
Definition: BTaggingTruthTaggingTool.h:211
BTaggingTruthTaggingTool::TagBin::~TagBin
~TagBin()
Definition: BTaggingTruthTaggingTool.h:75
BTaggingTruthTaggingTool::TagBin::TagBin
TagBin(bool is_tb, float b_low, float b_hig, float c_low=-99., float c_hig=+99)
Definition: BTaggingTruthTaggingTool.h:66
defineDB.jets
list jets
Definition: JetTagCalibration/share/defineDB.py:24
str
Definition: BTagTrackIpAccessor.cxx:11
BTaggingTruthTaggingTool::getEvtSF
float getEvtSF(TRFinfo &trfinf, std::vector< int > &quantiles)
Definition: BTaggingTruthTaggingTool.cxx:1050
BTaggingTruthTaggingTool::m_ignoreSF
bool m_ignoreSF
Definition: BTaggingTruthTaggingTool.h:275
BTaggingTruthTaggingTool::m_usePerm
bool m_usePerm
Definition: BTaggingTruthTaggingTool.h:276
BTaggingTruthTaggingTool::m_EffLightName
std::string m_EffLightName
semicolon-separated list of MC efficiency parametrisation names for light-flavour jets
Definition: BTaggingTruthTaggingTool.h:233
AsgTool.h
BTaggingTruthTaggingTool::m_nbins
int m_nbins
Definition: BTaggingTruthTaggingTool.h:282
BTaggingTruthTaggingTool::getAllEffSF
StatusCode getAllEffSF(TRFinfo &trfinf, int=0)
BTaggingTruthTaggingTool::TRFinfo::effMC_allBins
std::map< int, std::vector< float > > effMC_allBins
Definition: BTaggingTruthTaggingTool.h:104
BTaggingTruthTaggingTool::jetVariable::flav
int flav
Definition: BTaggingTruthTaggingTool.h:81
BTaggingTruthTaggingTool::m_maxRangePt
float m_maxRangePt
Definition: BTaggingTruthTaggingTool.h:270
BTaggingTruthTaggingTool::m_SFFile
std::string m_SFFile
name of the data/MC efficiency scale factor calibration file (may be changed by the PathResolver)
Definition: BTaggingTruthTaggingTool.h:209
BTaggingTruthTaggingTool::m_taggingStrategy
std::string m_taggingStrategy
tagging strategy is required to do TT with GNN, when we don't want to truth tag all the jets (eg....
Definition: BTaggingTruthTaggingTool.h:259
BTaggingTruthTaggingTool::BTaggingTruthTaggingTool
BTaggingTruthTaggingTool(const std::string &name)
Create a constructor for standalone usage.
Definition: BTaggingTruthTaggingTool.cxx:35
BTaggingTruthTaggingTool::m_doOnlyUpVariations
bool m_doOnlyUpVariations
Definition: BTaggingTruthTaggingTool.h:274
BTaggingTruthTaggingTool::TRFinfo
Definition: BTaggingTruthTaggingTool.h:85
BTaggingTruthTaggingTool::trfWeight
float trfWeight(TRFinfo &trfinf, const std::vector< bool > &tags)
Definition: BTaggingTruthTaggingTool.cxx:702
BTaggingTruthTaggingTool::m_OP
std::string m_OP
operating point
Definition: BTaggingTruthTaggingTool.h:239