Skip to content
Snippets Groups Projects

add calo_total_EM variables that only use fit integral when waveforms are overflown

Merged Deion Elgin Fellers requested to merge dfellers/calypso:calo_variable into master
2 files
+ 27
13
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -185,10 +185,12 @@ StatusCode NtupleDumperAlg::initialize()
@@ -185,10 +185,12 @@ StatusCode NtupleDumperAlg::initialize()
addCalibratedBranches("Calo",4,0);
addCalibratedBranches("Calo",4,0);
addBranch("Calo_total_nMIP", &m_calo_total_nMIP);
addBranch("Calo_total_nMIP", &m_calo_total_nMIP);
addBranch("Calo_total_E_dep", &m_calo_total_E_dep);
addBranch("Calo_total_E_dep", &m_calo_total_E_dep);
addBranch("Calo_total_E_EM", &m_calo_total_E_EM);
addBranch("Calo_total_fit_E_EM", &m_calo_total_fit_E_EM);
addBranch("Calo_total_raw_E_EM", &m_calo_total_raw_E_EM);
addBranch("Calo_total_raw_E_EM", &m_calo_total_raw_E_EM);
addBranch("Calo_total_E_EM_fudged", &m_calo_total_E_EM_fudged);
addBranch("Calo_total_E_EM", &m_calo_total_E_EM);
 
addBranch("Calo_total_fit_E_EM_fudged", &m_calo_total_fit_E_EM_fudged);
addBranch("Calo_total_raw_E_EM_fudged", &m_calo_total_raw_E_EM_fudged);
addBranch("Calo_total_raw_E_EM_fudged", &m_calo_total_raw_E_EM_fudged);
 
addBranch("Calo_total_E_EM_fudged", &m_calo_total_E_EM_fudged);
addCalibratedBranches("Preshower",2,12);
addCalibratedBranches("Preshower",2,12);
addBranch("Preshower_total_nMIP", &m_preshower_total_nMIP);
addBranch("Preshower_total_nMIP", &m_preshower_total_nMIP);
@@ -783,9 +785,15 @@ StatusCode NtupleDumperAlg::execute(const EventContext &ctx) const
@@ -783,9 +785,15 @@ StatusCode NtupleDumperAlg::execute(const EventContext &ctx) const
m_calo_total_nMIP += hit->Nmip();
m_calo_total_nMIP += hit->Nmip();
m_calo_total_E_dep += hit->E_dep();
m_calo_total_E_dep += hit->E_dep();
m_calo_total_E_EM += hit->E_EM();
m_calo_total_fit_E_EM += hit->E_EM();
m_calo_total_raw_E_EM += (hit->E_EM()*hit->fit_to_raw_ratio());
m_calo_total_raw_E_EM += (hit->E_EM()*hit->fit_to_raw_ratio());
 
if (m_wave_status[ch]&4) {
 
m_calo_total_E_EM += hit->E_EM();
 
} else {
 
m_calo_total_E_EM += (hit->E_EM()*hit->fit_to_raw_ratio());
 
}
 
ATH_MSG_DEBUG("Calibrated calo: ch is " << ch << ", edep is " << hit->E_dep() << ", E_EM is " << hit->E_EM() << ", Nmip is " << hit->Nmip() << ", fit_to_raw_ratio is " << hit->fit_to_raw_ratio());
ATH_MSG_DEBUG("Calibrated calo: ch is " << ch << ", edep is " << hit->E_dep() << ", E_EM is " << hit->E_EM() << ", Nmip is " << hit->Nmip() << ", fit_to_raw_ratio is " << hit->fit_to_raw_ratio());
//// the following is an example of how to access the linked waveform data from the calibrated data
//// the following is an example of how to access the linked waveform data from the calibrated data
@@ -801,11 +809,13 @@ StatusCode NtupleDumperAlg::execute(const EventContext &ctx) const
@@ -801,11 +809,13 @@ StatusCode NtupleDumperAlg::execute(const EventContext &ctx) const
}
}
// add a fudged energy variable that corrects the MC to agree with the testbeam results
// add a fudged energy variable that corrects the MC to agree with the testbeam results
m_calo_total_E_EM_fudged = m_calo_total_E_EM;
m_calo_total_fit_E_EM_fudged = m_calo_total_fit_E_EM;
m_calo_total_raw_E_EM_fudged = m_calo_total_raw_E_EM;
m_calo_total_raw_E_EM_fudged = m_calo_total_raw_E_EM;
 
m_calo_total_E_EM_fudged = m_calo_total_E_EM;
if (isMC) {
if (isMC) {
m_calo_total_E_EM_fudged = m_calo_total_E_EM_fudged * m_caloMC_FudgeFactor;
m_calo_total_fit_E_EM_fudged = m_calo_total_fit_E_EM_fudged * m_caloMC_FudgeFactor;
m_calo_total_raw_E_EM_fudged = m_calo_total_raw_E_EM_fudged * m_caloMC_FudgeFactor;
m_calo_total_raw_E_EM_fudged = m_calo_total_raw_E_EM_fudged * m_caloMC_FudgeFactor;
 
m_calo_total_E_EM_fudged = m_calo_total_E_EM_fudged * m_caloMC_FudgeFactor;
}
}
// load in calibrated preshower container
// load in calibrated preshower container
@@ -813,11 +823,11 @@ StatusCode NtupleDumperAlg::execute(const EventContext &ctx) const
@@ -813,11 +823,11 @@ StatusCode NtupleDumperAlg::execute(const EventContext &ctx) const
ATH_CHECK(preshowerCalibratedContainer.isValid());
ATH_CHECK(preshowerCalibratedContainer.isValid());
for (auto hit : *preshowerCalibratedContainer) {
for (auto hit : *preshowerCalibratedContainer) {
int ch=hit->channel();
int ch=hit->channel();
m_calibrated_nMIP[ch] = hit->Nmip();
m_calibrated_nMIP[ch] = hit->Nmip() * hit->fit_to_raw_ratio();
m_calibrated_E_dep[ch] = hit->E_dep();
m_calibrated_E_dep[ch] = hit->E_dep() * hit->fit_to_raw_ratio();
m_preshower_total_nMIP += hit->Nmip();
m_preshower_total_nMIP += hit->Nmip() * hit->fit_to_raw_ratio();
m_preshower_total_E_dep += hit->E_dep();
m_preshower_total_E_dep += hit->E_dep() * hit->fit_to_raw_ratio();
ATH_MSG_DEBUG("Calibrated preshower: ch is " << ch << ", edep is " << hit->E_dep() << ", E_EM is " << hit->E_EM() << ", Nmip is " << hit->Nmip() << ", fit_to_raw_ratio is " << hit->fit_to_raw_ratio());
ATH_MSG_DEBUG("Calibrated preshower: ch is " << ch << ", edep is " << hit->E_dep() << ", E_EM is " << hit->E_EM() << ", Nmip is " << hit->Nmip() << ", fit_to_raw_ratio is " << hit->fit_to_raw_ratio());
}
}
@@ -1288,10 +1298,12 @@ NtupleDumperAlg::clearTree() const
@@ -1288,10 +1298,12 @@ NtupleDumperAlg::clearTree() const
m_calo_total_nMIP=0;
m_calo_total_nMIP=0;
m_calo_total_E_dep=0;
m_calo_total_E_dep=0;
m_calo_total_E_EM=0;
m_calo_total_fit_E_EM=0;
m_calo_total_raw_E_EM=0;
m_calo_total_raw_E_EM=0;
m_calo_total_E_EM_fudged=0;
m_calo_total_E_EM=0;
 
m_calo_total_fit_E_EM_fudged=0;
m_calo_total_raw_E_EM_fudged=0;
m_calo_total_raw_E_EM_fudged=0;
 
m_calo_total_E_EM_fudged=0;
m_preshower_total_nMIP=0;
m_preshower_total_nMIP=0;
m_preshower_total_E_dep=0;
m_preshower_total_E_dep=0;
Loading