15 #include <boost/shared_ptr.hpp>
24 produces<L1GctEmCandCollection>(
"isoEm");
25 produces<L1GctEmCandCollection>(
"nonIsoEm");
26 produces<L1GctJetCandCollection>(
"cenJets");
27 produces<L1GctJetCandCollection>(
"forJets");
28 produces<L1GctJetCandCollection>(
"tauJets");
29 produces<L1GctInternJetDataCollection>();
30 produces<L1GctEtTotalCollection>();
31 produces<L1GctEtHadCollection>();
32 produces<L1GctEtMissCollection>();
33 produces<L1GctHtMissCollection>();
34 produces<L1GctInternEtSumCollection>();
35 produces<L1GctInternHtMissCollection>();
36 produces<L1GctHFBitCountsCollection>();
37 produces<L1GctHFRingEtSumsCollection>();
58 LogDebug(
"l1t|stage 1 Converter") <<
"L1TCaloUpgradeToGCTConverter::produce function called...\n";
104 int firstBX = EGamma->getFirstBX();
105 int lastBX = EGamma->getLastBX();
116 for(
int itBX=firstBX; itBX!=lastBX+1; ++itBX){
122 itEGamma != EGamma->end(itBX); ++itEGamma){
123 bool iso = itEGamma->hwIso();
125 L1GctEmCand EmCand(itEGamma->hwPt(), itEGamma->hwPhi(), itEGamma->hwEta(),
133 isoEmResult->push_back(EmCand);
140 nonIsoEmResult->push_back(EmCand);
149 itTau != Tau->end(itBX); ++itTau){
151 const bool forward= (itTau->hwEta() < 4 || itTau->hwEta() > 17);
152 const uint16_t rankPt = jetScale->rank((uint16_t)itTau->hwPt());
154 unsigned iEta = itTau->hwEta();
155 unsigned rctEta = (iEta<11 ? 10-iEta : iEta-11);
156 unsigned gtEta=(((rctEta % 7) & 0x7) | (iEta<11 ? 0x8 : 0));
159 true, forward,0, 0, itBX);
163 tauJetResult->push_back(TauCand);
172 itJet != Jet->end(itBX); ++itJet){
174 const bool forward = ((itJet->hwQual() & 0x2) != 0);
175 const uint16_t rankPt = jetScale->rank((uint16_t)itJet->hwPt());
177 unsigned iEta = itJet->hwEta();
178 unsigned rctEta = (iEta<11 ? 10-iEta : iEta-11);
179 unsigned gtEta=(((rctEta % 7) & 0x7) | (iEta<11 ? 0x8 : 0));
182 false, forward,0, 0, itBX);
187 forJetResult->push_back(JetCand);
193 cenJetResult->push_back(JetCand);
200 itEtSum != EtSum->end(itBX); ++itEtSum){
202 if (EtSum::EtSumType::kMissingEt == itEtSum->getType()){
203 L1GctEtMiss Cand(itEtSum->hwPt(), itEtSum->hwPhi(), 0, itBX);
204 etMissResult->push_back(Cand);
205 }
else if (EtSum::EtSumType::kMissingHt == itEtSum->getType()){
206 L1GctHtMiss Cand(itEtSum->hwPt(), itEtSum->hwPhi(), 0, itBX);
207 htMissResult->push_back(Cand);
208 }
else if (EtSum::EtSumType::kTotalEt == itEtSum->getType()){
210 etTotResult->push_back(Cand);
211 }
else if (EtSum::EtSumType::kTotalHt == itEtSum->getType()){
213 etHadResult->push_back(Cand);
215 LogError(
"l1t|stage 1 Converter") <<
" Unknown EtSumType --- EtSum collection will not be saved...\n ";
242 e.
put(isoEmResult,
"isoEm");
243 e.
put(nonIsoEmResult,
"nonIsoEm");
244 e.
put(cenJetResult,
"cenJets");
245 e.
put(forJetResult,
"forJets");
246 e.
put(tauJetResult,
"tauJets");
251 e.
put(hfBitCountResult);
252 e.
put(hfRingEtSumResult);
254 e.
put(internalJetResult);
255 e.
put(internalEtSumResult);
256 e.
put(internalHtMissResult);
L1TCaloUpgradeToGCTConverter(const ParameterSet &)
T getParameter(std::string const &) const
std::vector< L1GctEtMiss > L1GctEtMissCollection
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< L1GctHFRingEtSums > L1GctHFRingEtSumsCollection
#define DEFINE_FWK_MODULE(type)
std::vector< L1GctEtHad > L1GctEtHadCollection
Level-1 Trigger jet candidate.
std::vector< L1GctInternHtMiss > L1GctInternHtMissCollection
Persistable copy of missing Et measured at Level-1.
virtual void beginRun(Run const &iR, EventSetup const &iE)
Level-1 Trigger EM candidate at output of GCT.
std::vector< L1GctEtTotal > L1GctEtTotalCollection
std::vector< L1GctHFBitCounts > L1GctHFBitCountsCollection
std::vector< L1GctJetCand > L1GctJetCandCollection
~L1TCaloUpgradeToGCTConverter()
virtual void produce(Event &, EventSetup const &) override
void addDefault(ParameterSetDescription const &psetDescription)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Persistable copy of total Et measured at Level-1.
Persistable copy of total Ht measured at Level-1.
std::vector< L1GctHtMiss > L1GctHtMissCollection
Persistable copy of missing Et measured at Level-1.
std::vector< L1GctInternJetData > L1GctInternJetDataCollection
std::vector< L1GctInternEtSum > L1GctInternEtSumCollection
virtual void endRun(Run const &iR, EventSetup const &iE)
static void fillDescriptions(ConfigurationDescriptions &descriptions)
std::vector< EGamma >::const_iterator const_iterator
std::vector< L1GctEmCand > L1GctEmCandCollection