Skip to content
Snippets Groups Projects
Commit 06d92666 authored by Will Kalderon's avatar Will Kalderon
Browse files

add m_debugJetAlg to JGTowerReader

Former-commit-id: 2367933f0b9039d8ee5f5c15cc02d2c56ed3a6f0
parent fc1aacaa
No related branches found
No related tags found
No related merge requests found
......@@ -43,6 +43,7 @@ class JGTowerReader: public ::AthAlgorithm {
virtual StatusCode HistBookFill(const TString name, Int_t nbinsx, const Double_t* xbins, float xvalue,float wei);
private:
bool m_outputNoise;
bool m_debugJetAlg;
bool m_dumpTowersEtaPhi;
bool m_dumpSeedsEtaPhi;
bool m_makeSquareJets;
......
......@@ -9,6 +9,8 @@
#include "StoreGate/WriteHandle.h"
#include "AthenaBaseComps/AthAlgTool.h"
#include "AthenaBaseComps/AthAlgorithm.h"
#include "AthenaBaseComps/AthMessaging.h"
#include "CaloTriggerTool/JTowerSCMap.h"
#include "CaloTriggerTool/GTowerSCMap.h"
#include "CaloIdentifier/TTOnlineID.h"
......@@ -56,10 +58,10 @@ class JetAlg{
};
static StatusCode SeedGrid(const xAOD::JGTowerContainer*towers, JetAlg::Seed*seeds, bool &m_dumpSeedsEtaPhi);
static StatusCode SeedFinding(const xAOD::JGTowerContainer*towers, JetAlg::Seed*seeds, float seed_size,float range, std::vector<float> noise);
static StatusCode SeedFinding(const xAOD::JGTowerContainer*towers, JetAlg::Seed*seeds, float seed_size,float range, std::vector<float> noise, bool m_debug = false);
static StatusCode BuildJet(const xAOD::JGTowerContainer*towers, JetAlg::Seed*seeds, std::vector<JetAlg::L1Jet> &js, float jet_size, std::vector<float> noise);
static StatusCode BuildRoundJet(const xAOD::JGTowerContainer*towers, JetAlg::Seed*seeds, std::vector<JetAlg::L1Jet> &js, float jet_size, std::vector<float> noise);
static StatusCode BuildJet(const xAOD::JGTowerContainer*towers, JetAlg::Seed*seeds, std::vector<JetAlg::L1Jet> &js, float jet_size, std::vector<float> noise, bool m_debug = false);
static StatusCode BuildRoundJet(const xAOD::JGTowerContainer*towers, JetAlg::Seed*seeds, std::vector<JetAlg::L1Jet> &js, float jet_size, std::vector<float> noise, bool m_debug = false);
};
#endif
......@@ -79,6 +79,7 @@ algseq = CfgMgr.AthSequencer("AthAlgSeq") # gets the main AthSequencer
algseq += CfgMgr.JGTowerReader( # adds an instance of your alg to it
outputNoise = False,
debugJetAlg = debug,
noise_file = "noise_r9813.root", # "/eos/user/c/cylin/public/L1Calo/noise_r10684.root", - this is not generally accessible (I can see it but not open it)
makeSquareJets = True,
jSeed_size = 0.2,
......
......@@ -40,6 +40,7 @@ AthAlgorithm( name, pSvcLocator ),
histSvc("THistSvc",name){
declareProperty("outputNoise",m_outputNoise=false);
declareProperty("debugJetAlg", m_debugJetAlg=false);
declareProperty("dumpTowersEtaPhi",m_dumpTowersEtaPhi=false);
declareProperty("dumpSeedsEtaPhi",m_dumpSeedsEtaPhi=false);
declareProperty("noise_file",m_noise_file="");
......@@ -219,15 +220,15 @@ StatusCode JGTowerReader::JFexAlg(const xAOD::JGTowerContainer* jTs){
// the diameter of seed, and its range to be local maximum
// Careful to ensure the range set to be no tower double counted
ATH_MSG_DEBUG("JFexAlg: SeedFinding with jSeeds; m_jSeed_size = " << m_jSeed_size << ", m_jMax_r = " << m_jMax_r);
CHECK(JetAlg::SeedFinding(jTs,jSeeds,m_jSeed_size,m_jMax_r,jJet_thr));
CHECK(JetAlg::SeedFinding(jTs,jSeeds,m_jSeed_size,m_jMax_r,jJet_thr,m_debugJetAlg));
ATH_MSG_DEBUG("JFexAlg: BuildJet");
CHECK(JetAlg::BuildJet(jTs, jSeeds, jL1Jets, m_jJet_r, jJet_thr));
CHECK(JetAlg::BuildJet(jTs, jSeeds, jL1Jets, m_jJet_r, jJet_thr, m_debugJetAlg));
}
if(m_makeRoundJets) {
ATH_MSG_DEBUG("JFexAlg: SeedFinding with jJetSeeds; m_jJetSeed_size = " << m_jJetSeed_size << ", m_jJet_max_r = " << m_jJet_max_r);
CHECK(JetAlg::SeedFinding(jTs,jJetSeeds,m_jJetSeed_size,m_jJet_max_r,jJet_jet_thr));
CHECK(JetAlg::SeedFinding(jTs,jJetSeeds,m_jJetSeed_size,m_jJet_max_r,jJet_jet_thr,m_debugJetAlg));
ATH_MSG_DEBUG("JFexAlg: BuildRoundJet");
CHECK(JetAlg::BuildRoundJet(jTs, jJetSeeds, jJet_L1Jets, m_jJet_jet_r, jJet_jet_thr));
CHECK(JetAlg::BuildRoundJet(jTs, jJetSeeds, jJet_L1Jets, m_jJet_jet_r, jJet_jet_thr, m_debugJetAlg));
}
ATH_MSG_DEBUG("JFexAlg: BuildMET");
......
......@@ -91,9 +91,12 @@ StatusCode JetAlg::SeedGrid(const xAOD::JGTowerContainer*towers, JetAlg::Seed*se
}
//To find the seeds as local maxima
StatusCode JetAlg::SeedFinding(const xAOD::JGTowerContainer*towers, JetAlg::Seed*seeds, float seed_size,float range, std::vector<float> noise){
bool m_debug = false;
StatusCode JetAlg::SeedFinding(const xAOD::JGTowerContainer*towers, JetAlg::Seed*seeds, float seed_size,float range, std::vector<float> noise, bool m_debug){
// get the energy of each seeds which is defined as 2x2 towers in barrel and endcap, and single tower in fcal
// static MsgStream staticMsg("MyStaticMsgStream"0);
// static MsgStream staticMsg();
// staticMsg << "My message" << endmsg
// msg() << MSG::INFO << "Retrieved tool " << endmsg;
// ATH_MSG_DEBUG("How can I get ATH_MSG_DEBUG to compile???");
if(m_debug)
std::cout << "JetAlg::SeedFinding: getting seeds with " << seed_size << " and " << range << std::endl;
......@@ -187,8 +190,7 @@ StatusCode JetAlg::SeedFinding(const xAOD::JGTowerContainer*towers, JetAlg::Seed
}
StatusCode JetAlg::BuildJet(const xAOD::JGTowerContainer*towers,JetAlg::Seed*seeds, std::vector<JetAlg::L1Jet>& js, float jet_r,std::vector<float> noise){
bool m_debug = false;
StatusCode JetAlg::BuildJet(const xAOD::JGTowerContainer*towers,JetAlg::Seed*seeds, std::vector<JetAlg::L1Jet>& js, float jet_r, std::vector<float> noise, bool m_debug){
for(unsigned eta_ind=0; eta_ind<seeds->eta.size(); eta_ind++){
for(unsigned phi_ind=0; phi_ind<seeds->phi.at(eta_ind).size(); phi_ind++){
if(!seeds->local_max.at(eta_ind).at(phi_ind)) continue;
......@@ -212,8 +214,7 @@ StatusCode JetAlg::BuildJet(const xAOD::JGTowerContainer*towers,JetAlg::Seed*see
}
StatusCode JetAlg::BuildRoundJet(const xAOD::JGTowerContainer*towers, JetAlg::Seed*seeds, std::vector<JetAlg::L1Jet>& js, float jet_r, std::vector<float> noise){
bool m_debug = false;
StatusCode JetAlg::BuildRoundJet(const xAOD::JGTowerContainer*towers, JetAlg::Seed*seeds, std::vector<JetAlg::L1Jet>& js, float jet_r, std::vector<float> noise, bool m_debug){
for(unsigned eta_ind=0; eta_ind<seeds->eta.size(); eta_ind++){
for(unsigned phi_ind=0; phi_ind<seeds->phi.at(eta_ind).size(); phi_ind++){
if(!seeds->local_max.at(eta_ind).at(phi_ind)) continue;
......
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