|
void | produce (edm::StreamID, edm::Event &, const edm::EventSetup &) const override |
|
| TrackTimeValueMapProducer (const edm::ParameterSet &) |
|
| ~TrackTimeValueMapProducer () override |
|
| EDProducer ()=default |
|
bool | hasAbilityToProduceInBeginLumis () const final |
|
bool | hasAbilityToProduceInBeginRuns () const final |
|
bool | hasAbilityToProduceInEndLumis () const final |
|
bool | hasAbilityToProduceInEndRuns () const final |
|
bool | wantsGlobalLuminosityBlocks () const final |
|
bool | wantsGlobalRuns () 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 |
|
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> |
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<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event> |
auto | esConsumes (ESInputTag const &tag) |
|
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 224 of file TrackTimeValueMapProducer.cc.
227 const auto &tvertex =
tp.parentVertex();
231 if (tvertex->nSourceTracks() && tvertex->sourceTracks()[0]->pdgId() ==
pdgid) {
232 auto pvertex = tvertex->sourceTracks()[0]->parentVertex();
233 result = pvertex->position();
234 while (pvertex->nSourceTracks() && pvertex->sourceTracks()[0]->pdgId() ==
pdgid) {
235 pvertex = pvertex->sourceTracks()[0]->parentVertex();
236 result = pvertex->position();
243 const auto &tkstate =
tt.trajectoryStateClosestToPoint(result_pos);
244 float tkphi = tkstate.momentum().phi();
245 float tkz = tkstate.position().z();
247 float dz = tkz -
tt.track().vz();
250 float pathlengthrphi =
tt.track().charge() * dphi *
radius;
252 float pathlength =
std::sqrt(pathlengthrphi * pathlengthrphi +
dz *
dz);
253 float p =
tt.track().p();
255 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;
141 associatedTracks.emplace_back(
associator->associateRecoToSim(TrackCollectionH, TPCollectionH));
144 double sumSimTime = 0.;
145 double sumSimTimeSq = 0.;
148 if (puinfo.getBunchCrossing() == 0) {
149 for (
const float &
time : puinfo.getPU_times()) {
150 double simtime =
time;
151 sumSimTime += simtime;
152 sumSimTimeSq += simtime * simtime;
159 double meanSimTime = sumSimTime / double(nsim);
160 double varSimTime = sumSimTimeSq / double(nsim) - meanSimTime * meanSimTime;
162 std::normal_distribution<float> gausSimTime(meanSimTime, rmsSimTime);
165 unsigned int runNum_uint = static_cast<unsigned int>(evt.
id().
run());
166 unsigned int lumiNum_uint = static_cast<unsigned int>(evt.
id().
luminosityBlock());
167 unsigned int evNum_uint = static_cast<unsigned int>(evt.
id().
event());
169 std::uint32_t
seed = tkChi2_uint + (lumiNum_uint << 10) + (runNum_uint << 20) + evNum_uint;
170 std::mt19937 rng(
seed);
182 if (track_tps != associatedTracks.back().end() && track_tps->val.size() == 1) {
185 generalTrackTimes.push_back(
time);
187 float rndtime = gausSimTime(rng);
188 generalTrackTimes.push_back(rndtime);
189 if (track_tps != associatedTracks.back().end() && track_tps->val.size() > 1) {
190 LogDebug(
"TooManyTracks") <<
"track matched to " << track_tps->val.size() <<
" tracking particles!"
198 std::vector<float> times, resos;
206 bool inAcceptance = absEta < etaMax_ && absEta >=
etaMin_ && tk.
p() >
pMin_ &&
209 const float resolution = reso->getTimeResolution(tk);
210 std::normal_distribution<float> gausGeneralTime(generalTrackTimes[
i],
resolution);
211 times.push_back(gausGeneralTime(rng));
214 times.push_back(0.0
f);
215 resos.push_back(-1.);
References funct::abs(), TrackValidation_cff::association, 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(), SurveyInfoScenario_cff::seed, mathSSE::sqrt(), AlCaHLTBitMon_QueryRunRegistry::string, ntuplemaker::time, unpackBuffers-CaloStage2::token, trackingParticles_, tracks_, tracksName_, and groupFilesInBlocks::tt.