using namespace std;
#include <stdlib.h>
#include <iostream>
#include "hhypPPElasticAlg.h"
#include "hypinfodef.h"
ClassImp(HHypPPElasticAlg)
HHypPPElasticAlg::HHypPPElasticAlg(Char_t *name_i, Option_t par[])
:HHypBaseAlgorithm(name_i,par)
{
}
HHypPPElasticAlg::~HHypPPElasticAlg()
{
}
Bool_t HHypPPElasticAlg::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);
if (mylist->getIterStatus() == kTRUE) {
if (TMath::Abs(TMath::Abs(proton1.Phi() - proton2.Phi()) - TMath::Pi()) > 5.0 * TMath::DegToRad()) {
mylist->resetProbAlg(-1.);
} else {
TLorentzVector pp_miss = (*beam) - (proton1 + proton2);
if (pp_miss.M2() < -1000000 || pp_miss.M2() > 1000000)
mylist->resetProbAlg(-1.);
}
}
}
if (exitIdx > -1)
return kTRUE;
return kFALSE;
}
Bool_t HHypPPElasticAlg::init()
{
return kTRUE;
}
Bool_t HHypPPElasticAlg::reinit()
{
return kTRUE;
}
Bool_t HHypPPElasticAlg::finalize()
{
return kTRUE;
}
Last change: Sat May 22 12:57:54 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.