CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
L1TSummary Class Reference
Inheritance diagram for L1TSummary:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 L1TSummary (const ParameterSet &)
 
 ~L1TSummary () 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::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
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
- 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 ()
 

Private Member Functions

void analyze (Event const &, EventSetup const &) override
 
void beginJob () override
 
void beginLuminosityBlock (LuminosityBlock const &, EventSetup const &) override
 
void beginRun (Run const &, EventSetup const &) override
 
void endJob () override
 
void endLuminosityBlock (LuminosityBlock const &, EventSetup const &) override
 
void endRun (Run const &, EventSetup const &) override
 

Private Attributes

bool bxZeroOnly_
 
bool egCheck_
 
int egCount_
 
edm::EDGetTokenT< EGammaBxCollectionegToken_
 
bool jetCheck_
 
int jetCount_
 
edm::EDGetTokenT< JetBxCollectionjetToken_
 
bool muonCheck_
 
int muonCount_
 
edm::EDGetTokenT< MuonBxCollectionmuonToken_
 
bool sumCheck_
 
int sumCount_
 
edm::EDGetTokenT< EtSumBxCollectionsumToken_
 
string tag_
 
bool tauCheck_
 
int tauCount_
 
std::vector< edm::EDGetTokenT< TauBxCollection > > tauTokens_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- 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 23 of file L1TSummary.cc.

Constructor & Destructor Documentation

◆ L1TSummary()

L1TSummary::L1TSummary ( const ParameterSet iConfig)
explicit

Definition at line 66 of file L1TSummary.cc.

66  {
67  // InputTag barrelTfInputTag = iConfig.getParameter<InputTag>("barrelTFInput");
68  // InputTag overlapTfInputTag = iConfig.getParameter<InputTag>("overlapTFInput");
69  // InputTag forwardTfInputTag = iConfig.getParameter<InputTag>("forwardTFInput");
70  //m_barrelTfInputToken = consumes<MicroGMTConfiguration::InputCollection>(iConfig.getParameter<InputTag>("bmtfDigis"));
71 
72  tag_ = iConfig.getParameter<string>("tag");
73 
74  egCheck_ = iConfig.getParameter<bool>("egCheck");
75  tauCheck_ = iConfig.getParameter<bool>("tauCheck");
76  jetCheck_ = iConfig.getParameter<bool>("jetCheck");
77  sumCheck_ = iConfig.getParameter<bool>("sumCheck");
78  muonCheck_ = iConfig.getParameter<bool>("muonCheck");
79  bxZeroOnly_ = iConfig.getParameter<bool>("bxZeroOnly");
80 
81  //cout << "L1T Summary for " << tag << "\n";
82  //cout << "DEBUG: egCheck: " << egCheck_ << "\n";
83  //cout << "DEBUG: tauCheck: " << tauCheck_ << "\n";
84  //cout << "DEBUG: jetCheck: " << jetCheck_ << "\n";
85  //cout << "DEBUG: sumCheck: " << sumCheck_ << "\n";
86  //cout << "DEBUG: muonCheck: " << muonCheck_ << "\n";
87 
88  if (egCheck_) {
89  egToken_ = consumes<EGammaBxCollection>(iConfig.getParameter<InputTag>("egToken"));
90  }
91  if (tauCheck_) {
92  const auto& taus = iConfig.getParameter<std::vector<edm::InputTag>>("tauTokens");
93  for (const auto& tau : taus) {
94  tauTokens_.push_back(consumes<l1t::TauBxCollection>(tau));
95  }
96  }
97  if (jetCheck_) {
98  jetToken_ = consumes<JetBxCollection>(iConfig.getParameter<InputTag>("jetToken"));
99  }
100  if (sumCheck_) {
101  sumToken_ = consumes<EtSumBxCollection>(iConfig.getParameter<InputTag>("sumToken"));
102  }
103  if (muonCheck_) {
104  muonToken_ = consumes<MuonBxCollection>(iConfig.getParameter<InputTag>("muonToken"));
105  }
106 
107  egCount_ = 0;
108  tauCount_ = 0;
109  jetCount_ = 0;
110  sumCount_ = 0;
111  muonCount_ = 0;
112 }

References edm::ParameterSet::getParameter(), metsig::tau, and Tau3MuMonitor_cff::taus.

◆ ~L1TSummary()

L1TSummary::~L1TSummary ( )
override

Definition at line 114 of file L1TSummary.cc.

114 {}

Member Function Documentation

◆ analyze()

void L1TSummary::analyze ( Event const &  iEvent,
EventSetup const &  iSetup 
)
overrideprivatevirtual

Implements edm::EDAnalyzer.

Definition at line 116 of file L1TSummary.cc.

116  {
117  cout << "L1TSummary Module output for " << tag_ << "\n";
118  if (egCheck_) {
120  iEvent.getByToken(egToken_, XTMP);
121  if (XTMP.isValid()) {
122  cout << "INFO: L1T found e-gamma collection.\n";
123  for (int ibx = XTMP->getFirstBX(); ibx <= XTMP->getLastBX(); ++ibx) {
124  for (auto it = XTMP->begin(ibx); it != XTMP->end(ibx); it++) {
125  if (bxZeroOnly_ && (ibx != 0))
126  continue;
127  if (it->et() > 0) {
128  egCount_++;
129  cout << "bx: " << ibx << " et: " << it->et() << " eta: " << it->eta() << " phi: " << it->phi()
130  << "\n";
131  }
132  }
133  }
134  } else {
135  LogWarning("MissingProduct") << "L1Upgrade e-gamma's not found." << std::endl;
136  }
137  }
138 
139  if (tauCheck_) {
140  for (auto& tautoken : tauTokens_) {
142  iEvent.getByToken(tautoken, XTMP);
143  if (XTMP.isValid()) {
144  cout << "INFO: L1T found tau collection.\n";
145  for (int ibx = XTMP->getFirstBX(); ibx <= XTMP->getLastBX(); ++ibx) {
146  for (auto it = XTMP->begin(ibx); it != XTMP->end(ibx); it++) {
147  if (it->et() > 0) {
148  if (bxZeroOnly_ && (ibx != 0))
149  continue;
150  tauCount_++;
151  cout << "bx: " << ibx << " et: " << it->et() << " eta: " << it->eta() << " phi: " << it->phi()
152  << "\n";
153  }
154  }
155  }
156  } else {
157  LogWarning("MissingProduct") << "L1Upgrade tau's not found." << std::endl;
158  }
159  }
160  }
161 
162  if (jetCheck_) {
164  iEvent.getByToken(jetToken_, XTMP);
165  if (XTMP.isValid()) {
166  cout << "INFO: L1T found jet collection.\n";
167  for (int ibx = XTMP->getFirstBX(); ibx <= XTMP->getLastBX(); ++ibx) {
168  for (auto it = XTMP->begin(ibx); it != XTMP->end(ibx); it++) {
169  if (it->et() > 0) {
170  if (bxZeroOnly_ && (ibx != 0))
171  continue;
172  jetCount_++;
173  cout << "bx: " << ibx << " et: " << it->et() << " eta: " << it->eta() << " phi: " << it->phi()
174  << "\n";
175  }
176  }
177  }
178  } else {
179  LogWarning("MissingProduct") << "L1T upgrade jets not found." << std::endl;
180  }
181  }
182 
183  if (sumCheck_) {
185  iEvent.getByToken(sumToken_, XTMP);
186  if (XTMP.isValid()) {
187  cout << "INFO: L1T found sum collection.\n";
188  for (int ibx = XTMP->getFirstBX(); ibx <= XTMP->getLastBX(); ++ibx) {
189  for (auto it = XTMP->begin(ibx); it != XTMP->end(ibx); it++) {
190  //if (it->et() > 0) {
191  if (bxZeroOnly_ && (ibx != 0))
192  continue;
193  sumCount_++;
194  cout << "bx: " << ibx << " et: " << it->et() << " eta: " << it->eta() << " phi: " << it->phi()
195  << " type: " << it->getType() << "\n";
196  //}
197  }
198  }
199  } else {
200  LogWarning("MissingProduct") << "L1T upgrade sums not found." << std::endl;
201  }
202  }
203 
204  if (muonCheck_) {
206  iEvent.getByToken(muonToken_, XTMP);
207  if (XTMP.isValid()) {
208  cout << "INFO: L1T found muon collection.\n";
209  for (int ibx = XTMP->getFirstBX(); ibx <= XTMP->getLastBX(); ++ibx) {
210  for (auto it = XTMP->begin(ibx); it != XTMP->end(ibx); it++) {
211  if (it->et() > 0) {
212  if (bxZeroOnly_ && (ibx != 0))
213  continue;
214  muonCount_++;
215  cout << "bx: " << ibx << " et: " << it->et() << " eta: " << it->eta() << " phi: " << it->phi()
216  << "\n";
217  }
218  }
219  }
220  } else {
221  LogWarning("MissingProduct") << "L1T upgrade muons not found." << std::endl;
222  }
223  }
224 }

References BXVector< T >::begin(), gather_cfg::cout, BXVector< T >::end(), BXVector< T >::getFirstBX(), BXVector< T >::getLastBX(), iEvent, and edm::HandleBase::isValid().

◆ beginJob()

void L1TSummary::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 226 of file L1TSummary.cc.

226 { cout << "INFO: L1TSummary module beginJob called.\n"; }

References gather_cfg::cout.

◆ beginLuminosityBlock()

void L1TSummary::beginLuminosityBlock ( LuminosityBlock const &  ,
EventSetup const &   
)
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 247 of file L1TSummary.cc.

247 {}

◆ beginRun()

void L1TSummary::beginRun ( Run const &  run,
EventSetup const &  iSetup 
)
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 243 of file L1TSummary.cc.

243 {}

◆ endJob()

void L1TSummary::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 228 of file L1TSummary.cc.

228  {
229  cout << "INFO: L1T Summary for " << tag_ << "\n";
230  cout << "INFO: count of non-zero candidates for each type follows:\n";
231  if (egCheck_)
232  cout << "eg: " << egCount_ << "\n";
233  if (tauCheck_)
234  cout << "tau: " << tauCount_ << "\n";
235  if (jetCheck_)
236  cout << "jet: " << jetCount_ << "\n";
237  if (sumCheck_)
238  cout << "sum: " << sumCount_ << "\n";
239  if (muonCheck_)
240  cout << "muon: " << muonCount_ << "\n";
241 }

References gather_cfg::cout.

◆ endLuminosityBlock()

void L1TSummary::endLuminosityBlock ( LuminosityBlock const &  ,
EventSetup const &   
)
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 249 of file L1TSummary.cc.

249 {}

◆ endRun()

void L1TSummary::endRun ( Run const &  ,
EventSetup const &   
)
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 245 of file L1TSummary.cc.

245 {}

◆ fillDescriptions()

void L1TSummary::fillDescriptions ( ConfigurationDescriptions descriptions)
static

Definition at line 251 of file L1TSummary.cc.

251  {
252  //The following says we do not know what parameters are allowed so do no validation
253  // Please change this to state exactly what you do use, even if it is no parameters
255  desc.setUnknown();
256  descriptions.addDefault(desc);
257 }

References edm::ConfigurationDescriptions::addDefault(), and submitPVResolutionJobs::desc.

Member Data Documentation

◆ bxZeroOnly_

bool L1TSummary::bxZeroOnly_
private

Definition at line 49 of file L1TSummary.cc.

◆ egCheck_

bool L1TSummary::egCheck_
private

Definition at line 44 of file L1TSummary.cc.

◆ egCount_

int L1TSummary::egCount_
private

Definition at line 59 of file L1TSummary.cc.

◆ egToken_

edm::EDGetTokenT<EGammaBxCollection> L1TSummary::egToken_
private

Definition at line 52 of file L1TSummary.cc.

◆ jetCheck_

bool L1TSummary::jetCheck_
private

Definition at line 46 of file L1TSummary.cc.

◆ jetCount_

int L1TSummary::jetCount_
private

Definition at line 61 of file L1TSummary.cc.

◆ jetToken_

edm::EDGetTokenT<JetBxCollection> L1TSummary::jetToken_
private

Definition at line 54 of file L1TSummary.cc.

◆ muonCheck_

bool L1TSummary::muonCheck_
private

Definition at line 48 of file L1TSummary.cc.

◆ muonCount_

int L1TSummary::muonCount_
private

Definition at line 63 of file L1TSummary.cc.

◆ muonToken_

edm::EDGetTokenT<MuonBxCollection> L1TSummary::muonToken_
private

Definition at line 56 of file L1TSummary.cc.

◆ sumCheck_

bool L1TSummary::sumCheck_
private

Definition at line 47 of file L1TSummary.cc.

◆ sumCount_

int L1TSummary::sumCount_
private

Definition at line 62 of file L1TSummary.cc.

◆ sumToken_

edm::EDGetTokenT<EtSumBxCollection> L1TSummary::sumToken_
private

Definition at line 55 of file L1TSummary.cc.

◆ tag_

string L1TSummary::tag_
private

Definition at line 41 of file L1TSummary.cc.

◆ tauCheck_

bool L1TSummary::tauCheck_
private

Definition at line 45 of file L1TSummary.cc.

◆ tauCount_

int L1TSummary::tauCount_
private

Definition at line 60 of file L1TSummary.cc.

◆ tauTokens_

std::vector<edm::EDGetTokenT<TauBxCollection> > L1TSummary::tauTokens_
private

Definition at line 53 of file L1TSummary.cc.

L1TSummary::sumCount_
int sumCount_
Definition: L1TSummary.cc:62
L1TSummary::egToken_
edm::EDGetTokenT< EGammaBxCollection > egToken_
Definition: L1TSummary.cc:52
L1TSummary::bxZeroOnly_
bool bxZeroOnly_
Definition: L1TSummary.cc:49
L1TSummary::tauTokens_
std::vector< edm::EDGetTokenT< TauBxCollection > > tauTokens_
Definition: L1TSummary.cc:53
metsig::tau
Definition: SignAlgoResolutions.h:49
Tau3MuMonitor_cff.taus
taus
Definition: Tau3MuMonitor_cff.py:7
L1TSummary::muonCount_
int muonCount_
Definition: L1TSummary.cc:63
gather_cfg.cout
cout
Definition: gather_cfg.py:144
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
L1TSummary::tauCount_
int tauCount_
Definition: L1TSummary.cc:60
L1TSummary::jetCount_
int jetCount_
Definition: L1TSummary.cc:61
L1TSummary::jetCheck_
bool jetCheck_
Definition: L1TSummary.cc:46
edm::Handle
Definition: AssociativeIterator.h:50
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
BXVector::getFirstBX
int getFirstBX() const
L1TSummary::tag_
string tag_
Definition: L1TSummary.cc:41
L1TSummary::jetToken_
edm::EDGetTokenT< JetBxCollection > jetToken_
Definition: L1TSummary.cc:54
BXVector::begin
const_iterator begin(int bx) const
BXVector::end
const_iterator end(int bx) const
L1TSummary::sumCheck_
bool sumCheck_
Definition: L1TSummary.cc:47
L1TSummary::egCount_
int egCount_
Definition: L1TSummary.cc:59
iEvent
int iEvent
Definition: GenABIO.cc:224
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
L1TSummary::egCheck_
bool egCheck_
Definition: L1TSummary.cc:44
L1TSummary::muonToken_
edm::EDGetTokenT< MuonBxCollection > muonToken_
Definition: L1TSummary.cc:56
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
L1TSummary::tauCheck_
bool tauCheck_
Definition: L1TSummary.cc:45
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
L1TSummary::sumToken_
edm::EDGetTokenT< EtSumBxCollection > sumToken_
Definition: L1TSummary.cc:55
edm::ConfigurationDescriptions::addDefault
void addDefault(ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:99
BXVector::getLastBX
int getLastBX() const
edm::InputTag
Definition: InputTag.h:15
L1TSummary::muonCheck_
bool muonCheck_
Definition: L1TSummary.cc:48