//////////////////////////////////////////////////////////////////////////
// //
// ATLFBrowsable //
// //
// helper class to browse generated particles. //
// //
//////////////////////////////////////////////////////////////////////////
#include <TBrowser.h>
#include <TMCParticle.h>
#include <TClonesArray.h>
#include "ATLFast.h"
#include "ATLFBrowsable.h"
#include "ATLFBigBang.h"
#include "ATLFMCMaker.h"
ClassImp(ATLFBrowsable)
//_____________________________________________________________________________
ATLFBrowsable::ATLFBrowsable()
{
}
//_____________________________________________________________________________
void ATLFBrowsable::Browse(TBrowser *b)
{
ATLFMCMaker *mcarlo = gATLFast->MCMaker();
TClonesArray *particles = mcarlo->Fruits();
Int_t nparticles = particles->GetEntriesFast();
TMCParticle *refpart = (TMCParticle*)m_RefObject;
TMCParticle *part;
ATLFBrowsable *brow;
char name[64];
Int_t iparent;
for (Int_t i=0;i<nparticles;i++) {
part = (TMCParticle*)particles->UncheckedAt(i);
iparent = part->GetParent();
if (!iparent) continue;
if (particles->UncheckedAt(iparent-1) != refpart) continue;
brow = m_BigBang->GetBrowsable(i);
sprintf(name,"%s_%d",part->GetName(),i);
brow->SetName(name);
brow->SetRefObject(part);
b->Add(brow,name);
}
}
ROOT page - Class index - Top of the page
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.