CMS 3D CMS Logo

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

#include <CSCTFTrackProducer.h>

Inheritance diagram for CSCTFTrackProducer:
edm::one::EDProducer< edm::one::SharedResources > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 CSCTFTrackProducer (const edm::ParameterSet &)
 
void produce (edm::Event &e, const edm::EventSetup &c) override
 
- Public Member Functions inherited from edm::one::EDProducer< edm::one::SharedResources >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
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
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () 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::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (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)
 

Private Attributes

const edm::EDGetTokenT< CSCTriggerContainer< csctf::TrackStub > > directProd
 
const edm::EDGetTokenT< L1MuDTChambPhContainerdt_producer
 
const edm::EDGetTokenT< CSCCorrelatedLCTDigiCollectioninput_module
 
const CSCTFTrackBuilder::Tokens m_builderTokens
 
const edm::ESGetToken< CSCGeometry, MuonGeometryRecordm_pDDToken
 
unsigned long long m_ptScaleCacheID
 
const edm::ESGetToken< L1MuTriggerPtScale, L1MuTriggerPtScaleRcdm_ptScaleToken
 
unsigned long long m_scalesCacheID
 
const edm::ESGetToken< L1MuTriggerScales, L1MuTriggerScalesRcdm_scalesToken
 
std::unique_ptr< CSCTFTrackBuildermy_builder
 
CSCTFDTReceiver my_dtrc
 
const bool readDtDirect
 
const edm::ParameterSet sp_pset
 
const bool TMB07
 
const bool useDT
 

Additional Inherited Members

- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::ProducerBase
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 ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
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)
 

Detailed Description

Definition at line 28 of file CSCTFTrackProducer.h.

Constructor & Destructor Documentation

◆ CSCTFTrackProducer()

CSCTFTrackProducer::CSCTFTrackProducer ( const edm::ParameterSet pset)

Definition at line 16 of file CSCTFTrackProducer.cc.

17  : my_dtrc{},
18  useDT{pset.getParameter<bool>("useDT")},
19  TMB07{pset.getParameter<bool>("isTMB07")},
20  readDtDirect{pset.getParameter<bool>("readDtDirect")},
22  consumes<CSCCorrelatedLCTDigiCollection>(pset.getUntrackedParameter<edm::InputTag>("SectorReceiverInput"))},
23  dt_producer{consumes<L1MuDTChambPhContainer>(pset.getUntrackedParameter<edm::InputTag>("DTproducer"))},
24  directProd{
25  consumes<CSCTriggerContainer<csctf::TrackStub> >(pset.getUntrackedParameter<edm::InputTag>("DtDirectProd"))},
26  m_scalesToken(esConsumes<L1MuTriggerScales, L1MuTriggerScalesRcd>()),
27  m_ptScaleToken(esConsumes<L1MuTriggerPtScale, L1MuTriggerPtScaleRcd>()),
28  m_pDDToken(esConsumes<CSCGeometry, MuonGeometryRecord>()),
29  sp_pset{pset.getParameter<edm::ParameterSet>("SectorProcessor")},
31  m_scalesCacheID = 0ULL;
32  m_ptScaleCacheID = 0ULL;
33  produces<L1CSCTrackCollection>();
34  produces<CSCTriggerContainer<csctf::TrackStub> >();
35 
36  //CSCSectorReceiverLUT has a static member it fills by reading a file
37  usesResource("CSCSectorReceiverLUT");
38  //CSCTFSPcoreLogic has non-const static members
39  usesResource("CSCTFSPCoreLogic");
40  //CSCTFPtLUT has a static member it fills by reading a file
41  usesResource("CSCTFPtLUT");
42 }

Member Function Documentation

◆ produce()

void CSCTFTrackProducer::produce ( edm::Event e,
const edm::EventSetup c 
)
overridevirtual

Implements edm::one::EDProducerBase.

Definition at line 44 of file CSCTFTrackProducer.cc.

44  {
45  // Update CSCTFTrackBuilder only if the scales have changed. Use the
46  // EventSetup cacheIdentifier to tell when this has happened.
48  c.get<L1MuTriggerPtScaleRcd>().cacheIdentifier() != m_ptScaleCacheID) {
50 
52 
53  my_builder = std::make_unique<CSCTFTrackBuilder>(sp_pset, TMB07, scales.product(), ptScale.product());
54  my_builder->initialize(c, m_builderTokens);
55 
56  m_scalesCacheID = c.get<L1MuTriggerScalesRcd>().cacheIdentifier();
57  m_ptScaleCacheID = c.get<L1MuTriggerPtScaleRcd>().cacheIdentifier();
58  }
59 
60  // set geometry pointer
61  edm::ESHandle<CSCGeometry> pDD = c.getHandle(m_pDDToken);
62 
64  std::unique_ptr<L1CSCTrackCollection> track_product(new L1CSCTrackCollection);
65  e.getByToken(input_module, LCTs);
66  std::unique_ptr<CSCTriggerContainer<csctf::TrackStub> > dt_stubs(new CSCTriggerContainer<csctf::TrackStub>);
67 
68  // Either emulate or directly read in DT stubs based on switch
71  if (readDtDirect == false) {
73  e.getByToken(dt_producer, dttrig);
74  emulStub = my_dtrc.process(dttrig.product());
75  } else {
77  //e.getByLabel("csctfunpacker","DT",stubsFromDaq);
78  e.getByToken(directProd, stubsFromDaq);
79  const CSCTriggerContainer<csctf::TrackStub>* stubPointer = stubsFromDaq.product();
80  emulStub.push_many(*stubPointer);
81  }
82 
83  my_builder->buildTracks(LCTs.product(), (useDT ? &emulStub : nullptr), track_product.get(), dt_stubs.get());
84 
85  e.put(std::move(track_product));
86  e.put(std::move(dt_stubs));
87 }

References c, edm::eventsetup::EventSetupRecord::cacheIdentifier(), directProd, dt_producer, MillePedeFileConverter_cfg::e, input_module, m_builderTokens, m_pDDToken, m_ptScaleCacheID, m_ptScaleToken, m_scalesCacheID, m_scalesToken, eostools::move(), my_builder, my_dtrc, CSCTFDTReceiver::process(), edm::Handle< T >::product(), edm::ESHandle< T >::product(), ptScale, CSCTriggerContainer< T >::push_many(), readDtDirect, sp_pset, TMB07, and useDT.

Member Data Documentation

◆ directProd

const edm::EDGetTokenT<CSCTriggerContainer<csctf::TrackStub> > CSCTFTrackProducer::directProd
private

Definition at line 40 of file CSCTFTrackProducer.h.

Referenced by produce().

◆ dt_producer

const edm::EDGetTokenT<L1MuDTChambPhContainer> CSCTFTrackProducer::dt_producer
private

Definition at line 39 of file CSCTFTrackProducer.h.

Referenced by produce().

◆ input_module

const edm::EDGetTokenT<CSCCorrelatedLCTDigiCollection> CSCTFTrackProducer::input_module
private

Definition at line 38 of file CSCTFTrackProducer.h.

Referenced by produce().

◆ m_builderTokens

const CSCTFTrackBuilder::Tokens CSCTFTrackProducer::m_builderTokens
private

Definition at line 45 of file CSCTFTrackProducer.h.

Referenced by produce().

◆ m_pDDToken

const edm::ESGetToken<CSCGeometry, MuonGeometryRecord> CSCTFTrackProducer::m_pDDToken
private

Definition at line 43 of file CSCTFTrackProducer.h.

Referenced by produce().

◆ m_ptScaleCacheID

unsigned long long CSCTFTrackProducer::m_ptScaleCacheID
private

Definition at line 47 of file CSCTFTrackProducer.h.

Referenced by produce().

◆ m_ptScaleToken

const edm::ESGetToken<L1MuTriggerPtScale, L1MuTriggerPtScaleRcd> CSCTFTrackProducer::m_ptScaleToken
private

Definition at line 42 of file CSCTFTrackProducer.h.

Referenced by produce().

◆ m_scalesCacheID

unsigned long long CSCTFTrackProducer::m_scalesCacheID
private

Definition at line 46 of file CSCTFTrackProducer.h.

Referenced by produce().

◆ m_scalesToken

const edm::ESGetToken<L1MuTriggerScales, L1MuTriggerScalesRcd> CSCTFTrackProducer::m_scalesToken
private

Definition at line 41 of file CSCTFTrackProducer.h.

Referenced by produce().

◆ my_builder

std::unique_ptr<CSCTFTrackBuilder> CSCTFTrackProducer::my_builder
private

Definition at line 48 of file CSCTFTrackProducer.h.

Referenced by produce().

◆ my_dtrc

CSCTFDTReceiver CSCTFTrackProducer::my_dtrc
private

Definition at line 34 of file CSCTFTrackProducer.h.

Referenced by produce().

◆ readDtDirect

const bool CSCTFTrackProducer::readDtDirect
private

Definition at line 37 of file CSCTFTrackProducer.h.

Referenced by produce().

◆ sp_pset

const edm::ParameterSet CSCTFTrackProducer::sp_pset
private

Definition at line 44 of file CSCTFTrackProducer.h.

Referenced by produce().

◆ TMB07

const bool CSCTFTrackProducer::TMB07
private

Definition at line 36 of file CSCTFTrackProducer.h.

Referenced by produce().

◆ useDT

const bool CSCTFTrackProducer::useDT
private

Definition at line 35 of file CSCTFTrackProducer.h.

Referenced by produce().

edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
CSCTFDTReceiver::process
CSCTriggerContainer< csctf::TrackStub > process(const L1MuDTChambPhContainer *)
Definition: CSCTFDTReceiver.cc:12
edm::Handle::product
T const * product() const
Definition: Handle.h:70
edm::EDConsumerBase::consumesCollector
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
Definition: EDConsumerBase.cc:47
CSCTriggerContainer::push_many
void push_many(const std::vector< T > &data)
Definition: CSCTriggerContainer.h:52
L1CSCTrackCollection
std::vector< L1CSCTrack > L1CSCTrackCollection
Definition: L1CSCTrackCollection.h:8
edm::Handle< CSCCorrelatedLCTDigiCollection >
CSCTFTrackProducer::my_dtrc
CSCTFDTReceiver my_dtrc
Definition: CSCTFTrackProducer.h:34
CSCTFTrackProducer::m_scalesToken
const edm::ESGetToken< L1MuTriggerScales, L1MuTriggerScalesRcd > m_scalesToken
Definition: CSCTFTrackProducer.h:41
CSCTFTrackProducer::useDT
const bool useDT
Definition: CSCTFTrackProducer.h:35
CSCTFTrackProducer::m_ptScaleCacheID
unsigned long long m_ptScaleCacheID
Definition: CSCTFTrackProducer.h:47
CSCTFTrackProducer::m_pDDToken
const edm::ESGetToken< CSCGeometry, MuonGeometryRecord > m_pDDToken
Definition: CSCTFTrackProducer.h:43
edm::ESHandle
Definition: DTSurvey.h:22
CSCTFTrackProducer::directProd
const edm::EDGetTokenT< CSCTriggerContainer< csctf::TrackStub > > directProd
Definition: CSCTFTrackProducer.h:40
edm::ParameterSet
Definition: ParameterSet.h:47
CSCTFTrackProducer::readDtDirect
const bool readDtDirect
Definition: CSCTFTrackProducer.h:37
CSCTFTrackProducer::sp_pset
const edm::ParameterSet sp_pset
Definition: CSCTFTrackProducer.h:44
CSCTFTrackProducer::m_scalesCacheID
unsigned long long m_scalesCacheID
Definition: CSCTFTrackProducer.h:46
CSCTFTrackProducer::m_ptScaleToken
const edm::ESGetToken< L1MuTriggerPtScale, L1MuTriggerPtScaleRcd > m_ptScaleToken
Definition: CSCTFTrackProducer.h:42
L1MuTriggerPtScaleRcd
Definition: L1MuTriggerPtScaleRcd.h:12
CSCTFTrackProducer::input_module
const edm::EDGetTokenT< CSCCorrelatedLCTDigiCollection > input_module
Definition: CSCTFTrackProducer.h:38
ptScale
const std::vector< double > ptScale
Definition: Utilities.cc:33
CSCTFTrackProducer::my_builder
std::unique_ptr< CSCTFTrackBuilder > my_builder
Definition: CSCTFTrackProducer.h:48
L1MuTriggerScalesRcd
Definition: L1MuTriggerScalesRcd.h:12
CSCTFTrackProducer::TMB07
const bool TMB07
Definition: CSCTFTrackProducer.h:36
eostools.move
def move(src, dest)
Definition: eostools.py:511
CSCTriggerContainer< csctf::TrackStub >
CSCTFTrackProducer::dt_producer
const edm::EDGetTokenT< L1MuDTChambPhContainer > dt_producer
Definition: CSCTFTrackProducer.h:39
edm::eventsetup::EventSetupRecord::cacheIdentifier
unsigned long long cacheIdentifier() const
Definition: EventSetupRecord.h:187
CSCTFTrackBuilder::consumes
static Tokens consumes(const edm::ParameterSet &pset, edm::ConsumesCollector iC)
Definition: CSCTFTrackBuilder.h:22
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46
edm::InputTag
Definition: InputTag.h:15
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
CSCTFTrackProducer::m_builderTokens
const CSCTFTrackBuilder::Tokens m_builderTokens
Definition: CSCTFTrackProducer.h:45
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37