Skip to content

Commit

Permalink
Merge pull request #405 from UCATLAS/feature/addPhotonNtupleDump
Browse files Browse the repository at this point in the history
Feature/add photon ntuple dump
  • Loading branch information
kratsg committed Dec 12, 2015
2 parents 8dbb5b3 + 4aecd09 commit 563a9d6
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Root/HelpTreeBase.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1302,7 +1302,7 @@ void HelpTreeBase::AddPhotons(const std::string detailStr) {
m_tree->Branch("ph_isIsolated_Cone40", &m_ph_isIsolated_Cone40);
m_tree->Branch("ph_isIsolated_Cone20", &m_ph_isIsolated_Cone20);

m_tree->Branch("ph_etcone20", &m_ph_etcone20);
//m_tree->Branch("ph_etcone20", &m_ph_etcone20);
m_tree->Branch("ph_ptcone20", &m_ph_ptcone20);
m_tree->Branch("ph_ptcone30", &m_ph_ptcone30);
m_tree->Branch("ph_ptcone40", &m_ph_ptcone40);
Expand Down Expand Up @@ -1369,7 +1369,7 @@ void HelpTreeBase::FillPhotons( const xAOD::PhotonContainer* photons ) {
m_ph_isIsolated_Cone20.push_back( -1 );
}

m_ph_etcone20 .push_back( ph_itr->isolation( xAOD::Iso::etcone20 ) / m_units );
//m_ph_etcone20 .push_back( ph_itr->isolation( xAOD::Iso::etcone20 ) / m_units );
m_ph_ptcone20 .push_back( ph_itr->isolation( xAOD::Iso::ptcone20 ) / m_units );
m_ph_ptcone30 .push_back( ph_itr->isolation( xAOD::Iso::ptcone30 ) / m_units );
m_ph_ptcone40 .push_back( ph_itr->isolation( xAOD::Iso::ptcone40 ) / m_units );
Expand Down Expand Up @@ -1427,7 +1427,7 @@ void HelpTreeBase::ClearPhotons() {
m_ph_isIsolated_Cone40CaloOnly.clear();
m_ph_isIsolated_Cone40.clear();
m_ph_isIsolated_Cone20.clear();
m_ph_etcone20.clear();
//m_ph_etcone20.clear();
m_ph_ptcone20.clear();
m_ph_ptcone30.clear();
m_ph_ptcone40.clear();
Expand Down
11 changes: 11 additions & 0 deletions Root/TreeAlgo.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <xAODTracking/VertexContainer.h>
#include <xAODEventInfo/EventInfo.h>
#include <AthContainers/ConstDataVector.h>
#include <xAODEgamma/PhotonContainer.h>

#include <xAODAnaHelpers/TreeAlgo.h>

Expand Down Expand Up @@ -35,6 +36,7 @@ TreeAlgo :: TreeAlgo (std::string className) :
m_fatJetDetailStr = "";
m_tauDetailStr = "";
m_METDetailStr = "";
m_photonDetailStr = "";

m_debug = false;

Expand All @@ -46,6 +48,7 @@ TreeAlgo :: TreeAlgo (std::string className) :
m_fatJetContainerName = "";
m_tauContainerName = "";
m_METContainerName = "";
m_photonContainerName = "";

// DC14 switch for little things that need to happen to run
// for those samples with the corresponding packages
Expand Down Expand Up @@ -115,6 +118,7 @@ EL::StatusCode TreeAlgo :: treeInitialize ()
if ( !m_fatJetContainerName.empty() ) { m_helpTree->AddFatJets (m_fatJetDetailStr); }
if ( !m_tauContainerName.empty() ) { m_helpTree->AddTaus (m_tauDetailStr); }
if ( !m_METContainerName.empty() ) { m_helpTree->AddMET (m_METDetailStr); }
if ( !m_photonContainerName.empty() ) { m_helpTree->AddPhotons (m_photonDetailStr); }

Info("treeInitialize()", "Successfully initialized output tree");

Expand All @@ -136,6 +140,7 @@ EL::StatusCode TreeAlgo :: configure ()
m_fatJetDetailStr = config->GetValue("FatJetDetailStr", m_fatJetDetailStr.c_str());
m_tauDetailStr = config->GetValue("TauDetailStr", m_tauDetailStr.c_str());
m_METDetailStr = config->GetValue("METDetailStr", m_METDetailStr.c_str());
m_photonDetailStr = config->GetValue("PhotonDetailStr", m_photonDetailStr.c_str());

m_debug = config->GetValue("Debug" , m_debug);

Expand All @@ -147,6 +152,7 @@ EL::StatusCode TreeAlgo :: configure ()
m_fatJetContainerName = config->GetValue("FatJetContainerName", m_fatJetContainerName.c_str());
m_tauContainerName = config->GetValue("TauContainerName", m_tauContainerName.c_str());
m_METContainerName = config->GetValue("METContainerName", m_METContainerName.c_str());
m_photonContainerName = config->GetValue("PhotonContainerName", m_photonContainerName.c_str());

// DC14 switch for little things that need to happen to run
// for those samples with the corresponding packages
Expand Down Expand Up @@ -221,6 +227,11 @@ EL::StatusCode TreeAlgo :: execute ()
RETURN_CHECK("HTopMultilepTreeAlgo::execute()", HelperFunctions::retrieve(inMETCont, m_METContainerName, m_event, m_store, m_debug) , "");
m_helpTree->FillMET( inMETCont );
}
if ( !m_photonContainerName.empty() ) {
const xAOD::PhotonContainer* inPhotons(nullptr);
RETURN_CHECK("TreeAlgo::execute()", HelperFunctions::retrieve(inPhotons, m_photonContainerName, m_event, m_store, m_verbose) ,"");
m_helpTree->FillPhotons( inPhotons );
}

// fill the tree
m_helpTree->Fill();
Expand Down
2 changes: 1 addition & 1 deletion xAODAnaHelpers/HelpTreeBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ class HelpTreeBase {
std::vector<int> m_ph_isIsolated_Cone40CaloOnly;
std::vector<int> m_ph_isIsolated_Cone40;
std::vector<int> m_ph_isIsolated_Cone20;
std::vector<float> m_ph_etcone20;
//std::vector<float> m_ph_etcone20;
std::vector<float> m_ph_ptcone20;
std::vector<float> m_ph_ptcone30;
std::vector<float> m_ph_ptcone40;
Expand Down
2 changes: 2 additions & 0 deletions xAODAnaHelpers/TreeAlgo.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class TreeAlgo : public xAH::Algorithm
std::string m_fatJetDetailStr;
std::string m_tauDetailStr;
std::string m_METDetailStr;
std::string m_photonDetailStr;

std::string m_evtContainerName;
std::string m_muContainerName;
Expand All @@ -34,6 +35,7 @@ class TreeAlgo : public xAH::Algorithm
std::string m_fatJetContainerName;
std::string m_tauContainerName;
std::string m_METContainerName;
std::string m_photonContainerName;

bool m_DC14;

Expand Down

0 comments on commit 563a9d6

Please sign in to comment.