/onelepton/scripts/onelepton_dataRA4_sync_settings.py

https://github.com/brynmathias/AnalysisV2 · Python · 137 lines · 99 code · 14 blank · 24 comment · 0 complexity · 13ec0894d353c6354cad34fdf9f80c42 MD5 · raw file

  1. # this files overloads most of ../../framework/python/icf/config.py, if interested in a specific setting not found below please look the included file
  2. ## Calo and PF jet exchange is NOT just a matter of changing the Jet collection. CALO and PF treat muons in jets differntly, you have to look at the x-cleaning parameters. Also the residual corrections (if applied) do have to be changed !!!
  3. import setupSUSY
  4. from libFrameworkSUSY import *
  5. from copy import deepcopy
  6. from icf.core import PSet,Analysis
  7. from icf.config import defaultConfig
  8. import icf.utils as utils
  9. conf=defaultConfig.copy()
  10. conf.Common.Jets.PtCut = 40.0
  11. conf.Common.Jets.EtaCut = 2.4
  12. conf.Common.Jets.TightID=False ## DOES NOT MEAN ID is NOT applied
  13. conf.Common.Jets.ApplyID=False ## DOES NOT MEAN ID is NOT applied
  14. # muons
  15. conf.Common.Muons.EtaCut = 2.1
  16. conf.Common.Muons.PtCut = 20.0
  17. conf.Common.Muons.TrkIsoCut=999999.
  18. ## conf.Common.Muons.CombIsoCut=0.1 ##GETS OVERWRITTEN ANYHOW
  19. conf.Common.Muons.TightID=False
  20. conf.Common.Muons.ApplyID=False
  21. # electrons
  22. conf.Common.Electrons.PtCut = 20.0 #it was 15 put it so again
  23. conf.Common.Electrons.EtaCut = 2.5
  24. conf.Common.Electrons.TrkIsoCut=5.
  25. conf.Common.Electrons.CombIsoCut=0.15
  26. conf.Common.Electrons.TightID=False
  27. conf.Common.Electrons.ApplyID=False
  28. # photons
  29. conf.Common.Photons.EtCut = 25.0
  30. conf.Common.Photons.EtaCut = 2.5
  31. conf.Common.Photons.TrkIsoRel=0.
  32. conf.Common.Photons.TrkIsoCut=99999.
  33. conf.Common.Photons.EcalIsoRel=0.
  34. conf.Common.Photons.EcalIsoCut=99999.
  35. conf.Common.Photons.HcalIsoRel=0.
  36. conf.Common.Photons.HcalIsoCut=99999.
  37. conf.Common.Photons.HadOverEmCut=0.5
  38. conf.Common.Photons.SigmaIetaIetaCut=0.5
  39. #conf.Common.Photons.CaloIsoCut=0.2
  40. conf.Common.Photons.IDReq=2
  41. conf.Common.ApplyXCleaning=False
  42. # If you use calo jets be aware that muons in jets ARE not added to the jet. For PFjets they are already in the jets, to steer the xcleaning, do default_cc = deepcopy(defaultConfig.XCleaning) and overload stuff
  43. conf.Ntuple.Weight="User"
  44. conf.Ntuple.Electrons.Prefix="electron"
  45. conf.Ntuple.Electrons.Suffix="Pat"
  46. conf.Ntuple.Electrons.LooseID="EIDLoose"
  47. conf.Ntuple.Electrons.TightID="EIDTight"
  48. conf.Ntuple.Muons.Prefix="muon"
  49. conf.Ntuple.Muons.Suffix="Pat"
  50. conf.Ntuple.Muons.LooseID="IsGlobalMuon"
  51. conf.Ntuple.Muons.TightID="IDGlobalMuonPromptTight"
  52. conf.Ntuple.Jets.Prefix="ak5JetPF"
  53. # if you switch to CaloJets, check that care about how muons are added to jets. Read also comment at top of page
  54. conf.Ntuple.Jets.Suffix="Pat"
  55. conf.Ntuple.Jets.Uncorrected=False
  56. conf.Ntuple.Jets.UseGenJets=False
  57. conf.Ntuple.SecMuons.Prefix="muon"
  58. conf.Ntuple.SecMuons.Suffix="PF"
  59. conf.Ntuple.TerJets.Prefix="ak5JetPF2PAT"
  60. conf.Ntuple.TerJets.Suffix="Pat"
  61. # note that these corrections are presumably outdated once you read this!!!
  62. ##from icf.JetCorrections import *
  63. ###corPset = CorrectionPset("ResidualJetEnergyCorrections.txt") # Calo Jets (pre CMSSW_4_1_X)
  64. ###corPset = CorrectionPset("Spring10DataV2_L2L3Residual_AK5PF.txt") # PF Jets (pre CMSSW_4_1_X)
  65. ## lepton definitions ######
  66. ## Muon definition
  67. Mus = PSet(
  68. MuID = "Tight",
  69. MinPt = 20.,
  70. MaxEta = 2.1,
  71. MaxIsolation = 0.1,
  72. DRMuJet = 0.3,
  73. MaxGlbTrkDxy = 0.02,
  74. MinGlbTrkNumOfValidHits = 11,
  75. SegMatch2GlbMu = 1,
  76. PixelHitsOnInrTrk = 1,
  77. MaxInrTrkDz = 1.
  78. )
  79. ## Electron definition
  80. import wpol.electron_id as eid
  81. id_sig = eid.eff_80
  82. Els_Sig = PSet(
  83. Cuts = id_sig,
  84. Isolation = 1,
  85. HoverE = 1,
  86. DeltaEtaAtVtx = 1,
  87. DeltaPhiAtVtx = 1,
  88. SigmaIEtaIEta = 1,
  89. Conversions = 1,
  90. ConversionsExtra = 1,
  91. SupressErrors = True
  92. )
  93. # Anti-selection electron ID
  94. # The convention below is
  95. # 1 -> apply criterion
  96. # 0 -> invert criterion
  97. # -1 -> ignore criterion
  98. Els_QCD = PSet(
  99. Cuts = id_sig,
  100. # Apply Isolation and HoE cuts
  101. Isolation = 1,
  102. HoverE = 1,
  103. # Invert DeltaEta/DeltaPhi
  104. DeltaEtaAtVtx = 0,
  105. DeltaPhiAtVtx = 0,
  106. # Ignore the rest
  107. SigmaIEtaIEta = -1,
  108. Conversions = -1,
  109. ConversionsExtra = -1,
  110. SupressErrors = True
  111. )
  112. id_veto = eid.eff_95
  113. Els_Veto = PSet(
  114. Cuts = id_veto,
  115. Isolation = True,
  116. HoverE = True,
  117. DeltaEtaAtVtx = True,
  118. DeltaPhiAtVtx = True,
  119. SigmaIEtaIEta = True,
  120. Conversions = True,
  121. ConversionsExtra = True,
  122. SupressErrors = True
  123. )