#include <RecoMuon/TrackerSeedGenerator/plugins/CompositeTSG.h>
Public Types | |
typedef std::vector < TrajectorySeed > | BTSeedCollection |
typedef std::pair< const Trajectory *, reco::TrackRef > | TrackCand |
Public Member Functions | |
CompositeTSG (const edm::ParameterSet &pset) | |
void | init (const MuonServiceProxy *service) |
initialized the TSGs | |
void | setEvent (const edm::Event &event) |
set the event to the TSGs | |
virtual void | trackerSeeds (const TrackCand &, const TrackingRegion &, BTSeedCollection &)=0 |
provides the seeds from the TSGs: must be overloaded | |
virtual | ~CompositeTSG () |
Protected Member Functions | |
uint | nTSGs () |
Protected Attributes | |
std::string | theCategory |
std::vector< TH1F * > | theHistos |
std::vector< std::string > | theNames |
const MuonServiceProxy * | theProxyService |
std::vector < TrackerSeedGenerator * > | theTSGs |
bool | useTFileService_ |
used as a SeparatingTSG of CombinedTSG
Definition at line 21 of file CompositeTSG.h.
typedef std::vector<TrajectorySeed> CompositeTSG::BTSeedCollection |
typedef std::pair<const Trajectory*, reco::TrackRef> CompositeTSG::TrackCand |
CompositeTSG::CompositeTSG | ( | const edm::ParameterSet & | pset | ) |
Definition at line 12 of file CompositeTSG.cc.
References edm::ParameterSet::addUntrackedParameter(), edm::ParameterSet::empty(), DBSPlugin::get(), edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), theCategory, theHistos, theNames, theTSGs, and useTFileService_.
00012 { 00013 theCategory = "CompositeTSG"; 00014 00015 useTFileService_ = par.getUntrackedParameter<bool>("UseTFileService",false); 00016 edm::Service<TFileService> fs; 00017 00018 //configure the individual components of the TSG 00019 std::vector<std::string> PSetNames = par.getParameter<std::vector<std::string> >("PSetNames"); 00020 00021 for (std::vector<std::string>::iterator nIt = PSetNames.begin();nIt!=PSetNames.end();nIt++){ 00022 edm::ParameterSet TSGpset = par.getParameter<edm::ParameterSet>(*nIt); 00023 if (TSGpset.empty()) { 00024 theNames.push_back((*nIt)+":"+"NULL"); 00025 theTSGs.push_back(0); 00026 theHistos.push_back(0); 00027 }else { 00028 std::string SeedGenName = TSGpset.getParameter<std::string>("ComponentName"); 00029 theNames.push_back((*nIt)+":"+SeedGenName); 00030 TSGpset.addUntrackedParameter<bool>("UseTFileService",useTFileService_); 00031 theTSGs.push_back(TrackerSeedGeneratorFactory::get()->create(SeedGenName,TSGpset)); 00032 std::string hName = "nSeedPerTrack_"+(*nIt)+"_"+SeedGenName; 00033 if(useTFileService_) theHistos.push_back(fs->make<TH1F>(hName.c_str(),hName.c_str(),76,-0.5,75.5)); 00034 else theHistos.push_back(0); 00035 } 00036 } 00037 00038 }
CompositeTSG::~CompositeTSG | ( | ) | [virtual] |
void CompositeTSG::init | ( | const MuonServiceProxy * | service | ) | [virtual] |
initialized the TSGs
Reimplemented from TrackerSeedGenerator.
Definition at line 45 of file CompositeTSG.cc.
References theProxyService, and theTSGs.
00045 { 00046 theProxyService = service; 00047 for (uint iTSG=0; iTSG!=theTSGs.size();iTSG++){ 00048 if(theTSGs[iTSG]) theTSGs[iTSG]->init(service); 00049 } 00050 }
uint CompositeTSG::nTSGs | ( | ) | [inline, protected] |
Definition at line 41 of file CompositeTSG.h.
References theTSGs.
Referenced by DualByEtaTSG::DualByEtaTSG().
00041 { return theTSGs.size();}
void CompositeTSG::setEvent | ( | const edm::Event & | event | ) | [virtual] |
set the event to the TSGs
Reimplemented from TrackerSeedGenerator.
Definition at line 52 of file CompositeTSG.cc.
References theTSGs.
00052 { 00053 for (uint iTSG=0; iTSG!=theTSGs.size();iTSG++){ 00054 if(theTSGs[iTSG]) theTSGs[iTSG]->setEvent(event); 00055 } 00056 }
virtual void CompositeTSG::trackerSeeds | ( | const TrackCand & | , | |
const TrackingRegion & | , | |||
BTSeedCollection & | ||||
) | [pure virtual] |
std::string CompositeTSG::theCategory [protected] |
Reimplemented in CombinedTSG, DualByEtaTSG, and SeparatingTSG.
Definition at line 45 of file CompositeTSG.h.
Referenced by CompositeTSG().
std::vector<TH1F*> CompositeTSG::theHistos [protected] |
std::vector<std::string> CompositeTSG::theNames [protected] |
const MuonServiceProxy* CompositeTSG::theProxyService [protected] |
Reimplemented from TrackerSeedGenerator.
Definition at line 47 of file CompositeTSG.h.
Referenced by init().
std::vector<TrackerSeedGenerator*> CompositeTSG::theTSGs [protected] |
Definition at line 42 of file CompositeTSG.h.
Referenced by CompositeTSG(), init(), nTSGs(), and setEvent().
bool CompositeTSG::useTFileService_ [protected] |