コード例 #1
0
            "HLT_ht850_L1HT190-J15.ETA20", "HLT_ht1000",
            "HLT_ht1000_L1HT190-J15.ETA20", "HLT_j200", "HLT_j175", "HLT_j150",
            "HLT_7j45", "HLT_6j45", "HLT_5j45", "HLT_4j45"
        ])
    ToolSvc += EXOT1TriggerSkimmingTool
    skimmingTools.append(EXOT1TriggerSkimmingTool)

expression = trigger

thinningTools = []

from DerivationFrameworkCalo.DerivationFrameworkCaloConf import DerivationFramework__JetCaloClusterThinning
EXOT1Ak4CCThinningTool_LC = DerivationFramework__JetCaloClusterThinning(
    name="EXOT1Ak4CCThinningTool_LC",
    StreamName=streamName,
    SGKey="AntiKt4LCTopoJets",
    TopoClCollectionSGKey="CaloCalTopoClusters",
    SelectionString="AntiKt4LCTopoJets.pt > 40*GeV",
    ConeSize=0)
ToolSvc += EXOT1Ak4CCThinningTool_LC
thinningTools.append(EXOT1Ak4CCThinningTool_LC)

from DerivationFrameworkCalo.DerivationFrameworkCaloConf import DerivationFramework__JetCaloClusterThinning
EXOT1Ak4CCThinningTool_EM = DerivationFramework__JetCaloClusterThinning(
    name="EXOT1Ak4CCThinningTool_EM",
    StreamName=streamName,
    SGKey="AntiKt4EMTopoJets",
    TopoClCollectionSGKey="CaloCalTopoClusters",
    SelectionString="AntiKt4EMTopoJets.pt > 40*GeV",
    ConeSize=0)
ToolSvc += EXOT1Ak4CCThinningTool_EM
コード例 #2
0
    StreamName=streamName,
    JetKey="AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets",
    SelectionString=
    "AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets.DFCommonJets_Calib_pt > 200*GeV && AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets.DFCommonJets_Calib_eta > -2.7 && AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets.DFCommonJets_Calib_eta < 2.7",
    InDetTrackParticlesKey="InDetTrackParticles")
ToolSvc += EXOT8Ak10r2JetTPThinningTool
thinningTools.append(EXOT8Ak10r2JetTPThinningTool)

#########################################
# clusters thinning associated R=0.4 jets
#########################################
from DerivationFrameworkCalo.DerivationFrameworkCaloConf import DerivationFramework__JetCaloClusterThinning
EXOT8Ak4CCThinningTool = DerivationFramework__JetCaloClusterThinning(
    name="EXOT8Ak4CCThinningTool",
    StreamName=streamName,
    SGKey="AntiKt4LCTopoJets",
    TopoClCollectionSGKey="CaloCalTopoClusters",
    SelectionString="AntiKt4LCTopoJets.pt > 50*GeV",
    ConeSize=0)
ToolSvc += EXOT8Ak4CCThinningTool
thinningTools.append(EXOT8Ak4CCThinningTool)

#############################################
# clusters associated with large-R jets (0.2)
#############################################
EXOT8Ak10r2CCThinningTool = DerivationFramework__JetCaloClusterThinning(
    name="EXOT8Ak10r2CCThinningTool",
    StreamName=streamName,
    SGKey="AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets",
    TopoClCollectionSGKey="CaloCalTopoClusters",
    SelectionString=
コード例 #3
0
EXOT3AKt10JetTPThinningTool = DerivationFramework__JetTrackParticleThinning(
    name="EXOT3Cam12JetTPThinningTool",
    StreamName=streamName,
    JetKey="CamKt12LCTopoJets",
    SelectionString=
    "CamKt12LCTopoJets.pt > 150*GeV && abs(CamKt12LCTopoJets.eta) < 2.8",
    InDetTrackParticlesKey="InDetTrackParticles")
ToolSvc += EXOT3AKt10JetTPThinningTool
thinningTools.append(EXOT3AKt10JetTPThinningTool)

# Calo-cluster thinning
from DerivationFrameworkCalo.DerivationFrameworkCaloConf import DerivationFramework__JetCaloClusterThinning
EXOT3AKt10CCThinningTool = DerivationFramework__JetCaloClusterThinning(
    name="EXOT3Ak10CCThinningTool",
    StreamName=streamName,
    SGKey="AntiKt10LCTopoJets",
    TopoClCollectionSGKey="CaloCalTopoClusters",
    SelectionString=
    "AntiKt10LCTopoJets.pt > 150*GeV && abs(AntiKt10LCTopoJets.eta) < 2.8",
    ConeSize=0)
ToolSvc += EXOT3AKt10CCThinningTool
thinningTools.append(EXOT3AKt10CCThinningTool)

EXOT3CA12CCThinningTool = DerivationFramework__JetCaloClusterThinning(
    name="EXOT3CA12CCThinningTool",
    StreamName=streamName,
    SGKey="CamKt12LCTopoJets",
    TopoClCollectionSGKey="CaloCalTopoClusters",
    SelectionString=
    "CamKt12LCTopoJets.pt > 150*GeV && abs(CamKt12LCTopoJets.eta) < 2.8",
    ConeSize=0)
ToolSvc += EXOT3CA12CCThinningTool
コード例 #4
0
    name="EXOT7ElectronCCThinningTool",
    StreamName=streamName,
    SGKey="Electrons",
    CaloClCollectionSGKey="egammaClusters",
    #TopoClCollectionSGKey   = "CaloCalTopoCluster",
    SelectionString="Electrons.pt > 7*GeV",
    #FrwdClCollectionSGKey   = "LArClusterEMFrwd",
    ConeSize=0.4)
ToolSvc += EXOT7ElectronCCThinningTool
thinningTools.append(EXOT7ElectronCCThinningTool)

from DerivationFrameworkCalo.DerivationFrameworkCaloConf import DerivationFramework__JetCaloClusterThinning
EXOT7CA15CCThinningTool = DerivationFramework__JetCaloClusterThinning(
    name="EXOT7CA15CCThinningTool",
    StreamName=streamName,
    SGKey="CamKt15LCTopoJets",
    TopoClCollectionSGKey="CaloCalTopoClusters",
    SelectionString="CamKt15LCTopoJets.pt > 150*GeV",
    ConeSize=0)
ToolSvc += EXOT7CA15CCThinningTool
thinningTools.append(EXOT7CA15CCThinningTool)

EXOT7CA8CCThinningTool = DerivationFramework__JetCaloClusterThinning(
    name="EXOT7CA8CCThinningTool",
    StreamName=streamName,
    SGKey="CamKt8LCTopoJets",
    TopoClCollectionSGKey="CaloCalTopoClusters",
    SelectionString="CamKt8LCTopoJets.pt > 150*GeV",
    ConeSize=0)
ToolSvc += EXOT7CA8CCThinningTool
thinningTools.append(EXOT7CA8CCThinningTool)
コード例 #5
0
from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning
JETM15ElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning(
    name="JETM15ElectronTPThinningTool",
    StreamName=streamName,
    SGKey="Electrons",
    InDetTrackParticlesKey="InDetTrackParticles")
ToolSvc += JETM15ElectronTPThinningTool
thinningTools.append(JETM15ElectronTPThinningTool)

from DerivationFrameworkCalo.DerivationFrameworkCaloConf import DerivationFramework__JetCaloClusterThinning

JETM15AKt10CSThinningTool = DerivationFramework__JetCaloClusterThinning(
    name="JETM15AKt10CSThinningTool",
    StreamName=streamName,
    SGKey="AntiKt10LCTopoCSSKJets",
    TopoClCollectionSGKey="CaloCalTopoClusters",
    SelectionString=
    "AntiKt10LCTopoCSSKJets.pt > 300*GeV && abs(AntiKt10LCTopoCSSKJets.eta) < 2.8",
    AdditionalClustersKey=["LCOriginTopoClusters", "LCOriginCSSKTopoClusters"],
    ApplyAnd=False)
ToolSvc += JETM15AKt10CSThinningTool
thinningTools.append(JETM15AKt10CSThinningTool)

JETM15AKt10CCThinningTool = DerivationFramework__JetCaloClusterThinning(
    name="JETM15AKt10CCThinningTool",
    StreamName=streamName,
    SGKey="AntiKt10LCTopoJets",
    TopoClCollectionSGKey="CaloCalTopoClusters",
    SelectionString=
    "(AntiKt10LCTopoJets.pt > 300*GeV && abs(AntiKt10LCTopoJets.eta) < 2.8)",
    AdditionalClustersKey=["LCOriginTopoClusters", "LCOriginCSSKTopoClusters"],
コード例 #6
0
ファイル: EXOT16.py プロジェクト: rushioda/PIXELVALID_athena
##from DerivationFrameworkCalo.DerivationFrameworkCaloConf import DerivationFramework__JetCaloClusterThinning
##EXOT16CA15CCThinningTool = DerivationFramework__JetCaloClusterThinning(name                    = "EXOT16CA15CCThinningTool",
##                                                                       ThinningService         = "EXOT16ThinningSvc",
##                                                                       SGKey                   = "CamKt15LCTopoJets",
##                                                                       TopoClCollectionSGKey   = "CaloCalTopoClusters",
##                                                                       SelectionString         = "CamKt15LCTopoJets.pt > 150*GeV",
##                                                                       ConeSize                = 0)
##ToolSvc += EXOT16CA15CCThinningTool
##thinningTools.append(EXOT16CA15CCThinningTool)

from DerivationFrameworkCalo.DerivationFrameworkCaloConf import DerivationFramework__JetCaloClusterThinning
EXOT16Ak10CCThinningTool = DerivationFramework__JetCaloClusterThinning(
    name="EXOT16Ak10CCThinningTool",
    ThinningService="EXOT16ThinningSvc",
    SGKey="AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets",
    TopoClCollectionSGKey="CaloCalTopoClusters",
    SelectionString="AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets.pt > 150*GeV",
    ConeSize=0)
ToolSvc += EXOT16Ak10CCThinningTool
thinningTools.append(EXOT16Ak10CCThinningTool)

# Truth particles (this is not working for ghost-associated b-hadrons)
#pythia_status = "(TruthParticles.status == 1 || TruthParticles.status == 2)"
#truth_eta = "abs(TruthParticles.eta) < 2.8"
#truth_quarks  = "(abs(TruthParticles.pdgId) == 1 || abs(TruthParticles.pdgId) == 2 || abs(TruthParticles.pdgId) == 3 || abs(TruthParticles.pdgId) == 4 || abs(TruthParticles.pdgId) == 5 || abs(TruthParticles.pdgId) == 6)"
#truth_leptons = "(abs(TruthParticles.pdgId) == 11 || abs(TruthParticles.pdgId) == 12 || abs(TruthParticles.pdgId) == 13 || abs(TruthParticles.pdgId) == 14 ||abs(TruthParticles.pdgId) == 15 ||abs(TruthParticles.pdgId) ==16)"
#truth_bhadrons = "(abs(TruthParticles.pdgId)==51 ||abs(TruthParticles.pdgId)==52 ||abs(TruthParticles.pdgId)==53 || abs(TruthParticles.pdgId)==54 || abs(TruthParticles.pdgId)==55 || abs(TruthParticles.pdgId)==56 || abs(TruthParticles.pdgId)==511 ||abs(TruthParticles.pdgId)==521|| abs(TruthParticles.pdgId)==531 ||abs(TruthParticles.pdgId)==541 ||abs(TruthParticles.pdgId)==551 || abs(TruthParticles.pdgId)==513 || abs(TruthParticles.pdgId)==523 || abs(TruthParticles.pdgId)==533 ||abs(TruthParticles.pdgId)==543 || abs(TruthParticles.pdgId)==553 || abs(TruthParticles.pdgId)==5101 || abs(TruthParticles.pdgId)==5201 || abs(TruthParticles.pdgId)==5301 ||abs(TruthParticles.pdgId)==5401 ||  abs(TruthParticles.pdgId)==5103 || abs(TruthParticles.pdgId)==5203 || abs(TruthParticles.pdgId)==5303 || abs(TruthParticles.pdgId)==5403 || abs(TruthParticles.pdgId)==5503 || abs(TruthParticles.pdgId)==515 || abs(TruthParticles.pdgId)==525 || abs(TruthParticles.pdgId)==535 || abs(TruthParticles.pdgId)==545 || abs(TruthParticles.pdgId)==555 || abs(TruthParticles.pdgId)==5122 || abs(TruthParticles.pdgId)==5212 || abs(TruthParticles.pdgId)==5222 || abs(TruthParticles.pdgId)==5312 || abs(TruthParticles.pdgId)==5322 || abs(TruthParticles.pdgId)==5332 || abs(TruthParticles.pdgId)==5412 || abs(TruthParticles.pdgId)==5422  || abs(TruthParticles.pdgId)==5432 || abs(TruthParticles.pdgId)==5442 || abs(TruthParticles.pdgId)==5512 || abs(TruthParticles.pdgId)==5522 || abs(TruthParticles.pdgId)==5532 || abs(TruthParticles.pdgId)==5542 || abs(TruthParticles.pdgId)==5114 || abs(TruthParticles.pdgId)==5214 || abs(TruthParticles.pdgId)==5224 || abs(TruthParticles.pdgId)==5314 || abs(TruthParticles.pdgId)==5324 || abs(TruthParticles.pdgId)==5334 || abs(TruthParticles.pdgId)==5414 || abs(TruthParticles.pdgId)==5424 || abs(TruthParticles.pdgId)==5434 || abs(TruthParticles.pdgId)==5444 || abs(TruthParticles.pdgId)==5514 || abs(TruthParticles.pdgId)==5524 || abs(TruthParticles.pdgId)==5534 || abs(TruthParticles.pdgId)==5544 || abs(TruthParticles.pdgId)==5554  || abs(TruthParticles.pdgId)==5132 || abs(TruthParticles.pdgId)==5232 || abs(TruthParticles.pdgId)==5142 || abs(TruthParticles.pdgId)==5242 || abs(TruthParticles.pdgId)==5342 || abs(TruthParticles.pdgId)==5112)"
#truth_signal = "abs(TruthParticles.pdgId) ==25 || abs(TruthParticles.pdgId)==39 || abs(TruthParticles.pdgId)==32 || abs(TruthParticles.pdgId)==5100021"
#truth_WZ = "abs(TruthParticles.pdgId) == 24 || abs(TruthParticles.pdgId) ==23"
#truth_expression = '('+pythia_status+' && '+truth_eta+')'
コード例 #7
0
TRIG7ThinningHelper.AppendToStream(TRIG7Stream)

thinningTools = []

#====================================================================
# CLUSTER THINNING TOOL
#====================================================================
from DerivationFrameworkCalo.DerivationFrameworkCaloConf import DerivationFramework__JetCaloClusterThinning

jetcuts = '(AntiKt10LCTopoJets.pt > ' + jetptmin + '*GeV && abs(AntiKt10LCTopoJets.eta) < ' + jetetamax + ')'

## save clusters matched to ungroomed jets with jetcuts selection
TRIG7ClusterThinningTool = DerivationFramework__JetCaloClusterThinning(
    name="TRIG7ClusterThinningTool",
    StreamName=streamName,
    SGKey="AntiKt10LCTopoJets",
    TopoClCollectionSGKey="CaloCalTopoClusters",
    SelectionString=jetcuts,
    AdditionalClustersKey=["LCOriginTopoClusters"])

ToolSvc += TRIG7ClusterThinningTool
thinningTools.append(TRIG7ClusterThinningTool)

trigjetcuts = '(HLT_xAOD__JetContainer_a10tclcwsubjesFS.pt > ' + jetptmin + '*GeV && abs(HLT_xAOD__JetContainer_a10tclcwsubjesFS.eta) < ' + jetetamax + ')'

## save clusters matched to ungroomed trigger jets passing trigjetcuts
TRIG7TrigClusterThinningTool = DerivationFramework__JetCaloClusterThinning(
    name="TRIG7TrigClusterThinningTool",
    StreamName=streamName,
    SGKey="HLT_xAOD__JetContainer_a10tclcwsubjesFS",
    TopoClCollectionSGKey="CaloCalTopoClusters",
コード例 #8
0
def setup(TOPQname, streamName, ToolSvc):
    thinningTools = []

    #========================
    # Track Particle Thinning !!! BUGGY (yes, that's a technical term)...CURRENTLY NOT USING !!!
    #========================
    # PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/trunk/src/TrackParticleThinning.cxx
    thinning_expression = "(InDetTrackParticles.pt > 0.5*GeV) && (InDetTrackParticles.numberOfPixelHits > 0) && (InDetTrackParticles.numberOfSCTHits > 5) && (abs(DFCommonInDetTrackZ0AtPV) < 1.5)"
    from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackParticleThinning
    TOPQTPThinningTool = DerivationFramework__TrackParticleThinning(
        name=TOPQname + "TPThinningTool",
        StreamName=streamName,
        SelectionString=thinning_expression,
        InDetTrackParticlesKey="InDetTrackParticles")

    #ToolSvc += TOPQTPThinningTool
    #thinningTools.append(TOPQTPThinningTool)
    #print (TOPQname+".py", TOPQname+"TPThinningTool: ", TOPQTPThinningTool)

    #============================
    # Jet Track Particle Thinning
    #============================
    # PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/trunk/src/JetTrackParticleThinning.cxx
    from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning
    TOPQJetTPThinningTool = DerivationFramework__JetTrackParticleThinning(
        name=TOPQname + "JetTPThinningTool",
        StreamName=streamName,
        JetKey="AntiKt4EMTopoJets",
        InDetTrackParticlesKey="InDetTrackParticles",
        SelectionString="(AntiKt4EMTopoJets.DFCommonJets_Calib_pt > 20*GeV)")

    ToolSvc += TOPQJetTPThinningTool
    thinningTools.append(TOPQJetTPThinningTool)
    print(TOPQname + ".py", TOPQname + "JetTPThinningTool: ",
          TOPQJetTPThinningTool)

    from DerivationFrameworkTop.DerivationFrameworkTopConf import DerivationFramework__SV1TrackThinning
    TOPQSV1ThinningTool = DerivationFramework__SV1TrackThinning(
        name=TOPQname + "SV1TrackThinning",
        StreamName=streamName,
        JetKey="AntiKt4EMTopoJets",
        InDetTrackParticlesKey="InDetTrackParticles",
        SelectionString="(AntiKt4EMTopoJets.DFCommonJets_Calib_pt > 20*GeV)")

    ToolSvc += TOPQSV1ThinningTool
    thinningTools.append(TOPQSV1ThinningTool)
    print(TOPQname + ".py", TOPQname + "SV1ThinningTool: ",
          TOPQSV1ThinningTool)

    TOPQLargeJetTPThinningTool = DerivationFramework__JetTrackParticleThinning(
        name=TOPQname + "LargeJetTPThinningTool",
        StreamName=streamName,
        JetKey="AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets",
        InDetTrackParticlesKey="InDetTrackParticles",
        SelectionString="AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets.pt>25*GeV")

    ToolSvc += TOPQLargeJetTPThinningTool
    thinningTools.append(TOPQLargeJetTPThinningTool)
    print(TOPQname + ".py", TOPQname + "LargeJetTPThinningTool: ",
          TOPQLargeJetTPThinningTool)

    from DerivationFrameworkCalo.DerivationFrameworkCaloConf import DerivationFramework__JetCaloClusterThinning
    TOPQAK4CCThinningTool = DerivationFramework__JetCaloClusterThinning(
        name=TOPQname + "AK4CCThinningTool",
        StreamName=streamName,
        SGKey="AntiKt4EMTopoJets",
        TopoClCollectionSGKey="CaloCalTopoClusters",
        SelectionString="AntiKt4EMTopoJets.DFCommonJets_Calib_pt > 7*GeV",
        ConeSize=0.5)

    ToolSvc += TOPQAK4CCThinningTool
    thinningTools.append(TOPQAK4CCThinningTool)
    print(TOPQname + ".py", TOPQname + "AK4CCThinningTool: ",
          TOPQAK4CCThinningTool)

    from DerivationFrameworkCalo.DerivationFrameworkCaloConf import DerivationFramework__JetCaloClusterThinning
    TOPQLargeJetCCThinningTool = DerivationFramework__JetCaloClusterThinning(
        name=TOPQname + "LargeJetCCThinningTool",
        StreamName=streamName,
        SGKey="AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets",
        TopoClCollectionSGKey="CaloCalTopoClusters",
        SelectionString=
        "AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets.DFCommonJets_Calib_pt > 7*GeV",
        ConeSize=1.1)

    ToolSvc += TOPQLargeJetCCThinningTool
    thinningTools.append(TOPQLargeJetCCThinningTool)
    print(TOPQname + ".py", TOPQname + "LargeJetCCThinningTool: ",
          TOPQLargeJetCCThinningTool)

    #=================================
    # Electron Track Particle Thinning
    #=================================
    # PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/trunk/src/EgammaTrackParticleThinning.cxx
    from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning
    TOPQElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning(
        name=TOPQname + "ElectronTPThinningTool",
        StreamName=streamName,
        SGKey="Electrons",
        InDetTrackParticlesKey="InDetTrackParticles")

    ToolSvc += TOPQElectronTPThinningTool
    thinningTools.append(TOPQElectronTPThinningTool)
    print(TOPQname + ".py", TOPQname + "ElectronTPThinningTool: ",
          TOPQElectronTPThinningTool)

    #===============================
    # Electron Calo Cluster Thinning
    #===============================
    # PhysicsAnalysis/DerivationFramework/DerivationFrameworkCalo/trunk/src/CaloClusterThinning.cxx
    from DerivationFrameworkCalo.DerivationFrameworkCaloConf import DerivationFramework__CaloClusterThinning
    TOPQElectronCCThinningTool = DerivationFramework__CaloClusterThinning(
        name=TOPQname + "ElectronCCThinningTool",
        StreamName=streamName,
        SGKey="Electrons",
        CaloClCollectionSGKey="egammaClusters",
        SelectionString=
        "(Electrons.Loose || Electrons.DFCommonElectronsLHLoose)",
        ConeSize=0.4)

    ToolSvc += TOPQElectronCCThinningTool
    thinningTools.append(TOPQElectronCCThinningTool)
    print(TOPQname + ".py", TOPQname + "ElectronCCThinningTool: ",
          TOPQElectronCCThinningTool)

    #========================
    # Photon Track Particle Thinning
    #========================
    from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning
    TOPQPhotonTPThinningTool = DerivationFramework__EgammaTrackParticleThinning(
        name=TOPQname + "PhotonTPThinningTool",
        StreamName=streamName,
        SGKey="Photons",
        InDetTrackParticlesKey="InDetTrackParticles")

    ToolSvc += TOPQPhotonTPThinningTool
    thinningTools.append(TOPQPhotonTPThinningTool)
    print(TOPQname + ".py", TOPQname + "PhotonTPThinningTool: ",
          TOPQPhotonTPThinningTool)

    #===============================
    # Photon Calo Cluster Thinning
    #===============================
    # PhysicsAnalysis/DerivationFramework/DerivationFrameworkCalo/trunk/src/CaloClusterThinning.cxx
    from DerivationFrameworkCalo.DerivationFrameworkCaloConf import DerivationFramework__CaloClusterThinning
    TOPQPhotonCCThinningTool = DerivationFramework__CaloClusterThinning(
        name=TOPQname + "PhotonCCThinningTool",
        StreamName=streamName,
        SGKey="Photons",
        CaloClCollectionSGKey="egammaClusters",
        SelectionString="(Photons.Loose || Photons.DFCommonPhotonsIsEMLoose)",
        ConeSize=0.4)

    ToolSvc += TOPQPhotonCCThinningTool
    thinningTools.append(TOPQPhotonCCThinningTool)
    print(TOPQname + ".py", TOPQname + "PhotonCCThinningTool: ",
          TOPQPhotonCCThinningTool)

    #=============================
    # Muon Track Particle Thinning
    #=============================
    # PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/trunk/src/MuonTrackParticleThinning.cxx
    from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__MuonTrackParticleThinning
    TOPQMuonTPThinningTool = DerivationFramework__MuonTrackParticleThinning(
        name=TOPQname + "MuonTPThinningTool",
        StreamName=streamName,
        MuonKey="Muons",
        InDetTrackParticlesKey="InDetTrackParticles")

    ToolSvc += TOPQMuonTPThinningTool
    thinningTools.append(TOPQMuonTPThinningTool)
    print(TOPQname + ".py", TOPQname + "MuonTPThinningTool: ",
          TOPQMuonTPThinningTool)

    #============================
    # Tau Track Particle Thinning
    #============================
    # PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/trunk/src/TauTrackParticleThinning.cxx
    from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TauTrackParticleThinning
    TOPQTauTPThinningTool = DerivationFramework__TauTrackParticleThinning(
        name=TOPQname + "TauTPThinningTool",
        StreamName=streamName,
        TauKey="TauJets",
        InDetTrackParticlesKey="InDetTrackParticles")

    ToolSvc += TOPQTauTPThinningTool
    thinningTools.append(TOPQTauTPThinningTool)
    print(TOPQname + ".py", TOPQname + "TauTPThinningTool: ",
          TOPQTauTPThinningTool)

    #  #==============================
    #  # Large-R jet thinning
    #  #==============================
    #
    #  # we remove low pT large-R jets from the various collections
    #  from AthenaCommon.GlobalFlags import globalflags
    #  largeRjetCollsToThin = ["AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets"]
    #  if globalflags.DataSource()=='geant4':
    #    largeRjetCollsToThin.append("AntiKt10TruthTrimmedPtFrac5SmallR20Jets")
    #    largeRjetCollsToThin.append("AntiKt10TruthJets")
    #  from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__GenericObjectThinning
    #  for largeRjetColl in largeRjetCollsToThin:
    #    #pTvariableToCutOn = ".DFCommonJets_Calib_pt" # use calibrated pT for reco jets
    #    pTvariableToCutOn = ".pt" # well for now the uncalibrated pT seems a more reasonable option
    #    # use normal pT for truth jets
    #    if largeRjetColl.find('Truth') > -1:
    #      pTvariableToCutOn = ".pt"
    #    TOPQLargeRJetThinning = DerivationFramework__GenericObjectThinning(
    #      name = TOPQname + largeRjetColl + "Thinning_LargeR",
    #      StreamName              = streamName,
    #      ContainerName    = largeRjetColl,
    #      SelectionString  = largeRjetColl + pTvariableToCutOn + " > 150.0*GeV")
    #    ToolSvc += TOPQLargeRJetThinning
    #    thinningTools.append(TOPQLargeRJetThinning)
    #    print (TOPQname+".py", TOPQname+largeRjetColl+"Thinning: ", TOPQLargeRJetThinning)

    #==============================
    # Photon thinning
    #==============================

    # we remove photons below 9GeV
    from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__GenericObjectThinning
    pTPhotonVariableToCutOn = ".pt"
    photonColl = "Photons"
    TOPQPhotonThinning = DerivationFramework__GenericObjectThinning(
        name=TOPQname + photonColl + "Thinning_lowpTphotons",
        StreamName=streamName,
        ContainerName=photonColl,
        SelectionString=photonColl + ".pt > 9.0*GeV")
    ToolSvc += TOPQPhotonThinning
    thinningTools.append(TOPQPhotonThinning)
    print(TOPQname + ".py", TOPQname + photonColl + "Thinning: ",
          TOPQPhotonThinning)

    #==============================================
    # TRUTH THINNING
    #==============================================
    from AthenaCommon.GlobalFlags import globalflags
    if globalflags.DataSource() == 'geant4':
        #==========================
        # MENU TRUTH THINNING
        #==========================
        from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__MenuTruthThinning
        TOPQTruthThinningTool = DerivationFramework__MenuTruthThinning(
            name=TOPQname + "TruthThinningTool",
            StreamName=streamName,
            ParticlesKey="TruthParticles",
            VerticesKey="TruthVertices",
            EventsKey="TruthEvents",
            WritePartons=True,  # keep partons?  ###maybe set to FALSE?
            WriteHadrons=False,  # keep hadrons?
            WriteBHadrons=False,  # keep b-hadrons?
            WriteGeant=False,  # keep Geant particles?
            GeantPhotonPtThresh=
            -1.0,  # Set to <0 to not write any Geant photons; otherwise write with a pT above threshold
            WriteTauHad=True,  # keep hadronic taus?
            PartonPtThresh=-1.0,  # write partons with pT aboe this threhold
            WriteBSM=True,  # keep BSM particles?
            WriteBSMProducts=True,  # keep BSM particle decay products?
            WriteBosons=True,  # keep bosons?
            WriteBosonProducts=True,  # keep boson decay products?
            WriteTopAndDecays=
            True,  # keep top partons and immediate decay products?
            WriteEverything=False,  # keep everything?; overrides all other flags
            WriteAllLeptons=True,  # keep absolutely all leptons?
            WriteLeptonsNotFromHadrons=
            False,  # keep leptons not from hadron decays
            WriteAllStable=
            True,  # keep all stable particles?   ###maybe set to FALSE?
            WriteStatus3=False,  # keep all particles with status code 3?
            WriteFirstN=10,  # keep first N particles in record
            PreserveDescendants=False,  # keep descendants of retained particles?
            PreserveAncestors=True,  # keep ancestors of retained particles?
            SimBarcodeOffset=200000,  # barcode offset for simulation particles
            WritettHFHadrons=True)  # keep tt+HF hadrons

        ToolSvc += TOPQTruthThinningTool
        thinningTools.append(TOPQTruthThinningTool)
        print(TOPQname + ".py", TOPQname + "TruthThinningTool: ",
              TOPQTruthThinningTool)

        #==============================================================================
        # Thinning the photon truth collection : no photons from pi0 (origin=42)
        #==============================================================================
        # PhysicsAnalysis/DerivationFramework/DerivationFrameworkMCTruth/trunk/src/GenericTruthThinning.cxx
        from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning
        TOPQPhotonThinning = DerivationFramework__GenericTruthThinning(
            name=TOPQname + "PhotonThinning",
            StreamName=streamName,
            ParticlesKey="TruthPhotons",
            ParticleSelectionString=
            "(TruthPhotons.classifierParticleOrigin != 42) || (TruthPhotons.pt > 20.0*GeV)"
        )

        ToolSvc += TOPQPhotonThinning
        thinningTools.append(TOPQPhotonThinning)
        print(TOPQname + ".py", TOPQname + "PhotonThinning: ",
              TOPQPhotonThinning)

        #==============================================================================
        # Thinning TruthParticles : no gluons
        #==============================================================================
        ## PhysicsAnalysis/DerivationFramework/DerivationFrameworkMCTruth/trunk/src/GenericTruthThinning.cxx
        #from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning
        #TOPQGluonThinning = DerivationFramework__GenericTruthThinning(
        #                      name                    = TOPQname + "GluonThinning",
        #                      StreamName              = streamName,
        #                      ParticlesKey            = "TruthParticles",
        #                      ParticleSelectionString = "(TruthParticles.pdgId  != 21)")

        #ToolSvc += TOPQGluonThinning
        #thinningTools.append(TOPQGluonThinning)
        #print (TOPQname+".py", TOPQname+"GluonThinning: ", TOPQGluonThinning)

    return thinningTools
コード例 #9
0
    name="EXOT4ElectronCCThinningTool",
    ThinningService="EXOT4ThinningSvc",
    SGKey="Electrons",
    CaloClCollectionSGKey="egammaClusters",
    TopoClCollectionSGKey="CaloCalTopoClusters",
    SelectionString="Electrons.pt > 7*GeV",
    #FrwdClCollectionSGKey   = "LArClusterEMFrwd",
    ConeSize=0.4)
ToolSvc += EXOT4ElectronCCThinningTool
thinningTools.append(EXOT4ElectronCCThinningTool)

from DerivationFrameworkCalo.DerivationFrameworkCaloConf import DerivationFramework__JetCaloClusterThinning
EXOT4CA15CCThinningTool = DerivationFramework__JetCaloClusterThinning(
    name="EXOT4CA15CCThinningTool",
    ThinningService="EXOT4ThinningSvc",
    SGKey="CamKt15LCTopoJets",
    TopoClCollectionSGKey="CaloCalTopoClusters",
    SelectionString="CamKt15LCTopoJets.pt > 150*GeV",
    ConeSize=0)
ToolSvc += EXOT4CA15CCThinningTool
thinningTools.append(EXOT4CA15CCThinningTool)

from DerivationFrameworkCalo.DerivationFrameworkCaloConf import DerivationFramework__JetCaloClusterThinning
EXOT4Ak10CCThinningTool = DerivationFramework__JetCaloClusterThinning(
    name="EXOT4Ak10CCThinningTool",
    ThinningService="EXOT4ThinningSvc",
    SGKey="AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets",
    TopoClCollectionSGKey="CaloCalTopoClusters",
    SelectionString=
    "AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets.DFCommonJets_Calib_pt > 150*GeV",
    ConeSize=0)