15 #include <boost/shared_ptr.hpp>
26 produces<L1GctEmCandCollection>(
"isoEm");
27 produces<L1GctEmCandCollection>(
"nonIsoEm");
28 produces<L1GctJetCandCollection>(
"cenJets");
29 produces<L1GctJetCandCollection>(
"forJets");
30 produces<L1GctJetCandCollection>(
"tauJets");
31 produces<L1GctJetCandCollection>(
"isoTauJets");
32 produces<L1GctInternJetDataCollection>();
33 produces<L1GctEtTotalCollection>();
34 produces<L1GctEtHadCollection>();
35 produces<L1GctEtMissCollection>();
36 produces<L1GctHtMissCollection>();
37 produces<L1GctInternEtSumCollection>();
38 produces<L1GctInternHtMissCollection>();
39 produces<L1GctHFBitCountsCollection>();
40 produces<L1GctHFRingEtSumsCollection>();
44 RlxTauToken_ = consumes<TauBxCollection>(iConfig.
getParameter<
InputTag>(
"InputRlxTauCollection"));
45 IsoTauToken_ = consumes<TauBxCollection>(iConfig.
getParameter<
InputTag>(
"InputIsoTauCollection"));
64 LogDebug(
"l1t|stage 1 Converter") <<
"L1TCaloUpgradeToGCTConverter::produce function called...\n";
113 for(
int itBX=EGamma->getFirstBX(); itBX<=EGamma->getLastBX(); ++itBX){
120 itEGamma != EGamma->end(itBX); ++itEGamma){
121 bool iso = itEGamma->hwIso();
123 L1GctEmCand EmCand(itEGamma->hwPt(), itEGamma->hwPhi(), itEGamma->hwEta(),
131 isoEmResult->push_back(EmCand);
138 nonIsoEmResult->push_back(EmCand);
143 isoEmResult->resize(4*bxCounter);
144 nonIsoEmResult->resize(4*bxCounter);
148 for(
int itBX=RlxTau->getFirstBX(); itBX<=RlxTau->getLastBX(); ++itBX){
153 itTau != RlxTau->end(itBX); ++itTau){
155 const bool forward=
false;
157 L1GctJetCand TauCand(itTau->hwPt(), itTau->hwPhi(), itTau->hwEta(),
158 true, forward,0, 0, itBX);
162 tauJetResult->push_back(TauCand);
166 tauJetResult->resize(4*bxCounter);
170 for(
int itBX=IsoTau->getFirstBX(); itBX<=IsoTau->getLastBX(); ++itBX){
175 itTau != IsoTau->end(itBX); ++itTau){
177 const bool forward=
false;
179 L1GctJetCand TauCand(itTau->hwPt(), itTau->hwPhi(), itTau->hwEta(),
180 true, forward,0, 0, itBX);
183 if(isoTauCount != 4){
184 isoTauJetResult->push_back(TauCand);
188 isoTauJetResult->resize(4*bxCounter);
192 for(
int itBX=Jet->getFirstBX(); itBX<=Jet->getLastBX(); ++itBX){
198 itJet != Jet->end(itBX); ++itJet){
200 const bool forward = ((itJet->hwQual() & 0x2) != 0);
201 L1GctJetCand JetCand(itJet->hwPt(), itJet->hwPhi(), itJet->hwEta(),
202 false, forward,0, 0, itBX);
207 forJetResult->push_back(JetCand);
213 cenJetResult->push_back(JetCand);
218 forJetResult->resize(4*bxCounter);
219 cenJetResult->resize(4*bxCounter);
223 for(
int itBX=EtSum->getFirstBX(); itBX<=EtSum->getLastBX(); ++itBX){
227 itEtSum != EtSum->end(itBX); ++itEtSum){
229 if (EtSum::EtSumType::kMissingEt == itEtSum->getType()){
230 L1GctEtMiss Cand(itEtSum->hwPt(), itEtSum->hwPhi(), itEtSum->hwQual()&0x1, itBX);
231 etMissResult->push_back(Cand);
232 }
else if (EtSum::EtSumType::kMissingHt == itEtSum->getType()){
233 L1GctHtMiss Cand(itEtSum->hwPt(), itEtSum->hwPhi(), itEtSum->hwQual()&0x1, itBX);
234 htMissResult->push_back(Cand);
235 }
else if (EtSum::EtSumType::kTotalEt == itEtSum->getType()){
236 L1GctEtTotal Cand(itEtSum->hwPt(), itEtSum->hwQual()&0x1, itBX);
237 etTotResult->push_back(Cand);
238 }
else if (EtSum::EtSumType::kTotalHt == itEtSum->getType()){
239 L1GctEtHad Cand(itEtSum->hwPt(), itEtSum->hwQual()&0x1, itBX);
240 etHadResult->push_back(Cand);
242 LogError(
"l1t|stage 1 Converter") <<
" Unknown EtSumType --- EtSum collection will not be saved...\n ";
245 etMissResult->resize(1*bxCounter);
246 htMissResult->resize(1*bxCounter);
247 etTotResult->resize(1*bxCounter);
248 etHadResult->resize(1*bxCounter);
252 for(
int itBX=HfSums->getFirstBX(); itBX<=HfSums->getLastBX(); ++itBX){
260 itCaloSpare != HfSums->end(itBX); ++itCaloSpare){
274 for(
int i = 0;
i < 4;
i++)
279 hfRingEtSumResult->push_back(sum);
281 hfRingEtSumResult->resize(1*bxCounter);
283 hfBitCountResult->resize(1*bxCounter);
286 e.
put(isoEmResult,
"isoEm");
287 e.
put(nonIsoEmResult,
"nonIsoEm");
288 e.
put(cenJetResult,
"cenJets");
289 e.
put(forJetResult,
"forJets");
290 e.
put(tauJetResult,
"tauJets");
291 e.
put(isoTauJetResult,
"isoTauJets");
296 e.
put(hfBitCountResult);
297 e.
put(hfRingEtSumResult);
299 e.
put(internalJetResult);
300 e.
put(internalEtSumResult);
301 e.
put(internalHtMissResult);
static L1GctHFRingEtSums fromGctEmulator(const int16_t bx, const uint16_t etSumPosEtaRing1, const uint16_t etSumNegEtaRing1, const uint16_t etSumPosEtaRing2, const uint16_t etSumNegEtaRing2)
named ctor for GCT emulator
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.
Level-1 Trigger EM candidate at output of GCT.
std::vector< L1GctEtTotal > L1GctEtTotalCollection
std::vector< L1GctHFBitCounts > L1GctHFBitCountsCollection
std::vector< L1GctJetCand > L1GctJetCandCollection
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.
virtual void beginRun(Run const &iR, EventSetup const &iE)
void setEtSum(unsigned i, uint16_t et)
set a sum
Persistable copy of total Ht measured at Level-1.
virtual void produce(Event &, EventSetup const &) override
std::vector< L1GctHtMiss > L1GctHtMissCollection
Persistable copy of missing Et measured at Level-1.
std::vector< L1GctInternJetData > L1GctInternJetDataCollection
static void fillDescriptions(ConfigurationDescriptions &descriptions)
std::vector< L1GctInternEtSum > L1GctInternEtSumCollection
virtual void endRun(Run const &iR, EventSetup const &iE)
~L1TCaloUpgradeToGCTConverter()
L1TCaloUpgradeToGCTConverter(const ParameterSet &)
std::vector< EGamma >::const_iterator const_iterator
std::vector< L1GctEmCand > L1GctEmCandCollection