using namespace std;
#include <stdlib.h>
#include <iostream>
#include "hhypPPPipPimPi0Alg.h"
#include "hypinfodef.h"
ClassImp(HHypPPPipPimPi0Alg)
HHypPPPipPimPi0Alg::HHypPPPipPimPi0Alg(Char_t *name_i, Option_t par[])
:HHypBaseAlgorithm(name_i,par)
{
}
HHypPPPipPimPi0Alg::~HHypPPPipPimPi0Alg()
{
}
Bool_t HHypPPPipPimPi0Alg::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 pip = mylist->getTLorentzVector("pi+", 1);
TLorentzVector pim = mylist->getTLorentzVector("pi-", 1);
if (mylist->getIterStatus() == kTRUE) {
TLorentzVector miss4 = (*beam) - (proton1 + proton2 + pip + pim);
TLorentzVector pp_miss = (*beam) - (proton1 + proton2);
TLorentzVector pippim_invmass = (pip + pim);
if (miss4.M2() < lower_pi_cut) {
mylist->removeComb();
}
else if (miss4.M2() > upper_pi_cut) {
mylist->removeComb();
}
if (pp_miss.M2() < pippim_invmass.M2())
mylist->removeComb();
}
}
if (exitIdx > -1)
return kTRUE;
return kFALSE;
}
Bool_t HHypPPPipPimPi0Alg::init()
{
pParams->registerCut("PPPipPimPi0_LOWER_CUT");
pParams->registerCut("PPPipPimPi0_UPPER_CUT");
return kTRUE;
}
Bool_t HHypPPPipPimPi0Alg::reinit()
{
if (!pParams->getCut("PPPipPimPi0_UPPER_CUT", upper_pi_cut)) {
upper_pi_cut=62500;
std::cout << "HHypPPPipPimPi0Alg::init: PI0_UPPER_CUT not found" << std::
endl;
std::cout << "using hardcoded PI0_UPPER_CUT" << std::endl;
}
if (!pParams->getCut("PPPipPimPi0_LOWER_CUT", lower_pi_cut)) {
lower_pi_cut=2500;
std::cout << "HHypPPPipPimPi0Alg::init: PI0_LOWER_CUT not found" << std::
endl;
std::cout << "using hardcoded PI0_LOWER_CUT" << std::endl;
}
std::cout << "PI0_LOWER_CUT is: " << lower_pi_cut << std::endl;
std::cout << "PI0_UPPER_CUT is: " << upper_pi_cut << std::endl;
return kTRUE;
}
Bool_t HHypPPPipPimPi0Alg::finalize()
{
return kTRUE;
}
Last change: Sat May 22 12:58:01 2010
Last generated: 2010-05-22 12:58
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.