CMS 3D CMS Logo

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

#include <L1Trigger/L1Ntuples/plugins/L1UpgradeTfMuonTreeProducer.cc>

Inheritance diagram for L1UpgradeTfMuonTreeProducer:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 L1UpgradeTfMuonTreeProducer (const edm::ParameterSet &)
 
 ~L1UpgradeTfMuonTreeProducer () override
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
 ~EDAnalyzer () 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::vector< ModuleDescription const * > &modules, 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)
 

Public Attributes

L1Analysis::L1AnalysisL1UpgradeTfMuon l1UpgradeBmtf
 
L1Analysis::L1AnalysisL1UpgradeTfMuonDataFormatl1UpgradeBmtfData
 
L1Analysis::L1AnalysisBMTFInputs l1UpgradeBmtfInputs
 
L1Analysis::L1AnalysisBMTFInputsDataFormatl1UpgradeBmtfInputsData
 
L1Analysis::L1AnalysisL1UpgradeTfMuon l1UpgradeEmtf
 
L1Analysis::L1AnalysisL1UpgradeTfMuonDataFormatl1UpgradeEmtfData
 
L1Analysis::L1AnalysisL1UpgradeTfMuon l1UpgradeOmtf
 
L1Analysis::L1AnalysisL1UpgradeTfMuonDataFormatl1UpgradeOmtfData
 

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void beginJob (void) override
 
void endJob () override
 

Private Attributes

edm::EDGetTokenT< l1t::RegionalMuonCandBxCollectionbmtfMuonToken_
 
edm::EDGetTokenT< L1MuDTChambPhContainerbmtfPhInputToken_
 
edm::EDGetTokenT< L1MuDTChambThContainerbmtfThInputToken_
 
edm::EDGetTokenT< l1t::RegionalMuonCandBxCollectionemtfMuonToken_
 
edm::Service< TFileServicefs_
 
unsigned maxL1UpgradeTfMuon_
 
edm::EDGetTokenT< l1t::RegionalMuonCandBxCollectionomtfMuonToken_
 
TTree * tree_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsInputProcessBlocks ()
 
static bool wantsProcessBlocks ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- 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

Implementation:

Definition at line 44 of file L1UpgradeTfMuonTreeProducer.cc.

Constructor & Destructor Documentation

◆ L1UpgradeTfMuonTreeProducer()

L1UpgradeTfMuonTreeProducer::L1UpgradeTfMuonTreeProducer ( const edm::ParameterSet iConfig)
explicit

Definition at line 82 of file L1UpgradeTfMuonTreeProducer.cc.

82  {
84  consumes<l1t::RegionalMuonCandBxCollection>(iConfig.getUntrackedParameter<edm::InputTag>("bmtfMuonToken"));
86  consumes<l1t::RegionalMuonCandBxCollection>(iConfig.getUntrackedParameter<edm::InputTag>("omtfMuonToken"));
88  consumes<l1t::RegionalMuonCandBxCollection>(iConfig.getUntrackedParameter<edm::InputTag>("emtfMuonToken"));
89 
91  consumes<L1MuDTChambPhContainer>(iConfig.getUntrackedParameter<edm::InputTag>("bmtfInputPhMuonToken"));
93  consumes<L1MuDTChambThContainer>(iConfig.getUntrackedParameter<edm::InputTag>("bmtfInputThMuonToken"));
94 
95  maxL1UpgradeTfMuon_ = iConfig.getParameter<unsigned int>("maxL1UpgradeTfMuon");
96 
101 
102  // set up output
103  tree_ = fs_->make<TTree>("L1UpgradeTfMuonTree", "L1UpgradeTfMuonTree");
104  tree_->Branch("L1UpgradeBmtfMuon", "L1Analysis::L1AnalysisL1UpgradeTfMuonDataFormat", &l1UpgradeBmtfData, 32000, 3);
105  tree_->Branch("L1UpgradeOmtfMuon", "L1Analysis::L1AnalysisL1UpgradeTfMuonDataFormat", &l1UpgradeOmtfData, 32000, 3);
106  tree_->Branch("L1UpgradeEmtfMuon", "L1Analysis::L1AnalysisL1UpgradeTfMuonDataFormat", &l1UpgradeEmtfData, 32000, 3);
107 
108  tree_->Branch(
109  "L1UpgradeBmtfInputs", "L1Analysis::L1AnalysisBMTFInputsDataFormat", &l1UpgradeBmtfInputsData, 32000, 3);
110 }

References bmtfMuonToken_, bmtfPhInputToken_, bmtfThInputToken_, emtfMuonToken_, fs_, L1Analysis::L1AnalysisL1UpgradeTfMuon::getData(), L1Analysis::L1AnalysisBMTFInputs::getData(), edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), l1UpgradeBmtf, l1UpgradeBmtfData, l1UpgradeBmtfInputs, l1UpgradeBmtfInputsData, l1UpgradeEmtf, l1UpgradeEmtfData, l1UpgradeOmtf, l1UpgradeOmtfData, TFileService::make(), maxL1UpgradeTfMuon_, omtfMuonToken_, and tree_.

◆ ~L1UpgradeTfMuonTreeProducer()

L1UpgradeTfMuonTreeProducer::~L1UpgradeTfMuonTreeProducer ( )
override

Definition at line 112 of file L1UpgradeTfMuonTreeProducer.cc.

112 {}

Member Function Documentation

◆ analyze()

void L1UpgradeTfMuonTreeProducer::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Implements edm::EDAnalyzer.

Definition at line 119 of file L1UpgradeTfMuonTreeProducer.cc.

119  {
124 
130 
131  iEvent.getByToken(bmtfMuonToken_, bmtfMuon);
132  iEvent.getByToken(omtfMuonToken_, omtfMuon);
133  iEvent.getByToken(emtfMuonToken_, emtfMuon);
134  iEvent.getByToken(bmtfPhInputToken_, bmtfPhInputs);
135  iEvent.getByToken(bmtfThInputToken_, bmtfThInputs);
136 
137  if (bmtfMuon.isValid()) {
139  } else {
140  edm::LogWarning("MissingProduct") << "L1Upgrade BMTF muons not found. Branch will not be filled" << std::endl;
141  }
142 
143  if (omtfMuon.isValid()) {
145  } else {
146  edm::LogWarning("MissingProduct") << "L1Upgrade OMTF muons not found. Branch will not be filled" << std::endl;
147  }
148 
149  if (emtfMuon.isValid()) {
151  } else {
152  edm::LogWarning("MissingProduct") << "L1Upgrade EMTF muons not found. Branch will not be filled" << std::endl;
153  }
154 
155  int max_inputs = maxL1UpgradeTfMuon_ * 4;
156 
157  if (!bmtfPhInputs.isValid()) {
158  edm::LogWarning("MissingProduct") << "L1Upgrade BMTF Ph Inputs not found. Branch will not be filled" << std::endl;
159  } else
160  l1UpgradeBmtfInputs.SetBMPH(bmtfPhInputs, max_inputs);
161 
162  if (!bmtfThInputs.isValid()) {
163  edm::LogWarning("MissingProduct") << "L1Upgrade BMTF Th Inputs not found. Branch will not be filled" << std::endl;
164  } else
165  l1UpgradeBmtfInputs.SetBMTH(bmtfThInputs, max_inputs);
166 
167  tree_->Fill();
168 }

References bmtfMuonToken_, bmtfPhInputToken_, bmtfThInputToken_, emtfMuonToken_, iEvent, edm::HandleBase::isValid(), l1UpgradeBmtf, l1UpgradeBmtfInputs, l1UpgradeEmtf, l1UpgradeOmtf, maxL1UpgradeTfMuon_, omtfMuonToken_, L1Analysis::L1AnalysisL1UpgradeTfMuon::Reset(), L1Analysis::L1AnalysisBMTFInputs::Reset(), L1Analysis::L1AnalysisBMTFInputs::SetBMPH(), L1Analysis::L1AnalysisBMTFInputs::SetBMTH(), L1Analysis::L1AnalysisL1UpgradeTfMuon::SetTfMuon(), and tree_.

◆ beginJob()

void L1UpgradeTfMuonTreeProducer::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 171 of file L1UpgradeTfMuonTreeProducer.cc.

171 {}

◆ endJob()

void L1UpgradeTfMuonTreeProducer::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 174 of file L1UpgradeTfMuonTreeProducer.cc.

174 {}

Member Data Documentation

◆ bmtfMuonToken_

edm::EDGetTokenT<l1t::RegionalMuonCandBxCollection> L1UpgradeTfMuonTreeProducer::bmtfMuonToken_
private

Definition at line 74 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by analyze(), and L1UpgradeTfMuonTreeProducer().

◆ bmtfPhInputToken_

edm::EDGetTokenT<L1MuDTChambPhContainer> L1UpgradeTfMuonTreeProducer::bmtfPhInputToken_
private

Definition at line 78 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by analyze(), and L1UpgradeTfMuonTreeProducer().

◆ bmtfThInputToken_

edm::EDGetTokenT<L1MuDTChambThContainer> L1UpgradeTfMuonTreeProducer::bmtfThInputToken_
private

Definition at line 79 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by analyze(), and L1UpgradeTfMuonTreeProducer().

◆ emtfMuonToken_

edm::EDGetTokenT<l1t::RegionalMuonCandBxCollection> L1UpgradeTfMuonTreeProducer::emtfMuonToken_
private

Definition at line 76 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by analyze(), and L1UpgradeTfMuonTreeProducer().

◆ fs_

edm::Service<TFileService> L1UpgradeTfMuonTreeProducer::fs_
private

Definition at line 68 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by L1UpgradeTfMuonTreeProducer().

◆ l1UpgradeBmtf

L1Analysis::L1AnalysisL1UpgradeTfMuon L1UpgradeTfMuonTreeProducer::l1UpgradeBmtf

Definition at line 55 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by analyze(), and L1UpgradeTfMuonTreeProducer().

◆ l1UpgradeBmtfData

L1Analysis::L1AnalysisL1UpgradeTfMuonDataFormat* L1UpgradeTfMuonTreeProducer::l1UpgradeBmtfData

Definition at line 59 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by L1UpgradeTfMuonTreeProducer().

◆ l1UpgradeBmtfInputs

L1Analysis::L1AnalysisBMTFInputs L1UpgradeTfMuonTreeProducer::l1UpgradeBmtfInputs

Definition at line 58 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by analyze(), and L1UpgradeTfMuonTreeProducer().

◆ l1UpgradeBmtfInputsData

L1Analysis::L1AnalysisBMTFInputsDataFormat* L1UpgradeTfMuonTreeProducer::l1UpgradeBmtfInputsData

Definition at line 62 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by L1UpgradeTfMuonTreeProducer().

◆ l1UpgradeEmtf

L1Analysis::L1AnalysisL1UpgradeTfMuon L1UpgradeTfMuonTreeProducer::l1UpgradeEmtf

Definition at line 57 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by analyze(), and L1UpgradeTfMuonTreeProducer().

◆ l1UpgradeEmtfData

L1Analysis::L1AnalysisL1UpgradeTfMuonDataFormat* L1UpgradeTfMuonTreeProducer::l1UpgradeEmtfData

Definition at line 61 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by L1UpgradeTfMuonTreeProducer().

◆ l1UpgradeOmtf

L1Analysis::L1AnalysisL1UpgradeTfMuon L1UpgradeTfMuonTreeProducer::l1UpgradeOmtf

Definition at line 56 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by analyze(), and L1UpgradeTfMuonTreeProducer().

◆ l1UpgradeOmtfData

L1Analysis::L1AnalysisL1UpgradeTfMuonDataFormat* L1UpgradeTfMuonTreeProducer::l1UpgradeOmtfData

Definition at line 60 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by L1UpgradeTfMuonTreeProducer().

◆ maxL1UpgradeTfMuon_

unsigned L1UpgradeTfMuonTreeProducer::maxL1UpgradeTfMuon_
private

Definition at line 65 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by analyze(), and L1UpgradeTfMuonTreeProducer().

◆ omtfMuonToken_

edm::EDGetTokenT<l1t::RegionalMuonCandBxCollection> L1UpgradeTfMuonTreeProducer::omtfMuonToken_
private

Definition at line 75 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by analyze(), and L1UpgradeTfMuonTreeProducer().

◆ tree_

TTree* L1UpgradeTfMuonTreeProducer::tree_
private

Definition at line 71 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by analyze(), and L1UpgradeTfMuonTreeProducer().

L1UpgradeTfMuonTreeProducer::fs_
edm::Service< TFileService > fs_
Definition: L1UpgradeTfMuonTreeProducer.cc:68
L1UpgradeTfMuonTreeProducer::bmtfPhInputToken_
edm::EDGetTokenT< L1MuDTChambPhContainer > bmtfPhInputToken_
Definition: L1UpgradeTfMuonTreeProducer.cc:78
L1Analysis::L1AnalysisL1UpgradeTfMuon::SetTfMuon
void SetTfMuon(const l1t::RegionalMuonCandBxCollection &muon, unsigned maxL1UpgradeTfMuon)
Definition: L1AnalysisL1UpgradeTfMuon.cc:7
L1UpgradeTfMuonTreeProducer::l1UpgradeEmtfData
L1Analysis::L1AnalysisL1UpgradeTfMuonDataFormat * l1UpgradeEmtfData
Definition: L1UpgradeTfMuonTreeProducer.cc:61
L1Analysis::L1AnalysisL1UpgradeTfMuon::getData
L1AnalysisL1UpgradeTfMuonDataFormat * getData()
Definition: L1AnalysisL1UpgradeTfMuon.h:16
L1UpgradeTfMuonTreeProducer::emtfMuonToken_
edm::EDGetTokenT< l1t::RegionalMuonCandBxCollection > emtfMuonToken_
Definition: L1UpgradeTfMuonTreeProducer.cc:76
L1Analysis::L1AnalysisBMTFInputs::SetBMTH
void SetBMTH(const edm::Handle< L1MuDTChambThContainer > L1MuDTChambThContainer, unsigned int maxDTTH)
Definition: L1AnalysisBMTFInputs.cc:37
L1Analysis::L1AnalysisBMTFInputs::SetBMPH
void SetBMPH(const edm::Handle< L1MuDTChambPhContainer > L1MuDTChambPhContainer, unsigned int maxDTPH)
Definition: L1AnalysisBMTFInputs.cc:13
L1UpgradeTfMuonTreeProducer::l1UpgradeOmtfData
L1Analysis::L1AnalysisL1UpgradeTfMuonDataFormat * l1UpgradeOmtfData
Definition: L1UpgradeTfMuonTreeProducer.cc:60
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
edm::Handle
Definition: AssociativeIterator.h:50
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
L1UpgradeTfMuonTreeProducer::l1UpgradeBmtf
L1Analysis::L1AnalysisL1UpgradeTfMuon l1UpgradeBmtf
Definition: L1UpgradeTfMuonTreeProducer.cc:55
L1Analysis::L1AnalysisL1UpgradeTfMuon::Reset
void Reset()
Definition: L1AnalysisL1UpgradeTfMuon.h:14
L1UpgradeTfMuonTreeProducer::l1UpgradeBmtfData
L1Analysis::L1AnalysisL1UpgradeTfMuonDataFormat * l1UpgradeBmtfData
Definition: L1UpgradeTfMuonTreeProducer.cc:59
L1Analysis::L1AnalysisBMTFInputs::getData
L1AnalysisBMTFInputsDataFormat * getData()
Definition: L1AnalysisBMTFInputs.h:28
L1Analysis::L1AnalysisBMTFInputs::Reset
void Reset()
Definition: L1AnalysisBMTFInputs.h:27
L1UpgradeTfMuonTreeProducer::tree_
TTree * tree_
Definition: L1UpgradeTfMuonTreeProducer.cc:71
L1UpgradeTfMuonTreeProducer::bmtfThInputToken_
edm::EDGetTokenT< L1MuDTChambThContainer > bmtfThInputToken_
Definition: L1UpgradeTfMuonTreeProducer.cc:79
L1UpgradeTfMuonTreeProducer::l1UpgradeBmtfInputs
L1Analysis::L1AnalysisBMTFInputs l1UpgradeBmtfInputs
Definition: L1UpgradeTfMuonTreeProducer.cc:58
L1UpgradeTfMuonTreeProducer::l1UpgradeOmtf
L1Analysis::L1AnalysisL1UpgradeTfMuon l1UpgradeOmtf
Definition: L1UpgradeTfMuonTreeProducer.cc:56
iEvent
int iEvent
Definition: GenABIO.cc:224
L1UpgradeTfMuonTreeProducer::maxL1UpgradeTfMuon_
unsigned maxL1UpgradeTfMuon_
Definition: L1UpgradeTfMuonTreeProducer.cc:65
L1UpgradeTfMuonTreeProducer::l1UpgradeEmtf
L1Analysis::L1AnalysisL1UpgradeTfMuon l1UpgradeEmtf
Definition: L1UpgradeTfMuonTreeProducer.cc:57
L1UpgradeTfMuonTreeProducer::omtfMuonToken_
edm::EDGetTokenT< l1t::RegionalMuonCandBxCollection > omtfMuonToken_
Definition: L1UpgradeTfMuonTreeProducer.cc:75
L1UpgradeTfMuonTreeProducer::l1UpgradeBmtfInputsData
L1Analysis::L1AnalysisBMTFInputsDataFormat * l1UpgradeBmtfInputsData
Definition: L1UpgradeTfMuonTreeProducer.cc:62
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
edm::InputTag
Definition: InputTag.h:15
TFileService::make
T * make(const Args &... args) const
make new ROOT object
Definition: TFileService.h:64
L1UpgradeTfMuonTreeProducer::bmtfMuonToken_
edm::EDGetTokenT< l1t::RegionalMuonCandBxCollection > bmtfMuonToken_
Definition: L1UpgradeTfMuonTreeProducer.cc:74