84 using namespace susybsm;
101 std::auto_ptr<susybsm::HSCParticleCollection>
result(hscp);
104 std::auto_ptr<susybsm::HSCPCaloInfoCollection> caloInfoCollaptr(caloInfoColl);
111 for(susybsm::HSCParticleCollection::iterator hscpcandidate = hscp->begin(); hscpcandidate != hscp->end(); ++hscpcandidate) {
114 if(track.
isNull())
continue;
115 float dRMin=1000;
int found = -1;
116 for(
unsigned int t=0;
t<trackIsoCollectionHandle->size();
t++) {
118 if( fabs( (1.0/track->pt())-(1.0/Isotrack->pt())) >
maxInvPtDiff)
continue;
119 float dR =
deltaR(track->momentum(), Isotrack->momentum());
120 if(dR <=
minDR && dR < dRMin){ dRMin=
dR; found =
t;}
122 if(found>=0)hscpcandidate->setTrackIso(
reco::TrackRef( trackIsoCollectionHandle, found ));
127 for(susybsm::HSCParticleCollection::iterator hscpcandidate = hscp->begin(); hscpcandidate != hscp->end(); ++hscpcandidate) {
133 for(susybsm::HSCParticleCollection::iterator hscpcandidate = hscp->begin(); hscpcandidate != hscp->end(); ++hscpcandidate) {
139 for(susybsm::HSCParticleCollection::iterator hscpcandidate = hscp->begin(); hscpcandidate != hscp->end(); ++hscpcandidate) {
149 caloInfoColl->resize(hscp->size());
150 for(susybsm::HSCParticleCollection::iterator hscpcandidate = hscp->begin(); hscpcandidate != hscp->end(); ++hscpcandidate, Index++) {
155 for(
int i=0;
i<(int)hscp->size();
i++) {
156 susybsm::HSCParticleCollection::iterator hscpcandidate = hscp->begin() +
i;
157 bool decision =
false;
160 hscp->erase(hscpcandidate);
174 for(
int i=0;
i<(int)hscp->size();
i++) {
175 susybsm::HSCParticleCollection::iterator hscpcandidate = hscp->begin() +
i;
std::vector< susybsm::HSCParticle > getHSCPSeedCollection(edm::Handle< reco::TrackCollection > &trackCollectionHandle, edm::Handle< reco::MuonCollection > &muonCollectionHandle)
std::vector< HSCPCaloInfo > HSCPCaloInfoCollection
edm::EDGetTokenT< reco::MuonCollection > m_muonsToken
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void addInfoToCandidate(susybsm::HSCParticle &candidate, const edm::Event &iEvent, const edm::EventSetup &iSetup)
BetaCalculatorMUON * beta_calculator_MUON
void addInfoToCandidate(susybsm::HSCParticle &candidate, edm::Handle< reco::TrackCollection > &tracks, edm::Event &iEvent, const edm::EventSetup &iSetup, susybsm::HSCPCaloInfo &caloInfo)
BetaCalculatorTK * beta_calculator_TK
void addInfoToCandidate(susybsm::HSCParticle &candidate, edm::Event &iEvent, const edm::EventSetup &iSetup)
BetaCalculatorECAL * beta_calculator_ECAL
edm::Ref< HSCPCaloInfoCollection > HSCPCaloInfoRef
std::vector< HSCParticle > HSCParticleCollection
bool isNull() const
Checks for null.
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
void addInfoToCandidate(susybsm::HSCParticle &candidate, edm::Event &iEvent, const edm::EventSetup &iSetup)
double deltaR(double eta1, double eta2, double phi1, double phi2)
edm::EDGetTokenT< reco::TrackCollection > m_trackToken
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
BetaCalculatorRPC * beta_calculator_RPC
std::vector< CandidateSelector * > Selectors
edm::EDGetTokenT< reco::TrackCollection > m_trackIsoToken