65 iConfig.
getParameter<std::vector<edm::ParameterSet> >(
"SelectionParameters");
71 produces<susybsm::HSCParticleCollection>();
73 produces<susybsm::HSCPCaloInfoCollection>();
94 iEvent.getByToken(m_muonsToken, muonCollectionHandle);
98 iEvent.getByToken(m_MTmuonsToken, MTmuonCollectionHandle);
102 iEvent.getByToken(m_trackToken, trackCollectionHandle);
106 iEvent.getByToken(m_trackIsoToken, trackIsoCollectionHandle);
110 std::unique_ptr<susybsm::HSCParticleCollection>
result(hscp);
113 std::unique_ptr<susybsm::HSCPCaloInfoCollection> caloInfoCollaptr(caloInfoColl);
116 *hscp = getHSCPSeedCollection(trackCollectionHandle, muonCollectionHandle, MTmuonCollectionHandle);
119 for (susybsm::HSCParticleCollection::iterator hscpcandidate = hscp->begin(); hscpcandidate != hscp->end();
127 for (
unsigned int t = 0;
t < trackIsoCollectionHandle->size();
t++) {
143 for (susybsm::HSCParticleCollection::iterator hscpcandidate = hscp->begin(); hscpcandidate != hscp->end();
145 beta_calculator_TK->addInfoToCandidate(*hscpcandidate,
iEvent, iSetup);
151 for (susybsm::HSCParticleCollection::iterator hscpcandidate = hscp->begin(); hscpcandidate != hscp->end();
153 beta_calculator_MUON->addInfoToCandidate(*hscpcandidate,
iEvent, iSetup);
159 for (susybsm::HSCParticleCollection::iterator hscpcandidate = hscp->begin(); hscpcandidate != hscp->end();
161 beta_calculator_RPC->addInfoToCandidate(*hscpcandidate,
iEvent, iSetup);
168 caloInfoColl->resize(hscp->size());
169 for (susybsm::HSCParticleCollection::iterator hscpcandidate = hscp->begin(); hscpcandidate != hscp->end();
170 ++hscpcandidate, Index++) {
171 beta_calculator_ECAL->addInfoToCandidate(
172 *hscpcandidate, trackCollectionHandle,
iEvent, iSetup, (*caloInfoColl)[Index]);
177 for (
int i = 0;
i < (
int)hscp->size();
i++) {
178 susybsm::HSCParticleCollection::iterator hscpcandidate = hscp->begin() +
i;
179 bool decision =
false;
180 for (
unsigned int s = 0;
s < Selectors.size();
s++) {
181 decision |= Selectors[
s]->isSelected(*hscpcandidate);
184 hscp->erase(hscpcandidate);
186 caloInfoColl->erase(caloInfoColl->begin() +
i);
190 bool filterResult = !Filter_ || (Filter_ && !hscp->empty());
196 for (
int i = 0;
i < (
int)hscp->size();
i++) {
197 susybsm::HSCParticleCollection::iterator hscpcandidate = hscp->begin() +
i;
225 std::vector<HSCParticle> HSCPCollection;
228 std::vector<reco::TrackRef>
tracks;
229 for (
unsigned int i = 0;
i < trackCollectionHandle->size();
i++) {
234 for (
unsigned int m = 0;
m < muonCollectionHandle->size();
m++) {
241 float dR =
deltaR(innertrack->momentum(),
track->momentum());
252 for (
unsigned int m = 0;
m < muonCollectionHandle->size();
m++) {
255 if (
muon->isStandAloneMuon())
256 SApt =
muon->standAloneMuon()->pt();
267 for (
unsigned int t = 0;
t <
tracks.size();
t++) {
271 float dR =
deltaR(innertrack->momentum(),
track->momentum());
285 HSCPCollection.push_back(candidate);
289 for (
unsigned int m = 0;
m < muonCollectionHandle->size();
m++) {
292 if (
muon->isStandAloneMuon())
293 SApt =
muon->standAloneMuon()->pt();
303 for (
unsigned int t = 0;
t <
tracks.size();
t++) {
321 HSCPCollection.push_back(candidate);
325 for (
unsigned int m = 0;
m < MTmuonCollectionHandle->size();
m++) {
333 for (
unsigned int i = 0;
i < HSCPCollection.size();
i++) {
334 if (!HSCPCollection[
i].hasMuonRef())
337 float dR =
deltaR(
muon->momentum(), MTmuon->momentum());
344 HSCPCollection[
found].setMTMuon(MTmuon);
348 HSCPCollection.push_back(candidate);
353 for (
unsigned int i = 0;
i <
tracks.size();
i++) {
356 HSCPCollection.push_back(candidate);
359 return HSCPCollection;