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 const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
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 const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
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 wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, 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)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Implementation:

Definition at line 44 of file L1UpgradeTfMuonTreeProducer.cc.

Constructor & Destructor Documentation

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

Definition at line 82 of file L1UpgradeTfMuonTreeProducer.cc.

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_.

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 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
L1Analysis::L1AnalysisL1UpgradeTfMuon l1UpgradeEmtf
L1AnalysisBMTFInputsDataFormat * getData()
L1Analysis::L1AnalysisL1UpgradeTfMuonDataFormat * l1UpgradeEmtfData
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
L1Analysis::L1AnalysisL1UpgradeTfMuon l1UpgradeOmtf
L1Analysis::L1AnalysisBMTFInputs l1UpgradeBmtfInputs
edm::EDGetTokenT< L1MuDTChambThContainer > bmtfThInputToken_
edm::EDGetTokenT< l1t::RegionalMuonCandBxCollection > bmtfMuonToken_
edm::EDGetTokenT< l1t::RegionalMuonCandBxCollection > omtfMuonToken_
L1Analysis::L1AnalysisL1UpgradeTfMuon l1UpgradeBmtf
edm::EDGetTokenT< L1MuDTChambPhContainer > bmtfPhInputToken_
L1Analysis::L1AnalysisL1UpgradeTfMuonDataFormat * l1UpgradeBmtfData
L1Analysis::L1AnalysisBMTFInputsDataFormat * l1UpgradeBmtfInputsData
L1AnalysisL1UpgradeTfMuonDataFormat * getData()
edm::EDGetTokenT< l1t::RegionalMuonCandBxCollection > emtfMuonToken_
L1Analysis::L1AnalysisL1UpgradeTfMuonDataFormat * l1UpgradeOmtfData
edm::Service< TFileService > fs_
L1UpgradeTfMuonTreeProducer::~L1UpgradeTfMuonTreeProducer ( )
override

Definition at line 112 of file L1UpgradeTfMuonTreeProducer.cc.

112 {}

Member Function Documentation

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

Definition at line 119 of file L1UpgradeTfMuonTreeProducer.cc.

References bmtfMuonToken_, bmtfPhInputToken_, bmtfThInputToken_, emtfMuonToken_, edm::Event::getByToken(), 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_.

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 }
L1Analysis::L1AnalysisL1UpgradeTfMuon l1UpgradeEmtf
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
L1Analysis::L1AnalysisL1UpgradeTfMuon l1UpgradeOmtf
L1Analysis::L1AnalysisBMTFInputs l1UpgradeBmtfInputs
edm::EDGetTokenT< L1MuDTChambThContainer > bmtfThInputToken_
edm::EDGetTokenT< l1t::RegionalMuonCandBxCollection > bmtfMuonToken_
edm::EDGetTokenT< l1t::RegionalMuonCandBxCollection > omtfMuonToken_
void SetBMPH(const edm::Handle< L1MuDTChambPhContainer > L1MuDTChambPhContainer, unsigned int maxDTPH)
bool isValid() const
Definition: HandleBase.h:70
L1Analysis::L1AnalysisL1UpgradeTfMuon l1UpgradeBmtf
edm::EDGetTokenT< L1MuDTChambPhContainer > bmtfPhInputToken_
void SetBMTH(const edm::Handle< L1MuDTChambThContainer > L1MuDTChambThContainer, unsigned int maxDTTH)
edm::EDGetTokenT< l1t::RegionalMuonCandBxCollection > emtfMuonToken_
void SetTfMuon(const l1t::RegionalMuonCandBxCollection &muon, unsigned maxL1UpgradeTfMuon)
void L1UpgradeTfMuonTreeProducer::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 171 of file L1UpgradeTfMuonTreeProducer.cc.

171 {}
void L1UpgradeTfMuonTreeProducer::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 174 of file L1UpgradeTfMuonTreeProducer.cc.

References DEFINE_FWK_MODULE.

174 {}

Member Data Documentation

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

Definition at line 74 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by analyze(), and L1UpgradeTfMuonTreeProducer().

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

Definition at line 78 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by analyze(), and L1UpgradeTfMuonTreeProducer().

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

Definition at line 79 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by analyze(), and L1UpgradeTfMuonTreeProducer().

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

Definition at line 76 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by analyze(), and L1UpgradeTfMuonTreeProducer().

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

Definition at line 68 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by L1UpgradeTfMuonTreeProducer().

L1Analysis::L1AnalysisL1UpgradeTfMuon L1UpgradeTfMuonTreeProducer::l1UpgradeBmtf

Definition at line 55 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by analyze(), and L1UpgradeTfMuonTreeProducer().

L1Analysis::L1AnalysisL1UpgradeTfMuonDataFormat* L1UpgradeTfMuonTreeProducer::l1UpgradeBmtfData

Definition at line 59 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by L1UpgradeTfMuonTreeProducer().

L1Analysis::L1AnalysisBMTFInputs L1UpgradeTfMuonTreeProducer::l1UpgradeBmtfInputs

Definition at line 58 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by analyze(), and L1UpgradeTfMuonTreeProducer().

L1Analysis::L1AnalysisBMTFInputsDataFormat* L1UpgradeTfMuonTreeProducer::l1UpgradeBmtfInputsData

Definition at line 62 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by L1UpgradeTfMuonTreeProducer().

L1Analysis::L1AnalysisL1UpgradeTfMuon L1UpgradeTfMuonTreeProducer::l1UpgradeEmtf

Definition at line 57 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by analyze(), and L1UpgradeTfMuonTreeProducer().

L1Analysis::L1AnalysisL1UpgradeTfMuonDataFormat* L1UpgradeTfMuonTreeProducer::l1UpgradeEmtfData

Definition at line 61 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by L1UpgradeTfMuonTreeProducer().

L1Analysis::L1AnalysisL1UpgradeTfMuon L1UpgradeTfMuonTreeProducer::l1UpgradeOmtf

Definition at line 56 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by analyze(), and L1UpgradeTfMuonTreeProducer().

L1Analysis::L1AnalysisL1UpgradeTfMuonDataFormat* L1UpgradeTfMuonTreeProducer::l1UpgradeOmtfData

Definition at line 60 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by L1UpgradeTfMuonTreeProducer().

unsigned L1UpgradeTfMuonTreeProducer::maxL1UpgradeTfMuon_
private

Definition at line 65 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by analyze(), and L1UpgradeTfMuonTreeProducer().

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

Definition at line 75 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by analyze(), and L1UpgradeTfMuonTreeProducer().

TTree* L1UpgradeTfMuonTreeProducer::tree_
private

Definition at line 71 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by analyze(), and L1UpgradeTfMuonTreeProducer().