CMS 3D CMS Logo

SelectHFMinBias.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: BeamSplash
4 // Class: BeamSPlash
5 //
6 //
7 // Original Author: Luca Malgeri
8 
9 #include <memory>
10 #include <vector>
11 #include <map>
12 #include <set>
13 
14 // user include files
15 
24 
28 
29 using namespace edm;
30 using namespace std;
31 
33 
35 
38  iEvent.getByLabel("towerMaker", towers);
39 
40  int negTowers = 0;
41  int posTowers = 0;
42  for (CaloTowerCollection::const_iterator cal = towers->begin(); cal != towers->end(); ++cal) {
43  for (unsigned int i = 0; i < cal->constituentsSize(); i++) {
44  const DetId id = cal->constituent(i);
45  if (id.det() == DetId::Hcal) {
46  HcalSubdetector subdet = (HcalSubdetector(id.subdetId()));
47  if (subdet == HcalForward) {
48  if (cal->energy() > 3. && cal->eta() < -3.)
49  negTowers++;
50  if (cal->energy() > 3. && cal->eta() > 3.)
51  posTowers++;
52  }
53  }
54  }
55  }
56  if (negTowers > 0 && posTowers > 0)
57  return true;
58 
59  return false;
60 }
61 
62 //define this as a plug-in
HLT_FULL_cff.towers
towers
Definition: HLT_FULL_cff.py:36379
mps_fire.i
i
Definition: mps_fire.py:428
edm::SortedCollection< CaloTower >::const_iterator
std::vector< CaloTower >::const_iterator const_iterator
Definition: SortedCollection.h:80
MessageLogger.h
ESHandle.h
edm
HLT enums.
Definition: AlignableModifier.h:19
DetId::Hcal
Definition: DetId.h:28
EDFilter.h
edm::Handle
Definition: AssociativeIterator.h:50
DetId
Definition: DetId.h:17
MakerMacros.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
SelectHFMinBias::~SelectHFMinBias
~SelectHFMinBias() override
Definition: SelectHFMinBias.cc:34
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
SelectHFMinBias::SelectHFMinBias
SelectHFMinBias(const edm::ParameterSet &)
Definition: SelectHFMinBias.cc:32
iEvent
int iEvent
Definition: GenABIO.cc:224
edm::EventSetup
Definition: EventSetup.h:58
HcalSubdetector.h
SelectHFMinBias.h
InputTag.h
CaloTowerCollection.h
HcalSubdetector
HcalSubdetector
Definition: HcalAssistant.h:31
HcalForward
Definition: HcalAssistant.h:36
SelectHFMinBias::filter
bool filter(edm::Event &, const edm::EventSetup &) override
Definition: SelectHFMinBias.cc:36
std
Definition: JetResolutionObject.h:76
Frameworkfwd.h
SelectHFMinBias
Definition: SelectHFMinBias.h:33
ParameterSet.h
edm::Event
Definition: Event.h:73