Skip to content

Commit

Permalink
renaming to clarify that All is actually the sum of all true visible …
Browse files Browse the repository at this point in the history
…particles, comments on branch content in class header file
  • Loading branch information
webermat authored and andresailer committed Jan 24, 2020
1 parent 17072fd commit 0e3a910
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 24 deletions.
14 changes: 8 additions & 6 deletions Calorimetry/include/JetAnalyzer.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,37 +64,39 @@ class JetAnalyzer : public Processor {
// Run and event counters
int m_eventNumber=0;
int m_runNumber=0;
//parton level information, save two Z daughters
//parton level information, save first quark in history
int m_d1_mcPDGID=0;
float m_d1_mcE=0;
float m_d1_mcPx=0;
float m_d1_mcPy=0;
float m_d1_mcPz=0;

//parton level information, save second quark in history
int m_d2_mcPDGID=0;
float m_d2_mcE=0;
float m_d2_mcPx=0;
float m_d2_mcPy=0;
float m_d2_mcPz=0;
//particle level information sums --> visible and invisible energy

//only neutrinos
float m_E_trueInv=0;
float m_px_trueInv=0;
float m_py_trueInv=0;
float m_pz_trueInv=0;

//all visible particles
float m_E_trueAll=0;
float m_px_trueAll=0;
float m_py_trueAll=0;
float m_pz_trueAll=0;
float m_E_trueVis=0;
float m_px_trueVis=0;
float m_py_trueVis=0;
float m_pz_trueVis=0;

//all reconstructed particles
float m_E_totPFO=0;
float m_px_totPFO=0;
float m_py_totPFO=0;
float m_pz_totPFO=0;

//if extended parton quantities are saved: dibosons and their decay products
std::vector<float>* m_trueME_E=NULL;
std::vector<float>* m_trueME_Px=NULL;
std::vector<float>* m_trueME_Py=NULL;
Expand Down
36 changes: 18 additions & 18 deletions Calorimetry/src/JetAnalyzer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,10 @@ void JetAnalyzer::init() {
m_py_trueInv = 0;
m_pz_trueInv = 0;

m_E_trueAll = 0;
m_px_trueAll = 0;
m_py_trueAll = 0;
m_pz_trueAll = 0;
m_E_trueVis = 0;
m_px_trueVis = 0;
m_py_trueVis = 0;
m_pz_trueVis = 0;

m_E_totPFO = 0;
m_px_totPFO = 0;
Expand Down Expand Up @@ -167,13 +167,13 @@ void JetAnalyzer::init() {
m_outputTree->Branch("d2_mcPy",&m_d2_mcPy,"d2_mcPy/F");
m_outputTree->Branch("d2_mcPz",&m_d2_mcPz,"d2_mcPz/F");

//true particle level, exclude neutrinos
m_outputTree->Branch("E_trueAll" ,&m_E_trueAll, "E_trueAll/F");
m_outputTree->Branch("Px_trueAll",&m_px_trueAll,"Px_trueAll/F");
m_outputTree->Branch("Py_trueAll",&m_py_trueAll,"Py_trueAll/F");
m_outputTree->Branch("Pz_trueAll",&m_pz_trueAll,"Pz_trueAll/F");
//true particle level, exclude neutrinos, true visible content
m_outputTree->Branch("E_trueVis" ,&m_E_trueVis, "E_trueVis/F");
m_outputTree->Branch("Px_trueVis",&m_px_trueVis,"Px_trueVis/F");
m_outputTree->Branch("Py_trueVis",&m_py_trueVis,"Py_trueVis/F");
m_outputTree->Branch("Pz_trueVis",&m_pz_trueVis,"Pz_trueVis/F");

//true particle level, only neutrinos
//true particle level, only neutrinos, true invisible content
m_outputTree->Branch("E_trueInv" ,&m_E_trueInv, "E_trueInv/F");
m_outputTree->Branch("Px_trueInv",&m_px_trueInv,"Px_trueInv/F");
m_outputTree->Branch("Py_trueInv",&m_py_trueInv,"Py_trueInv/F");
Expand Down Expand Up @@ -214,10 +214,10 @@ void JetAnalyzer::processEvent( LCEvent* evt ) {
m_py_trueInv = 0;
m_pz_trueInv = 0;

m_E_trueAll = 0;
m_px_trueAll = 0;
m_py_trueAll = 0;
m_pz_trueAll = 0;
m_E_trueVis = 0;
m_px_trueVis = 0;
m_py_trueVis = 0;
m_pz_trueVis = 0;

m_E_totPFO = 0;
m_px_totPFO = 0;
Expand Down Expand Up @@ -318,10 +318,10 @@ void JetAnalyzer::processEvent( LCEvent* evt ) {
}
if(mcp->getGeneratorStatus()==1){//visible sum of stable particles --> take neutrinos out
if(abs(mcp->getPDG())!=12 && abs(mcp->getPDG())!=14 && abs(mcp->getPDG())!=16){
m_E_trueAll+=mcp->getEnergy();
m_px_trueAll+=mcp->getMomentum()[0];
m_py_trueAll+=mcp->getMomentum()[1];
m_pz_trueAll+=mcp->getMomentum()[2];
m_E_trueVis+=mcp->getEnergy();
m_px_trueVis+=mcp->getMomentum()[0];
m_py_trueVis+=mcp->getMomentum()[1];
m_pz_trueVis+=mcp->getMomentum()[2];
}else{
m_E_trueInv+=mcp->getEnergy();
m_px_trueInv+=mcp->getMomentum()[0];
Expand Down

0 comments on commit 0e3a910

Please sign in to comment.