Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:20:31

0001 // -*- C++ -*-
0002 //
0003 // Package:    L1Trigger/L1TGloba
0004 // Class:      L1TGlobalAnalyzer
0005 //
0006 /**\class L1TGlobalAnalyzer L1TGlobalAnalyzer.cc L1Trigger/L1TGlobal/plugins/L1TGlobalAnalyzer.cc
0007 
0008  Description: [one line class summary]
0009 
0010  Implementation:
0011      [Notes on implementation]
0012 */
0013 //
0014 // Original Author:  James Brooke
0015 //         Created:  Tue, 11 Mar 2014 14:55:45 GMT
0016 //
0017 // Modifying Author:  Brian Winer
0018 //         Created: Tue, 10 Mar 2015 based off L1TCaloAnalyzer
0019 //
0020 
0021 // system include files
0022 #include <memory>
0023 
0024 // user include files
0025 #include "FWCore/Framework/interface/Frameworkfwd.h"
0026 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0027 
0028 #include "FWCore/Framework/interface/Event.h"
0029 #include "FWCore/Framework/interface/MakerMacros.h"
0030 
0031 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0032 
0033 #include "FWCore/ServiceRegistry/interface/Service.h"
0034 #include "CommonTools/UtilAlgos/interface/TFileService.h"
0035 
0036 #include "DataFormats/L1TGlobal/interface/GlobalAlgBlk.h"
0037 #include "DataFormats/L1TGlobal/interface/GlobalExtBlk.h"
0038 #include "DataFormats/L1Trigger/interface/Muon.h"
0039 #include "DataFormats/L1Trigger/interface/EGamma.h"
0040 #include "DataFormats/L1Trigger/interface/Tau.h"
0041 #include "DataFormats/L1Trigger/interface/Jet.h"
0042 #include "DataFormats/L1Trigger/interface/EtSum.h"
0043 
0044 #include "TH1F.h"
0045 #include "TH2F.h"
0046 
0047 //
0048 // class declaration
0049 //
0050 
0051 namespace l1t {
0052 
0053   class L1TGlobalAnalyzer : public edm::one::EDAnalyzer<> {
0054   public:
0055     explicit L1TGlobalAnalyzer(const edm::ParameterSet&);
0056 
0057     static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
0058 
0059   private:
0060     void beginJob() override;
0061     void analyze(const edm::Event&, const edm::EventSetup&) override;
0062 
0063     // ----------member data ---------------------------
0064     edm::EDGetToken m_gmuToken;
0065     edm::EDGetToken m_dmxEGToken;
0066     edm::EDGetToken m_dmxTauToken;
0067     edm::EDGetToken m_dmxJetToken;
0068     edm::EDGetToken m_dmxSumToken;
0069     edm::EDGetToken m_muToken;
0070     edm::EDGetToken m_egToken;
0071     edm::EDGetToken m_tauToken;
0072     edm::EDGetToken m_jetToken;
0073     edm::EDGetToken m_sumToken;
0074 
0075     edm::EDGetToken m_gtAlgToken;
0076     edm::EDGetToken m_emulGtAlgToken;
0077     edm::EDGetToken m_emulDxAlgToken;
0078 
0079     bool m_dogMUs;
0080     bool m_doDmxEGs;
0081     bool m_doDmxTaus;
0082     bool m_doDmxJets;
0083     bool m_doDmxSums;
0084     bool m_doMUs;
0085     bool m_doEGs;
0086     bool m_doTaus;
0087     bool m_doJets;
0088     bool m_doSums;
0089 
0090     bool m_doGtAlg;
0091     bool m_doEmulGtAlg;
0092     bool m_doEmulDxAlg;
0093 
0094     bool doText_;
0095     bool doHistos_;
0096 
0097     enum ObjectType {
0098       MU = 0x1,
0099       EG = 0x2,
0100       Tau = 0x3,
0101       Jet = 0x4,
0102       Sum = 0x5,
0103       DmxEG = 0x6,
0104       DmxTau = 0x7,
0105       DmxJet = 0x8,
0106       DmxSum = 0x9,
0107       GtAlg = 0xA,
0108       EmulGtAlg = 0xB,
0109       gMU = 0xC
0110     };
0111 
0112     std::vector<ObjectType> types_;
0113     std::vector<std::string> typeStr_;
0114 
0115     std::map<ObjectType, TFileDirectory> dirs_;
0116     std::map<ObjectType, TH1F*> het_;
0117     std::map<ObjectType, TH1F*> heta_;
0118     std::map<ObjectType, TH1F*> hphi_;
0119     std::map<ObjectType, TH1F*> hbx_;
0120     std::map<ObjectType, TH2F*> hetaphi_;
0121 
0122     TFileDirectory evtDispDir_;
0123     TFileDirectory algDir_;
0124     TFileDirectory dmxVGtDir_;
0125     TH1F* hAlgoBits_;
0126     TH1F* hEmulGtAlgoBits_;
0127     TH1F* hEmulDxAlgoBits_;
0128     TH2F* hAlgoBitsEmulGtVsHw_;
0129     TH2F* hAlgoBitsEmulDxVsHw_;
0130     TH2F* hGmtVsGTMUEt_;
0131     TH2F* hGmtVsGTMUEta_;
0132     TH2F* hGmtVsGTMUPhi_;
0133     TH2F* hDmxVsGTEGEt_;
0134     TH2F* hDmxVsGTEGEta_;
0135     TH2F* hDmxVsGTEGPhi_;
0136     TH2F* hDmxVsGTTauEt_;
0137     TH2F* hDmxVsGTTauEta_;
0138     TH2F* hDmxVsGTTauPhi_;
0139     TH2F* hDmxVsGTJetEt_;
0140     TH2F* hDmxVsGTJetEta_;
0141     TH2F* hDmxVsGTJetPhi_;
0142     TH2F* hDmxVsGTSumEt_ETT_;
0143     TH2F* hDmxVsGTSumEt_ETTem_;
0144     TH2F* hDmxVsGTSumEt_HTT_;
0145     TH2F* hDmxVsGTSumEt_ETM_;
0146     TH2F* hDmxVsGTSumPhi_ETM_;
0147     TH2F* hDmxVsGTSumEt_ETMHF_;
0148     TH2F* hDmxVsGTSumPhi_ETMHF_;
0149     TH2F* hDmxVsGTSumEt_HTM_;
0150     TH2F* hDmxVsGTSumPhi_HTM_;
0151     TH2F* hDmxVsGTSumEt_HFP0_;
0152     TH2F* hDmxVsGTSumEt_HFM0_;
0153     TH2F* hDmxVsGTSumEt_HFP1_;
0154     TH2F* hDmxVsGTSumEt_HFM1_;
0155   };
0156 
0157   //
0158   // constants, enums and typedefs
0159   //
0160 
0161   //
0162   // static data member definitions
0163   //
0164 
0165   //
0166   // constructors and destructor
0167   //
0168   L1TGlobalAnalyzer::L1TGlobalAnalyzer(const edm::ParameterSet& iConfig)
0169       : doText_(iConfig.getUntrackedParameter<bool>("doText", true)),
0170         doHistos_(iConfig.getUntrackedParameter<bool>("doHistos", true)) {
0171     //now do what ever initialization is needed
0172 
0173     // register what you consume and keep token for later access:
0174     edm::InputTag nullTag("None");
0175 
0176     edm::InputTag gmuTag = iConfig.getParameter<edm::InputTag>("gmuToken");
0177     m_gmuToken = consumes<l1t::MuonBxCollection>(gmuTag);
0178     m_dogMUs = !(gmuTag == nullTag);
0179 
0180     edm::InputTag dmxEGTag = iConfig.getParameter<edm::InputTag>("dmxEGToken");
0181     m_dmxEGToken = consumes<l1t::EGammaBxCollection>(dmxEGTag);
0182     m_doDmxEGs = !(dmxEGTag == nullTag);
0183 
0184     edm::InputTag dmxTauTag = iConfig.getParameter<edm::InputTag>("dmxTauToken");
0185     m_dmxTauToken = consumes<l1t::TauBxCollection>(dmxTauTag);
0186     m_doDmxTaus = !(dmxTauTag == nullTag);
0187 
0188     edm::InputTag dmxJetTag = iConfig.getParameter<edm::InputTag>("dmxJetToken");
0189     m_dmxJetToken = consumes<l1t::JetBxCollection>(dmxJetTag);
0190     m_doDmxJets = !(dmxJetTag == nullTag);
0191 
0192     edm::InputTag dmxSumTag = iConfig.getParameter<edm::InputTag>("dmxEtSumToken");
0193     m_dmxSumToken = consumes<l1t::EtSumBxCollection>(dmxSumTag);
0194     m_doDmxSums = !(dmxSumTag == nullTag);
0195 
0196     edm::InputTag muTag = iConfig.getParameter<edm::InputTag>("muToken");
0197     m_muToken = consumes<l1t::MuonBxCollection>(muTag);
0198     m_doMUs = !(muTag == nullTag);
0199 
0200     edm::InputTag egTag = iConfig.getParameter<edm::InputTag>("egToken");
0201     m_egToken = consumes<l1t::EGammaBxCollection>(egTag);
0202     m_doEGs = !(egTag == nullTag);
0203 
0204     edm::InputTag tauTag = iConfig.getParameter<edm::InputTag>("tauToken");
0205     m_tauToken = consumes<l1t::TauBxCollection>(tauTag);
0206     m_doTaus = !(tauTag == nullTag);
0207 
0208     edm::InputTag jetTag = iConfig.getParameter<edm::InputTag>("jetToken");
0209     m_jetToken = consumes<l1t::JetBxCollection>(jetTag);
0210     m_doJets = !(jetTag == nullTag);
0211 
0212     edm::InputTag sumTag = iConfig.getParameter<edm::InputTag>("etSumToken");
0213     m_sumToken = consumes<l1t::EtSumBxCollection>(sumTag);
0214     m_doSums = !(sumTag == nullTag);
0215 
0216     edm::InputTag gtAlgTag = iConfig.getParameter<edm::InputTag>("gtAlgToken");
0217     m_gtAlgToken = consumes<GlobalAlgBlkBxCollection>(gtAlgTag);
0218     m_doGtAlg = !(gtAlgTag == nullTag);
0219 
0220     edm::InputTag emulGtAlgTag = iConfig.getParameter<edm::InputTag>("emulGtAlgToken");
0221     m_emulGtAlgToken = consumes<GlobalAlgBlkBxCollection>(emulGtAlgTag);
0222     m_doEmulGtAlg = !(emulGtAlgTag == nullTag);
0223 
0224     edm::InputTag emulDxAlgTag = iConfig.getParameter<edm::InputTag>("emulDxAlgToken");
0225     m_emulDxAlgToken = consumes<GlobalAlgBlkBxCollection>(emulDxAlgTag);
0226     m_doEmulDxAlg = !(emulDxAlgTag == nullTag);
0227 
0228     types_.push_back(gMU);
0229     types_.push_back(DmxEG);
0230     types_.push_back(DmxTau);
0231     types_.push_back(DmxJet);
0232     types_.push_back(DmxSum);
0233     types_.push_back(MU);
0234     types_.push_back(EG);
0235     types_.push_back(Tau);
0236     types_.push_back(Jet);
0237     types_.push_back(Sum);
0238 
0239     typeStr_.push_back("gmtmu");
0240     typeStr_.push_back("dmxeg");
0241     typeStr_.push_back("dmxtau");
0242     typeStr_.push_back("dmxjet");
0243     typeStr_.push_back("dmxsum");
0244     typeStr_.push_back("mu");
0245     typeStr_.push_back("eg");
0246     typeStr_.push_back("tau");
0247     typeStr_.push_back("jet");
0248     typeStr_.push_back("sum");
0249   }
0250 
0251   //
0252   // member functions
0253   //
0254 
0255   // ------------ method called for each event  ------------
0256   void L1TGlobalAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) {
0257     using namespace edm;
0258 
0259     std::stringstream text;
0260 
0261     // get gmt Muons
0262     if (m_dogMUs) {
0263       Handle<BXVector<l1t::Muon> > gmuons;
0264       iEvent.getByToken(m_gmuToken, gmuons);
0265 
0266       for (int ibx = gmuons->getFirstBX(); ibx <= gmuons->getLastBX(); ++ibx) {
0267         for (auto itr = gmuons->begin(ibx); itr != gmuons->end(ibx); ++itr) {
0268           hbx_.at(gMU)->Fill(ibx);
0269           het_.at(gMU)->Fill(itr->hwPt());
0270           heta_.at(gMU)->Fill(itr->hwEtaAtVtx());
0271           hphi_.at(gMU)->Fill(itr->hwPhiAtVtx());
0272           hetaphi_.at(gMU)->Fill(itr->hwEtaAtVtx(), itr->hwPhiAtVtx(), itr->hwPt());
0273 
0274           text << "Muon : "
0275                << " BX=" << ibx << " ipt=" << itr->hwPt() << " ieta=" << itr->hwEtaAtVtx()
0276                << " iphi=" << itr->hwPhiAtVtx() << std::endl;
0277         }
0278       }
0279     }
0280 
0281     // get EG
0282     if (m_doDmxEGs) {
0283       Handle<BXVector<l1t::EGamma> > dmxegs;
0284       iEvent.getByToken(m_dmxEGToken, dmxegs);
0285 
0286       for (int ibx = dmxegs->getFirstBX(); ibx <= dmxegs->getLastBX(); ++ibx) {
0287         for (auto itr = dmxegs->begin(ibx); itr != dmxegs->end(ibx); ++itr) {
0288           hbx_.at(DmxEG)->Fill(ibx);
0289           het_.at(DmxEG)->Fill(itr->hwPt());
0290           heta_.at(DmxEG)->Fill(itr->hwEta());
0291           hphi_.at(DmxEG)->Fill(itr->hwPhi());
0292           hetaphi_.at(DmxEG)->Fill(itr->hwEta(), itr->hwPhi(), itr->hwPt());
0293 
0294           text << "Dmx EG : "
0295                << " BX=" << ibx << " ipt=" << itr->hwPt() << " ieta=" << itr->hwEta() << " iphi=" << itr->hwPhi()
0296                << std::endl;
0297         }
0298       }
0299     }
0300 
0301     // get tau
0302     if (m_doDmxTaus) {
0303       Handle<BXVector<l1t::Tau> > dmxtaus;
0304       iEvent.getByToken(m_dmxTauToken, dmxtaus);
0305 
0306       for (int ibx = dmxtaus->getFirstBX(); ibx <= dmxtaus->getLastBX(); ++ibx) {
0307         for (auto itr = dmxtaus->begin(ibx); itr != dmxtaus->end(ibx); ++itr) {
0308           hbx_.at(DmxTau)->Fill(ibx);
0309           het_.at(DmxTau)->Fill(itr->hwPt());
0310           heta_.at(DmxTau)->Fill(itr->hwEta());
0311           hphi_.at(DmxTau)->Fill(itr->hwPhi());
0312           hetaphi_.at(DmxTau)->Fill(itr->hwEta(), itr->hwPhi(), itr->hwPt());
0313 
0314           text << "Dmx Tau : "
0315                << " BX=" << ibx << " ipt=" << itr->hwPt() << " ieta=" << itr->hwEta() << " iphi=" << itr->hwPhi()
0316                << std::endl;
0317         }
0318       }
0319     }
0320 
0321     // get jet
0322     if (m_doDmxJets) {
0323       Handle<BXVector<l1t::Jet> > dmxjets;
0324       iEvent.getByToken(m_dmxJetToken, dmxjets);
0325 
0326       for (int ibx = dmxjets->getFirstBX(); ibx <= dmxjets->getLastBX(); ++ibx) {
0327         for (auto itr = dmxjets->begin(ibx); itr != dmxjets->end(ibx); ++itr) {
0328           hbx_.at(DmxJet)->Fill(ibx);
0329           het_.at(DmxJet)->Fill(itr->hwPt());
0330           heta_.at(DmxJet)->Fill(itr->hwEta());
0331           hphi_.at(DmxJet)->Fill(itr->hwPhi());
0332           hetaphi_.at(DmxJet)->Fill(itr->hwEta(), itr->hwPhi(), itr->hwPt());
0333 
0334           text << "Dmx Jet : "
0335                << " BX=" << ibx << " ipt=" << itr->hwPt() << " ieta=" << itr->hwEta() << " iphi=" << itr->hwPhi()
0336                << std::endl;
0337         }
0338       }
0339     }
0340 
0341     // get sums
0342     if (m_doDmxSums) {
0343       Handle<BXVector<l1t::EtSum> > dmxsums;
0344       iEvent.getByToken(m_dmxSumToken, dmxsums);
0345 
0346       for (int ibx = dmxsums->getFirstBX(); ibx <= dmxsums->getLastBX(); ++ibx) {
0347         for (auto itr = dmxsums->begin(ibx); itr != dmxsums->end(ibx); ++itr) {
0348           hbx_.at(DmxSum)->Fill(ibx);
0349           het_.at(DmxSum)->Fill(itr->hwPt());
0350           heta_.at(DmxSum)->Fill(itr->hwEta());
0351           hphi_.at(DmxSum)->Fill(itr->hwPhi());
0352           hetaphi_.at(DmxSum)->Fill(itr->hwEta(), itr->hwPhi(), itr->hwPt());
0353 
0354           text << "Dmx Sum : "
0355                << " type=" << itr->getType() << " BX=" << ibx << " ipt=" << itr->hwPt() << " ieta=" << itr->hwEta()
0356                << " iphi=" << itr->hwPhi() << std::endl;
0357         }
0358       }
0359     }
0360 
0361     // get Muons
0362     if (m_doMUs) {
0363       Handle<BXVector<l1t::Muon> > muons;
0364       iEvent.getByToken(m_muToken, muons);
0365 
0366       for (int ibx = muons->getFirstBX(); ibx <= muons->getLastBX(); ++ibx) {
0367         for (auto itr = muons->begin(ibx); itr != muons->end(ibx); ++itr) {
0368           hbx_.at(MU)->Fill(ibx);
0369           het_.at(MU)->Fill(itr->hwPt());
0370           heta_.at(MU)->Fill(itr->hwEtaAtVtx());
0371           hphi_.at(MU)->Fill(itr->hwPhiAtVtx());
0372           hetaphi_.at(MU)->Fill(itr->hwEtaAtVtx(), itr->hwPhiAtVtx(), itr->hwPt());
0373 
0374           text << "Muon : "
0375                << " BX=" << ibx << " ipt=" << itr->hwPt() << " ieta=" << itr->hwEtaAtVtx()
0376                << " iphi=" << itr->hwPhiAtVtx() << std::endl;
0377         }
0378       }
0379     }
0380 
0381     // get EG
0382     if (m_doEGs) {
0383       Handle<BXVector<l1t::EGamma> > egs;
0384       iEvent.getByToken(m_egToken, egs);
0385 
0386       for (int ibx = egs->getFirstBX(); ibx <= egs->getLastBX(); ++ibx) {
0387         for (auto itr = egs->begin(ibx); itr != egs->end(ibx); ++itr) {
0388           hbx_.at(EG)->Fill(ibx);
0389           het_.at(EG)->Fill(itr->hwPt());
0390           heta_.at(EG)->Fill(itr->hwEta());
0391           hphi_.at(EG)->Fill(itr->hwPhi());
0392           hetaphi_.at(EG)->Fill(itr->hwEta(), itr->hwPhi(), itr->hwPt());
0393 
0394           text << "EG : "
0395                << " BX=" << ibx << " ipt=" << itr->hwPt() << " ieta=" << itr->hwEta() << " iphi=" << itr->hwPhi()
0396                << std::endl;
0397         }
0398       }
0399     }
0400 
0401     // get tau
0402     if (m_doTaus) {
0403       Handle<BXVector<l1t::Tau> > taus;
0404       iEvent.getByToken(m_tauToken, taus);
0405 
0406       for (int ibx = taus->getFirstBX(); ibx <= taus->getLastBX(); ++ibx) {
0407         for (auto itr = taus->begin(ibx); itr != taus->end(ibx); ++itr) {
0408           hbx_.at(Tau)->Fill(ibx);
0409           het_.at(Tau)->Fill(itr->hwPt());
0410           heta_.at(Tau)->Fill(itr->hwEta());
0411           hphi_.at(Tau)->Fill(itr->hwPhi());
0412           hetaphi_.at(Tau)->Fill(itr->hwEta(), itr->hwPhi(), itr->hwPt());
0413 
0414           text << "Tau : "
0415                << " BX=" << ibx << " ipt=" << itr->hwPt() << " ieta=" << itr->hwEta() << " iphi=" << itr->hwPhi()
0416                << std::endl;
0417         }
0418       }
0419     }
0420 
0421     // get jet
0422     if (m_doJets) {
0423       Handle<BXVector<l1t::Jet> > jets;
0424       iEvent.getByToken(m_jetToken, jets);
0425 
0426       for (int ibx = jets->getFirstBX(); ibx <= jets->getLastBX(); ++ibx) {
0427         for (auto itr = jets->begin(ibx); itr != jets->end(ibx); ++itr) {
0428           hbx_.at(Jet)->Fill(ibx);
0429           het_.at(Jet)->Fill(itr->hwPt());
0430           heta_.at(Jet)->Fill(itr->hwEta());
0431           hphi_.at(Jet)->Fill(itr->hwPhi());
0432           hetaphi_.at(Jet)->Fill(itr->hwEta(), itr->hwPhi(), itr->hwPt());
0433 
0434           text << "Jet : "
0435                << " BX=" << ibx << " ipt=" << itr->hwPt() << " ieta=" << itr->hwEta() << " iphi=" << itr->hwPhi()
0436                << std::endl;
0437         }
0438       }
0439     }
0440 
0441     // get sums
0442     if (m_doSums) {
0443       Handle<BXVector<l1t::EtSum> > sums;
0444       iEvent.getByToken(m_sumToken, sums);
0445 
0446       for (int ibx = sums->getFirstBX(); ibx <= sums->getLastBX(); ++ibx) {
0447         for (auto itr = sums->begin(ibx); itr != sums->end(ibx); ++itr) {
0448           hbx_.at(Sum)->Fill(ibx);
0449           het_.at(Sum)->Fill(itr->hwPt());
0450           heta_.at(Sum)->Fill(itr->hwEta());
0451           hphi_.at(Sum)->Fill(itr->hwPhi());
0452           hetaphi_.at(Sum)->Fill(itr->hwEta(), itr->hwPhi(), itr->hwPt());
0453           text << "Sum : "
0454                << " type=" << itr->getType() << " BX=" << ibx << " ipt=" << itr->hwPt() << " ieta=" << itr->hwEta()
0455                << " iphi=" << itr->hwPhi() << std::endl;
0456         }
0457       }
0458     }
0459 
0460     //Algorithm Bits
0461     if (m_doGtAlg) {
0462       Handle<BXVector<GlobalAlgBlk> > algs;
0463       iEvent.getByToken(m_gtAlgToken, algs);
0464 
0465       for (int ibx = algs->getFirstBX(); ibx <= algs->getLastBX(); ++ibx) {
0466         for (auto itr = algs->begin(ibx); itr != algs->end(ibx); ++itr) {
0467           for (int algBit = 0; algBit < 128;
0468                algBit++) {  //Fix Me: Should access size of algo vector...need method in GlobalAlgBlk class
0469             if (itr->getAlgoDecisionFinal(algBit)) {
0470               hAlgoBits_->Fill(algBit);
0471               text << "HW Fired Alg Bit : " << algBit << std::endl;
0472             }
0473           }
0474         }
0475       }
0476     }
0477 
0478     //Algorithm Bits (Emulation seeded by GT input)
0479     if (m_doEmulGtAlg) {
0480       Handle<BXVector<GlobalAlgBlk> > emulGtAlgs;
0481       iEvent.getByToken(m_emulGtAlgToken, emulGtAlgs);
0482 
0483       for (int ibx = emulGtAlgs->getFirstBX(); ibx <= emulGtAlgs->getLastBX(); ++ibx) {
0484         for (auto itr = emulGtAlgs->begin(ibx); itr != emulGtAlgs->end(ibx); ++itr) {
0485           for (int algBit = 0; algBit < 128;
0486                algBit++) {  //Fix Me: Should access size of algo vector...need method in GlobalAlgBlk class
0487             if (itr->getAlgoDecisionFinal(algBit)) {
0488               hEmulGtAlgoBits_->Fill(algBit);
0489               text << "Emul w/ GTInput Fired Alg Bit : " << algBit << std::endl;
0490             }
0491           }
0492         }
0493       }
0494     }
0495 
0496     //Algorithm Bits (Emulation seeded by Demux Output)
0497     if (m_doEmulDxAlg) {
0498       Handle<BXVector<GlobalAlgBlk> > emulDxAlgs;
0499       iEvent.getByToken(m_emulDxAlgToken, emulDxAlgs);
0500 
0501       for (int ibx = emulDxAlgs->getFirstBX(); ibx <= emulDxAlgs->getLastBX(); ++ibx) {
0502         for (auto itr = emulDxAlgs->begin(ibx); itr != emulDxAlgs->end(ibx); ++itr) {
0503           for (int algBit = 0; algBit < 128;
0504                algBit++) {  //Fix Me: Should access size of algo vector...need method in GlobalAlgBlk class
0505             if (itr->getAlgoDecisionFinal(algBit)) {
0506               hEmulDxAlgoBits_->Fill(algBit);
0507               text << "Emul w/ Demux output Fired Alg Bit : " << algBit << std::endl;
0508             }
0509           }
0510         }
0511       }
0512     }
0513 
0514     // Mu (gmt vs GT)
0515     if (m_doMUs & m_dogMUs) {
0516       Handle<BXVector<l1t::Muon> > mus;
0517       iEvent.getByToken(m_muToken, mus);
0518 
0519       Handle<BXVector<l1t::Muon> > gmtmus;
0520       iEvent.getByToken(m_gmuToken, gmtmus);
0521 
0522       for (int ibx = mus->getFirstBX(); ibx <= mus->getLastBX(); ++ibx) {
0523         // Cycle through all GT MUs
0524         for (unsigned int igtMU = 0; igtMU < mus->size(ibx); igtMU++) {
0525           double gtMUEt = mus->at(ibx, igtMU).hwPt();
0526           double gmtMUEt = 0.0;
0527           if (gmtmus->size(ibx) > igtMU)
0528             gmtMUEt = gmtmus->at(ibx, igtMU).hwPt();
0529           hGmtVsGTMUEt_->Fill(gtMUEt, gmtMUEt);
0530 
0531           double gtMUEta = mus->at(ibx, igtMU).hwEtaAtVtx();
0532           double gmtMUEta = 0.0;
0533           if (gmtmus->size(ibx) > igtMU)
0534             gmtMUEta = gmtmus->at(ibx, igtMU).hwEtaAtVtx();
0535           hGmtVsGTMUEta_->Fill(gtMUEta, gmtMUEta);
0536 
0537           double gtMUPhi = mus->at(ibx, igtMU).hwPhiAtVtx();
0538           double gmtMUPhi = 0.0;
0539           if (gmtmus->size(ibx) > igtMU)
0540             gmtMUPhi = gmtmus->at(ibx, igtMU).hwPhiAtVtx();
0541           hGmtVsGTMUPhi_->Fill(gtMUPhi, gmtMUPhi);
0542         }
0543         // if there are extra MUs in the dmx record them
0544         for (unsigned int igmtMU = mus->size(ibx); igmtMU < gmtmus->size(ibx); igmtMU++) {
0545           double gtMUEt = 0.0;  //no GT jet exists
0546           double gmtMUEt = gmtmus->at(ibx, igmtMU).hwPt();
0547           hGmtVsGTMUEt_->Fill(gtMUEt, gmtMUEt);
0548 
0549           double gtMUEta = 0.0;
0550           double gmtMUEta = gmtmus->at(ibx, igmtMU).hwEtaAtVtx();
0551           hGmtVsGTMUEta_->Fill(gtMUEta, gmtMUEta);
0552 
0553           double gtMUPhi = 0.0;
0554           double gmtMUPhi = gmtmus->at(ibx, igmtMU).hwPhiAtVtx();
0555           hGmtVsGTMUPhi_->Fill(gtMUPhi, gmtMUPhi);
0556         }
0557       }
0558     }
0559 
0560     // EG (Dmx vs GT)
0561     if (m_doEGs & m_doDmxEGs) {
0562       Handle<BXVector<l1t::EGamma> > egs;
0563       iEvent.getByToken(m_egToken, egs);
0564 
0565       Handle<BXVector<l1t::EGamma> > dmxegs;
0566       iEvent.getByToken(m_dmxEGToken, dmxegs);
0567 
0568       for (int ibx = egs->getFirstBX(); ibx <= egs->getLastBX(); ++ibx) {
0569         // Cycle through all GT egs
0570         for (unsigned int igtEG = 0; igtEG < egs->size(ibx); igtEG++) {
0571           double gtEGEt = egs->at(ibx, igtEG).hwPt();
0572           double dmxEGEt = 0.0;
0573           if (dmxegs->size(ibx) > igtEG)
0574             dmxEGEt = dmxegs->at(ibx, igtEG).hwPt();
0575           hDmxVsGTEGEt_->Fill(gtEGEt, dmxEGEt);
0576 
0577           double gtEGEta = egs->at(ibx, igtEG).hwEta();
0578           double dmxEGEta = 0.0;
0579           if (dmxegs->size(ibx) > igtEG)
0580             dmxEGEta = dmxegs->at(ibx, igtEG).hwEta();
0581           hDmxVsGTEGEta_->Fill(gtEGEta, dmxEGEta);
0582 
0583           double gtEGPhi = egs->at(ibx, igtEG).hwPhi();
0584           double dmxEGPhi = 0.0;
0585           if (dmxegs->size(ibx) > igtEG)
0586             dmxEGPhi = dmxegs->at(ibx, igtEG).hwPhi();
0587           hDmxVsGTEGPhi_->Fill(gtEGPhi, dmxEGPhi);
0588         }
0589         // if there are extra egs in the dmx record them
0590         for (unsigned int idmEG = egs->size(ibx); idmEG < dmxegs->size(ibx); idmEG++) {
0591           double gtEGEt = 0.0;  //no GT jet exists
0592           double dmxEGEt = dmxegs->at(ibx, idmEG).hwPt();
0593           hDmxVsGTEGEt_->Fill(gtEGEt, dmxEGEt);
0594 
0595           double gtEGEta = 0.0;
0596           double dmxEGEta = dmxegs->at(ibx, idmEG).hwEta();
0597           hDmxVsGTEGEta_->Fill(gtEGEta, dmxEGEta);
0598 
0599           double gtEGPhi = 0.0;
0600           double dmxEGPhi = dmxegs->at(ibx, idmEG).hwPhi();
0601           hDmxVsGTEGPhi_->Fill(gtEGPhi, dmxEGPhi);
0602         }
0603       }
0604     }
0605 
0606     // Tau (Dmx vs GT)
0607     if (m_doTaus & m_doDmxTaus) {
0608       Handle<BXVector<l1t::Tau> > taus;
0609       iEvent.getByToken(m_tauToken, taus);
0610 
0611       Handle<BXVector<l1t::Tau> > dmxtaus;
0612       iEvent.getByToken(m_dmxTauToken, dmxtaus);
0613 
0614       for (int ibx = taus->getFirstBX(); ibx <= taus->getLastBX(); ++ibx) {
0615         // Cycle through all GT taus
0616         for (unsigned int igtTau = 0; igtTau < taus->size(ibx); igtTau++) {
0617           double gtTauEt = taus->at(ibx, igtTau).hwPt();
0618           double dmxTauEt = 0.0;
0619           if (dmxtaus->size(ibx) > igtTau)
0620             dmxTauEt = dmxtaus->at(ibx, igtTau).hwPt();
0621           hDmxVsGTTauEt_->Fill(gtTauEt, dmxTauEt);
0622 
0623           double gtTauEta = taus->at(ibx, igtTau).hwEta();
0624           double dmxTauEta = 0.0;
0625           if (dmxtaus->size(ibx) > igtTau)
0626             dmxTauEta = dmxtaus->at(ibx, igtTau).hwEta();
0627           hDmxVsGTTauEta_->Fill(gtTauEta, dmxTauEta);
0628 
0629           double gtTauPhi = taus->at(ibx, igtTau).hwPhi();
0630           double dmxTauPhi = 0.0;
0631           if (dmxtaus->size(ibx) > igtTau)
0632             dmxTauPhi = dmxtaus->at(ibx, igtTau).hwPhi();
0633           hDmxVsGTTauPhi_->Fill(gtTauPhi, dmxTauPhi);
0634         }
0635         // if there are extra taus in the dmx record them
0636         for (unsigned int idmTau = taus->size(ibx); idmTau < dmxtaus->size(ibx); idmTau++) {
0637           double gtTauEt = 0.0;  //no GT jet exists
0638           double dmxTauEt = dmxtaus->at(ibx, idmTau).hwPt();
0639           hDmxVsGTTauEt_->Fill(gtTauEt, dmxTauEt);
0640 
0641           double gtTauEta = 0.0;
0642           double dmxTauEta = dmxtaus->at(ibx, idmTau).hwEta();
0643           hDmxVsGTTauEta_->Fill(gtTauEta, dmxTauEta);
0644 
0645           double gtTauPhi = 0.0;
0646           double dmxTauPhi = dmxtaus->at(ibx, idmTau).hwPhi();
0647           hDmxVsGTTauPhi_->Fill(gtTauPhi, dmxTauPhi);
0648         }
0649       }
0650     }
0651 
0652     // Jets (Dmx vs GT)
0653     if (m_doJets & m_doDmxJets) {
0654       Handle<BXVector<l1t::Jet> > jets;
0655       iEvent.getByToken(m_jetToken, jets);
0656 
0657       Handle<BXVector<l1t::Jet> > dmxjets;
0658       iEvent.getByToken(m_dmxJetToken, dmxjets);
0659 
0660       for (int ibx = jets->getFirstBX(); ibx <= jets->getLastBX(); ++ibx) {
0661         // Cycle through all GT jets
0662         for (unsigned int igtJ = 0; igtJ < jets->size(ibx); igtJ++) {
0663           double gtJetEt = jets->at(ibx, igtJ).hwPt();
0664           double dmxJetEt = 0.0;
0665           if (dmxjets->size(ibx) > igtJ)
0666             dmxJetEt = dmxjets->at(ibx, igtJ).hwPt();
0667           hDmxVsGTJetEt_->Fill(gtJetEt, dmxJetEt);
0668 
0669           double gtJetEta = jets->at(ibx, igtJ).hwEta();
0670           double dmxJetEta = 0.0;
0671           if (dmxjets->size(ibx) > igtJ)
0672             dmxJetEta = dmxjets->at(ibx, igtJ).hwEta();
0673           hDmxVsGTJetEta_->Fill(gtJetEta, dmxJetEta);
0674 
0675           double gtJetPhi = jets->at(ibx, igtJ).hwPhi();
0676           double dmxJetPhi = 0.0;
0677           if (dmxjets->size(ibx) > igtJ)
0678             dmxJetPhi = dmxjets->at(ibx, igtJ).hwPhi();
0679           hDmxVsGTJetPhi_->Fill(gtJetPhi, dmxJetPhi);
0680         }
0681         // if there are extra jets in the dmx record them
0682         for (unsigned int idmJ = jets->size(ibx); idmJ < dmxjets->size(ibx); idmJ++) {
0683           double gtJetEt = 0.0;  //no GT jet exists
0684           double dmxJetEt = dmxjets->at(ibx, idmJ).hwPt();
0685           hDmxVsGTJetEt_->Fill(gtJetEt, dmxJetEt);
0686 
0687           double gtJetEta = 0.0;
0688           double dmxJetEta = dmxjets->at(ibx, idmJ).hwEta();
0689           hDmxVsGTJetEta_->Fill(gtJetEta, dmxJetEta);
0690 
0691           double gtJetPhi = 0.0;
0692           double dmxJetPhi = dmxjets->at(ibx, idmJ).hwPhi();
0693           hDmxVsGTJetPhi_->Fill(gtJetPhi, dmxJetPhi);
0694         }
0695       }
0696     }
0697 
0698     // Sums (Dmx vs GT)
0699     if (m_doSums & m_doDmxSums) {
0700       Handle<BXVector<l1t::EtSum> > sums;
0701       iEvent.getByToken(m_sumToken, sums);
0702 
0703       Handle<BXVector<l1t::EtSum> > dmxSums;
0704       iEvent.getByToken(m_dmxSumToken, dmxSums);
0705 
0706       for (int ibx = sums->getFirstBX(); ibx <= sums->getLastBX(); ++ibx) {
0707         // Cycle through all GT sums
0708         for (unsigned int igtS = 0; igtS < sums->size(ibx); igtS++) {
0709           double gtSumEt = sums->at(ibx, igtS).hwPt();
0710           double dmxSumEt = 0.0;
0711           if (dmxSums->size(ibx) > igtS)
0712             dmxSumEt = dmxSums->at(ibx, igtS).hwPt();
0713 
0714           double gtSumPhi = sums->at(ibx, igtS).hwPhi();
0715           double dmxSumPhi = 0.0;
0716           if (dmxSums->size(ibx) > igtS)
0717             dmxSumPhi = dmxSums->at(ibx, igtS).hwPhi();
0718 
0719           if (sums->at(ibx, igtS).getType() == dmxSums->at(ibx, igtS).getType()) {
0720             switch (sums->at(ibx, igtS).getType()) {
0721               case l1t::EtSum::EtSumType::kTotalEt:
0722                 hDmxVsGTSumEt_ETT_->Fill(gtSumEt, dmxSumEt);
0723 
0724                 break;
0725               case l1t::EtSum::EtSumType::kTotalEtEm:
0726                 hDmxVsGTSumEt_ETTem_->Fill(gtSumEt, dmxSumEt);
0727 
0728                 break;
0729               case l1t::EtSum::EtSumType::kTotalHt:
0730                 hDmxVsGTSumEt_HTT_->Fill(gtSumEt, dmxSumEt);
0731 
0732                 break;
0733               case l1t::EtSum::EtSumType::kMissingEt:
0734                 hDmxVsGTSumEt_ETM_->Fill(gtSumEt, dmxSumEt);
0735                 hDmxVsGTSumPhi_ETM_->Fill(gtSumPhi, dmxSumPhi);
0736                 break;
0737               case l1t::EtSum::EtSumType::kMissingEtHF:
0738                 hDmxVsGTSumEt_ETMHF_->Fill(gtSumEt, dmxSumEt);
0739                 hDmxVsGTSumPhi_ETMHF_->Fill(gtSumPhi, dmxSumPhi);
0740                 break;
0741               case l1t::EtSum::EtSumType::kMissingHt:
0742                 hDmxVsGTSumEt_HTM_->Fill(gtSumEt, dmxSumEt);
0743                 hDmxVsGTSumPhi_HTM_->Fill(gtSumPhi, dmxSumPhi);
0744                 break;
0745               case l1t::EtSum::EtSumType::kMinBiasHFP0:
0746                 hDmxVsGTSumEt_HFP0_->Fill(gtSumEt, dmxSumEt);
0747                 break;
0748               case l1t::EtSum::EtSumType::kMinBiasHFM0:
0749                 hDmxVsGTSumEt_HFM0_->Fill(gtSumEt, dmxSumEt);
0750                 break;
0751               case l1t::EtSum::EtSumType::kMinBiasHFP1:
0752                 hDmxVsGTSumEt_HFP1_->Fill(gtSumEt, dmxSumEt);
0753                 break;
0754               case l1t::EtSum::EtSumType::kMinBiasHFM1:
0755                 hDmxVsGTSumEt_HFM1_->Fill(gtSumEt, dmxSumEt);
0756                 break;
0757               default:
0758                 break;
0759             }
0760           } else {
0761             text << "WARNING:  EtSum Types do not line up between DeMux and uGT " << std::endl;
0762           }
0763         }
0764         // if there are extra sumss in the dmx record them...should not be any...but let's check
0765         for (unsigned int idmS = sums->size(ibx); idmS < dmxSums->size(ibx); idmS++) {
0766           double gtSumEt = -1.0;  //no GT jet exists
0767           double dmxSumEt = dmxSums->at(ibx, idmS).hwPt();
0768 
0769           double gtSumPhi = -1.0;
0770           double dmxSumPhi = dmxSums->at(ibx, idmS).hwPhi();
0771 
0772           switch (dmxSums->at(ibx, idmS).getType()) {
0773             case l1t::EtSum::EtSumType::kTotalEt:
0774               hDmxVsGTSumEt_ETT_->Fill(gtSumEt, dmxSumEt);
0775 
0776               break;
0777             case l1t::EtSum::EtSumType::kTotalEtEm:
0778               hDmxVsGTSumEt_ETTem_->Fill(gtSumEt, dmxSumEt);
0779 
0780               break;
0781             case l1t::EtSum::EtSumType::kTotalHt:
0782               hDmxVsGTSumEt_HTT_->Fill(gtSumEt, dmxSumEt);
0783 
0784               break;
0785             case l1t::EtSum::EtSumType::kMissingEt:
0786               hDmxVsGTSumEt_ETM_->Fill(gtSumEt, dmxSumEt);
0787               hDmxVsGTSumPhi_ETM_->Fill(gtSumPhi, dmxSumPhi);
0788               break;
0789             case l1t::EtSum::EtSumType::kMissingEtHF:
0790               hDmxVsGTSumEt_ETMHF_->Fill(gtSumEt, dmxSumEt);
0791               hDmxVsGTSumPhi_ETMHF_->Fill(gtSumPhi, dmxSumPhi);
0792               break;
0793             case l1t::EtSum::EtSumType::kMissingHt:
0794               hDmxVsGTSumEt_HTM_->Fill(gtSumEt, dmxSumEt);
0795               hDmxVsGTSumPhi_HTM_->Fill(gtSumPhi, dmxSumPhi);
0796               break;
0797             default:
0798               break;
0799           }
0800         }
0801       }
0802     }
0803 
0804     //Algorithm Bits (Emulation vs HW)
0805     if (m_doGtAlg && m_doEmulGtAlg) {
0806       Handle<BXVector<GlobalAlgBlk> > hwalgs;
0807       iEvent.getByToken(m_gtAlgToken, hwalgs);
0808 
0809       Handle<BXVector<GlobalAlgBlk> > emulAlgs;
0810       iEvent.getByToken(m_emulGtAlgToken, emulAlgs);
0811 
0812       //for ( int ibx=hwalgs->getFirstBX(); ibx<=hwalgs->getLastBX(); ++ibx) {
0813       int ibx = 0;
0814 
0815       auto itr = hwalgs->begin(ibx);
0816       auto itr_emul = emulAlgs->begin(ibx);
0817 
0818       for (int algBit = 0; algBit < 128;
0819            algBit++) {  //Fix Me: Should access size of algo vector...need method in GlobalAlgBlk class
0820         bool hw = itr->getAlgoDecisionFinal(algBit);
0821         bool em = itr_emul->getAlgoDecisionFinal(algBit);
0822         if (hw & em) {
0823           hAlgoBitsEmulGtVsHw_->Fill(algBit, algBit);
0824         } else if (hw & !em) {
0825           hAlgoBitsEmulGtVsHw_->Fill(algBit, -1.0);
0826           text << "WARNING:  HW Fnd Alg Bit " << algBit << " but emulation did not " << std::endl;
0827         } else if (!hw & em) {
0828           hAlgoBitsEmulGtVsHw_->Fill(-1.0, algBit);
0829           text << "WARNING:  Emul. Fnd Alg Bit " << algBit << " but hardware did not " << std::endl;
0830         }
0831       }
0832 
0833       // }
0834     }
0835 
0836     //Algorithm Bits (Emulation vs HW)
0837     if (m_doGtAlg && m_doEmulDxAlg) {
0838       Handle<BXVector<GlobalAlgBlk> > hwalgs;
0839       iEvent.getByToken(m_gtAlgToken, hwalgs);
0840 
0841       Handle<BXVector<GlobalAlgBlk> > emulAlgs;
0842       iEvent.getByToken(m_emulDxAlgToken, emulAlgs);
0843 
0844       //for ( int ibx=hwalgs->getFirstBX(); ibx<=hwalgs->getLastBX(); ++ibx) {
0845       int ibx = 0;
0846 
0847       auto itr = hwalgs->begin(ibx);
0848       auto itr_emul = emulAlgs->begin(ibx);
0849 
0850       for (int algBit = 0; algBit < 128;
0851            algBit++) {  //Fix Me: Should access size of algo vector...need method in GlobalAlgBlk class
0852         bool hw = itr->getAlgoDecisionFinal(algBit);
0853         bool em = itr_emul->getAlgoDecisionFinal(algBit);
0854         if (hw & em) {
0855           hAlgoBitsEmulDxVsHw_->Fill(algBit, algBit);
0856         } else if (hw & !em) {
0857           hAlgoBitsEmulDxVsHw_->Fill(algBit, -1.0);
0858         } else if (!hw & em) {
0859           hAlgoBitsEmulDxVsHw_->Fill(-1.0, algBit);
0860         }
0861       }
0862 
0863       // }
0864     }
0865 
0866     if (doText_)
0867       edm::LogInfo("L1TGlobalEvents") << text.str();
0868   }
0869 
0870   // ------------ method called once each job just before starting event loop  ------------
0871   void L1TGlobalAnalyzer::beginJob() {
0872     edm::Service<TFileService> fs;
0873 
0874     auto itr = types_.cbegin();
0875     auto str = typeStr_.cbegin();
0876 
0877     for (; itr != types_.end(); ++itr, ++str) {
0878       if (*itr == Jet || *itr == DmxJet || *itr == Sum || *itr == DmxSum || *itr == DmxEG || *itr == EG ||
0879           *itr == DmxTau || *itr == Tau) {
0880         double etmax = 99.5;
0881         if (*itr == Jet || *itr == DmxJet || *itr == Sum || *itr == DmxSum)
0882           etmax = 499.5;
0883 
0884         dirs_.insert(std::pair<ObjectType, TFileDirectory>(*itr, fs->mkdir(*str)));
0885 
0886         het_.insert(std::pair<ObjectType, TH1F*>(*itr, dirs_.at(*itr).make<TH1F>("et", "", 500, -0.5, etmax)));
0887 
0888         hbx_.insert(std::pair<ObjectType, TH1F*>(*itr, dirs_.at(*itr).make<TH1F>("bx", "", 11, -5.5, 5.5)));
0889 
0890         heta_.insert(std::pair<ObjectType, TH1F*>(*itr, dirs_.at(*itr).make<TH1F>("eta", "", 229, -114.5, 114.5)));
0891         hphi_.insert(std::pair<ObjectType, TH1F*>(*itr, dirs_.at(*itr).make<TH1F>("phi", "", 144, -0.5, 143.5)));
0892         hetaphi_.insert(std::pair<ObjectType, TH2F*>(
0893             *itr, dirs_.at(*itr).make<TH2F>("etaphi", "", 229, -114.5, 114.5, 144, -0.5, 143.5)));
0894       } else if (*itr == MU || *itr == gMU) {
0895         double etmax = 511.5;
0896         dirs_.insert(std::pair<ObjectType, TFileDirectory>(*itr, fs->mkdir(*str)));
0897 
0898         het_.insert(std::pair<ObjectType, TH1F*>(*itr, dirs_.at(*itr).make<TH1F>("et", "", 512, -0.5, etmax)));
0899 
0900         hbx_.insert(std::pair<ObjectType, TH1F*>(*itr, dirs_.at(*itr).make<TH1F>("bx", "", 11, -5.5, 5.5)));
0901 
0902         heta_.insert(std::pair<ObjectType, TH1F*>(*itr, dirs_.at(*itr).make<TH1F>("eta", "", 549, -224.5, 224.5)));
0903         hphi_.insert(std::pair<ObjectType, TH1F*>(*itr, dirs_.at(*itr).make<TH1F>("phi", "", 576, -0.5, 575.5)));
0904         hetaphi_.insert(std::pair<ObjectType, TH2F*>(
0905             *itr, dirs_.at(*itr).make<TH2F>("etaphi", "", 549, -224.5, 224.5, 576, -0.5, 575.5)));
0906       }
0907     }
0908 
0909     algDir_ = fs->mkdir("Algorithms");
0910     hAlgoBits_ = algDir_.make<TH1F>("hAlgoBits", "Algorithm Bits", 100, -0.5, 99.5);
0911     hEmulGtAlgoBits_ = algDir_.make<TH1F>("hEmulGtAlgoBits", "GT Emulated Algorithm Bits", 100, -0.5, 99.5);
0912     hAlgoBitsEmulGtVsHw_ = algDir_.make<TH2F>(
0913         "hAlgoBitsEmulGtVsHw", "Algorithm Bits (GT) Emulation vs Hardware", 129, -1.5, 127.5, 129, -1.5, 127.5);
0914     hEmulDxAlgoBits_ = algDir_.make<TH1F>("hEmulDxAlgoBits", "Dx Emulated Algorithm Bits", 100, -0.5, 99.5);
0915     hAlgoBitsEmulDxVsHw_ = algDir_.make<TH2F>(
0916         "hAlgoBitsEmulDxVsHw", "Algorithm Bits (Dx) Emulation vs Hardware", 129, -1.5, 127.5, 129, -1.5, 127.5);
0917 
0918     dmxVGtDir_ = fs->mkdir("SourceVsGT");
0919 
0920     hGmtVsGTMUEt_ =
0921         dmxVGtDir_.make<TH2F>("hGmtVsGTMUEt", "Gmt MU Et versus GT MU Et", 512, -0.5, 511.5, 512, -0.5, 511.5);
0922     hGmtVsGTMUEta_ =
0923         dmxVGtDir_.make<TH2F>("hGmtVsGTMUEta", "Gmt MU Eta versus GT MU Eta", 549, -224.5, 224.5, 549, -224.5, 224.5);
0924     hGmtVsGTMUPhi_ =
0925         dmxVGtDir_.make<TH2F>("hGmtVsGTMUPhi", "Gmt MU Phi versus GT MU Phi", 576, -0.5, 575.5, 576, -0.5, 575.5);
0926 
0927     hDmxVsGTEGEt_ =
0928         dmxVGtDir_.make<TH2F>("hDmxVsGTEGEt", "Dmx EG Et versus GT EG Et", 500, -0.5, 499.5, 500, -0.5, 499.5);
0929     hDmxVsGTEGEta_ =
0930         dmxVGtDir_.make<TH2F>("hDmxVsGTEGEta", "Dmx EG Eta versus GT EG Eta", 229, -114.5, 114.5, 229, -114.5, 114.5);
0931     hDmxVsGTEGPhi_ =
0932         dmxVGtDir_.make<TH2F>("hDmxVsGTEGPhi", "Dmx EG Phi versus GT EG Phi", 144, -0.5, 143.5, 144, -0.5, 143.5);
0933 
0934     hDmxVsGTTauEt_ =
0935         dmxVGtDir_.make<TH2F>("hDmxVsGTTauEt", "Dmx Tau Et versus GT Tau Et", 500, -0.5, 499.5, 500, -0.5, 499.5);
0936     hDmxVsGTTauEta_ = dmxVGtDir_.make<TH2F>(
0937         "hDmxVsGTTauEta", "Dmx Tau Eta versus GT Tau Eta", 229, -114.5, 114.5, 229, -114.5, 114.5);
0938     hDmxVsGTTauPhi_ =
0939         dmxVGtDir_.make<TH2F>("hDmxVsGTTauPhi", "Dmx Tau Phi versus GT Tau Phi", 144, -0.5, 143.5, 144, -0.5, 143.5);
0940 
0941     hDmxVsGTJetEt_ =
0942         dmxVGtDir_.make<TH2F>("hDmxVsGTJetEt", "Dmx Jet Et versus GT Jet Et", 500, -0.5, 499.5, 500, -0.5, 499.5);
0943     hDmxVsGTJetEta_ = dmxVGtDir_.make<TH2F>(
0944         "hDmxVsGTJetEta", "Dmx Jet Eta versus GT Jet Eta", 229, -114.5, 114.5, 229, -114.5, 114.5);
0945     hDmxVsGTJetPhi_ =
0946         dmxVGtDir_.make<TH2F>("hDmxVsGTJetPhi", "Dmx Jet Phi versus GT Jet Phi", 144, -0.5, 143.5, 144, -0.5, 143.5);
0947 
0948     hDmxVsGTSumEt_ETT_ =
0949         dmxVGtDir_.make<TH2F>("hDmxVsGTSumEt_ETT", "Dmx ETT versus GT ETT", 256, -0.5, 2047.5, 256, -0.5, 2047.5);
0950     hDmxVsGTSumEt_ETTem_ =
0951         dmxVGtDir_.make<TH2F>("hDmxVsGTSumEt_ETTem", "Dmx ETTem versus GT ETTem", 256, -0.5, 2047.5, 256, -0.5, 2047.5);
0952     hDmxVsGTSumEt_HTT_ =
0953         dmxVGtDir_.make<TH2F>("hDmxVsGTSumEt_HTT", "Dmx HTT versus GT HTT", 256, -0.5, 2047.5, 256, -0.5, 2047.5);
0954     hDmxVsGTSumEt_ETM_ =
0955         dmxVGtDir_.make<TH2F>("hDmxVsGTSumEt_ETM", "Dmx ETM versus GT ETM", 500, -0.5, 499.5, 500, -0.5, 499.5);
0956     hDmxVsGTSumPhi_ETM_ = dmxVGtDir_.make<TH2F>(
0957         "hDmxVsGTSumPhi_ETM", "Dmx ETM Phi versus GT ETM Phi", 144, -0.5, 143.5, 144, -0.5, 143.5);
0958     hDmxVsGTSumEt_ETMHF_ =
0959         dmxVGtDir_.make<TH2F>("hDmxVsGTSumEt_ETMHF", "Dmx ETMHF versus GT ETMHF", 500, -0.5, 499.5, 500, -0.5, 499.5);
0960     hDmxVsGTSumPhi_ETMHF_ = dmxVGtDir_.make<TH2F>(
0961         "hDmxVsGTSumPhi_ETMHF", "Dmx ETMHF Phi versus GT ETMHF Phi", 144, -0.5, 143.5, 144, -0.5, 143.5);
0962     hDmxVsGTSumEt_HTM_ =
0963         dmxVGtDir_.make<TH2F>("hDmxVsGTSumEt_HTM", "Dmx HTM versus GT HTM", 500, -0.5, 499.5, 500, -0.5, 499.5);
0964     hDmxVsGTSumPhi_HTM_ = dmxVGtDir_.make<TH2F>(
0965         "hDmxVsGTSumPhi_HTM", "Dmx HTM Phi versus GT HTM Phi", 144, -0.5, 143.5, 144, -0.5, 143.5);
0966 
0967     hDmxVsGTSumEt_HFP0_ =
0968         dmxVGtDir_.make<TH2F>("hDmxVsGTSumEt_HFP0", "Dmx versus GT HFP0", 16, -0.5, 15.5, 16, -0.5, 15.5);
0969     hDmxVsGTSumEt_HFM0_ =
0970         dmxVGtDir_.make<TH2F>("hDmxVsGTSumEt_HFM0", "Dmx versus GT HFM0", 16, -0.5, 15.5, 16, -0.5, 15.5);
0971     hDmxVsGTSumEt_HFP1_ =
0972         dmxVGtDir_.make<TH2F>("hDmxVsGTSumEt_HFP1", "Dmx versus GT HFP1", 16, -0.5, 15.5, 16, -0.5, 15.5);
0973     hDmxVsGTSumEt_HFM1_ =
0974         dmxVGtDir_.make<TH2F>("hDmxVsGTSumEt_HFM1", "Dmx versus GT HFM1", 16, -0.5, 15.5, 16, -0.5, 15.5);
0975   }
0976 
0977   // ------------ method fills 'descriptions' with the allowed parameters for the module  ------------
0978   void L1TGlobalAnalyzer::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
0979     //The following says we do not know what parameters are allowed so do no validation
0980     // Please change this to state exactly what you do use, even if it is no parameters
0981     edm::ParameterSetDescription desc;
0982     desc.setUnknown();
0983     descriptions.addDefault(desc);
0984   }
0985 
0986 }  // namespace l1t
0987 
0988 using namespace l1t;
0989 
0990 //define this as a plug-in
0991 DEFINE_FWK_MODULE(L1TGlobalAnalyzer);