CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
EgammaHLTRegionalPixelSeedGeneratorProducers Class Reference

#include <EgammaHLTRegionalPixelSeedGeneratorProducers.h>

Inheritance diagram for EgammaHLTRegionalPixelSeedGeneratorProducers:
edm::stream::EDProducer<>

Public Member Functions

 EgammaHLTRegionalPixelSeedGeneratorProducers (const edm::ParameterSet &conf)
 
void produce (edm::Event &e, const edm::EventSetup &c) override
 
 ~EgammaHLTRegionalPixelSeedGeneratorProducers () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () const final
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Attributes

edm::EDGetTokenT< reco::BeamSpotBSProducer_
 
edm::EDGetTokenT< reco::RecoEcalCandidateCollectioncandTag_
 
edm::EDGetTokenT< reco::ElectronCollectioncandTagEle_
 
std::unique_ptr< SeedGeneratorFromRegionHitscombinatorialSeedGenerator
 
double deltaEta_
 
double deltaPhi_
 
double halflength_
 
double originradius_
 
double originz_
 
double ptmin_
 
bool useZvertex_
 
double vertexz_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 

Detailed Description

Definition at line 31 of file EgammaHLTRegionalPixelSeedGeneratorProducers.h.

Constructor & Destructor Documentation

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

Definition at line 43 of file EgammaHLTRegionalPixelSeedGeneratorProducers.cc.

References edm::ParameterSet::addParameter(), beamerCreator::create(), reco::get(), edm::ParameterSet::getParameter(), and AlCaHLTBitMon_QueryRunRegistry::string.

44 {
45 
46  produces<TrajectorySeedCollection>();
47 
48  ptmin_ = conf.getParameter<double>("ptMin");
49  vertexz_ = conf.getParameter<double>("vertexZ");
50  originradius_= conf.getParameter<double>("originRadius");
51  halflength_ = conf.getParameter<double>("originHalfLength");
52  deltaEta_ = conf.getParameter<double>("deltaEtaRegion");
53  deltaPhi_ = conf.getParameter<double>("deltaPhiRegion");
54 
55  candTag_ = consumes<reco::RecoEcalCandidateCollection>(conf.getParameter< edm::InputTag > ("candTag"));
56  candTagEle_ = consumes<reco::ElectronCollection>(conf.getParameter< edm::InputTag > ("candTagEle"));
57  BSProducer_ = consumes<reco::BeamSpot>(conf.getParameter<edm::InputTag>("BSProducer"));
58 
59  useZvertex_ = conf.getParameter<bool>("UseZInVertex");
60 
61  edm::ParameterSet hitsfactoryPSet = conf.getParameter<edm::ParameterSet>("OrderedHitsFactoryPSet");
62  std::string hitsfactoryName = hitsfactoryPSet.getParameter<std::string>("ComponentName");
63 
64  // get orderd hits generator from factory
65  edm::ConsumesCollector iC = consumesCollector();
66  OrderedHitsGenerator* hitsGenerator = OrderedHitsGeneratorFactory::get()->create( hitsfactoryName, hitsfactoryPSet, iC);
67 
68  // start seed generator
69  edm::ParameterSet creatorPSet;
70  creatorPSet.addParameter<std::string>("propagator","PropagatorWithMaterial");
71 
72  combinatorialSeedGenerator.reset(new SeedGeneratorFromRegionHits( hitsGenerator, nullptr,
73  SeedCreatorFactory::get()->create("SeedFromConsecutiveHitsCreator", creatorPSet)
74  ));
75  // setup orderedhits setup (in order to tell seed generator to use pairs/triplets, which layers)
76 }
T getParameter(std::string const &) const
def create(alignables, pedeDump, additionalData, outputFile, config)
void addParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:125
edm::EDGetTokenT< reco::RecoEcalCandidateCollection > candTag_
std::unique_ptr< SeedGeneratorFromRegionHits > combinatorialSeedGenerator
T get(const Candidate &c)
Definition: component.h:55
EgammaHLTRegionalPixelSeedGeneratorProducers::~EgammaHLTRegionalPixelSeedGeneratorProducers ( )
override

Definition at line 79 of file EgammaHLTRegionalPixelSeedGeneratorProducers.cc.

79  {
80 }

Member Function Documentation

void EgammaHLTRegionalPixelSeedGeneratorProducers::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 82 of file EgammaHLTRegionalPixelSeedGeneratorProducers.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), and AlCaHLTBitMon_QueryRunRegistry::string.

82  {
83 
85  desc.add<double>("ptMin", 1.5);
86  desc.add<double>("vertexZ", 0);
87  desc.add<double>("originRadius", 0.02);
88  desc.add<double>("originHalfLength", 15.0);
89  desc.add<double>("deltaEtaRegion", 0.3);
90  desc.add<double>("deltaPhiRegion", 0.3);
91  desc.add<edm::InputTag>(("candTag"), edm::InputTag("hltL1SeededRecoEcalCandidate"));
92  desc.add<edm::InputTag>(("candTagEle"), edm::InputTag("pixelMatchElectrons"));
93  desc.add<edm::InputTag>(("BSProducer"), edm::InputTag("hltOnlineBeamSpot"));
94  desc.add<bool>(("UseZInVertex"), false);
95  desc.add<std::string>("TTRHBuilder", "WithTrackAngle");
96 
97  edm::ParameterSetDescription orderedHitsPSET;
98  orderedHitsPSET.add<std::string>("ComponentName", "StandardHitPairGenerator");
99  orderedHitsPSET.add<edm::InputTag>("SeedingLayers", edm::InputTag("PixelLayerPairs"));
100  orderedHitsPSET.add<unsigned int>("maxElement", 0);
101  desc.add<edm::ParameterSetDescription>("OrderedHitsFactoryPSet", orderedHitsPSET);
102 
103  descriptions.add(("hltEgammaHLTRegionalPixelSeedGeneratorProducers"), desc);
104 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void EgammaHLTRegionalPixelSeedGeneratorProducers::produce ( edm::Event e,
const edm::EventSetup c 
)
override

Definition at line 107 of file EgammaHLTRegionalPixelSeedGeneratorProducers.cc.

References edm::Event::getByToken(), eostools::move(), convertSQLitetoXML_cfg::output, reco::BeamSpot::position(), and edm::Event::put().

108 {
109 
110  // resulting collection
111  auto output = std::make_unique< TrajectorySeedCollection>();
112 
113  // Get the recoEcalCandidates
115  iEvent.getByToken(candTag_,recoecalcands);
116 
117  //Get the Beam Spot position
118  edm::Handle<reco::BeamSpot> recoBeamSpotHandle;
119  iEvent.getByToken(BSProducer_,recoBeamSpotHandle);
120  // gets its position
121  const BeamSpot::Point& BSPosition = recoBeamSpotHandle->position();
122 
123  //Get the HLT electrons collection if needed
125  if(useZvertex_)
126  iEvent.getByToken(candTagEle_,electronHandle);
127 
128  reco::SuperClusterRef scRef;
129  for (reco::RecoEcalCandidateCollection::const_iterator recoecalcand= recoecalcands->begin(); recoecalcand!=recoecalcands->end(); recoecalcand++) {
130  scRef = recoecalcand->superCluster();
131  float zvertex = 0;
132  if( useZvertex_ ){
133  reco::SuperClusterRef scRefEle;
134  for(reco::ElectronCollection::const_iterator iElectron = electronHandle->begin(); iElectron != electronHandle->end(); iElectron++){
135  //Compare electron SC with EcalCandidate SC
136  scRefEle = iElectron->superCluster();
137  if(&(*scRef) == &(*scRefEle)){
138  if(iElectron->track().isNonnull()) zvertex = iElectron->track()->vz();
139  else zvertex = iElectron->gsfTrack()->vz();
140  break;
141  }
142  }
143 
144  }
145  GlobalVector dirVector((recoecalcand)->px(),(recoecalcand)->py(),(recoecalcand)->pz());
146  RectangularEtaPhiTrackingRegion etaphiRegion( dirVector,
147  GlobalPoint( BSPosition.x(), BSPosition.y(), zvertex ),
148  ptmin_,
150  halflength_,
151  deltaEta_,
152  deltaPhi_);
153 
154  // fill Trajectory seed collection
155  combinatorialSeedGenerator->run(*output, etaphiRegion, iEvent, iSetup);
156 
157  }
158 
159  iEvent.put(std::move(output));
160 }
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
math::XYZPoint Point
point in the space
Definition: BeamSpot.h:29
int iEvent
Definition: GenABIO.cc:224
edm::EDGetTokenT< reco::RecoEcalCandidateCollection > candTag_
std::unique_ptr< SeedGeneratorFromRegionHits > combinatorialSeedGenerator
const Point & position() const
position
Definition: BeamSpot.h:62
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

edm::EDGetTokenT<reco::BeamSpot> EgammaHLTRegionalPixelSeedGeneratorProducers::BSProducer_
private
edm::EDGetTokenT<reco::RecoEcalCandidateCollection> EgammaHLTRegionalPixelSeedGeneratorProducers::candTag_
private
edm::EDGetTokenT<reco::ElectronCollection> EgammaHLTRegionalPixelSeedGeneratorProducers::candTagEle_
private
std::unique_ptr<SeedGeneratorFromRegionHits> EgammaHLTRegionalPixelSeedGeneratorProducers::combinatorialSeedGenerator
private
double EgammaHLTRegionalPixelSeedGeneratorProducers::deltaEta_
private
double EgammaHLTRegionalPixelSeedGeneratorProducers::deltaPhi_
private
double EgammaHLTRegionalPixelSeedGeneratorProducers::halflength_
private
double EgammaHLTRegionalPixelSeedGeneratorProducers::originradius_
private
double EgammaHLTRegionalPixelSeedGeneratorProducers::originz_
private
double EgammaHLTRegionalPixelSeedGeneratorProducers::ptmin_
private
bool EgammaHLTRegionalPixelSeedGeneratorProducers::useZvertex_
private
double EgammaHLTRegionalPixelSeedGeneratorProducers::vertexz_
private