9 Jets_(cfg.getParameter<
edm::InputTag>(
"Jets")),
10 bTagAlgo_(cfg.getParameter<
std::
string>(
"bTagAlgo")),
11 bins_(cfg.getParameter<unsigned
int>(
"bins")),
12 lowerbin_(cfg.getParameter<double>(
"lowerbin")),
13 upperbin_(cfg.getParameter<double>(
"upperbin"))
28 Jets_(cfg.getParameter<
edm::InputTag>(
"Jets")),
31 bins_(cfg.getParameter<unsigned
int>(
"bins")),
32 lowerbin_(cfg.getParameter<double>(
"lowerbin")),
33 upperbin_(cfg.getParameter<double>(
"upperbin"))
48 for(
unsigned int i=0;
i<
bins_; ++
i){
49 hists_[
"effBTag_b"]->SetBinContent(
i,
hists_[
"BTag_b"]->Integral(
i,
hists_[
"BTag_b"]->GetNbinsX()+1)/
hists_[
"BTag_b"]->Integral(0,
hists_[
"BTag_b"]->GetNbinsX()+1) );
50 hists_[
"effBTag_g"]->SetBinContent(
i,
hists_[
"BTag_g"]->Integral(
i,
hists_[
"BTag_g"]->GetNbinsX()+1)/
hists_[
"BTag_g"]->Integral(0,
hists_[
"BTag_g"]->GetNbinsX()+1) );
51 hists_[
"effBTag_c"]->SetBinContent(
i,
hists_[
"BTag_c"]->Integral(
i,
hists_[
"BTag_c"]->GetNbinsX()+1)/
hists_[
"BTag_c"]->Integral(0,
hists_[
"BTag_c"]->GetNbinsX()+1) );
52 hists_[
"effBTag_uds"]->SetBinContent(
i,
hists_[
"BTag_uds"]->Integral(
i,
hists_[
"BTag_uds"]->GetNbinsX()+1)/
hists_[
"BTag_uds"]->Integral(0,
hists_[
"BTag_uds"]->GetNbinsX()+1) );
53 hists_[
"effBTag_other"]->SetBinContent(
i,
hists_[
"BTag_other"]->Integral(
i,
hists_[
"BTag_other"]->GetNbinsX()+1)/
hists_[
"BTag_other"]->Integral(0,
hists_[
"BTag_other"]->GetNbinsX()+1) );
66 event.getByLabel(
Jets_, Jets);
69 for(std::vector<Jet>::const_iterator Jet_it=Jets->begin(); Jet_it!=Jets->end(); ++Jet_it){
void analyze(const edm::EventBase &event) override
everything that needs to be done during the event loop
~AnalysisTasksAnalyzerBTag() override
default destructor
edm::EDGetTokenT< std::vector< pat::Jet > > JetsToken_
float bDiscriminator(const std::string &theLabel) const
-— methods for accessing b-tagging info -—
Abstract base class for FWLite and EDM friendly analyzers.
std::map< std::string, TH1 * > hists_
histograms
Abs< T >::type abs(const T &t)
T * make(const Args &...args) const
make new ROOT object
int partonFlavour() const
return the parton-based flavour of the jet
AnalysisTasksAnalyzerBTag(const edm::ParameterSet &cfg, TFileDirectory &fs)
default constructor
Analysis-level calorimeter jet class.
edm::InputTag Jets_
input tag for mouns