213 int ntrigs = hltresults->size();
214 if (ntrigs==0){
std::cout <<
"%HLTInfo -- No trigger name given in TriggerResults of the input " << std::endl;}
220 for (
int itrig = 0; itrig != ntrigs; ++itrig) {
221 TString trigName = triggerNames.
triggerName(itrig);
222 HltTree->Branch(trigName,
trigflag+itrig,trigName+
"/I");
223 HltTree->Branch(trigName+
"_Prescl",
trigPrescl+itrig,trigName+
"_Prescl/I");
227 for (
unsigned int idum = 0; idum <
dummyBranches_.size(); ++idum) {
229 bool addThisBranch = 1;
230 for (
int itrig = 0; itrig != ntrigs; ++itrig) {
231 TString realTrigName = triggerNames.
triggerName(itrig);
232 if(trigName == realTrigName) addThisBranch = 0;
235 HltTree->Branch(trigName,
trigflag+itdum,trigName+
"/I");
236 HltTree->Branch(trigName+
"_Prescl",
trigPrescl+itdum,trigName+
"_Prescl/I");
252 for (
int itrig = 0; itrig != ntrigs; ++itrig){
255 bool accept = hltresults->accept(itrig);
264 if (
_Debug)
std::cout <<
"%HLTInfo -- Number of HLT Triggers: " << ntrigs << std::endl;
265 std::cout <<
"%HLTInfo -- HLTTrigger(" << itrig <<
"): " << trigName <<
" = " << accept << std::endl;
269 else {
if (
_Debug)
std::cout <<
"%HLTInfo -- No Trigger Result" << std::endl;}
273 const int maxL1EmIsol = 4;
274 for (
int i=0;
i!=maxL1EmIsol; ++
i){
280 if (L1ExtEmIsol.isValid()) {
283 myl1iems = * L1ExtEmIsol;
286 for (l1extra::L1EmParticleCollection::const_iterator emItr = myl1iems.begin(); emItr != myl1iems.end(); ++emItr) {
296 if (
_Debug)
std::cout <<
"%HLTInfo -- No Isolated L1 EM object" << std::endl;
299 const int maxL1EmNIsol = 4;
300 for (
int i=0;
i!=maxL1EmNIsol; ++
i){
306 if (L1ExtEmNIsol.isValid()) {
309 myl1nems = * L1ExtEmNIsol;
312 for (l1extra::L1EmParticleCollection::const_iterator emItr = myl1nems.begin(); emItr != myl1nems.end(); ++emItr) {
322 if (
_Debug)
std::cout <<
"%HLTInfo -- No Non-Isolated L1 EM object" << std::endl;
325 const int maxL1Mu = 4;
326 for (
int i=0;
i!=maxL1Mu; ++
i){
338 if (L1ExtMu.isValid()) {
344 for (l1extra::L1MuonParticleCollection::const_iterator muItr = myl1mus.begin(); muItr != myl1mus.end(); ++muItr) {
346 l1extmue[il1exmu] = muItr->energy();
364 const int maxL1CenJet = 4;
365 for (
int i=0;
i!=maxL1CenJet; ++
i){
371 if (L1ExtJetC.isValid()) {
374 myl1jetsc = * L1ExtJetC;
377 for (l1extra::L1JetParticleCollection::const_iterator jtItr = myl1jetsc.begin(); jtItr != myl1jetsc.end(); ++jtItr) {
387 if (
_Debug)
std::cout <<
"%HLTInfo -- No L1 Central JET object" << std::endl;
390 const int maxL1ForJet = 4;
391 for (
int i=0;
i!=maxL1ForJet; ++
i){
397 if (L1ExtJetF.isValid()) {
400 myl1jetsf = * L1ExtJetF;
403 for (l1extra::L1JetParticleCollection::const_iterator jtItr = myl1jetsf.begin(); jtItr != myl1jetsf.end(); ++jtItr) {
413 if (
_Debug)
std::cout <<
"%HLTInfo -- No L1 Forward JET object" << std::endl;
416 const int maxL1Jet = 324;
417 for (
int i=0;
i!=maxL1Jet; ++
i){
423 if (L1ExtJet.isValid()) {
424 if (
_Debug)
std::cout <<
"%HLTInfo -- Found L1 JET object" << std::endl;
427 myl1jets = * L1ExtJet;
430 for (l1extra::L1JetParticleCollection::const_iterator jtItr = myl1jets.begin(); jtItr != myl1jets.end(); ++jtItr) {
432 l1extjte[il1exjt] = jtItr->energy();
444 const int maxL1TauJet = 4;
445 for (
int i=0;
i!=maxL1TauJet; ++
i){
451 if (L1ExtTau.isValid()) {
454 myl1taus = * L1ExtTau;
457 for (l1extra::L1JetParticleCollection::const_iterator tauItr = myl1taus.begin(); tauItr != myl1taus.end(); ++tauItr) {
470 if (L1ExtMet.isValid()) {
471 met = L1ExtMet->begin()->etMiss();
472 metphi = L1ExtMet->begin()->phi();
473 ettot = L1ExtMet->begin()->etTotal();
479 if (L1ExtMht.isValid()) {
480 mht = L1ExtMht->begin()->etMiss();
481 mhtphi = L1ExtMht->begin()->phi();
482 ethad = L1ExtMht->begin()->etTotal();
501 iEvent, trigCategory, iErrorCode);
502 if (iErrorCode == 0) {
503 if (
_Debug)
std::cout <<
"%Prescale set index: " << pfSetIndexAlgorithmTrigger << std::endl;
505 std::cout <<
"%Could not extract Prescale set index from event record. Error code: " << iErrorCode << std::endl;
509 if (L1GTRR.isValid()) {
512 const unsigned int numberTriggerBits(gtDecisionWord.size());
514 const unsigned int numberTechnicalTriggerBits(technicalTriggerWordBeforeMask.size());
528 if (pSet.
exists(
"UnpackBxInEvent")){
536 if (
_Debug)
std::cout <<
"Name: " << (
algo->second).algoName() <<
" Alias: " << (
algo->second).algoAlias() << std::endl;
537 int itrig = (
algo->second).algoBitNumber();
548 int itrig = (techTrig->second).algoBitNumber();
549 techBitToName[itrig] = TString( (techTrig->second).algoName() );
558 std::string triggerAlgTechTrig =
"PhysicsAlgorithms";
559 for (
unsigned int iBit = 0; iBit < numberTriggerBits; ++iBit) {
561 l1flag[iBit] = gtDecisionWord[iBit];
569 << gtDecisionWord[iBit]<<
" "
574 triggerAlgTechTrig =
"TechnicalTriggers";
575 for (
unsigned int iBit = 0; iBit < numberTechnicalTriggerBits; ++iBit) {
576 l1techflag[iBit] = (int) technicalTriggerWordBeforeMask.at(iBit);
592 std::vector<DecisionWord> m_gtDecisionWord5Bx;
593 std::vector<TechnicalTriggerWord> m_gtTechDecisionWord5Bx;
594 std::vector<int> m_ibxn;
596 const std::vector<L1GtFdlWord> &m_gtFdlWord(L1GTRR->gtFdlVector());
597 for (std::vector<L1GtFdlWord>::const_iterator itBx = m_gtFdlWord.begin();
598 itBx != m_gtFdlWord.end(); ++itBx) {
600 m_gtDecisionWord5Bx.push_back((*itBx).gtDecisionWord());
601 m_gtTechDecisionWord5Bx.push_back((*itBx).gtTechnicalTriggerWord());
604 for (
unsigned int iBit = 0; iBit < numberTriggerBits; ++iBit) {
609 for (
unsigned int jbx=0; jbx<m_gtDecisionWord5Bx.size(); ++jbx) {
611 result += m_gtDecisionWord5Bx[jbx][iBit];
612 if (m_gtDecisionWord5Bx[jbx][iBit]>0) bitword |= 1 << jbx;
614 if (
_Debug && result>1) {
std::cout <<
"5BxOr=" << result <<
" Bitword= "<< bitword <<std::endl;
617 bool bitOn=bitword & (1 <<
i);
625 for (
unsigned int iBit = 0; iBit < m_gtTechDecisionWord5Bx[2].size(); ++iBit) {
630 for (
unsigned int jbx=0; jbx<m_gtTechDecisionWord5Bx.size(); ++jbx) {
632 result += m_gtTechDecisionWord5Bx[jbx][iBit];
633 if (m_gtTechDecisionWord5Bx[jbx][iBit]>0) bitword |= 1 << jbx;
635 if (
_Debug && result>1) {
std::cout <<
"5BxOr=" << result <<
" Bitword= "<< bitword << std::endl;
638 bool bitOn=bitword & (1 <<
i);
650 if (
_Debug)
std::cout <<
"%HLTInfo -- No L1 GT ReadoutRecord " << std::endl;
658 L1GctHFBitCountsCollection::const_iterator bitCountItr;
659 for (bitCountItr=gctBitCounts->begin(); bitCountItr!=gctBitCounts->end(); ++bitCountItr) {
660 if (bitCountItr->bx()==0){
668 if (
_Debug)
std::cout <<
"%HLTInfo -- No L1 Gct HF BitCounts" << std::endl;
672 L1GctHFRingEtSumsCollection::const_iterator ringSumsItr;
673 for (ringSumsItr=gctRingSums->begin(); ringSumsItr!=gctRingSums->end(); ++ringSumsItr) {
674 if (ringSumsItr->bx()==0){
682 if (
_Debug)
std::cout <<
"%HLTInfo -- No L1 Gct HF RingSums" << std::endl;
T getParameter(std::string const &) const
static const bool useL1EventSetup(true)
std::vector< std::string > dummyBranches_
int l1hfTowerCountNegativeEtaRing2
int l1hfRing1EtSumNegativeEta
bool exists(std::string const ¶meterName) const
checks if a parameter exists
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
int l1hfRing2EtSumNegativeEta
int l1hfTowerCountPositiveEtaRing2
int l1hfTowerCountPositiveEtaRing1
unsigned int prescaleValue(unsigned int set, const std::string &trigger) const
HLT prescale value in specific prescale set for a specific trigger path.
std::vector< bool > DecisionWord
typedefs
int l1hfTowerCountNegativeEtaRing1
std::vector< bool > TechnicalTriggerWord
technical trigger bits (64 bits)
int l1hfRing2EtSumPositiveEta
void getL1GtRunCache(const edm::Run &, const edm::EventSetup &, const bool, const bool, const edm::InputTag &)
get all the run-constant quantities for L1 trigger and cache them
unsigned int quality() const
get quality
std::string const & triggerName(unsigned int index) const
T const * product() const
HLTConfigProvider hltConfig_
static const bool useL1GtTriggerMenuLite(false)
const int prescaleFactorSetIndex(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const TriggerCategory &trigCategory, int &errorCode) const
char data[epos_bytes_allocation]
int l1hfRing1EtSumPositiveEta
const int prescaleFactor(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return prescale factor for a given algorithm or technical trigger
ParameterSet const & parameterSet(Provenance const &provenance)