|
| L1TkFastVertexProducer (const edm::ParameterSet &) |
|
| ~L1TkFastVertexProducer () override |
|
| EDProducer ()=default |
|
| EDProducer (const EDProducer &)=delete |
|
bool | hasAbilityToProduceInBeginLumis () const final |
|
bool | hasAbilityToProduceInBeginProcessBlocks () const final |
|
bool | hasAbilityToProduceInBeginRuns () const final |
|
bool | hasAbilityToProduceInEndLumis () const final |
|
bool | hasAbilityToProduceInEndProcessBlocks () const final |
|
bool | hasAbilityToProduceInEndRuns () const final |
|
EDProducer & | operator= (const EDProducer &)=delete |
|
bool | wantsGlobalLuminosityBlocks () const final |
|
bool | wantsGlobalRuns () const final |
|
bool | wantsInputProcessBlocks () const final |
|
bool | wantsProcessBlocks () const final |
|
bool | wantsStreamLuminosityBlocks () const final |
|
bool | wantsStreamRuns () const final |
|
| EDProducerBase () |
|
ModuleDescription const & | moduleDescription () const |
|
| ~EDProducerBase () override |
|
void | callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func) |
|
std::vector< edm::ProductResolverIndex > const & | indiciesForPutProducts (BranchType iBranchType) const |
|
| ProducerBase () |
|
std::vector< edm::ProductResolverIndex > const & | putTokenIndexToProductResolverIndex () const |
|
std::vector< bool > const & | recordProvenanceList () const |
|
void | registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &) |
|
std::function< void(BranchDescription const &)> | registrationCallback () const |
| used by the fwk to register list of products More...
|
|
void | resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel) |
|
TypeLabelList const & | typeLabelList () const |
| used by the fwk to register the list of products of this module More...
|
|
| ~ProducerBase () noexcept(false) override |
|
std::vector< ConsumesInfo > | consumesInfo () const |
|
void | convertCurrentProcessAlias (std::string const &processName) |
| Convert "@currentProcess" in InputTag process names to the actual current process name. More...
|
|
| EDConsumerBase () |
|
| EDConsumerBase (EDConsumerBase &&)=default |
|
| EDConsumerBase (EDConsumerBase const &)=delete |
|
ESProxyIndex const * | esGetTokenIndices (edm::Transition iTrans) const |
|
std::vector< ESProxyIndex > const & | esGetTokenIndicesVector (edm::Transition iTrans) const |
|
std::vector< ESRecordIndex > const & | esGetTokenRecordIndicesVector (edm::Transition iTrans) const |
|
ProductResolverIndexAndSkipBit | indexFrom (EDGetToken, BranchType, TypeID const &) const |
|
void | itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const |
|
void | itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const |
|
std::vector< ProductResolverIndexAndSkipBit > const & | itemsToGetFrom (BranchType iType) const |
|
void | labelsForToken (EDGetToken iToken, Labels &oLabels) const |
|
void | modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const |
|
EDConsumerBase & | operator= (EDConsumerBase &&)=default |
|
EDConsumerBase const & | operator= (EDConsumerBase const &)=delete |
|
bool | registeredToConsume (ProductResolverIndex, bool, BranchType) const |
|
bool | registeredToConsumeMany (TypeID const &, BranchType) const |
|
ProductResolverIndexAndSkipBit | uncheckedIndexFrom (EDGetToken) const |
|
void | updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet) |
|
void | updateLookup (eventsetup::ESRecordsToProxyIndices const &) |
|
virtual | ~EDConsumerBase () noexcept(false) |
|
|
template<class ProductType > |
BranchAliasSetterT< ProductType > | produces () |
| declare what type of product will make and with which optional label More...
|
|
template<typename ProductType , BranchType B> |
BranchAliasSetterT< ProductType > | produces () |
|
template<typename ProductType , Transition B> |
BranchAliasSetterT< ProductType > | produces () |
|
BranchAliasSetter | produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true) |
|
template<BranchType B> |
BranchAliasSetter | produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true) |
|
template<Transition B> |
BranchAliasSetter | produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true) |
|
template<typename ProductType , Transition B> |
BranchAliasSetterT< ProductType > | produces (std::string instanceName) |
|
template<class ProductType > |
BranchAliasSetterT< ProductType > | produces (std::string instanceName) |
|
template<typename ProductType , BranchType B> |
BranchAliasSetterT< ProductType > | produces (std::string instanceName) |
|
ProducesCollector | producesCollector () |
|
EDGetToken | consumes (const TypeToGet &id, edm::InputTag const &tag) |
|
template<typename ProductType , BranchType B = InEvent> |
EDGetTokenT< ProductType > | consumes (edm::InputTag const &tag) |
|
template<BranchType B = InEvent> |
EDConsumerBaseAdaptor< B > | consumes (edm::InputTag tag) noexcept |
|
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event> |
auto | esConsumes () |
|
template<Transition Tr = Transition::Event> |
constexpr auto | esConsumes () noexcept |
|
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event> |
auto | esConsumes (ESInputTag const &tag) |
|
template<Transition Tr = Transition::Event> |
auto | esConsumes (ESInputTag tag) noexcept |
|
template<Transition Tr = Transition::Event> |
ESGetTokenGeneric | esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey) |
| Used with EventSetupRecord::doGet. More...
|
|
EDGetToken | mayConsume (const TypeToGet &id, edm::InputTag const &tag) |
|
template<BranchType B> |
EDGetToken | mayConsume (const TypeToGet &id, edm::InputTag const &tag) |
|
template<typename ProductType , BranchType B = InEvent> |
EDGetTokenT< ProductType > | mayConsume (edm::InputTag const &tag) |
|
Definition at line 49 of file L1TkFastVertexProducer.cc.
Implements edm::global::EDProducerBase.
Definition at line 142 of file L1TkFastVertexProducer.cc.
145 auto result = std::make_unique<TkPrimaryVertexCollection>();
164 const double mm = 0.1;
165 float zvtx_gen = -999;
171 for (HepMC::GenEvent::vertex_const_iterator ivertex = MCEvt->vertices_begin(); ivertex != MCEvt->vertices_end();
173 bool hasParentVertex =
false;
176 for (HepMC::GenVertex::particle_iterator iparent = (*ivertex)->particles_begin(
HepMC::parents);
179 if ((*iparent)->production_vertex()) {
180 hasParentVertex =
true;
188 HepMC::FourVector
pos = (*ivertex)->position();
189 zvtx_gen =
pos.z() * mm;
193 }
else if (GenParticleHandle.
isValid()) {
194 for (
const auto& genpart : *GenParticleHandle) {
195 int status = genpart.status();
198 if (genpart.numberOfMothers() == 0)
200 float part_zvertex = genpart.vz();
201 zvtx_gen = part_zvertex;
206 <<
"\nerror: try to retrieve the MC vertex (monteCarloVertex_ = True) "
207 <<
"\nbut the input file contains neither edm::HepMCProduct> nor vector<reco::GenParticle>. Exit"
213 result->push_back(genvtx);
221 if (!L1TTTrackHandle.
isValid()) {
223 <<
"\nWarning: L1TkTrackCollection with not found in the event. Exit" << std::endl;
227 for (
const auto&
track : *L1TTTrackHandle) {
228 float z =
track.POCA().z();
230 float pt =
track.momentum().perp();
257 theStubs =
track.getStubRefs();
259 int tmp_trk_nstub = (
int)theStubs.size();
260 if (tmp_trk_nstub < 0) {
262 <<
" ... could not retrieve the vector of stubs in L1TkFastVertexProducer::SumPtVertex " << std::endl;
267 for (
const auto& stub : theStubs) {
270 DetId detId(stub->getDetId());
286 int trk_nstub = (
int)
track.getStubRefs().size();
287 float chi2dof =
chi2 / (2 * trk_nstub - 4);
290 float trk_consistency =
track.stubPtConsistency();
291 if (trk_nstub == 4) {
299 if (
pt > 10.0 && chi2dof > 5.0)
304 htmp_weight.Fill(
z, wt);
310 float zvtx_sliding = -999;
311 float sigma_max = -999;
312 int nb = htmp.GetNbinsX();
313 for (
int i = 2;
i <= nb - 1;
i++) {
314 float a0 = htmp.GetBinContent(
i - 1);
315 float a1 = htmp.GetBinContent(
i);
316 float a2 = htmp.GetBinContent(
i + 1);
317 float sigma =
a0 + a1 +
a2;
318 if (sigma > sigma_max) {
320 float z0 = htmp.GetBinCenter(
i - 1);
321 float z1 = htmp.GetBinCenter(
i);
322 float z2 = htmp.GetBinCenter(
i + 1);
323 zvtx_sliding = (
a0 *
z0 + a1 * z1 +
a2 *
z2) / sigma;
329 for (
int i = 2;
i <= nb - 1;
i++) {
330 float a0 = htmp_weight.GetBinContent(
i - 1);
331 float a1 = htmp_weight.GetBinContent(
i);
332 float a2 = htmp_weight.GetBinContent(
i + 1);
333 float sigma =
a0 + a1 +
a2;
334 if (sigma > sigma_max) {
336 float z0 = htmp_weight.GetBinCenter(
i - 1);
337 float z1 = htmp_weight.GetBinCenter(
i);
338 float z2 = htmp_weight.GetBinCenter(
i + 1);
339 zvtx_sliding = (
a0 *
z0 + a1 * z1 +
a2 *
z2) / sigma;
References a0, testProducerWithPsetDescEmpty_cfi::a2, funct::abs(), hltPixelTracks_cff::chi2, chi2Max_, doPtComp_, doTightChi2_, PVValHelper::eta, Exception, genparticleToken_, edm::HepMCProduct::GetEvent(), edm::EventSetup::getHandle(), hepmcToken_, highPtTracks_, mps_fire::i, iEvent, createfilelist::int, edm::HandleBase::isValid(), LogTrace, monteCarloVertex_, eostools::move(), nBinning_, nStubsmin_, nStubsPSmin_, parents, funct::pow(), edm::ESHandle< T >::product(), DiDispStaMuonMonitor_cfi::pt, pTMax_, pTMinTra_, mps_fire::result, mps_update::status, StripSubdetector::TID, TrackerTopology::tidRing(), StripSubdetector::TOB, TrackerTopology::tobLayer(), topoToken_, HLT_FULL_cff::track, align::Tracker, trackToken_, weight_, xmax_, xmin_, z, HLTMuonOfflineAnalyzer_cfi::z0, testProducerWithPsetDescEmpty_cfi::z2, and zMax_.