using namespace std;
#include <iostream>
#include <hades.h>
#include "hpairext.h"
ClassImp(HPairExt)
HPairExt::HPairExt()
{
reset();
}
HPairExt::HPairExt(HPidParticle *p1, HPidParticle *p2 ):
itsParticle1(*(p1)),itsParticle2(*(p2))
{
calcPairProperties(&itsParticle1,&itsParticle2);
}
HPairExt::~HPairExt()
{
}
HPairExt::HPairExt(const HPairExt& source)
{
}
void HPairExt::print()
{
HPair::print();
}
void HPairExt::reset(void)
{
}
#if 0
Int_t HPairExt::getMostProbablePID(HPidParticle& p,HPidTrackData& t)
{
Float_t currentMax=0.0;
Int_t pid=-99;
for(Int_t j =0;j<p.getNPossibleSpecies();j++)
{
if(p.getWeight(j)>currentMax)
{
currentMax=p.getWeight(j);
pid=p.getPid(j);
}
}
if( !(currentMax>0.0)){
if( t.nPolarity[p.getMomAlg()]<0){
pid =HPidPhysicsConstants::artificialNeg();
}
else if (t.nPolarity[p.getMomAlg()]>0){
pid =HPidPhysicsConstants::artificialPos();
}
}
return pid;
}
#endif
#if 0
Bool_t HPairExt::calcPairPropertiesExt()
{
TLorentzVector pair;
if (gHades->isReal())
{
TVector3 p13 = itsParticle1.Vect();
TVector3 p23 = itsParticle2.Vect();
TLorentzVector p1t;
TLorentzVector p2t;
p1t.SetVectM(p13,HPidPhysicsConstants::mass(getMostProbablePID(itsParticle1,itsTrackData1)));
p2t.SetVectM(p23,HPidPhysicsConstants::mass(getMostProbablePID(itsParticle2,itsTrackData2)));
pair = p1t + p2t;
*(TLorentzVector *)this = pair;
}
else *(TLorentzVector *)this = itsParticle1 + itsParticle2;
setOpeningAngleDeg(TMath::RadToDeg() * itsParticle1.Angle(itsParticle2.Vect()));
setPid1(getMostProbablePID(itsParticle1,itsTrackData1));
setPid2(getMostProbablePID(itsParticle2,itsTrackData2));
setInvariantMass(this->M());
return kTRUE;
}
#endif
Char_t HPairExt::getCharge(void) const
{
return (itsParticle1.getCharge() + itsParticle2.getCharge());
}
void HPairExt::Clear(Option_t *opt)
{
itsParticle1.Clear();
itsParticle2.Clear();
}
Last change: Sat May 22 13:06:12 2010
Last generated: 2010-05-22 13:06
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.