43 for (
unsigned i = 0;
i != nLabels;
i++)
47 produces<HBHERecHitCollection>(
"HBHERecHitCollectionFHN");
48 produces<HORecHitCollection>(
"HORecHitCollectionFHN");
49 produces<HFRecHitCollection>(
"HFRecHitCollectionFHN");
51 produces<EcalRecHitCollection>(
"EcalRecHitCollectionFHN");
52 produces<EcalRecHitCollection>(
"PSEcalRecHitCollectionFHN");
54 produces<FEDRawDataCollection>(
"HcalFEDsFHN");
61 bool acceptEvent =
false;
65 bool isAnomalous_BasedOnMET =
false;
66 bool isAnomalous_BasedOnEnergyFraction =
false;
75 isAnomalous_BasedOnMET =
true;
85 std::vector<CaloTower> TowerContainer;
86 std::vector<reco::CaloJet> JetContainer;
87 TowerContainer.clear();
91 for (reco::CaloJetCollection::const_iterator calojetIter = calojetHandle->begin();
92 calojetIter != calojetHandle->end();
94 if (((calojetIter->et()) * cosh(calojetIter->eta()) >
JetMinE_) &&
96 JetContainer.push_back(*calojetIter);
97 double maxTowerE = 0.0;
99 double dR =
deltaR((*calojetIter).eta(), (*calojetIter).phi(), (*kal).eta(), (*kal).phi());
100 if ((
dR < 0.50) && (kal->p() > maxTowerE)) {
101 maxTowerE = kal->p();
105 TowerContainer.push_back(seedTower);
108 if (!JetContainer.empty()) {
110 isAnomalous_BasedOnEnergyFraction =
true;
114 acceptEvent = ((
useMet_ && isAnomalous_BasedOnMET) || (
useJet_ && isAnomalous_BasedOnEnergyFraction));
120 auto miniHBHERecHitCollection = std::make_unique<HBHERecHitCollection>();
121 auto miniHORecHitCollection = std::make_unique<HORecHitCollection>();
122 auto miniHFRecHitCollection = std::make_unique<HFRecHitCollection>();
124 auto outputEColl = std::make_unique<EcalRecHitCollection>();
125 auto outputESColl = std::make_unique<EcalRecHitCollection>();
127 auto outputFEDs = std::make_unique<FEDRawDataCollection>();
144 auto tmpEcalRecHitCollection = std::make_unique<EcalRecHitCollection>();
146 std::vector<edm::EDGetTokenT<EcalRecHitCollection> >::const_iterator
i;
151 tmpEcalRecHitCollection->push_back(*
recHit);
160 miniHBHERecHitCollection->
push_back(*hbheItr);
164 miniHORecHitCollection->
push_back(*hoItr);
169 miniHFRecHitCollection->
push_back(*hfItr);
174 for (std::vector<EcalRecHit>::const_iterator ehit = tmpEcalRecHitCollection->begin();
175 ehit != tmpEcalRecHitCollection->end();
177 outputEColl->push_back(*ehit);
192 std::vector<int> selFEDs;
194 selFEDs.push_back(
i);
205 bool rightFED =
false;
206 for (uint32_t
k = 0;
k < selFEDs.size();
k++) {
207 if (
j == selFEDs[
k]) {
219 if (fedDataProd.
size() != 0) {
225 unsigned char* dataProd = fedDataProd.
data();
226 const unsigned char*
data = fedData.
data();
227 for (
unsigned int k = 0;
k <
size; ++
k) {
236 iEvent.put(
std::move(miniHBHERecHitCollection),
"HBHERecHitCollectionFHN");
237 iEvent.put(
std::move(miniHORecHitCollection),
"HORecHitCollectionFHN");
238 iEvent.put(
std::move(miniHFRecHitCollection),
"HFRecHitCollectionFHN");