using namespace std;
#include <stdlib.h>
#include <iostream>
#include "hhypPPEpEmGammaAlg.h"
#include "hypinfodef.h"
ClassImp(HHypPPEpEmGammaAlg)
HHypPPEpEmGammaAlg::HHypPPEpEmGammaAlg(Char_t *name_i, Option_t par[])
:HHypBaseAlgorithm(name_i,par) {
}
HHypPPEpEmGammaAlg::~HHypPPEpEmGammaAlg() {
}
Bool_t HHypPPEpEmGammaAlg::execute()
{
if (!beam) {
cerr << algoName << " needs beam particle! " << endl;
return kFALSE;
}
mylist->CombIteratorReset();
while (mylist->CombIterator()) {
TLorentzVector proton1 = mylist->getTLorentzVector("p", 1);
TLorentzVector proton2 = mylist->getTLorentzVector("p", 2);
TLorentzVector ep = mylist->getTLorentzVector("e+", 1);
TLorentzVector em = mylist->getTLorentzVector("e-", 1);
if (mylist->getIterStatus() == kTRUE) {
TLorentzVector miss4 = (*beam) - (proton1 + proton2 + ep + em);
TLorentzVector pp_miss = (*beam) - (proton1 + proton2);
TLorentzVector epem_invmass = (ep + em);
if (miss4.M2() < lower_gamma_cut) {
mylist->removeComb();
}
else if (miss4.M2() > upper_gamma_cut) {
mylist->removeComb();
}
}
}
if (exitIdx > -1)
return kTRUE;
return kFALSE;
}
Bool_t HHypPPEpEmGammaAlg::init()
{
pParams->registerCut("PPEpEmGamma_LOWER_CUT");
pParams->registerCut("PPEpEmGamma_UPPER_CUT");
return kTRUE;
}
Bool_t HHypPPEpEmGammaAlg::reinit()
{
if (!pParams->getCut("PPEpEmGamma_UPPER_CUT", upper_gamma_cut)) {
upper_gamma_cut=23000.0;
std::cout << "HHypPPEpEmGammaAlg::init: GAMMA_UPPER_CUT not found" << std::endl;
std::cout << "using hardcoded GAMMA_UPPER_CUT" << std::endl;
}
if (!pParams->getCut("PPEpEmGamma_LOWER_CUT", lower_gamma_cut)) {
lower_gamma_cut=-23000.0;
std::cout << "HHypPPEpEmGammaAlg::init: GAMMA_LOWER_CUT not found" << std::endl;
std::cout << "using hardcoded GAMMA_LOWER_CUT" << std::endl;
}
std::cout << "GAMMA_LOWER_CUT is: " << lower_gamma_cut << std::endl;
std::cout << "GAMMA_UPPER_CUT is: " << upper_gamma_cut << std::endl;
return kTRUE;
}
Bool_t HHypPPEpEmGammaAlg::finalize()
{
return kTRUE;
}
Last change: Sat May 22 12:57:55 2010
Last generated: 2010-05-22 12:57
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.