#include "hgeantfilter.h"
#include "hades.h"
#include "hgeantkine.h"
#include "hlinkeddataobject.h"
#include "hgeantmdc.h"
#include "hgeanttof.h"
#include "hgeantshower.h"
#include "hgeantrich.h"
ClassImp(HGeantFilter)
HHitFilter::HHitFilter(HCategory* pCat) {
pKineCat = pCat;
}
HHitFilter::~HHitFilter() {}
Bool_t HHitFilter::check(TObject* obj) {
Int_t track = ((HLinkedDataObject*)obj)->getTrack();
HGeantKine* pKine = (HGeantKine*)(pKineCat->getObject(track-1));
return(!pKine->isSuppressed());
}
ClassImp(HGeantFilter)
HGeantFilter::HGeantFilter(Text_t *name,Text_t *title, Int_t id, Float_t acc)
: HReconstructor(name,title) {
particleId = id;
accepted = acc;
catKine = NULL;
catMdc = NULL;
catTof = NULL;
catShower = NULL;
catRichPhoton = NULL;
catRichDirect = NULL;
catRichMirror = NULL;
}
HGeantFilter::HGeantFilter(HGeantFilter &filter) {
Error("HGeantFilter","Copy constructor not defined");
}
HGeantFilter::~HGeantFilter(void) {
}
Bool_t HGeantFilter::init(void) {
HEvent* ev = (HEvent*)(gHades->getCurrentEvent());
if (!ev) return kFALSE;
if ((catKine = ev->getCategory(catGeantKine)) == NULL) return kFALSE;
catMdc = ev->getCategory(catMdcGeantRaw);
catTof = ev->getCategory(catTofGeantRaw);
catShower = ev->getCategory(catShowerGeantRaw);
catRichPhoton = ev->getCategory(catRichGeantRaw);
catRichDirect = ev->getCategory(catRichGeantRaw+1);
catRichMirror = ev->getCategory(catRichGeantRaw+2);
return kTRUE;
}
Int_t HGeantFilter::execute(void) {
HGeantKine::suppressTracks(particleId,accepted,(HLinearCategory*)catKine);
HHitFilter filt;
filt.setKine(catKine);
if (catMdc) catMdc->filter(filt);
if (catTof) catTof->filter(filt);
if (catShower) catShower->filter(filt);
if (catRichPhoton) catRichPhoton->filter(filt);
if (catRichDirect) catRichDirect->filter(filt);
if (catRichMirror) catRichMirror->filter(filt);
return 0;
}
Bool_t HGeantFilter::reinit(void) {
return kTRUE;
}
Bool_t HGeantFilter::finalize(void) {
return kTRUE;
}
Last change: Sat May 22 12:55:27 2010
Last generated: 2010-05-22 12:55
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.