CMS 3D CMS Logo

CompositeTSG Class Reference

Description: TrackerSeedGenerator generic class to allow more than one TSG to be used. More...

#include <RecoMuon/TrackerSeedGenerator/plugins/CompositeTSG.h>

Inheritance diagram for CompositeTSG:

TrackerSeedGenerator CombinedTSG SeparatingTSG DualByEtaTSG

List of all members.

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 MuonServiceProxytheProxyService
std::vector
< TrackerSeedGenerator * > 
theTSGs
bool useTFileService_


Detailed Description

Description: TrackerSeedGenerator generic class to allow more than one TSG to be used.

used as a SeparatingTSG of CombinedTSG

Author:
Jean-Roch Vlimant, Adam Everett

Definition at line 21 of file CompositeTSG.h.


Member Typedef Documentation

typedef std::vector<TrajectorySeed> CompositeTSG::BTSeedCollection

Reimplemented from TrackerSeedGenerator.

Definition at line 24 of file CompositeTSG.h.

typedef std::pair<const Trajectory*, reco::TrackRef> CompositeTSG::TrackCand

Reimplemented from TrackerSeedGenerator.

Definition at line 25 of file CompositeTSG.h.


Constructor & Destructor Documentation

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]

Definition at line 40 of file CompositeTSG.cc.

00040                            {
00041   //delete the components ?
00042 }


Member Function Documentation

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]

provides the seeds from the TSGs: must be overloaded

Reimplemented from TrackerSeedGenerator.


Member Data Documentation

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]

Definition at line 44 of file CompositeTSG.h.

Referenced by CompositeTSG().

std::vector<std::string> CompositeTSG::theNames [protected]

Definition at line 43 of file CompositeTSG.h.

Referenced by CompositeTSG().

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]

Definition at line 39 of file CompositeTSG.h.

Referenced by CompositeTSG().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:16:37 2009 for CMSSW by  doxygen 1.5.4