Exemple #1
0
jtm.modifiersMap["mycalib"] = jtm.modifiersMap["calib"] + [jtm.pull]
if jtm.haveShowerDeconstructionTool:
  jtm.modifiersMap["mycalib"] += [jtm.showerdec]

# Finders.
# Calibration for topo jets: calibOpt =
#   a - area corrn
#   r - residual pileup corrn
#   j - GES
#   g - GSC
#   i - Insitu
gatopo  = 0.01
gatruth = 0.00
gatrack = 0.00
if jetFlags.useTruth:
  jtm.addJetFinder("Run2AntiKt4TruthJets",    "AntiKt", 0.4,    "truth", ghostArea=gatruth, ptmin= 5000)
  jtm.addJetFinder("Run2AntiKt4TruthWZJets",  "AntiKt", 0.4,  "truthwz", ghostArea=gatruth, ptmin= 5000)
  jtm.addJetFinder("Run2AntiKt10TruthJets",   "AntiKt", 0.4,    "truth", ghostArea=gatruth, ptmin=40000)
  jtm.addJetFinder("Run2AntiKt10TruthWZJets", "AntiKt", 1.0,    "truth", ghostArea=gatruth, ptmin=40000)
  jtm.addJetFinder("Run2CamKt12TruthJets",     "CamKt", 1.2,    "truth", ghostArea=gatruth, ptmin=40000)
  jtm.addJetFinder("Run2CamKt12TruthWZJets",   "CamKt", 1.2,    "truth", ghostArea=gatruth, ptmin=40000)
if jetFlags.useTracks:
  jtm.addJetFinder("Run2AntiKt2PV0TrackJets", "AntiKt", 0.2, "pv0track", ghostArea=gatrack, ptmin= 2000)
  jtm.addJetFinder("Run2AntiKt3PV0TrackJets", "AntiKt", 0.3, "pv0track", ghostArea=gatrack, ptmin= 2000)
  jtm.addJetFinder("Run2AntiKt4TrackJets",    "AntiKt", 0.4,    "track", ghostArea=gatrack, ptmin= 2000)
  jtm.addJetFinder("Run2AntiKt4ZTrackJets",   "AntiKt", 0.4,   "ztrack", ghostArea=gatrack, ptmin= 2000)
  jtm.addJetFinder("Run2AntiKt4PV0TrackJets", "AntiKt", 0.4, "pv0track", ghostArea=gatrack, ptmin= 2000)
jtm.addJetFinder(  "Run2AntiKt4EMTopoJets",   "AntiKt", 0.4,   "emtopo", "mycalib", ptmin=2000, ptminFilter= 7000, ghostArea=gatopo, calibOpt="aroj")
jtm.addJetFinder(  "Run2AntiKt4LCTopoJets",   "AntiKt", 0.4,   "lctopo", "mycalib", ptmin=2000, ptminFilter= 7000, ghostArea=gatopo, calibOpt="aro")
jtm.addJetFinder(  "Run2AntiKt10LCTopoJets",  "AntiKt", 1.0,   "lctopo", "mycalib", ptmin=2000, ptminFilter=50000, ghostArea=gatopo, calibOpt="a")
jtm.addJetFinder(  "Run2CamKt12LCTopoJets",    "CamKt", 1.2,   "lctopo", "mycalib", ptmin=2000, ptminFilter=50000, ghostArea=gatopo, calibOpt="a")
Exemple #2
0
# Add tools to find or groom jets.
# Each call to addJetFinder adds one JetRecTool so that one jet
# container will be added to the event.
# The first argument is the name of that container.
# The next two are the jet algorithm (Kt, AntiKt, CamKt) and
# size parameter.
# The next two are the names of the input and modifier lists.
# The following optional, named arguments may also be provided:
#   ghostArea: Size in eta-phi for area ghosts
#   ptmin: pT threshold in MeV applied in jet finding
#   ptminFilter: pT threshold applied by the jet modifier "jetfilter"
if findJets:
    jtm.addJetFinder("MyAntiKt4TruthJets",
                     "AntiKt",
                     0.4,
                     "truth",
                     "truth",
                     ghostArea=0.01,
                     ptmin=2000,
                     ptminFilter=3000)
if doEMPFlowJets and findJets:
    jtm.addJetFinder("MyAntiKt4EMPFlowJets",
                     "AntiKt",
                     0.4,
                     "empflow",
                     "pflow",
                     ghostArea=0.01,
                     ptmin=2000,
                     ptminFilter=7000,
                     calibOpt="a:pflow")
if doEMCPFlowJets and findJets:
    jtm.addJetFinder("MyAntiKt4EMCPFlowJets",
Exemple #3
0
#   ghostArea: Size in eta-phi for area ghosts
#   ptmin: pT threshold in MeV applied in jet finding
#   ptminFilter: pT threshold applied by the jet modifier "jetfilter"

groomexisting = False
debugpseudojets = False

# Find the parent jets.
# A more complex example would read this in from a file and restore
# their cluster sequences.
findcons = []
jtm.addJetFinder("MyAntiKt4LCTopoJets",
                 "AntiKt",
                 0.4,
                 "mygetters",
                 "mymods",
                 findcons,
                 ghostArea=0.01,
                 ptmin=2000,
                 ptminFilter=7000)

# Recluster the new ungroomed jets.
parent = "MyAntiKt4LCTopo"
algrads = ["AntiKt4", "AntiKt3", "CamKt6"]
for ar in algrads:
    jtm.addJetReclusterer(parent + ar + "Jets", name2alg(ar), name2rad(ar),
                          parent + "Jets", groommods)

#--------------------------------------------------------------
# Add jet reco to the algorithm sequence.
# The current configuration of the jet tool manager is used.
Exemple #4
0
  jtm.width
]

# Add tools to find or groom jets.
# Each call to addJetFinder adds one JetRecTool so that one jet
# container will be added to the event.
# The first argument is the name of that container.
# The next two are the jet algorithm (Kt, AntiKt, CamKt) and
# size parameter.
# The next two are the names of the input and modifier lists.
# The following optional, named arguments may also be provided:
#   ghostArea: Size in eta-phi for area ghosts
#   ptmin: pT threshold in MeV applied in jet finding
#   ptminFilter: pT threshold applied by the jet modifier "jetfilter"
jtm.addJetFinder("MyAntiKtVRLCTopoJets", "AntiKt", 0.4, "mygetters", "mymods",
                 ghostArea=0.01 , ptmin=2000, ptminFilter=7000,
                 variableRMinRadius=0.2, variableRMassScale=60000)

#--------------------------------------------------------------
# Add jet reco to the algorithm sequence.
# The current configuration of the jet tool manager is used.
#--------------------------------------------------------------
from JetRec.JetAlgorithm import addJetRecoToAlgSequence
addJetRecoToAlgSequence()

#--------------------------------------------------------------
# Add tool to dump the new jet container to the log.
#--------------------------------------------------------------
from JetRec.JetRecConf import JetDumper
from JetRec.JetAlgorithm import jetalg
Exemple #5
0
    jtm.modifiersMap["mycalib"] += [jtm.showerdec]

# Finders.
# Calibration for topo jets: calibOpt =
#   a - area corrn
#   r - residual pileup corrn
#   j - GES
#   g - GSC
#   i - Insitu
gatopo = 0.01
gatruth = 0.00
gatrack = 0.00
if jetFlags.useTruth:
    jtm.addJetFinder("Run2AntiKt4TruthJets",
                     "AntiKt",
                     0.4,
                     "truth",
                     ghostArea=gatruth,
                     ptmin=5000)
    jtm.addJetFinder("Run2AntiKt4TruthWZJets",
                     "AntiKt",
                     0.4,
                     "truthwz",
                     ghostArea=gatruth,
                     ptmin=5000)
    jtm.addJetFinder("Run2AntiKt10TruthJets",
                     "AntiKt",
                     0.4,
                     "truth",
                     ghostArea=gatruth,
                     ptmin=40000)
    jtm.addJetFinder("Run2AntiKt10TruthWZJets",
Exemple #6
0
# Add tools to find or groom jets.
# Each call to addJetFinder adds one JetRecTool so that one jet
# container will be added to the event.
# The first argument is the name of that container.
# The next two are the jet algorithm (Kt, AntiKt, CamKt) and
# size parameter.
# The next two are the names of the input and modifier lists.
# The following optional, named arguments may also be provided:
#   ghostArea: Size in eta-phi for area ghosts
#   ptmin: pT threshold in MeV applied in jet finding
#   ptminFilter: pT threshold applied by the jet modifier "jetfilter"
jtm.addJetFinder("MyAntiKtVRLCTopoJets",
                 "AntiKt",
                 0.4,
                 "mygetters",
                 "mymods",
                 ghostArea=0.01,
                 ptmin=2000,
                 ptminFilter=7000,
                 variableRMinRadius=0.2,
                 variableRMassScale=60000)

#--------------------------------------------------------------
# Add jet reco to the algorithm sequence.
# The current configuration of the jet tool manager is used.
#--------------------------------------------------------------
from JetRec.JetAlgorithm import addJetRecoToAlgSequence
addJetRecoToAlgSequence()

#--------------------------------------------------------------
# Add tool to dump the new jet container to the log.
#--------------------------------------------------------------
Exemple #7
0
trimexisting = True
debugpseudojets = False

# Re-find the ungroomed jets and copy their pseudojets to the original collection.
findcons = []
if trimexisting:
  from JetRec.JetRecConf import JetPseudojetCopier
  jtm += JetPseudojetCopier(
    "myjpjcopier",
    DestinationContainer ="AntiKt4LCTopoJets",
    JetPseudojetRetriever =jtm.jpjretriever
  );
  findcons = [jtm.myjpjcopier]
  if debugpseudojets:
    jtm.setOutputLevel("myjpjcopier", VERBOSE)
jtm.addJetFinder("MyAntiKt4LCTopoJets", "AntiKt", 0.4, "mygetters", "mymods", findcons,
                 ghostArea=0.01 , ptmin=2000, ptminFilter=7000)

# Trim the new ungroomed jets.
jtm.addJetTrimmer("MyAntiKt4LCTopoTrimmedJets", 0.05, 0.10, "MyAntiKt4LCTopoJets", trimmods)

# Trim the original ungroomed jets using the pseudojets from the new ungroomed jets.
if trimexisting:
  if debugpseudojets:
    pjrname = "jpjretriever"
    jtm.setOutputLevel(pjrname, VERBOSE)
    jtm.addJetTrimmer("AntiKt4LCTopoTrimmedJets", 0.05, 0.10, "AntiKt4LCTopoJets", trimmods,
                      pseudojetRetriever=pjrname)
  else:
    jtm.addJetTrimmer("AntiKt4LCTopoTrimmedJets", 0.05, 0.10, "AntiKt4LCTopoJets", trimmods)

#--------------------------------------------------------------
Exemple #8
0
]
#note that TopoCalibMoments tool will FAIL SILENTLY if CaloCalibrationHitContainer names it's set up to use are not found in ESD
#read container names directly from ESD to prevent name mis-matches resulting in this failure mode
TopoCalibMoments.DMCalibrationHitContainerNames = DMCalibrationHitContainerNames
TopoCalibMoments.CalibrationHitContainerNames = CalibrationHitContainerNames
print(TopoCalibMoments)

if rerunTruthJets:
    include("McParticleAlgs/TruthParticleBuilder_jobOptions.py")
    from JetRec.JetRecFlags import jetFlags
    #this line should not be needed, but current jet algorithm implementation runs all of the pseudojet builders
    #even if they are not needed by the jet finders (truth only)
    #building origin-corrected topoclusters tries to modify existing const container
    jetFlags.useTracks = False
    from JetRec.JetRecStandardToolManager import jtm
    jtm.addJetFinder("AntiKt4TruthJets", "AntiKt", 0.4, "truth", ptmin=5000)
    from JetRec.JetAlgorithm import addJetRecoToAlgSequence
    addJetRecoToAlgSequence()

#add MLTreeMaker directly to top sequence to ensure its run *after* topoclustering
from MLTree.MLTreeConf import MLTreeMaker
topSequence += MLTreeMaker(name="MLTreeMaker",
                           TrackContainer="InDetTrackParticles",
                           CaloClusterContainer="CaloCalTopoClusters",
                           Prefix="CALO",
                           ClusterEmin=0.0,
                           ClusterEmax=2000.0,
                           ClusterEtaAbsmax=0.7,
                           EventCleaning=False,
                           Tracking=False,
                           Pileup=True,
Exemple #9
0
#   jtm.modifiersMap["mycalib"]

# Finders.
# Calibration for topo jets: calibOpt =
#   a - area corrn
#   r - residual pileup corrn
#   j - GES
#   g - GSC
#   i - Insitu
gatopo = 0.01
gatruth = 0.00
gatrack = 0.00
if jetFlags.useTruth:
    jtm.addJetFinder("Run2AntiKt4TruthJets",
                     "AntiKt",
                     0.4,
                     "truth",
                     ghostArea=gatruth,
                     ptmin=5000)
    jtm.addJetFinder("Run2AntiKt4TruthWZJets",
                     "AntiKt",
                     0.4,
                     "truthwz",
                     ghostArea=gatruth,
                     ptmin=5000)
    jtm.addJetFinder("Run2AntiKt10TruthJets",
                     "AntiKt",
                     0.4,
                     "truth",
                     ghostArea=gatruth,
                     ptmin=40000)
    jtm.addJetFinder("Run2AntiKt10TruthWZJets",
Exemple #10
0
print jtm.gettersMap.keys()

# Add tools to find or groom jets.
# Each call to addJetFinder adds one JetRecTool so that one jet
# container will be added to the event.
# The first argument is the name of that container.
# The next two are the jet algorithm (Kt, AntiKt, CamKt) and
# size parameter.
# The next three are the names of the input lit, modifier lists
# and consumer list.
# The following optional, named arguments may also be provided:
#   ghostArea: Size in eta-phi for area ghosts
#   ptmin: pT threshold in MeV applied in jet finding
#   ptminFilter: pT threshold applied by the jet modifier "jetfilter"

jtm.addJetFinder("CamKt15LCTopoJets", "CamKt", 1.5, "mygetters", [],
                 ghostArea=0.01 , ptmin=2000)


jtm.addJetSplitter("CamKt15LCTopoSplitJets", 1.0, 0.15, "CamKt15LCTopoJets", [], doArea=True)


#--------------------------------------------------------------
# Add jet reco to the algorithm sequence.
# The current configuration of the jet tool manager is used.
#--------------------------------------------------------------
from JetRec.JetAlgorithm import addJetRecoToAlgSequence
addJetRecoToAlgSequence()

#--------------------------------------------------------------
# Add tool to dump the new jet container to the log.
#--------------------------------------------------------------
Exemple #11
0
# Here we add a new list of inputs with the name "mygetters".
print jtm.gettersMap.keys()

# Add tools to find or groom jets.
# Each call to addJetFinder adds one JetRecTool so that one jet
# container will be added to the event.
# The first argument is the name of that container.
# The next two are the jet algorithm (Kt, AntiKt, CamKt) and
# size parameter.
# The next two are the names of the input and modifier lists.
# The following optional, named arguments may also be provided:
#   ghostArea: Size in eta-phi for area ghosts
#   ptmin: pT threshold in MeV applied in jet finding
#   ptminFilter: pT threshold applied by the jet modifier "jetfilter"
if findJets:
  jtm.addJetFinder("MyAntiKt4TruthJets",  "AntiKt", 0.4,  "truth",   "truth",
                   ghostArea=0.01 , ptmin=2000, ptminFilter=3000)
if doEMPFlowJets and findJets:
  jtm.addJetFinder("MyAntiKt4EMPFlowJets",  "AntiKt", 0.4,  "empflow", "pflow",
                   ghostArea=0.01 , ptmin=2000, ptminFilter=7000, calibOpt="a:pflow")
if doEMCPFlowJets and findJets:
  jtm.addJetFinder("MyAntiKt4EMCPFlowJets", "AntiKt", 0.4, "emcpflow", "pflow",
                   ghostArea=0.01 , ptmin=2000, ptminFilter=7000, calibOpt="a:pflow")
if doLCPFlowJets and findJets:
  jtm.addJetFinder("MyAntiKt4LCPFlowJets",  "AntiKt", 0.4,  "lcpflow", "pflow",
                   ghostArea=0.01 , ptmin=2000, ptminFilter=7000, calibOpt="a:pflow")

#--------------------------------------------------------------

# Add neutral-only pflow.

# Add neutral pflow builder.
Exemple #12
0
# Add tools to find or groom jets.
# Each call to addJetFinder adds one JetRecTool so that one jet
# container will be added to the event.
# The first argument is the name of that container.
# The next two are the jet algorithm (Kt, AntiKt, CamKt) and
# size parameter.
# The next three are the names of the input lit, modifier lists
# and consumer list.
# The following optional, named arguments may also be provided:
#   ghostArea: Size in eta-phi for area ghosts
#   ptmin: pT threshold in MeV applied in jet finding
#   ptminFilter: pT threshold applied by the jet modifier "jetfilter"

jtm.addJetFinder("CamKt15LCTopoJets",
                 "CamKt",
                 1.5,
                 "mygetters", [],
                 ghostArea=0.01,
                 ptmin=2000)

jtm.addJetSplitter("CamKt15LCTopoSplitJets",
                   1.0,
                   0.15,
                   "CamKt15LCTopoJets", [],
                   doArea=True)

#--------------------------------------------------------------
# Add jet reco to the algorithm sequence.
# The current configuration of the jet tool manager is used.
#--------------------------------------------------------------
from JetRec.JetAlgorithm import addJetRecoToAlgSequence