CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 ()
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

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

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

Private Attributes

edm::EDGetTokenT
< l1t::RegionalMuonCandBxCollection
bmtfMuonToken_
 
edm::EDGetTokenT
< L1MuDTChambPhContainer
bmtfPhInputToken_
 
edm::EDGetTokenT
< L1MuDTChambThContainer
bmtfThInputToken_
 
edm::EDGetTokenT
< l1t::RegionalMuonCandBxCollection
emtfMuonToken_
 
edm::Service< TFileServicefs_
 
unsigned maxL1UpgradeTfMuon_
 
edm::EDGetTokenT
< l1t::RegionalMuonCandBxCollection
omtfMuonToken_
 
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 &)
 
- 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 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 45 of file L1UpgradeTfMuonTreeProducer.cc.

Constructor & Destructor Documentation

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

Definition at line 89 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_.

90 {
91 
92  bmtfMuonToken_ = consumes<l1t::RegionalMuonCandBxCollection>(iConfig.getUntrackedParameter<edm::InputTag>("bmtfMuonToken"));
93  omtfMuonToken_ = consumes<l1t::RegionalMuonCandBxCollection>(iConfig.getUntrackedParameter<edm::InputTag>("omtfMuonToken"));
94  emtfMuonToken_ = consumes<l1t::RegionalMuonCandBxCollection>(iConfig.getUntrackedParameter<edm::InputTag>("emtfMuonToken"));
95 
96  bmtfPhInputToken_ = consumes<L1MuDTChambPhContainer>(iConfig.getUntrackedParameter<edm::InputTag>("bmtfInputPhMuonToken"));
97  bmtfThInputToken_ = consumes<L1MuDTChambThContainer>(iConfig.getUntrackedParameter<edm::InputTag>("bmtfInputThMuonToken"));
98 
99  maxL1UpgradeTfMuon_ = iConfig.getParameter<unsigned int>("maxL1UpgradeTfMuon");
100 
101 
106 
107 
108  // set up output
109  tree_=fs_->make<TTree>("L1UpgradeTfMuonTree", "L1UpgradeTfMuonTree");
110  tree_->Branch("L1UpgradeBmtfMuon", "L1Analysis::L1AnalysisL1UpgradeTfMuonDataFormat", &l1UpgradeBmtfData, 32000, 3);
111  tree_->Branch("L1UpgradeOmtfMuon", "L1Analysis::L1AnalysisL1UpgradeTfMuonDataFormat", &l1UpgradeOmtfData, 32000, 3);
112  tree_->Branch("L1UpgradeEmtfMuon", "L1Analysis::L1AnalysisL1UpgradeTfMuonDataFormat", &l1UpgradeEmtfData, 32000, 3);
113 
114  tree_->Branch("L1UpgradeBmtfInputs", "L1Analysis::L1AnalysisBMTFInputsDataFormat", &l1UpgradeBmtfInputsData, 32000, 3);
115 
116 
117 }
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 ( )

Definition at line 120 of file L1UpgradeTfMuonTreeProducer.cc.

121 {
122 }

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 131 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_.

132 {
133 
138 
139 
145 
146  iEvent.getByToken(bmtfMuonToken_, bmtfMuon);
147  iEvent.getByToken(omtfMuonToken_, omtfMuon);
148  iEvent.getByToken(emtfMuonToken_, emtfMuon);
149  iEvent.getByToken(bmtfPhInputToken_, bmtfPhInputs);
150  iEvent.getByToken(bmtfThInputToken_, bmtfThInputs);
151 
152  if (bmtfMuon.isValid()){
154  } else {
155  edm::LogWarning("MissingProduct") << "L1Upgrade BMTF muons not found. Branch will not be filled" << std::endl;
156  }
157 
158  if (omtfMuon.isValid()){
160  } else {
161  edm::LogWarning("MissingProduct") << "L1Upgrade OMTF muons not found. Branch will not be filled" << std::endl;
162  }
163 
164  if (emtfMuon.isValid()){
166  } else {
167  edm::LogWarning("MissingProduct") << "L1Upgrade EMTF muons not found. Branch will not be filled" << std::endl;
168  }
169 
170 
171  int max_inputs = maxL1UpgradeTfMuon_*4;
172 
173  if (!bmtfPhInputs.isValid()) {
174  edm::LogWarning("MissingProduct") << "L1Upgrade BMTF Ph Inputs not found. Branch will not be filled" << std::endl;
175  }
176  else l1UpgradeBmtfInputs.SetBMPH(bmtfPhInputs, max_inputs);
177 
178  if (!bmtfThInputs.isValid()) {
179  edm::LogWarning("MissingProduct") << "L1Upgrade BMTF Th Inputs not found. Branch will not be filled" << std::endl;
180  }
181  else l1UpgradeBmtfInputs.SetBMTH(bmtfThInputs, max_inputs);
182 
183 
184 
185  tree_->Fill();
186 
187 }
L1Analysis::L1AnalysisL1UpgradeTfMuon l1UpgradeEmtf
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
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:75
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  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 191 of file L1UpgradeTfMuonTreeProducer.cc.

192 {
193 }
void L1UpgradeTfMuonTreeProducer::endJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 197 of file L1UpgradeTfMuonTreeProducer.cc.

197  {
198 }

Member Data Documentation

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

Definition at line 78 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by analyze(), and L1UpgradeTfMuonTreeProducer().

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

Definition at line 82 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by analyze(), and L1UpgradeTfMuonTreeProducer().

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

Definition at line 83 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by analyze(), and L1UpgradeTfMuonTreeProducer().

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

Definition at line 80 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by analyze(), and L1UpgradeTfMuonTreeProducer().

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

Definition at line 72 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by L1UpgradeTfMuonTreeProducer().

L1Analysis::L1AnalysisL1UpgradeTfMuon L1UpgradeTfMuonTreeProducer::l1UpgradeBmtf

Definition at line 58 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by analyze(), and L1UpgradeTfMuonTreeProducer().

L1Analysis::L1AnalysisL1UpgradeTfMuonDataFormat* L1UpgradeTfMuonTreeProducer::l1UpgradeBmtfData

Definition at line 62 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by L1UpgradeTfMuonTreeProducer().

L1Analysis::L1AnalysisBMTFInputs L1UpgradeTfMuonTreeProducer::l1UpgradeBmtfInputs

Definition at line 61 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by analyze(), and L1UpgradeTfMuonTreeProducer().

L1Analysis::L1AnalysisBMTFInputsDataFormat* L1UpgradeTfMuonTreeProducer::l1UpgradeBmtfInputsData

Definition at line 65 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by L1UpgradeTfMuonTreeProducer().

L1Analysis::L1AnalysisL1UpgradeTfMuon L1UpgradeTfMuonTreeProducer::l1UpgradeEmtf

Definition at line 60 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by analyze(), and L1UpgradeTfMuonTreeProducer().

L1Analysis::L1AnalysisL1UpgradeTfMuonDataFormat* L1UpgradeTfMuonTreeProducer::l1UpgradeEmtfData

Definition at line 64 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by L1UpgradeTfMuonTreeProducer().

L1Analysis::L1AnalysisL1UpgradeTfMuon L1UpgradeTfMuonTreeProducer::l1UpgradeOmtf

Definition at line 59 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by analyze(), and L1UpgradeTfMuonTreeProducer().

L1Analysis::L1AnalysisL1UpgradeTfMuonDataFormat* L1UpgradeTfMuonTreeProducer::l1UpgradeOmtfData

Definition at line 63 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by L1UpgradeTfMuonTreeProducer().

unsigned L1UpgradeTfMuonTreeProducer::maxL1UpgradeTfMuon_
private

Definition at line 69 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by analyze(), and L1UpgradeTfMuonTreeProducer().

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

Definition at line 79 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by analyze(), and L1UpgradeTfMuonTreeProducer().

TTree* L1UpgradeTfMuonTreeProducer::tree_
private

Definition at line 75 of file L1UpgradeTfMuonTreeProducer.cc.

Referenced by analyze(), and L1UpgradeTfMuonTreeProducer().