#include <EgammaHLTRegionalPixelSeedGeneratorProducers.h>
Public Member Functions | |
virtual void | beginRun (edm::Run &run, const edm::EventSetup &es) |
EgammaHLTRegionalPixelSeedGeneratorProducers (const edm::ParameterSet &conf) | |
virtual void | endRun (edm::Run &run, const edm::EventSetup &es) |
virtual void | produce (edm::Event &e, const edm::EventSetup &c) |
virtual | ~EgammaHLTRegionalPixelSeedGeneratorProducers () |
Private Attributes | |
edm::InputTag | BSProducer_ |
edm::InputTag | candTag_ |
edm::InputTag | candTagEle_ |
SeedGeneratorFromRegionHits * | combinatorialSeedGenerator |
edm::ParameterSet | conf_ |
double | deltaEta_ |
double | deltaPhi_ |
double | halflength_ |
double | originradius_ |
double | originz_ |
double | ptmin_ |
bool | useZvertex_ |
double | vertexz_ |
Definition at line 25 of file EgammaHLTRegionalPixelSeedGeneratorProducers.h.
EgammaHLTRegionalPixelSeedGeneratorProducers::EgammaHLTRegionalPixelSeedGeneratorProducers | ( | const edm::ParameterSet & | conf | ) | [explicit] |
Definition at line 47 of file EgammaHLTRegionalPixelSeedGeneratorProducers.cc.
References BSProducer_, candTag_, candTagEle_, conf_, deltaEta_, deltaPhi_, edm::ParameterSet::getParameter(), halflength_, originradius_, ptmin_, useZvertex_, and vertexz_.
: conf_(conf),combinatorialSeedGenerator(0) { produces<TrajectorySeedCollection>(); ptmin_ = conf_.getParameter<double>("ptMin"); vertexz_ = conf_.getParameter<double>("vertexZ"); originradius_= conf_.getParameter<double>("originRadius"); halflength_ = conf_.getParameter<double>("originHalfLength"); deltaEta_ = conf_.getParameter<double>("deltaEtaRegion"); deltaPhi_ = conf_.getParameter<double>("deltaPhiRegion"); candTag_ = conf_.getParameter< edm::InputTag > ("candTag"); candTagEle_ = conf_.getParameter< edm::InputTag > ("candTagEle"); useZvertex_ = conf_.getParameter<bool>("UseZInVertex"); BSProducer_ = conf.getParameter<edm::InputTag>("BSProducer"); // setup orderedhits setup (in order to tell seed generator to use pairs/triplets, which layers) }
EgammaHLTRegionalPixelSeedGeneratorProducers::~EgammaHLTRegionalPixelSeedGeneratorProducers | ( | ) | [virtual] |
Definition at line 66 of file EgammaHLTRegionalPixelSeedGeneratorProducers.cc.
{ }
void EgammaHLTRegionalPixelSeedGeneratorProducers::beginRun | ( | edm::Run & | run, |
const edm::EventSetup & | es | ||
) | [virtual] |
Reimplemented from edm::EDProducer.
Definition at line 76 of file EgammaHLTRegionalPixelSeedGeneratorProducers.cc.
References edm::ParameterSet::addParameter(), combinatorialSeedGenerator, conf_, SurfaceDeformationFactory::create(), reco::get(), and edm::ParameterSet::getParameter().
{ edm::ParameterSet hitsfactoryPSet = conf_.getParameter<edm::ParameterSet>("OrderedHitsFactoryPSet"); std::string hitsfactoryName = hitsfactoryPSet.getParameter<std::string>("ComponentName"); // get orderd hits generator from factory OrderedHitsGenerator* hitsGenerator = OrderedHitsGeneratorFactory::get()->create( hitsfactoryName, hitsfactoryPSet); // start seed generator // FIXME?? edm::ParameterSet creatorPSet; creatorPSet.addParameter<std::string>("propagator","PropagatorWithMaterial"); combinatorialSeedGenerator = new SeedGeneratorFromRegionHits( hitsGenerator, 0, SeedCreatorFactory::get()->create("SeedFromConsecutiveHitsCreator", creatorPSet) ); }
void EgammaHLTRegionalPixelSeedGeneratorProducers::endRun | ( | edm::Run & | run, |
const edm::EventSetup & | es | ||
) | [virtual] |
Reimplemented from edm::EDProducer.
Definition at line 69 of file EgammaHLTRegionalPixelSeedGeneratorProducers.cc.
References combinatorialSeedGenerator.
{ delete combinatorialSeedGenerator; combinatorialSeedGenerator=0; }
void EgammaHLTRegionalPixelSeedGeneratorProducers::produce | ( | edm::Event & | e, |
const edm::EventSetup & | c | ||
) | [virtual] |
Implements edm::EDProducer.
Definition at line 97 of file EgammaHLTRegionalPixelSeedGeneratorProducers.cc.
References BSProducer_, candTag_, candTagEle_, combinatorialSeedGenerator, deltaEta_, deltaPhi_, edm::Event::getByLabel(), halflength_, originradius_, convertSQLitetoXML_cfg::output, ptmin_, edm::Event::put(), SeedGeneratorFromRegionHits::run(), and useZvertex_.
{ // resulting collection std::auto_ptr<TrajectorySeedCollection> output(new TrajectorySeedCollection()); // Get the recoEcalCandidates edm::Handle<reco::RecoEcalCandidateCollection> recoecalcands; iEvent.getByLabel(candTag_,recoecalcands); //Get the Beam Spot position edm::Handle<reco::BeamSpot> recoBeamSpotHandle; // iEvent.getByType(recoBeamSpotHandle); iEvent.getByLabel(BSProducer_,recoBeamSpotHandle); // gets its position const BeamSpot::Point& BSPosition = recoBeamSpotHandle->position(); //Get the HLT electrons collection if needed edm::Handle<reco::ElectronCollection> electronHandle; if(useZvertex_){iEvent.getByLabel(candTagEle_,electronHandle);} reco::SuperClusterRef scRef; for (reco::RecoEcalCandidateCollection::const_iterator recoecalcand= recoecalcands->begin(); recoecalcand!=recoecalcands->end(); recoecalcand++) { scRef = recoecalcand->superCluster(); float zvertex = 0; if( useZvertex_ ){ reco::SuperClusterRef scRefEle; for(reco::ElectronCollection::const_iterator iElectron = electronHandle->begin(); iElectron != electronHandle->end(); iElectron++){ //Compare electron SC with EcalCandidate SC scRefEle = iElectron->superCluster(); if(&(*scRef) == &(*scRefEle)){ if(iElectron->track().isNonnull()) zvertex = iElectron->track()->vz(); else zvertex = iElectron->gsfTrack()->vz(); break; } } } GlobalVector dirVector((recoecalcand)->px(),(recoecalcand)->py(),(recoecalcand)->pz()); RectangularEtaPhiTrackingRegion etaphiRegion( dirVector, GlobalPoint( BSPosition.x(), BSPosition.y(), zvertex ), ptmin_, originradius_, halflength_, deltaEta_, deltaPhi_); // fill Trajectory seed collection combinatorialSeedGenerator->run(*output, etaphiRegion, iEvent, iSetup); } iEvent.put(output); }
Definition at line 52 of file EgammaHLTRegionalPixelSeedGeneratorProducers.h.
Referenced by EgammaHLTRegionalPixelSeedGeneratorProducers(), and produce().
Definition at line 49 of file EgammaHLTRegionalPixelSeedGeneratorProducers.h.
Referenced by EgammaHLTRegionalPixelSeedGeneratorProducers(), and produce().
Definition at line 50 of file EgammaHLTRegionalPixelSeedGeneratorProducers.h.
Referenced by EgammaHLTRegionalPixelSeedGeneratorProducers(), and produce().
SeedGeneratorFromRegionHits* EgammaHLTRegionalPixelSeedGeneratorProducers::combinatorialSeedGenerator [private] |
Definition at line 41 of file EgammaHLTRegionalPixelSeedGeneratorProducers.h.
Referenced by beginRun(), endRun(), and produce().
Definition at line 40 of file EgammaHLTRegionalPixelSeedGeneratorProducers.h.
Referenced by beginRun(), and EgammaHLTRegionalPixelSeedGeneratorProducers().
double EgammaHLTRegionalPixelSeedGeneratorProducers::deltaEta_ [private] |
Definition at line 47 of file EgammaHLTRegionalPixelSeedGeneratorProducers.h.
Referenced by EgammaHLTRegionalPixelSeedGeneratorProducers(), and produce().
double EgammaHLTRegionalPixelSeedGeneratorProducers::deltaPhi_ [private] |
Definition at line 48 of file EgammaHLTRegionalPixelSeedGeneratorProducers.h.
Referenced by EgammaHLTRegionalPixelSeedGeneratorProducers(), and produce().
double EgammaHLTRegionalPixelSeedGeneratorProducers::halflength_ [private] |
Definition at line 45 of file EgammaHLTRegionalPixelSeedGeneratorProducers.h.
Referenced by EgammaHLTRegionalPixelSeedGeneratorProducers(), and produce().
double EgammaHLTRegionalPixelSeedGeneratorProducers::originradius_ [private] |
Definition at line 44 of file EgammaHLTRegionalPixelSeedGeneratorProducers.h.
Referenced by EgammaHLTRegionalPixelSeedGeneratorProducers(), and produce().
double EgammaHLTRegionalPixelSeedGeneratorProducers::originz_ [private] |
Definition at line 46 of file EgammaHLTRegionalPixelSeedGeneratorProducers.h.
double EgammaHLTRegionalPixelSeedGeneratorProducers::ptmin_ [private] |
Definition at line 42 of file EgammaHLTRegionalPixelSeedGeneratorProducers.h.
Referenced by EgammaHLTRegionalPixelSeedGeneratorProducers(), and produce().
bool EgammaHLTRegionalPixelSeedGeneratorProducers::useZvertex_ [private] |
Definition at line 51 of file EgammaHLTRegionalPixelSeedGeneratorProducers.h.
Referenced by EgammaHLTRegionalPixelSeedGeneratorProducers(), and produce().
double EgammaHLTRegionalPixelSeedGeneratorProducers::vertexz_ [private] |
Definition at line 43 of file EgammaHLTRegionalPixelSeedGeneratorProducers.h.
Referenced by EgammaHLTRegionalPixelSeedGeneratorProducers().