Skip to content

How to write a script that sets up two different B-tagger strategies #299

@CC-czz

Description

@CC-czz

Question

Dear experts,
I would like to reproduce the charged-Higgs results from arXiv:2302.11739 in my own model, where two different b-tagger working points are used. I generate ROOT files with Delphes 3 and have configured it as follows:
###########

b-tagging

###########

module BTagging BTagging {
set JetInputArray JetEnergyScale/jets

set BitNumber 0

add EfficiencyFormula {abs(PDG code)} {efficiency formula as a function of eta and pt}

PDG code = the highest PDG code of a quark or gluon inside DeltaR cone around jet axis

gluon's PDG code has the lowest priority

based on arXiv:1211.4462

default efficiency formula (misidentification rate)

add EfficiencyFormula {0} {0.001+0.000038*pt}

efficiency formula for c-jets (misidentification rate)

add EfficiencyFormula {4} {0.04tanh(0.018pt)(1/(1+ 0.0013pt))}

efficiency formula for b-jets

add EfficiencyFormula {5} {0.6tanh(0.0025pt)(25.0/(1+0.063pt))}

set BitNumber 1

add EfficiencyFormula {abs(PDG code)} {efficiency formula as a function of eta and pt}

PDG code = the highest PDG code of a quark or gluon inside DeltaR cone around jet axis

gluon's PDG code has the lowest priority

based on arXiv:1211.4462

default efficiency formula (misidentification rate)

add EfficiencyFormula {0} {0.01+0.000038*pt}

efficiency formula for c-jets (misidentification rate)

add EfficiencyFormula {4} {0.25tanh(0.018pt)(1/(1+ 0.0013pt))}

efficiency formula for b-jets

add EfficiencyFormula {5} {0.77tanh(0.0025pt)(25.0/(1+0.063pt))}
}

  1. Then, within MadAnalysis 5, I used the following script:

import /home/cz/science/HEPtool_install/testmg5chtt/394/signal/tag_1_pythia8_CMSReco.root as ch_sig

set main.lumi = 300
set ch_sig.xsection = 54.13

set main.stacking_method = normalize2one

#define ta = ta+ ta-
#define mu = mu+ mu-
#define e = e+ e-

select (j) PT > 10
select (j) ABSETA < 2.5
select (e) PT > 10
select (e) ABSETA < 2.5
select (b) PT > 10
select (b) ABSETA < 2.5
select (mu) PT > 10
select (mu) ABSETA < 2.5
select (ta) PT > 10
select (ta) ABSETA < 2.5
select DELTAR(j,j) > 0.4
select DELTAR(l+,l+) > 0.4
select DELTAR(l-,l-) > 0.4

define loose_bjets = j btag[1]
define not_nominal_bjets = j not btag
define loose_only_bjets = loose_bjets in not_nominal_bjets

efine_region reg_4j_2b1bl
select N(j) == 4
select N(b) == 2
select N(loose_only_bjets) == 1

define_region reg_5j_2b1bl
select N(jet) == 5
select N(b) == 2
select N(loose_only_bjets) == 1

define_region reg_6j_2b1bl
select N(jet) >= 6
select N(b) == 2
select N(loose_only_bjets) == 1

define_region reg_4j_3b
select N(j) == 4
select N(nominal_bjets) == 3

define_region reg_5j_3b
select N(j) == 5
select N(nominal_bjets) == 3

define_region reg_6j_3b
select N(j) >= 6
select N(nominal_bjets) == 3

define_region reg_4j_4b
select N(j) == 4
select N(nominal_bjets) == 4

define_region reg_5j_ge4b
select N(j) == 5
select N(nominal_bjets) >= 4

define_region reg_6j_ge4b
select N(j) >= 6
select N(nominal_bjets) >= 4

select N(j) >= 0
select MET > 5

plot (reg_4j_3b, reg_5j_3b) MET 50 0 500
plot (reg_4j_3b, reg_5j_3b) N(j) 10 0 10
plot (reg_4j_3b, reg_5j_3b) PT(j[1]) 50 0 500
plot (reg_4j_3b, reg_5j_3b) M(j[1] j[2]) 50 0 800

plot (reg_4j_2b1bl) N(j) 10 0 10
plot (reg_4j_2b1bl) PT(b[1]) 50 0 500

submit ch_sig_misid_study

3.However, many problems arose that I am unable to resolve.
MA5: ma5>import /home/cz/science/HEPtool_install/testmg5chtt/394/signal/tag_1_pythia8_CMSReco.root as ch_sig
MA5: -> Storing the file 'tag_1_pythia8_CMSReco.root' in the dataset 'ch_sig'.
MA5: ma5>set main.lumi = 300
MA5: ma5>set ch_sig.xsection = 54.13
MA5: ma5>set main.stacking_method = normalize2one
MA5: ma5>#define ta = ta+ ta-
MA5: ma5>#define mu = mu+ mu-
MA5: ma5>#define e = e+ e-
MA5: ma5>select (j) PT > 10
MA5: ma5>select (j) ABSETA < 2.5
MA5: ma5>select (e) PT > 10
MA5: ma5>select (e) ABSETA < 2.5
MA5: ma5>select (b) PT > 10
MA5: ma5>select (b) ABSETA < 2.5
MA5: ma5>select (mu) PT > 10
MA5: ma5>select (mu) ABSETA < 2.5
MA5: ma5>select (ta) PT > 10
MA5: ma5>select (ta) ABSETA < 2.5
MA5: ma5>select DELTAR(j,j) > 0.4
MA5: ma5>select DELTAR(l+,l+) > 0.4
MA5: ma5>select DELTAR(l-,l-) > 0.4
MA5: ma5>define loose_bjets = j btag[1]
MA5-ERROR: The (multi)particle 'btag' is not defined.
MA5: ma5>define not_nominal_bjets = j not btag
MA5-ERROR: The (multi)particle 'not' is not defined.
MA5: ma5>define loose_only_bjets = loose_bjets in not_nominal_bjets
MA5-ERROR: The (multi)particle 'loose_bjets' is not defined.
MA5: ma5>define_region reg_4j_2b1bl
MA5: ma5>select N(j) == 4
MA5: ma5>select N(b) == 2
MA5: ma5>select N(loose_only_bjets) == 1
MA5-ERROR: 'loose_only_bjets' is not a defined (multi)particle.
MA5: ma5>define_region reg_5j_2b1bl
MA5: ma5>select N(jet) == 5
MA5-ERROR: 'jet' is not a defined (multi)particle.
MA5: ma5>select N(b) == 2
MA5: ma5>select N(loose_only_bjets) == 1
MA5-ERROR: 'loose_only_bjets' is not a defined (multi)particle.
MA5: ma5>define_region reg_6j_2b1bl
MA5: ma5>select N(jet) >= 6
MA5-ERROR: 'jet' is not a defined (multi)particle.
MA5: ma5>select N(b) == 2
MA5: ma5>select N(loose_only_bjets) == 1
MA5-ERROR: 'loose_only_bjets' is not a defined (multi)particle.
MA5: ma5>define_region reg_4j_3b
MA5: ma5>select N(j) == 4
MA5: ma5>select N(nominal_bjets) == 3
MA5-ERROR: 'nominal_bjets' is not a defined (multi)particle.
MA5: ma5>define_region reg_5j_3b
MA5: ma5>select N(j) == 5
MA5: ma5>select N(nominal_bjets) == 3
MA5-ERROR: 'nominal_bjets' is not a defined (multi)particle.
MA5: ma5>define_region reg_6j_3b
MA5: ma5>select N(j) >= 6
MA5: ma5>select N(nominal_bjets) == 3
MA5-ERROR: 'nominal_bjets' is not a defined (multi)particle.
MA5: ma5>define_region reg_4j_4b
MA5: ma5>select N(j) == 4
MA5: ma5>select N(nominal_bjets) == 4
MA5-ERROR: 'nominal_bjets' is not a defined (multi)particle.
MA5: ma5>define_region reg_5j_ge4b
MA5: ma5>select N(j) == 5
MA5: ma5>select N(nominal_bjets) >= 4
MA5-ERROR: 'nominal_bjets' is not a defined (multi)particle.
MA5: ma5>define_region reg_6j_ge4b
MA5: ma5>select N(j) >= 6
MA5: ma5>select N(nominal_bjets) >= 4
MA5-ERROR: 'nominal_bjets' is not a defined (multi)particle.
MA5: ma5>select N(j) >= 0
MA5: ma5>select MET > 5
MA5: ma5>plot (reg_4j_3b, reg_5j_3b) MET 50 0 500
MA5-ERROR: '(' is an unwknown observable and cannot be used int a plot definition.
MA5: ma5>plot (reg_4j_3b, reg_5j_3b) N(j) 10 0 10
MA5-ERROR: '(' is an unwknown observable and cannot be used int a plot definition.
MA5: ma5>plot (reg_4j_3b, reg_5j_3b) PT(j[1]) 50 0 500
MA5-ERROR: '(' is an unwknown observable and cannot be used int a plot definition.
MA5: ma5>plot (reg_4j_3b, reg_5j_3b) M(j[1] j[2]) 50 0 800
MA5-ERROR: '(' is an unwknown observable and cannot be used int a plot definition.
MA5: ma5>plot (reg_4j_2b1bl) N(j) 10 0 10
MA5-ERROR: '(' is an unwknown observable and cannot be used int a plot definition.
MA5: ma5>plot (reg_4j_2b1bl) PT(b[1]) 50 0 500
MA5-ERROR: '(' is an unwknown observable and cannot be used int a plot definition.
MA5: ma5>submit ch_sig_misid_study
MA5: Creating folder 'ch_sig_misid_study'...
MA5-WARNING: A directory called '/home/cz/science/HEPtool_install/madanalysis5/ch_sig_misid_study' is already defined.
Would you like to remove it ? (Y/N)
Answer: y
MA5: Copying 'SampleAnalyzer' source files...
MA5: Inserting your selection into 'SampleAnalyzer'...
MA5: Writing the list of datasets...
MA5: Writing the command line history...
MA5: Creating Makefiles...
MA5: Compiling 'SampleAnalyzer'...
MA5-ERROR: impossible to compile the project. For more details, see the log file:
MA5-ERROR: /home/cz/science/HEPtool_install/madanalysis5/ch_sig_misid_study/Build/Log/compilation.log
MA5-ERROR: job submission aborted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ❓questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions