Skip to content
Snippets Groups Projects
Commit 2930d154 authored by Chris Hays's avatar Chris Hays Committed by Graeme Stewart
Browse files

Add charginos to MET in MissingEtFilter. (GeneratorFilters-00-03-36)

        * Update MissingEtFilter to add charginos to truth MET (AGENE-1156)
        * Tag as GeneratorFilters-00-03-36

2016-04-11 Chris Hays <Chris.Hays@cern.ch>
        * Update ParentTwoChildren filter to include chargeless children (AGENE-1144)
        * Tag as GeneratorFilters-00-03-35
parent eaca2f29
No related branches found
No related tags found
No related merge requests found
################################################################################
# Package: GeneratorFilters
################################################################################
# Declare the package name:
atlas_subdir( GeneratorFilters )
# Declare the package's dependencies:
atlas_depends_on_subdirs( PUBLIC
Control/StoreGate
GaudiKernel
Generators/GeneratorModules
PRIVATE
Control/AthenaKernel
Control/CxxUtils
Event/EventInfo
Event/xAOD/xAODJet
Event/xAOD/xAODTruth
Generators/TruthUtils
PhysicsAnalysis/AnalysisCommon/ParticleEvent
PhysicsAnalysis/TruthParticleID/McParticleEvent
Reconstruction/MissingETEvent )
# External dependencies:
find_package( CLHEP )
find_package( HepMC )
find_package( HepPDT )
find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread MathMore Minuit Minuit2 Matrix Physics HistPainter Rint )
# Component(s) in the package:
atlas_add_library( GeneratorFiltersLib
src/*.cxx
PUBLIC_HEADERS GeneratorFilters
INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${HEPMC_INCLUDE_DIRS}
PRIVATE_INCLUDE_DIRS ${HEPPDT_INCLUDE_DIRS}
DEFINITIONS ${CLHEP_DEFINITIONS}
LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} ${HEPMC_LIBRARIES} GaudiKernel StoreGateLib SGtests GeneratorModulesLib
PRIVATE_LINK_LIBRARIES ${HEPPDT_LIBRARIES} AthenaKernel CxxUtils EventInfo xAODJet xAODTruth TruthUtils ParticleEvent McParticleEvent MissingETEvent )
atlas_add_component( GeneratorFilters
src/components/*.cxx
INCLUDE_DIRS ${HEPPDT_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${HEPMC_INCLUDE_DIRS}
LINK_LIBRARIES ${HEPPDT_LIBRARIES} ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} ${HEPMC_LIBRARIES} StoreGateLib SGtests GaudiKernel GeneratorModulesLib AthenaKernel CxxUtils EventInfo xAODJet xAODTruth TruthUtils ParticleEvent McParticleEvent MissingETEvent GeneratorFiltersLib )
# Install files from the package:
atlas_install_joboptions( share/*.py )
......@@ -22,6 +22,7 @@ public:
double m_METmin;
bool m_useHadronicNu;
bool m_useChargedNonShowering;
};
......
......@@ -13,6 +13,7 @@ MissingEtFilter::MissingEtFilter(const std::string& name, ISvcLocator* pSvcLocat
declareProperty("METCut",m_METmin = 10000.);
// Normally we'd include them, but this is unstable if using EvtGen
declareProperty("UseNeutrinosFromHadrons",m_useHadronicNu = false);
declareProperty("UseChargedNonShowering",m_useChargedNonShowering = false);
}
......@@ -26,7 +27,7 @@ StatusCode MissingEtFilter::filterEvent() {
// Consider all non-interacting particles
// We want Missing Transverse Momentum, not "Missing Transverse Energy"
if (MC::isNonInteracting(*pitr)) {
if (MC::isNonInteracting(*pitr) || (m_useChargedNonShowering && MC::PID::isChargedNonShowering((*pitr)->pdg_id()))) {
bool addpart = true;
if(!m_useHadronicNu && MC::isNeutrino(*pitr) && !(fromWZ(*pitr) || fromTau(*pitr)) ) {
addpart = false; // ignore neutrinos from hadron decays
......
......@@ -3,6 +3,7 @@
*/
#include "GeneratorFilters/ParentTwoChildrenFilter.h"
#include "TruthUtils/PIDHelpers.h"
ParentTwoChildrenFilter::ParentTwoChildrenFilter(const std::string& name, ISvcLocator* pSvcLocator)
: GenFilter(name,pSvcLocator)
......@@ -30,8 +31,9 @@ StatusCode ParentTwoChildrenFilter::filterInitialize() {
StatusCode ParentTwoChildrenFilter::filterEvent() {
ATH_MSG_DEBUG(" ParentTwoChildrenFilter filtering for: Parent --> " << m_PDGParent[0]
<< ", Child(1) --> " << m_PDGChild[0] << " and Child(2) --> " << m_PDGChild[1]);
ATH_MSG_DEBUG(" ParentTwoChildrenFilter filtering for: "
<< "Parent (" << m_PDGParent[0] << ") --> Child (" << m_PDGChild[0] << ") + antiparticle and "
<< "Parent (" << m_PDGParent[0] << ") --> Child (" << m_PDGChild[1] << ") + antiparticle." );
int n_parents = 0;
int N_Child[2][2];
for (int i = 0; i < 2; i++) {
......@@ -46,25 +48,27 @@ StatusCode ParentTwoChildrenFilter::filterEvent() {
if ((*pitr)->momentum().perp() < m_PtMinParent) continue;
n_parents++;
// Verify we got a valid pointer and retrieve the number of daughters
int n_daughters = 0;
HepMC::GenParticle* mcpart = (*pitr);
const HepMC::GenVertex* decayVtx = mcpart->end_vertex();
// Verify if we got a valid pointer and retrieve the number of daughters
if (decayVtx != 0) n_daughters = decayVtx->particles_out_size();
if (n_daughters >= 2) {
HepMC::GenVertex::particle_iterator firstChild = (*pitr)->end_vertex()->particles_begin(HepMC::children);
HepMC::GenVertex::particle_iterator endChild = (*pitr)->end_vertex()->particles_end(HepMC::children);
HepMC::GenVertex::particle_iterator thisChild = firstChild;
for(; thisChild != endChild; ++thisChild) {
ATH_MSG_DEBUG(" ParentTwoChildrenFilter: parent ==> " <<(*pitr)->pdg_id() << " child ===> " <<(*thisChild)->pdg_id());
for (int i = 0; i < 2; i++) {
if ( abs((*thisChild)->pdg_id()) == m_PDGChild[i] ){
if ( (*thisChild)->pdg_id() == m_PDGChild[i] ){
if( ((*thisChild)->momentum().perp() >= m_PtMinChild) )N_Child[i][0]++;
}
if ( (*thisChild)->pdg_id() == -m_PDGChild[i] ){
if( ((*thisChild)->momentum().perp() >= m_PtMinChild) )N_Child[i][1]++;
}
if (decayVtx != 0) n_daughters = decayVtx->particles_out_size();
if (n_daughters < 2) continue;
// Check whether decays are part of the requested set
HepMC::GenVertex::particle_iterator firstChild = (*pitr)->end_vertex()->particles_begin(HepMC::children);
HepMC::GenVertex::particle_iterator endChild = (*pitr)->end_vertex()->particles_end(HepMC::children);
HepMC::GenVertex::particle_iterator thisChild = firstChild;
for(; thisChild != endChild; ++thisChild) {
ATH_MSG_DEBUG(" ParentTwoChildrenFilter: parent ==> " <<(*pitr)->pdg_id() << " child ===> " <<(*thisChild)->pdg_id());
for (int i = 0; i < 2; i++) {
if ( abs((*thisChild)->pdg_id()) == m_PDGChild[i] ) {
int antiparticle = ( MC::PID::charge(m_PDGChild[i]) == 0 ? 1 : -1 ); // assume that zero charge particles are their own anti-particle
if ( (*thisChild)->pdg_id() == m_PDGChild[i] ) {
if( ((*thisChild)->momentum().perp() >= m_PtMinChild) ) N_Child[i][0]++;
}
if ( (*thisChild)->pdg_id() == antiparticle * m_PDGChild[i] ) {
if( ((*thisChild)->momentum().perp() >= m_PtMinChild) ) N_Child[i][1]++;
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment