-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from robervalwalsh/develop
example for jet trigger efficiency with tag and probe
- Loading branch information
Showing
3 changed files
with
122 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
#include "Analysis/Tools/interface/Analyser.h" | ||
|
||
using namespace analysis; | ||
using namespace analysis::tools; | ||
|
||
int main(int argc, char ** argv) | ||
{ | ||
TH1::SetDefaultSumw2(); // proper treatment of errors when scaling histograms | ||
|
||
// construct your analyser | ||
Analyser analyser(argc,argv); | ||
|
||
analyser.jetHistograms("tandp_selection"); | ||
analyser.jetHistograms("tandp_probe_matched"); | ||
|
||
|
||
for ( int i = 0 ; i < analyser.nEvents() ; ++i ) | ||
{ | ||
if ( ! analyser.event(i) ) continue; // read event, run selection/json | ||
if ( ! analyser.triggerSelection () ) continue; // trigger | ||
if ( ! analyser.preselection() ) continue; // preselection - particle id's | ||
if ( ! analyser.jetCorrections() ) continue; // jet corrections | ||
|
||
// select events according to # jets criteria in the config file | ||
if ( ! analyser.selectionNJets() ) continue; | ||
// select events according to criteria for the leading and pr2nd leading jets kinematics | ||
if ( ! analyser.selectionJet(1) ) continue; | ||
if ( ! analyser.selectionJet(2) ) continue; | ||
// select events according to delta_phi criteria in the config file | ||
if ( ! analyser.selectionJetDphi(1,2) ) continue; | ||
|
||
/////////////////////////////////// | ||
// TO DO: veto events with a third jet | ||
/////////////////////////////////// | ||
|
||
// Assuming the tag to be the leading jet, | ||
// select events according to matching the leading jet to online objects defined in the config file | ||
if ( ! analyser.onlineJetMatching(1) ) continue; | ||
|
||
// Fill predefined histograms for the event selection | ||
// In the directory 'selection', the histograms for jet 2 correspond probe jets | ||
analyser.fillJetHistograms("tandp_selection"); | ||
|
||
// select events where the 2nd jet has a match to the online objects defined in the configuration | ||
if ( ! analyser.onlineJetMatching(2) ) continue; | ||
// Fill predefined histograms for the event selection after the probe jets are matched to online objects | ||
// In the directory 'selection_probe_matched', the histograms for jet 2 are those for the probe jets after matching to online | ||
analyser.fillJetHistograms("tandp_probe_matched"); | ||
|
||
|
||
|
||
// | ||
|
||
} | ||
} // end main | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
[Info] | ||
process = MssmHbb | ||
eventsMax = 500000 | ||
|
||
# # == Monte Carlo == | ||
# ntuplesList = tools:mssmhbb-2017-v4/mc/SUSYGluGluToBBHToBB_M-200_rootFileList.txt | ||
# isMC = true | ||
# output = histograms_semilep_MH-200_2017-v4_test.root | ||
# nloMC = true | ||
# signalRegion = true | ||
|
||
# == Data == | ||
ntuplesList = tools:mssmhbb-2017-v4/data/JetHT_Run2017C_rootFileList.txt | ||
isMC = false | ||
output = histograms_online_jet_eff.root | ||
signalRegion = false | ||
json = tools:2017/certified/Cert_294927-306462_13TeV_EOY2017ReReco_Collisions17_JSON.txt | ||
|
||
|
||
[Trigger] | ||
results = TriggerResults | ||
hltPath = HLT_PFJet60_v | ||
|
||
[Trigger.Objects] | ||
directory = slimmedPatTrigger | ||
Jets.L1 = hltL1sSingleJet35 | ||
Jets.Calo = hltSingleCaloJet40 | ||
Jets.PF = hltSinglePFJet60 | ||
# | ||
# | ||
|
||
[Jets] | ||
jets = updatedPatJets | ||
nMin = 2 | ||
id = tight | ||
puId = loose | ||
ptMin = 60 | ||
ptMax = -1 | ||
ptMin = 60 | ||
ptMax = 120 | ||
etaMax = 2.2 | ||
etaMax = 2.2 | ||
dPhiMin = 2.1 | ||
|
||
|
||
[Generator] | ||
genParticles = prunedGenParticles | ||
genJets = slimmedGenJets | ||
|
||
### 2017 | ||
[Corrections] | ||
Jets.jerPtRes = tools:2017/jer/Fall17_V3_MC_PtResolution_AK4PFchs.txt | ||
Jets.jerSF = tools:2017/jer/Fall17_V3_MC_SF_AK4PFchs.txt | ||
Pileup.reweight = tools:2017/pileup/PileupWeight_Run2017_Mix_2017.root | ||
|
||
|