test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
SiStripElectronSeedProducer Class Reference

#include <SiStripElectronSeedProducer.h>

Inheritance diagram for SiStripElectronSeedProducer:
edm::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

virtual void produce (edm::Event &e, const edm::EventSetup &c)
 
 SiStripElectronSeedProducer (const edm::ParameterSet &conf)
 
virtual ~SiStripElectronSeedProducer ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Attributes

edm::ParameterSet conf_
 
SiStripElectronSeedGeneratormatcher_
 
edm::EDGetTokenT
< reco::SuperClusterCollection
superClusters_ [2]
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Definition at line 15 of file SiStripElectronSeedProducer.h.

Constructor & Destructor Documentation

SiStripElectronSeedProducer::SiStripElectronSeedProducer ( const edm::ParameterSet conf)
explicit

Definition at line 21 of file SiStripElectronSeedProducer.cc.

References edm::ParameterSet::addParameter(), edm::ParameterSet::exists(), edm::ParameterSet::getParameter(), SiStripElectronSeedGenerator::Tokens::token_bs, and SiStripElectronSeedGenerator::Tokens::token_mte.

22 {
23  if(iConfig.exists("SeedConfiguration")){
24  conf_ = iConfig.getParameter<edm::ParameterSet>("SeedConfiguration") ;
25  }else{
26  conf_.addParameter("beamSpot",edm::InputTag("offlineBeamSpot"));
27  conf_.addParameter("tibOriginZCut",20.);
28  conf_.addParameter("tidOriginZCut",20.);
29  conf_.addParameter("tecOriginZCut",20.);
30  conf_.addParameter("monoOriginZCut",20.);
31  conf_.addParameter("tibDeltaPsiCut",0.1);
32  conf_.addParameter("tidDeltaPsiCut",0.1);
33  conf_.addParameter("tecDeltaPsiCut",0.1);
34  conf_.addParameter("monoDeltaPsiCut",0.1);
35  conf_.addParameter("tibPhiMissHit2Cut",0.006);
36  conf_.addParameter("tidPhiMissHit2Cut",0.006);
37  conf_.addParameter("tecPhiMissHit2Cut",0.007);
38  conf_.addParameter("monoPhiMissHit2Cut",0.02);
39  conf_.addParameter("tibZMissHit2Cut",0.35);
40  conf_.addParameter("tidRMissHit2Cut",0.3);
41  conf_.addParameter("tecRMissHit2Cut",0.3);
42  conf_.addParameter("tidEtaUsage", 1.2);
43  conf_.addParameter("tidMaxHits",4);
44  conf_.addParameter("tecMaxHits",2);
45  conf_.addParameter("monoMaxHits",4);
46  conf_.addParameter("maxSeeds",5);
47  }
49  ssesg_tokens.token_bs = consumes<reco::BeamSpot>(iConfig.getParameter<edm::InputTag>("beamSpot"));
50  if (conf_.existsAs<edm::InputTag>("measurementTrackerEvent")) {
51  ssesg_tokens.token_mte = consumes<MeasurementTrackerEvent>(conf_.getParameter<edm::InputTag>("measurementTrackerEvent"));
52  }
53  matcher_ = new SiStripElectronSeedGenerator(conf_,ssesg_tokens);
54 
55 
56 
57  // get labels from config
58  superClusters_[0]=consumes<reco::SuperClusterCollection>(iConfig.getParameter<edm::InputTag>("barrelSuperClusters"));
59  superClusters_[1]=consumes<reco::SuperClusterCollection>(iConfig.getParameter<edm::InputTag>("endcapSuperClusters"));
60 
61  //register your products
62  produces<ElectronSeedCollection>();
63 }
T getParameter(std::string const &) const
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:184
SiStripElectronSeedGenerator * matcher_
void addParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:142
edm::EDGetTokenT< reco::SuperClusterCollection > superClusters_[2]
edm::EDGetTokenT< reco::BeamSpot > token_bs
SiStripElectronSeedProducer::~SiStripElectronSeedProducer ( )
virtual

Definition at line 65 of file SiStripElectronSeedProducer.cc.

66 {
67  // do anything here that needs to be done at desctruction time
68  // (e.g. close files, deallocate resources etc.)
69  delete matcher_;
70 }
SiStripElectronSeedGenerator * matcher_

Member Function Documentation

void SiStripElectronSeedProducer::produce ( edm::Event e,
const edm::EventSetup c 
)
virtual

Implements edm::EDProducer.

Definition at line 72 of file SiStripElectronSeedProducer.cc.

References edm::Event::getByToken(), i, LogDebug, and edm::Event::put().

73 {
74  using namespace edm;
75  using namespace std;
76 
77  LogDebug("entering");
78  LogDebug("") <<"[SiStripElectronSeedProducer::produce] entering " ;
79 
80  matcher_->setupES(iSetup);
81 
83  std::auto_ptr<ElectronSeedCollection> pSeeds;
84 
85  // do both barrel and endcap instances
86  for (unsigned int i=0; i<2; i++) {
87 
88  // get the superclusters
90  if(e.getByToken(superClusters_[i],clusters)) {
91  // run the seed generator and put the ElectronSeeds into a collection
92  matcher_->run(e,iSetup,clusters,*seeds);
93  }
94 
95  }
96 
97  pSeeds = std::auto_ptr<ElectronSeedCollection>(seeds);
98 
99  e.put(pSeeds);
100 
101 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
SiStripElectronSeedGenerator * matcher_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:116
std::vector< ElectronSeed > ElectronSeedCollection
collection of ElectronSeed objects
void setupES(const edm::EventSetup &setup)
edm::EDGetTokenT< reco::SuperClusterCollection > superClusters_[2]
void run(edm::Event &, const edm::EventSetup &setup, const edm::Handle< reco::SuperClusterCollection > &, reco::ElectronSeedCollection &)

Member Data Documentation

edm::ParameterSet SiStripElectronSeedProducer::conf_
private

Definition at line 27 of file SiStripElectronSeedProducer.h.

SiStripElectronSeedGenerator* SiStripElectronSeedProducer::matcher_
private

Definition at line 28 of file SiStripElectronSeedProducer.h.

edm::EDGetTokenT<reco::SuperClusterCollection> SiStripElectronSeedProducer::superClusters_[2]
private

Definition at line 26 of file SiStripElectronSeedProducer.h.