//////////////////////////////////////////////////////////////////////////
// //
// TMBTree class for BCJets //
// //
// Created: 18-JUL-2002 A. Naumann (axel@fnal.gov) //
// //
//////////////////////////////////////////////////////////////////////////
#include "tmb_tree/TMBJets.hpp"
#include "tmb_tree/TMBBCJet.hpp"
#include "tmb_tree/TMBBCTagger.hpp"
#include "tmb_tree/TClassRef.hpp"
#include <iostream>
ClassImp(TMBBCJet)
const Float_t TMBBCJet::InvalidValue = 9E10;
TMBBCJet::TMBBCJet(const TRef& jet, std::list<TMBBCTagger*>* tags): fMapTags(0), fJet(jet) {
if (tags) {
fMapTags=new TMap(tags->size());
fMapTags->SetOwner();
for(std::list<TMBBCTagger*>::iterator itag=tags->begin();
itag!=tags->end(); itag++)
AddTagger(*itag);
}
}
TMBBCJet::~TMBBCJet(){
if (fMapTags){
fMapTags->DeleteAll();
delete fMapTags;
}
}
void TMBBCJet::AddTagger(TMBBCTagger* tag) {
if (!fMapTags) fMapTags=new TMap();
fMapTags->SetOwner();
fMapTags->Add(new TClassRef(tag->IsA()),tag);
return;
}
TMBBCTagger* TMBBCJet::GetTagger(const TClass* tagcl) const {
if (!fMapTags) {
Warning("GetTagger","There are no tags associated with this jet!");
return NULL;
}
TClassRef cr(tagcl);
return (TMBBCTagger*) fMapTags->GetValue(&cr);
}
TMBJets* TMBBCJet::GetJet() const {
if (!fJet.IsValid()) return NULL;
return (TMBJets*) fJet.GetObject();
}
Float_t TMBBCJet::px() const {
if (GetJet()) return GetJet()->px();
else return InvalidValue;
}
Float_t TMBBCJet::py() const {
if (GetJet()) return GetJet()->py();
else return InvalidValue;
}
Float_t TMBBCJet::pz() const {
if (GetJet()) return GetJet()->pz();
else return InvalidValue;
}
Float_t TMBBCJet::E() const {
if (GetJet()) return GetJet()->E();
else return InvalidValue;
}
Float_t TMBBCJet::charge() const {
if (GetJet()) return GetJet()->charge();
else return InvalidValue;
}
ROOT page - Class index - Class Hierarchy - 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.