Go to the documentation of this file.00001
00002
00003
00004
00005
00011
00012
00013
00014
00015
00016
00017
00018 #include "L1TriggerOffline/L1Analyzer/interface/GtToGctCands.h"
00019 #include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerReadoutRecord.h"
00020
00021 GtToGctCands::GtToGctCands(const edm::ParameterSet& iConfig) :
00022 m_GTInputTag(iConfig.getParameter<edm::InputTag>("inputLabel"))
00023 {
00024
00025
00026
00027
00028
00029 produces<L1GctEmCandCollection>("isoEm");
00030 produces<L1GctEmCandCollection>("nonIsoEm");
00031 produces<L1GctJetCandCollection>("cenJets");
00032 produces<L1GctJetCandCollection>("forJets");
00033 produces<L1GctJetCandCollection>("tauJets");
00034 produces<L1GctEtTotalCollection>();
00035 produces<L1GctEtHadCollection>();
00036 produces<L1GctEtMissCollection>();
00037
00038 produces<L1GctHFBitCountsCollection>();
00039 produces<L1GctHFRingEtSumsCollection>();
00040 }
00041
00042 GtToGctCands::~GtToGctCands(){}
00043
00044 void GtToGctCands::produce(edm::Event& iEvent, const edm::EventSetup& iSetup)
00045 {
00046
00047 std::auto_ptr<L1GctEmCandCollection> isoEm (new L1GctEmCandCollection);
00048 std::auto_ptr<L1GctEmCandCollection> nonIsoEm (new L1GctEmCandCollection);
00049 std::auto_ptr<L1GctJetCandCollection> cenJet (new L1GctJetCandCollection);
00050 std::auto_ptr<L1GctJetCandCollection> forJet (new L1GctJetCandCollection);
00051 std::auto_ptr<L1GctJetCandCollection> tauJet (new L1GctJetCandCollection);
00052
00053
00054 std::auto_ptr<L1GctEtTotalCollection> etTot (new L1GctEtTotalCollection);
00055 std::auto_ptr<L1GctEtHadCollection> etHad (new L1GctEtHadCollection);
00056 std::auto_ptr<L1GctEtMissCollection> etMiss (new L1GctEtMissCollection);
00057
00058
00059
00060 std::auto_ptr<L1GctHFBitCountsCollection> hfBitCount (new L1GctHFBitCountsCollection);
00061 std::auto_ptr<L1GctHFRingEtSumsCollection> hfRingEtSum (new L1GctHFRingEtSumsCollection);
00062
00063
00064 edm::Handle<L1GlobalTriggerReadoutRecord> gtrr_handle;
00065 iEvent.getByLabel(m_GTInputTag,gtrr_handle);
00066 L1GlobalTriggerReadoutRecord const* gtrr = gtrr_handle.product();
00067
00068
00069 for (int ibx=-1; ibx<=1; ibx++) {
00070 const L1GtPsbWord psb1 = gtrr->gtPsbWord(0xbb0d, ibx);
00071 const L1GtPsbWord psb2 = gtrr->gtPsbWord(0xbb0e, ibx);
00072
00073
00074 std::vector<int> psbisoel;
00075 psbisoel.push_back(psb1.aData(6));
00076 psbisoel.push_back(psb1.aData(7));
00077 psbisoel.push_back(psb1.bData(6));
00078 psbisoel.push_back(psb1.bData(7));
00079 for(std::vector<int>::const_iterator ipsbisoel=psbisoel.begin(); ipsbisoel!=psbisoel.end(); ipsbisoel++) {
00080 isoEm->push_back(L1GctEmCand((*ipsbisoel),true));
00081 }
00082
00083
00084 std::vector<int> psbel;
00085 psbel.push_back(psb1.aData(4));
00086 psbel.push_back(psb1.aData(5));
00087 psbel.push_back(psb1.bData(4));
00088 psbel.push_back(psb1.bData(5));
00089 for(std::vector<int>::const_iterator ipsbel=psbel.begin(); ipsbel!=psbel.end(); ipsbel++) {
00090 nonIsoEm->push_back(L1GctEmCand((*ipsbel),false));
00091 }
00092
00093
00094 std::vector<int> psbjet;
00095 psbjet.push_back(psb1.aData(2));
00096 psbjet.push_back(psb1.aData(3));
00097 psbjet.push_back(psb1.bData(2));
00098 psbjet.push_back(psb1.bData(3));
00099 for(std::vector<int>::const_iterator ipsbjet=psbjet.begin(); ipsbjet!=psbjet.end(); ipsbjet++) {
00100 cenJet->push_back(L1GctJetCand((*ipsbjet),false,false));
00101 }
00102
00103
00104 std::vector<int> psbfjet;
00105 psbfjet.push_back(psb1.aData(6));
00106 psbfjet.push_back(psb1.aData(7));
00107 psbfjet.push_back(psb1.bData(6));
00108 psbfjet.push_back(psb1.bData(7));
00109 for(std::vector<int>::const_iterator ipsbfjet=psbfjet.begin(); ipsbfjet!=psbfjet.end(); ipsbfjet++) {
00110 forJet->push_back(L1GctJetCand((*ipsbfjet),false,true));
00111 }
00112
00113
00114 std::vector<int> psbtjet;
00115 psbtjet.push_back(psb2.aData(6));
00116 psbtjet.push_back(psb2.aData(7));
00117 psbtjet.push_back(psb2.bData(6));
00118 psbtjet.push_back(psb2.bData(7));
00119 for(std::vector<int>::const_iterator ipsbtjet=psbtjet.begin(); ipsbtjet!=psbtjet.end(); ipsbtjet++) {
00120 tauJet->push_back(L1GctJetCand((*ipsbtjet),true,false));
00121 }
00122
00123 }
00124
00125
00126 iEvent.put(isoEm,"isoEm");
00127 iEvent.put(nonIsoEm,"nonIsoEm");
00128 iEvent.put(cenJet,"cenJets");
00129 iEvent.put(forJet,"forJets");
00130 iEvent.put(tauJet,"tauJets");
00131 iEvent.put(etTot);
00132 iEvent.put(etHad);
00133 iEvent.put(etMiss);
00134
00135 iEvent.put(hfBitCount);
00136 iEvent.put(hfRingEtSum);
00137 }