509 """Configures Heavy Ion Jet reconstruction."""
516 eventshapeKey =
"HIEventShapeWeighted"
518 name=
"HIEventShapeMaker_Weighted",
520 InputTowerKey=flags.HeavyIon.Jet.Internal.ClusterKey,
521 OutputContainerKey=eventshapeKey))
525 jetDef2 =
HICaloJetDef(flags, jetradius=2, suffix=
"_Unsubtracted")
529 jetRlist = flags.HeavyIon.Jet.RValues
530 for jetR
in jetRlist:
531 jetDef.append(
HICaloJetDef(flags, jetradius=jetR, suffix=
"_Unsubtracted"))
532 __log.info(
"HI Jet Collection for Reco: "+jetDef[-1].fullname())
538 pseudoTrkJetCont =
"HIJetTracks"
539 pseudoGhostTrks =
"PseudoJetGhostTracks"
543 flags, name=
"GhostTrackPseudoJets", InputContainer=pseudoTrkJetCont, OutputContainer=pseudoGhostTrks, Label=
"GhostTrack"))
547 pjContNames = [
"PseudoJet"+flags.HeavyIon.Jet.Internal.ClusterKey,pseudoGhostTrks]
549 mergeAlg = CompFactory.PseudoJetMerger(
550 "PJmerge_HIGhostTrack",
551 InputPJContainers = pjContNames,
552 OutputContainer =
"PseudoJet"+flags.HeavyIon.Jet.Internal.ClusterKey+
"_GhostTracks"
554 acc.addEventAlgo(mergeAlg)
564 modifiers=[
"HIJetAssoc",
"HIJetMaxOverMean",
"HIJetDiscrim",
"Filter:5000"])
570 InputEventShapeKey=eventshapeKey,
571 CaloJetSeedContainerKey=jetDef_seed0.fullname())
572 iter0 = acc.popToolsAndMerge(acc_iter0)
573 acc.addEventAlgo(CompFactory.JetAlgorithm(
"jetalgHI_iter0", Tools=[iter0]))
580 if not flags.Input.isMC:
581 calib_seq +=
"_Insitu"
586 modifiers=[
"HIJetAssoc",
"subtr0",
"HIJetCalib:{}___{}___{}".
format(2, calib_seq,
not flags.Input.isMC),
"Filter:{}".
format(flags.HeavyIon.Jet.SeedPtMin)])
590 if flags.HeavyIon.Jet.doTrackJetSeed:
591 pseudoTrks =
"PseudoTracks"
594 flags, InputContainer=pseudoTrkJetCont, OutputContainer=pseudoTrks))
598 modifiers=[
"HIJetAssoc",
"Filter:{}".
format(flags.HeavyIon.Jet.TrackJetPtMin),
"Sort"])
599 trkJetSeedCont = jetDef_trk.fullname()
603 InputPseudoJets=pseudoTrks))
604 acc.merge(
HIJetAlgCfg(flags, jetDef_trk, Provider=trkJetClust))
611 InputEventShapeKey=eventshapeKey,
612 CaloJetSeedContainerKey=jetDef_seed1.fullname(),
613 TrackJetSeedContainerKey=trkJetSeedCont)
614 iter1 = acc.popToolsAndMerge(acc_iter1)
615 acc.addEventAlgo(CompFactory.JetAlgorithm(
"jetalgHI_iter1", Tools=[iter1]))
619 suffix=
"iter_egamma",
621 InputEventShapeKey=flags.HeavyIon.Global.EventShape,
622 OutputEventShapeKey=flags.HeavyIon.Egamma.EventShape,
623 CaloJetSeedContainerKey=jetDef_seed1.fullname())
624 iter1_eg = acc.popToolsAndMerge(acc_iter1_eg)
625 acc.addEventAlgo(CompFactory.JetAlgorithm(
"jetalgHI_iter1_egamma", Tools=[iter1_eg]))
628 cluster_key_eGamma_deep = flags.HeavyIon.Jet.Internal.ClusterKey+
"_eGamma_deep"
629 subtrToCelltool = acc.popToolsAndMerge(
631 name=
"HIClusterSubtraction_egamma",
632 EventShapeKey=jm_dict1_eg[
"EventShapeKey"],
633 OutClusterKey=cluster_key_eGamma_deep,
634 Modulator=jm_dict1[
"Modulator"],
635 EventShapeMapTool=jm_dict1[
"EventShapeMapTool"],
637 ApplyOriginCorrection=
False)
639 acc.addEventAlgo(CompFactory.JetAlgorithm(
"jetalgHI_subtrToCellTool", Tools=[subtrToCelltool]))
645 subtrToClusterTool = acc.popToolsAndMerge(
647 name=
"HIClusterSubtraction_final",
648 EventShapeKey=jm_dict1[
"EventShapeKey"],
649 ClusterKey=cluster_key_eGamma_deep,
650 OutClusterKey=flags.HeavyIon.Jet.ClusterKey,
651 Modulator=jm_dict1[
"Modulator"],
652 EventShapeMapTool=jm_dict1[
"EventShapeMapTool"],
653 ApplyOriginCorrection=
False)
655 acc.addEventAlgo(CompFactory.JetAlgorithm(
656 "jetalgHI_subtrToClusterTool", Tools=[subtrToClusterTool]))
660 ClusterKey=flags.HeavyIon.Jet.ClusterKey,
661 Subtractor=jm_dict1[
"Subtractor"])
664 if flags.HeavyIon.Jet.WriteHIClusters:
665 output_hicluster = [
"xAOD::CaloClusterContainer#"+flags.HeavyIon.Jet.ClusterKey,
666 "xAOD::CaloClusterAuxContainer#"+flags.HeavyIon.Jet.ClusterKey+
"Aux."]
667 acc.merge(
addToESD(flags, output_hicluster))
668 acc.merge(
addToAOD(flags, output_hicluster))
671 extramods = [
"Sort",
"Width",
"CaloEnergies",
"LArHVCorr",
"CaloQuality",
"TrackMoments",
"JVF",
"JVT"]
676 modifiers=[
"subtr1",
"consmod",
"HIJetCalib:{}___{}___{}".
format(
str(
float(jd.radius)*10).
replace(
'.0',
''),calib_seq,
not flags.Input.isMC),
"Filter:{}".
format(flags.HeavyIon.Jet.RecoOutputPtMin)]+extramods)
679 output = [
"xAOD::JetContainer#"+jetDef_final.fullname(),
680 "xAOD::JetAuxContainer#"+jetDef_final.fullname()+
"Aux.-PseudoJet"]
685 if flags.HeavyIon.Jet.doTrackJetSeed:
686 output = [
"xAOD::JetContainer#"+jetDef_trk.fullname(),
687 "xAOD::JetAuxContainer#"+jetDef_trk.fullname()+
"Aux.-PseudoJet"]