|
void | produce (edm::StreamID, edm::Event &, const edm::EventSetup &) const override |
|
| TrackTimeValueMapProducer (const edm::ParameterSet &) |
|
| ~TrackTimeValueMapProducer () 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) |
|
|
typedef EDProducerBase | ModuleType |
|
using | ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > > |
|
typedef ProductRegistryHelper::TypeLabelList | TypeLabelList |
|
typedef ProductLabels | Labels |
|
static const std::string & | baseType () |
|
static void | fillDescriptions (ConfigurationDescriptions &descriptions) |
|
static void | prevalidate (ConfigurationDescriptions &descriptions) |
|
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 225 of file TrackTimeValueMapProducer.cc.
228 const auto &tvertex =
tp.parentVertex();
232 if (tvertex->nSourceTracks() && tvertex->sourceTracks()[0]->pdgId() ==
pdgid) {
233 auto pvertex = tvertex->sourceTracks()[0]->parentVertex();
234 result = pvertex->position();
235 while (pvertex->nSourceTracks() && pvertex->sourceTracks()[0]->pdgId() ==
pdgid) {
236 pvertex = pvertex->sourceTracks()[0]->parentVertex();
237 result = pvertex->position();
244 const auto &tkstate =
tt.trajectoryStateClosestToPoint(result_pos);
245 float tkphi = tkstate.momentum().phi();
246 float tkz = tkstate.position().z();
248 float dz = tkz -
tt.track().vz();
251 float pathlengthrphi =
tt.track().charge() * dphi *
radius;
253 float pathlength =
std::sqrt(pathlengthrphi * pathlengthrphi +
dz *
dz);
254 float p =
tt.track().p();
256 float speed =
std::sqrt(1. / (1. + m_pion /
p)) * CLHEP::c_light / CLHEP::cm;
References reco::deltaPhi(), dt, PVValHelper::dz, AlCaHLTBitMon_ParallelJobs::p, EgammaValidation_cff::pdgid, CosmicsPD_Skims::radius, mps_fire::result, edm::second(), HLTSiStripMonitoring_cff::speed, mathSSE::sqrt(), ntuplemaker::time, cmsswSequenceInfo::tp, and groupFilesInBlocks::tt.
Referenced by produce().
Implements edm::global::EDProducerBase.
Definition at line 111 of file TrackTimeValueMapProducer.cc.
113 std::vector<edm::Handle<reco::TrackToTrackingParticleAssociator>>
associators;
120 std::vector<float> generalTrackTimes;
139 std::vector<reco::RecoToSimCollection> associatedTracks;
142 associatedTracks.emplace_back(
associator->associateRecoToSim(TrackCollectionH, TPCollectionH));
145 double sumSimTime = 0.;
146 double sumSimTimeSq = 0.;
149 if (puinfo.getBunchCrossing() == 0) {
150 for (
const float &
time : puinfo.getPU_times()) {
151 double simtime =
time;
152 sumSimTime += simtime;
153 sumSimTimeSq += simtime * simtime;
160 double meanSimTime = sumSimTime / double(nsim);
161 double varSimTime = sumSimTimeSq / double(nsim) - meanSimTime * meanSimTime;
163 std::normal_distribution<float> gausSimTime(meanSimTime, rmsSimTime);
166 unsigned int runNum_uint = static_cast<unsigned int>(evt.
id().
run());
167 unsigned int lumiNum_uint = static_cast<unsigned int>(evt.
id().
luminosityBlock());
168 unsigned int evNum_uint = static_cast<unsigned int>(evt.
id().
event());
170 std::uint32_t
seed = tkChi2_uint + (lumiNum_uint << 10) + (runNum_uint << 20) + evNum_uint;
171 std::mt19937 rng(
seed);
183 if (track_tps != associatedTracks.back().end() && track_tps->val.size() == 1) {
186 generalTrackTimes.push_back(
time);
188 float rndtime = gausSimTime(rng);
189 generalTrackTimes.push_back(rndtime);
190 if (track_tps != associatedTracks.back().end() && track_tps->val.size() > 1) {
191 LogDebug(
"TooManyTracks") <<
"track matched to " << track_tps->val.size() <<
" tracking particles!"
199 std::vector<float> times, resos;
207 bool inAcceptance = absEta < etaMax_ && absEta >=
etaMin_ && tk.
p() >
pMin_ &&
210 const float resolution = reso->getTimeResolution(tk);
211 std::normal_distribution<float> gausGeneralTime(generalTrackTimes[
i],
resolution);
212 times.push_back(gausGeneralTime(rng));
215 times.push_back(0.0
f);
216 resos.push_back(-1.);
References funct::abs(), ctfWithMaterialTrackMCMatch_cfi::associator, simPFProducer_cfi::associators, associators_, TransientTrackBuilder::build(), edm::AssociationMap< edm::OneToManyWithQualityGeneric< edm::View< reco::Track >, TrackingParticleCollection, double > >::const_iterator, reco::TrackBase::eta(), etaMaxForPtThreshold_, etaMin_, edm::EventID::event(), extractTrackVertexTime(), f, edm::EventSetup::get(), get, edm::Event::getByToken(), mps_fire::i, edm::EventBase::id(), LogDebug, edm::EventID::luminosityBlock(), SiStripPI::max, Skims_PA_cff::name, reco::TrackBase::p(), pileupSummaryInfo_, pMin_, reco::TrackBase::pt(), ptMin_, L1TObjectsTimingClient_cff::resolution, resolutions_, edm::EventID::run(), fileCollector::seed, mathSSE::sqrt(), AlCaHLTBitMon_QueryRunRegistry::string, ntuplemaker::time, unpackBuffers-CaloStage2::token, trackingParticles_, tracks_, tracksName_, and groupFilesInBlocks::tt.