Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Legacy fiducial and differential xs measurement dev PR #1166

Merged
Merged
Show file tree
Hide file tree
Changes from 212 commits
Commits
Show all changes
221 commits
Select commit Hold shift + click to select a range
8f314ca
Add trigger filter to MicroAOD standard sequence
simonepigazzini Sep 20, 2018
b089944
Updated MET fix recipe (still evolving, pending ECAL final re-reco
simonepigazzini Sep 24, 2018
fea2d9f
Trigger filter for 2017
simonepigazzini Sep 27, 2018
cb10c19
New MET 2017 fix recipe (v2). Both uncorrected and corrected flashggM…
simonepigazzini Sep 27, 2018
bd313e4
Buildfile cleanup
simonepigazzini Sep 27, 2018
43cdd0e
RunIIFall17-3_2_0 campaign part1. Both Corrected (recipe v2) and unco…
simonepigazzini Oct 8, 2018
1c206b0
RunIIFall17-3_2_0 catalogue + flashggMetsCorr everywhere
simonepigazzini Oct 17, 2018
0758a19
Merge remote-tracking branch 'upstream/master'
simonepigazzini Oct 17, 2018
72aa60e
Merge pull request #1082 from simonepigazzini/master
simonepigazzini Oct 22, 2018
19b3b74
TTH di-lepton merged into TTH leptonic (#1084)
abeschi Oct 26, 2018
7c6cf55
Add Met Pt in TTHLeptonic dataformat
Oct 29, 2018
9ff7a22
Workspace syncronization
abeschi Oct 31, 2018
15cc42a
Merge pull request #1085 from abeschi/ttH_Workspaces
simonepigazzini Nov 2, 2018
b2bc3d4
tweaks for working local version
sethzenz Mar 10, 2017
674fad1
fixed dat file and bitstring order, add new nusiance to workspacestd
sethzenz Mar 10, 2017
ec93944
minor changes to submit jobs in t3 (to be tested on lxplus)
vtavolar May 20, 2016
8bb286d
add xsec for ggH, VBF amcatnlo 120,125,130
vtavolar May 29, 2016
63efb8f
restore standard configuration for tagsequence and tagsorter
vtavolar Jul 13, 2016
b37c8a5
options to run ws for xsec from workspaceStd
vtavolar Jul 13, 2016
c46bd94
revert job submission changes for ch t3
vtavolar Jul 14, 2016
225e4d4
skim DYJets datasets in catalogue
vtavolar Jul 24, 2016
f98a2cf
minor changes to submit jobs in t3 (to be tested on lxplus)
vtavolar May 20, 2016
7d81d6d
update split of catalogues and missing xsecs
vtavolar Jul 15, 2016
671e8a0
remove additional ttH samples (PS up and down)
vtavolar Jul 17, 2016
a16b4cd
update to catalog
vtavolar Jul 19, 2016
b2514a1
sh and jsons to run IA and OA components
vtavolar Jul 19, 2016
9816ee3
Revert "minor changes to submit jobs in t3 (to be tested on lxplus)"
musella Jul 20, 2016
c66632b
Import classes for gen-based analysis, needed for differential analysis
musella Aug 29, 2016
b38ab88
Factorized fiducial cross-sections configuration and added classes fo…
musella Aug 29, 2016
7881f97
debugged exta variables
musella Sep 16, 2016
77154b8
adding extra floats to ws, modify genP4
vtavolar Sep 30, 2016
e66d08f
state of the art of differential
vtavolar Sep 30, 2016
12d94ed
couts of diphoton candidate gen vars
vtavolar Nov 14, 2016
3fa4cdd
tweaks to fiducial ws customisation
vtavolar Nov 14, 2016
44ad926
if differential, run gen analysis and andd vars
vtavolar Nov 14, 2016
12e176e
attach composite objects to the tags (jet systs)
vtavolar Jan 30, 2017
8296334
change of opts in script for ws job submission
vtavolar Jan 30, 2017
341030d
CompsiteCandidate added to class revision
vtavolar Jan 30, 2017
3520141
variable binning for global vars
vtavolar Jan 30, 2017
53be7d3
small class used for filling datasets from trees
vtavolar Jan 30, 2017
68ec7a2
scripts and jsons for differential ws production
vtavolar Jan 30, 2017
7fc5953
rebase fiducial config
vtavolar Jan 30, 2017
01c27bb
comment out some vars for differentials
vtavolar Jan 31, 2017
3130468
remove printouts
vtavolar Feb 17, 2017
f923af7
script for testing
vtavolar Feb 17, 2017
5a8215b
add old xsec for ggh
vtavolar Feb 21, 2017
55ff8d5
Moriond17 scale and smearing corrections, 74, pho
vtavolar Feb 21, 2017
701e2e2
tune scripts for ws submission, delete obsolete one
vtavolar Feb 21, 2017
7536c42
remove phoID cut and dump the variable instead, re-tuning of sigmaMde…
vtavolar Feb 21, 2017
b25e81a
remove all those couts
vtavolar Feb 21, 2017
e3c4786
next round of ws
vtavolar Feb 21, 2017
ec9a982
update ws submission scripts
vtavolar Mar 1, 2017
cd4f52b
add phoID mva to differentials gen trees
vtavolar Mar 3, 2017
519f388
update of scripts for ws subms
vtavolar Mar 3, 2017
5ac4403
add loose jet is
vtavolar Mar 3, 2017
136bdbe
fix typo in jet id
vtavolar Mar 3, 2017
d27856c
update ws
vtavolar Mar 3, 2017
a078106
final sigmaM/M boundaries Moriond17
vtavolar Mar 11, 2017
baf3610
decorrelation file
vtavolar Mar 11, 2017
6e3ac5b
update ws scripts
vtavolar Mar 11, 2017
bef1056
fid XSs: dump number of constituents of each jet
vtavolar Mar 11, 2017
969147e
job resubmission if output root file is not there
vtavolar Mar 11, 2017
4d6f19d
decorrelation transf Moriond17
vtavolar Mar 11, 2017
1415779
possibility to truncate relative shift sigmaE
vtavolar Mar 15, 2017
50f1f30
add inclusive jets collection
vtavolar Mar 15, 2017
39c464d
no met systs
vtavolar Mar 15, 2017
2388ed3
comment cout to make logs lighter
vtavolar Mar 15, 2017
0c9af15
update ws submission scripts
vtavolar Mar 15, 2017
2b43034
json files
vtavolar Mar 15, 2017
bbc244c
uncomment submission lines
vtavolar Mar 15, 2017
9803196
decorr file
vtavolar Mar 17, 2017
46e959b
data jobs submission
vtavolar May 2, 2017
0aa18dc
some mods for 80X running
musella May 3, 2016
3170bbc
Added lumisToSkip to remove overlap between datasets in catalog
musella Jun 3, 2016
5b7eb5e
adding test correction files for 2016B
gfasanel May 31, 2016
5610b9a
Golden json correction 3 June
gfasanel Jun 9, 2016
e1cc614
updated setup script to get updated EGM tools
Mar 10, 2017
9c5c211
tweaks for working local version
sethzenz Mar 10, 2017
6fd3d8b
minor changes to submit jobs in t3 (to be tested on lxplus)
vtavolar May 20, 2016
c1cb05c
add xsec for ggH, VBF amcatnlo 120,125,130
vtavolar May 29, 2016
c49a7d6
restore standard configuration for tagsequence and tagsorter
vtavolar Jul 13, 2016
1eabf58
options to run ws for xsec from workspaceStd
vtavolar Jul 13, 2016
f8c9c4b
revert job submission changes for ch t3
vtavolar Jul 14, 2016
dc96849
skim DYJets datasets in catalogue
vtavolar Jul 24, 2016
38924ad
minor changes to submit jobs in t3 (to be tested on lxplus)
vtavolar May 20, 2016
850a96c
update to catalog
vtavolar Jul 19, 2016
cf4b079
sh and jsons to run IA and OA components
vtavolar Jul 19, 2016
7250308
Revert "minor changes to submit jobs in t3 (to be tested on lxplus)"
musella Jul 20, 2016
3913229
Factorized fiducial cross-sections configuration and added classes fo…
musella Aug 29, 2016
2563af3
debugged exta variables
musella Sep 16, 2016
0865e3b
adding extra floats to ws, modify genP4
vtavolar Sep 30, 2016
99acb68
state of the art of differential
vtavolar Sep 30, 2016
12b716a
couts of diphoton candidate gen vars
vtavolar Nov 14, 2016
bb7a537
attach composite objects to the tags (jet systs)
vtavolar Jan 30, 2017
ed413e9
CompsiteCandidate added to class revision
vtavolar Jan 30, 2017
d1e66f6
variable binning for global vars
vtavolar Jan 30, 2017
a9c2eec
scripts and jsons for differential ws production
vtavolar Jan 30, 2017
0a37402
rebase fiducial config
vtavolar Jan 30, 2017
c262cd2
add old xsec for ggh
vtavolar Feb 21, 2017
980fa6d
tune scripts for ws submission, delete obsolete one
vtavolar Feb 21, 2017
6f8d049
remove phoID cut and dump the variable instead, re-tuning of sigmaMde…
vtavolar Feb 21, 2017
b01cf12
remove all those couts
vtavolar Feb 21, 2017
abf3078
add phoID mva to differentials gen trees
vtavolar Mar 3, 2017
bf2f0cf
add loose jet is
vtavolar Mar 3, 2017
d942b8c
fix typo in jet id
vtavolar Mar 3, 2017
26bf2eb
final sigmaM/M boundaries Moriond17
vtavolar Mar 11, 2017
be5e4d6
update ws scripts
vtavolar Mar 11, 2017
b6907f5
fid XSs: dump number of constituents of each jet
vtavolar Mar 11, 2017
1ed9642
possibility to truncate relative shift sigmaE
vtavolar Mar 15, 2017
d5585ea
add inclusive jets collection
vtavolar Mar 15, 2017
1c274a4
update ws submission scripts
vtavolar Mar 15, 2017
4bdfe90
temp commit
musella Mar 17, 2017
6f3ce13
uncomment submission lines
vtavolar Mar 15, 2017
42851ee
differentials:
musella Apr 3, 2017
d459125
added model-depencence catalog with SUSY signals
musella Apr 25, 2017
4dba8bd
switch off systematics at MH!=125 in differentials
musella Apr 25, 2017
e57c061
Fixed IA/OA filtering logic in differentials
musella Apr 25, 2017
e41743b
adding method for pujetid to jet
vtavolar Jul 24, 2017
bafa210
print stage dest
vtavolar Jul 24, 2017
ae5bc3a
add pujetid to differentials
vtavolar Jul 24, 2017
8d6dc49
update differential submission scripts
vtavolar Jul 24, 2017
13a4739
remove un-needed producers from tagseq differential
vtavolar Jul 24, 2017
325a55a
acceptance script
vtavolar Jul 24, 2017
d136baf
fix cherrypick conflict
vtavolar Jul 27, 2017
f3bc947
new selector for jet puid
vtavolar Jul 27, 2017
8637765
use new implementation of pujetid
vtavolar Sep 11, 2017
e939544
update job sub script
vtavolar Sep 11, 2017
ff1bb26
classes, tools and producer to have gen leptons with dressing in micr…
vtavolar Sep 5, 2017
7ad5325
add genlepton classes to class control
vtavolar Sep 5, 2017
0bb1ac0
GenLeptonExtra inherits from ShallowCloneCandidate
vtavolar Sep 11, 2017
f11d102
add genleptons to differentials customization
vtavolar Sep 11, 2017
257c29f
class version control update
vtavolar Sep 14, 2017
9b501f3
add hasBottom info to genJets
vtavolar Sep 14, 2017
e2419ab
get utils
vtavolar Sep 14, 2017
5b0371f
temp changes to microAOD py
vtavolar Sep 14, 2017
8f0563f
fix conflict
vtavolar Sep 14, 2017
4e9a37a
use genjet instead of pointer
vtavolar Sep 14, 2017
cd27b5c
no extra member for dressedP4 in LeptonExtra
vtavolar Sep 29, 2017
f954396
fix indentation
vtavolar Sep 29, 2017
f7a088f
update with master
vtavolar Sep 29, 2017
be91d8f
add Bjet and Met collections and variables to differential trees conf…
vtavolar Sep 29, 2017
0a78484
apply MET filters in standalone selector, with MET utils
vtavolar Sep 29, 2017
8ede767
muon selection in standalone selector
vtavolar Oct 2, 2017
2658e26
add reco muons to final trees
vtavolar Oct 2, 2017
e436dc8
add second bool hasBquark to GenJetExtra
vtavolar Sep 19, 2017
fe2ba6e
keep also b quarks in prunedGenParticles
vtavolar Sep 19, 2017
3f83811
gen b-jet selection
vtavolar Oct 4, 2017
9d67baa
dump NNLOPS weight
vtavolar Jan 10, 2018
59f86a3
electrons
vtavolar Apr 24, 2018
494d6e0
muons
vtavolar Apr 24, 2018
9963330
add sigmaM and sigmaM_decorr to minimal vars for ws
vtavolar Apr 24, 2018
1961168
pick up different nnlops weights for amcatnlo and powheg
vtavolar Apr 24, 2018
005e59e
remove old code, inclusive jet selection with no cut at all
vtavolar Apr 24, 2018
472c381
latest config for data trees
vtavolar Apr 24, 2018
90f34fa
propagate to collection dumper nnlops weights customization for gener…
vtavolar Apr 24, 2018
316c98b
object selectors
vtavolar Apr 24, 2018
e9d5933
hadronic producers
vtavolar Apr 24, 2018
40fc673
script to compare overlap between jsons
vtavolar Apr 24, 2018
09e6069
script to add prefix to tree names
vtavolar Apr 24, 2018
82d6ba8
Polishing differential code merge, now running in 94X. Result rerpodu…
simonepigazzini Dec 14, 2018
84fb1c9
Fixed weight computation
threiten Jan 11, 2019
cc02a60
Version reproducing sigma_m/m categorization for 2016
threiten Feb 4, 2019
86a0b82
Fixed support to add Jet variables, doBJetsAndMET not working yet
threiten Feb 22, 2019
90b031b
Fixed support for doBJetsAndMET
threiten Feb 22, 2019
23a6ad7
Fixed genJets, now able to dump them
threiten Apr 12, 2019
029cbca
Updated for data processing, using 16JECs
threiten Apr 29, 2019
9a9d527
CMSSW_9_4_9 working version 110919
threiten Sep 11, 2019
6147367
Merged topic_mergeDifferentials into dev_legacy_runII
threiten Sep 11, 2019
ee0f589
Changes to make differentials specific modules work in CMSSW_10_5
threiten Sep 13, 2019
2febddb
Allign TTHLeptonicTag.h to current status
threiten Sep 13, 2019
0c2e66d
Added symlinks for Taggers and systematics data dir to git tree
threiten Sep 13, 2019
726f44a
Merge branch 'dev_legacy_runII' into dev_differentials_runII
threiten Sep 13, 2019
9bf8855
Merging changes from Nadya
threiten Oct 10, 2019
b6a9f54
Fixed conflict
threiten Oct 10, 2019
a8ace5d
Merging dev_legacy_runII
threiten Oct 11, 2019
b4de6a6
Added seperate config file for fiducial cross-section measurement
threiten Oct 14, 2019
3deb933
Modified patchfile to improve speed during loading of scales and smea…
threiten Oct 18, 2019
0078f39
Merging dev_legacy_runII
threiten Oct 28, 2019
d463f05
Running version with new tagSequence and with jets, bjets and leptons
threiten Oct 28, 2019
4cd66c9
Fixed variables to be dumped
threiten Oct 31, 2019
2d90727
script to manually resubmit failed joba
Oct 28, 2019
5ab2203
full version of resubmission script
Oct 28, 2019
3663989
fixing the case with one runJobs only
Oct 29, 2019
af72edf
fully working code for manual jobs resubmission
Oct 29, 2019
a95a194
Updated version of resubmit_files.py
threiten Nov 6, 2019
7e98f39
Added options nCondorCpu to fggRunJobs, will be written into htcondor
threiten Nov 26, 2019
2f0d1cd
Few changes in workflow to run backgorund
threiten Nov 26, 2019
ac52440
Added scripts to split trees into workspaces
threiten Nov 26, 2019
7ffbdc2
Adding bash scripts to run
threiten Nov 26, 2019
9a24aa8
Added path to sigmaMoM decorrelation file for each year to MetaCondit…
threiten Dec 2, 2019
9cf099e
Merged commit to add option to copy microAOD files to worker node
simonepigazzini Dec 8, 2019
bcae7d2
Added option to copy files to worker node while running. Fixed
threiten Dec 9, 2019
5de8f4f
Merge remote-tracking branch 'upstream/dev_legacy_runII' into dev_dif…
threiten Dec 9, 2019
254a30c
Added option --make-light-tarball to use symbolic links for data folder
threiten Dec 13, 2019
5d2b334
Change order of types while dumping extra floats
threiten Dec 13, 2019
9f43f14
Changes in run scripts
threiten Dec 13, 2019
e50a668
Added function for HLT filtering to SystematicsCustomize, changed
threiten Dec 16, 2019
38c5db1
Changes in fiducialStd to improve cut string and implement new trigge…
threiten Dec 16, 2019
1b7299f
New options in runData
threiten Dec 16, 2019
c90c0d2
Misc changes
threiten Mar 30, 2020
53756b6
Added Categorization class
threiten Mar 30, 2020
0ceb2e0
Added Basic input filter to get rid of negative R9 values
threiten Apr 6, 2020
470ca8a
Changes in splitTree.py
threiten May 12, 2020
23aad43
Merge remote-tracking branch 'upstream/dev_legacy_runII' into dev_dif…
threiten May 12, 2020
e3f19c2
Removed basic input filter
threiten May 12, 2020
0192b68
Cleanup after merge
threiten May 12, 2020
8fa9997
Chaged fiducialStd.py to reflect changes in negative R9 filter
threiten May 12, 2020
5380a69
Further cleanup
threiten May 12, 2020
0ba1600
Even more cleanup
threiten May 12, 2020
76528a1
(Re)moving stuff
threiten May 12, 2020
d11a230
Changes to run fiducial analysis in 10_6 + new NNLOPS application
threiten May 13, 2020
ed5cf56
Merge branch 'dev_legacy_runII' into dev_differentials_runII
simonepigazzini May 18, 2020
3bc1563
Moving stuff around
threiten May 18, 2020
8ead50c
Deleted obsolete Categorizer script
threiten May 18, 2020
29de7af
Merge branch 'dev_differentials_runII' of github.com:threiten/flashgg…
threiten May 18, 2020
248cc9a
Folder for running differentials
threiten May 18, 2020
5fe4116
Removing stuff
threiten May 18, 2020
c6d51f6
Adjusted run scripts
threiten May 18, 2020
9ae28d3
Cleaned workspaceStd.py
threiten May 19, 2020
fa02e48
Updated Jet object to reflect up to date recommendations for pileUpJe…
threiten May 19, 2020
dda75ac
Updated classes_def to reflect changes in flashgg::Jet
threiten May 19, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion DataFormats/BuildFile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<use name="DataFormats/VertexReco"/>
<use name="DataFormats/Common"/>
<use name="DataFormats/JetReco"/>
<use name="rootrflx"/>

<export>
<lib name="1"/>
Expand Down
2 changes: 2 additions & 0 deletions DataFormats/interface/GenDiPhoton.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ namespace flashgg {

virtual GenDiPhoton *clone() const { return ( new GenDiPhoton( *this ) ); }


const flashgg::GenPhotonExtra::cand_type* leadingPhoton() const { return &(leadingPhoton_.cand()); };
const flashgg::GenPhotonExtra::cand_type* subLeadingPhoton() const { return &(subLeadingPhoton_.cand()); }


const reco::GenJet & leadingJet() const { return *leadingJet_; };
const reco::GenJet & subLeadingJet() const { return *subLeadingJet_; }
Expand Down
50 changes: 50 additions & 0 deletions DataFormats/interface/GenJetExtra.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#ifndef FLASHgg_GenJetExtra_h
#define FLASHgg_GenJetExtra_h

//#include "flashgg/DataFormats/interface/Jet.h"
#include "DataFormats/PatCandidates/interface/PackedGenParticle.h"
#include "DataFormats/JetReco/interface/GenJet.h"
#include "DataFormats/HepMCCandidate/interface/GenParticle.h"
#include "DataFormats/Common/interface/Ptr.h"

#include <string>

namespace flashgg {

class GenJetExtra : public reco::GenJet
{

public:
GenJetExtra(){}
GenJetExtra(const reco::GenJet &j) : reco::GenJet(j) {}

bool hasBottom() const {return hasBottom_;}
void setHasBottom( bool x ){hasBottom_ = x;}

bool hasBquark() const {return hasBquark_;}
void setHasBquark( bool x ){hasBquark_ = x;}

bool deltaRBquarkGenJet() const {return deltaRBquarkGenjet_;}
void setDeltaRBquarkGenjet( double x ){deltaRBquarkGenjet_ = x;}

bool jetPtOverBquarkPt() const {return jetPtOverBquarkPt_;}
void setJetPtOverBquarkPt( double x ){jetPtOverBquarkPt_ = x;}


private:
bool hasBottom_;
bool hasBquark_;
double deltaRBquarkGenjet_;
double jetPtOverBquarkPt_;
};
}

#endif
// Local Variables:
// mode:c++
// indent-tabs-mode:nil
// tab-width:4
// c-basic-offset:4
// End:
// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4

64 changes: 64 additions & 0 deletions DataFormats/interface/GenLeptonExtra.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
#ifndef FLASHgg_GenLeptonExtra_h
#define FLASHgg_GenLeptonExtra_h

//#include "flashgg/DataFormats/interface/Lepton.h"
#include "DataFormats/PatCandidates/interface/PackedGenParticle.h"
#include "DataFormats/Candidate/interface/ShallowCloneCandidate.h"
#include "DataFormats/Common/interface/Ptr.h"

#include <string>

namespace flashgg {

class GenLeptonExtra : public reco::ShallowCloneCandidate
{

public:
typedef edm::Ptr<pat::PackedGenParticle> ptr_type;
typedef ptr_type::value_type cand_type;
// typedef Lepton::mcMatch_t match_type; //FIXME

GenLeptonExtra() {}
GenLeptonExtra( ptr_type ptr ) : ptr_( ptr ) {}


bool operator==( const ptr_type &rhs ) const { return ptr_ == rhs; }
bool operator!=( const ptr_type &rhs ) const { return ptr_ != rhs; }

const cand_type &cand() const { return *ptr_; }
ptr_type ptr() const { return ptr_; }
void setPtr( ptr_type x ) { ptr_ = x; }

float genIso() const { return genIso_; }
void setGenIso( float x ) { genIso_ = x; }

float genIsoAfterDressing() const { return genIsoAfterDressing_; }
void setGenIsoAfterDressing( float x ) { genIsoAfterDressing_ = x; }

// reco::Particle::LorentzVector dressedP4() const { return dressedP4_; }
// void setDressedP4( reco::Particle::LorentzVector x ) { dressedP4_ = x; }
// void setP4( reco::Particle::LorentzVector x ) { p4_ = x; }

// void copyTo( flashgg::Lepton &fg, const std::string &postFix = "" ) const
// {
// fg.addUserFloat( "genIso" + postFix, genIso_ );
// }

private:
ptr_type ptr_;
float genIso_;
float genIsoAfterDressing_;
// reco::Particle::LorentzVector dressedP4_;
// reco::Particle::LorentzVector p4_;
};
}

#endif
// Local Variables:
// mode:c++
// indent-tabs-mode:nil
// tab-width:4
// c-basic-offset:4
// End:
// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4

9 changes: 9 additions & 0 deletions DataFormats/interface/Jet.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ namespace flashgg {
};

enum JetIDLevel {Loose=0, Tight=1, Tight2017=2, Tight2018=3};
enum JetPuIdLevel {none=0, loose=1, medium=2, tight=3, mixed=4, forward_loose=5, forward_medium=6, forward_tight=7};

class Jet : public pat::Jet, public WeightedObject
{
Expand All @@ -27,12 +28,15 @@ namespace flashgg {
void setPuJetId( const edm::Ptr<reco::Vertex> vtx, const PileupJetIdentifier & );
bool hasPuJetId( const edm::Ptr<reco::Vertex> vtx ) const;
bool passesPuJetId( const edm::Ptr<reco::Vertex> vtx, PileupJetIdentifier::Id level = PileupJetIdentifier::kLoose ) const;
bool passesJetPuId( JetPuIdLevel level = none ) const;
void setSimpleRMS( float theRMS ) { simpleRMS_ = theRMS; }
void setSimpleMVA( float theMVA ) { simpleMVA_ = theMVA; }
float rms() const { return simpleRMS_; }
float rms( const edm::Ptr<reco::Vertex> vtx ) const;
float betaStar( const edm::Ptr<reco::Vertex> vtx ) const;
bool passesPuJetId( const edm::Ptr<DiPhotonCandidate> dipho, PileupJetIdentifier::Id level = PileupJetIdentifier::kLoose )const;


float rms( const edm::Ptr<DiPhotonCandidate> dipho ) const;
float betaStar( const edm::Ptr<DiPhotonCandidate> dipho ) const;
float puJetIdMVA() const { return simpleMVA_; }
Expand All @@ -55,12 +59,17 @@ namespace flashgg {
void setNeEnergies(std::vector<float> val) { neEnergies_ = val; }
void setMuEnergies(std::vector<float> val) { muEnergies_ = val; }

std::vector<double> _pujid_wp_pt_bin_1;
std::vector<double> _pujid_wp_pt_bin_2;
std::vector<double> _pujid_wp_pt_bin_3;

private:
std::map<edm::Ptr<reco::Vertex>, MinimalPileupJetIdentifier> puJetId_;
float qglikelihood_;
float simpleRMS_; // simpler storage for PFCHS where this is not vertex-dependent
float simpleMVA_;
std::vector<float> chEnergies_, emEnergies_, neEnergies_, muEnergies_;
std::vector<std::pair<double,double> > eta_cuts_;
};
}

Expand Down
2 changes: 1 addition & 1 deletion DataFormats/interface/Photon.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ namespace flashgg {
void updateEnergy( std::string key, float val );
void shiftAllMvaValuesBy( float val );
void shiftMvaValueBy( float val, edm::Ptr<reco::Vertex> vtx );
void shiftSigmaEOverEValueBy( float val );
void shiftSigmaEOverEValueBy( float val, float cutoff=0. );
void smearSigmaEOverEValueBy( float val );
// void setSigEOverE(float val) { sigEOverE_ = val; };

Expand Down
8 changes: 7 additions & 1 deletion DataFormats/interface/SigmaMpTTag.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#define flashgg_SigmaMpTTag

#include "flashgg/DataFormats/interface/DiPhotonTagBase.h"
#include "DataFormats/Candidate/interface/CompositeCandidate.h"

namespace flashgg {

Expand All @@ -13,11 +14,16 @@ namespace flashgg {

SigmaMpTTag( edm::Ptr<DiPhotonCandidate>, DiPhotonMVAResult );
SigmaMpTTag( edm::Ptr<DiPhotonCandidate>, edm::Ptr<DiPhotonMVAResult> );

SigmaMpTTag( edm::Ptr<DiPhotonCandidate>, DiPhotonMVAResult, std::map<std::string, edm::Ptr<reco::CompositeCandidate> > );
SigmaMpTTag( edm::Ptr<DiPhotonCandidate>, edm::Ptr<DiPhotonMVAResult>, std::map<std::string, edm::Ptr<reco::CompositeCandidate> > );
const edm::Ptr<reco::CompositeCandidate > getCompCand(const std::string &name) const;

virtual SigmaMpTTag *clone() const override;
DiPhotonTagBase::tag_t tagEnum() const override {return DiPhotonTagBase::kUntagged; }

private:

std::map<std::string, edm::Ptr<reco::CompositeCandidate > > compObjMap_;


};
Expand Down
13 changes: 6 additions & 7 deletions DataFormats/interface/TTHLeptonicTag.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,16 @@ namespace flashgg {
int subleadMomMomID() const { return sublead_motherMotherID_; }
int subleadPassFrix() const { return sublead_passFrix_; }
double subleadSmallestDr() const { return sublead_smallestDr_; }

void setJets( std::vector<edm::Ptr<Jet> > Jets ) { Jets_ = Jets; }
void setBJets( std::vector<edm::Ptr<Jet> > BJets ) { BJets_ = BJets;}
void setMuons( std::vector<edm::Ptr<Muon> > Muons ) {Muons_ = Muons;}
void setElectrons( std::vector<edm::Ptr<Electron> > Electrons ) {Electrons_ = Electrons;}
void setLepPt( std::vector<double> lepPt) { lepPt_ = lepPt; }
void setLepE( std::vector<double> lepE) { lepE_ = lepE; }
void setLepEta( std::vector<double> lepEta) { lepEta_ = lepEta; }
void setLepPhi( std::vector<double> lepPhi) { lepPhi_ = lepPhi; }
void setLepType( std::vector<int> lepType) { lepType_ = lepType; }
void setLepPt( std::vector<double> lepPt ) { lepPt_ = lepPt; }
void setLepE( std::vector<double> lepE ) { lepE_ = lepE; }
void setLepEta( std::vector<double> lepEta ) { lepEta_ = lepEta; }
void setLepPhi( std::vector<double> lepPhi ) { lepPhi_ = lepPhi; }
void setLepType( std::vector<int> lepType ) { lepType_ = lepType; }

void setLeadPrompt(int leadPrompt) { leadPrompt_ = leadPrompt; }
void setSubleadPrompt(int subleadPrompt) { subleadPrompt_ = subleadPrompt; }
Expand Down Expand Up @@ -113,7 +113,6 @@ namespace flashgg {
int sublead_motherMotherID_;
int sublead_passFrix_;
double sublead_smallestDr_;

float mvaRes_;
};
}
Expand Down
117 changes: 117 additions & 0 deletions DataFormats/src/Jet.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ Jet::Jet() : pat::Jet()
qglikelihood_ = -999.;
simpleMVA_ = -999.;
puJetId_.clear();
eta_cuts_.push_back( std::make_pair (0 ,2.50 ) );
eta_cuts_.push_back( std::make_pair (2.50 ,2.75 ) );
eta_cuts_.push_back( std::make_pair (2.75 ,3.00 ) );
eta_cuts_.push_back( std::make_pair (3.00 ,10) );
}

Jet::Jet( const pat::Jet &aJet ) : pat::Jet( aJet )
Expand Down Expand Up @@ -38,6 +42,8 @@ bool Jet::passesPuJetId( const edm::Ptr<reco::Vertex> vtx, PileupJetIdentifier::
return true;
}



float Jet::rms( const edm::Ptr<reco::Vertex> vtx ) const
{
assert( hasPuJetId( vtx ) );
Expand Down Expand Up @@ -67,6 +73,117 @@ float Jet::betaStar( const edm::Ptr<DiPhotonCandidate> dipho ) const
return betaStar( dipho->vtx() );
}


bool Jet::passesJetPuId( JetPuIdLevel level ) const
simonepigazzini marked this conversation as resolved.
Show resolved Hide resolved
{
// std::vector<double> _pujid_wp_pt_bin_1;
// std::vector<double> _pujid_wp_pt_bin_2;
// std::vector<double> _pujid_wp_pt_bin_3;
//
// if(mva_wp.size() == 3){
// std::vector<double> _pujid_wp_pt_bin_1 = mva_wp[0];
// std::vector<double> _pujid_wp_pt_bin_2 = mva_wp[1];
// std::vector<double> _pujid_wp_pt_bin_3 = mva_wp[2];
// }
// else{
// std::cout << "Error:: wrong size of cuts for mva jet ID !! expected 3 pt bins" << std::endl;
// return false;
// }
flashgg::Jet* ptr = const_cast<flashgg::Jet*> (this);

switch(level){
case none:
{
ptr->_pujid_wp_pt_bin_1 = {-1,-1,-1,-1};
ptr->_pujid_wp_pt_bin_2 = {-1,-1,-1,-1};
ptr->_pujid_wp_pt_bin_3 = {-1,-1,-1,-1};
}break;
case loose:
{
ptr->_pujid_wp_pt_bin_1 = {-0.96, -0.64, -0.56, -0.54};
ptr->_pujid_wp_pt_bin_2 = {-0.92, -0.56, -0.44, -0.39};
ptr->_pujid_wp_pt_bin_3 = {-0.77, -0.31, -0.20, -0.03};
}break;

case medium:
{
ptr->_pujid_wp_pt_bin_1 = {-0.49, -0.53, -0.44, -0.42};
ptr->_pujid_wp_pt_bin_2 = {-0.06, -0.42, -0.30, -0.23};
ptr->_pujid_wp_pt_bin_3 = { 0.56, -0.10, 0.01, 0.13};
}break;
case tight:
{
ptr->_pujid_wp_pt_bin_1 = {0.26, -0.34, -0.24, -0.26};
ptr->_pujid_wp_pt_bin_2 = {0.62, -0.21, -0.07, -0.03};
ptr->_pujid_wp_pt_bin_3 = {0.87, 0.17 , 0.25 , 0.33};
}break;
case mixed:
{
ptr->_pujid_wp_pt_bin_1 = {-0.96, -0.34, -0.24, -0.26};
ptr->_pujid_wp_pt_bin_2 = {-0.92, -0.21, -0.07, -0.03};
ptr->_pujid_wp_pt_bin_3 = {-0.77, 0.17 , 0.25 , 0.33};
}break;
case forward_loose:
{
ptr->_pujid_wp_pt_bin_1 = {-1, -0.64, -0.56, -0.54};
ptr->_pujid_wp_pt_bin_2 = {-1, -0.56, -0.44, -0.39};
ptr->_pujid_wp_pt_bin_3 = {-1, -0.31, -0.20, -0.03};
}break;
case forward_medium:
{
ptr->_pujid_wp_pt_bin_1 = {-1, -0.53, -0.44, -0.42};
ptr->_pujid_wp_pt_bin_2 = {-1, -0.42, -0.30, -0.23};
ptr->_pujid_wp_pt_bin_3 = {-1, -0.10, 0.01, 0.13};
}break;
case forward_tight:
{
ptr->_pujid_wp_pt_bin_1 = {-1, -0.34, -0.24, -0.26};
ptr->_pujid_wp_pt_bin_2 = {-1, -0.21, -0.07, -0.03};
ptr->_pujid_wp_pt_bin_3 = {-1, 0.17 , 0.25 , 0.33};
}break;
default:
{
std::cout << "error:: wrong level !!" << std::endl;
}
break;
}


bool pass=false;
if ( (!_pujid_wp_pt_bin_1.empty()) &&
(!_pujid_wp_pt_bin_2.empty()) &&
(!_pujid_wp_pt_bin_3.empty()) ){
//std::cout << "VBFTagMVA::DEBUG making the pujid --> "<< _pujid_wp_pt_bin_1.size() << std::endl;
for (UInt_t eta_bin=0; eta_bin < _pujid_wp_pt_bin_1.size(); eta_bin++ ){
// std::cout << inputTagJets_[0]
// << " eta-bin["<< eta_bin<< "] == " << eta_cuts_[eta_bin].first << " :: "
// << eta_cuts_[eta_bin].second
// << " pt1: " << _pujid_wp_pt_bin_1[eta_bin]
// << " pt2: " << _pujid_wp_pt_bin_2[eta_bin]
// << " pt3: " << _pujid_wp_pt_bin_3[eta_bin]
// << std::endl;
if ( fabs( this->eta() ) > eta_cuts_[eta_bin].first &&
fabs( this->eta() ) <= eta_cuts_[eta_bin].second){
if ( this->pt() > 20 &&
this->pt() <= 30 && this->puJetIdMVA() > _pujid_wp_pt_bin_1[eta_bin] )
pass=true;
if ( this->pt() > 30 &&
this->pt() <= 50 && this->puJetIdMVA() > _pujid_wp_pt_bin_2[eta_bin] )
pass=true;
if ( this->pt() > 50 &&
this->pt() <= 100&& this->puJetIdMVA() > _pujid_wp_pt_bin_3[eta_bin] )
pass=true;
if (this->pt() > 100) pass = true;
}
}
// std::cout << inputTagJets_[0] << " pt="<< this->pt() << " :eta: "<< this->eta() << " :mva: "<< this->puJetIdMVA() << " pass == " << pass << std::endl;
}


return pass;

}

bool Jet::passesJetID( JetIDLevel level) const
{
float eta = this->eta();
Expand Down
4 changes: 2 additions & 2 deletions DataFormats/src/Photon.cc
Original file line number Diff line number Diff line change
Expand Up @@ -282,10 +282,10 @@ void Photon::shiftMvaValueBy( float val, edm::Ptr<reco::Vertex> vtx ) {
}

//sigmaEOverE systematycs
void Photon::shiftSigmaEOverEValueBy( float val ) {
void Photon::shiftSigmaEOverEValueBy( float val, float cutoff ) {
const LorentzVector pho_p4 = p4(getCandidateP4type());
float energyError = getCorrectedEnergyError(getCandidateP4type());
setP4(getCandidateP4type(), pho_p4, energyError*(1.+val), false);
setP4(getCandidateP4type(), pho_p4, energyError + val*(std::max(energyError, cutoff)), false);
}


Expand Down
Loading