85 using namespace susybsm;
102 std::auto_ptr<susybsm::HSCParticleCollection>
result(hscp);
105 std::auto_ptr<susybsm::HSCPCaloInfoCollection> caloInfoCollaptr(caloInfoColl);
112 for(susybsm::HSCParticleCollection::iterator hscpcandidate = hscp->begin(); hscpcandidate != hscp->end(); ++hscpcandidate) {
115 if(track.
isNull())
continue;
116 float dRMin=1000;
int found = -1;
117 for(
unsigned int t=0;
t<trackIsoCollectionHandle->size();
t++) {
119 if( fabs( (1.0/track->pt())-(1.0/Isotrack->pt())) >
maxInvPtDiff)
continue;
120 float dR =
deltaR(track->momentum(), Isotrack->momentum());
121 if(dR <=
minDR && dR < dRMin){ dRMin=
dR; found =
t;}
123 if(found>=0)hscpcandidate->setTrackIso(
reco::TrackRef( trackIsoCollectionHandle, found ));
128 for(susybsm::HSCParticleCollection::iterator hscpcandidate = hscp->begin(); hscpcandidate != hscp->end(); ++hscpcandidate) {
134 for(susybsm::HSCParticleCollection::iterator hscpcandidate = hscp->begin(); hscpcandidate != hscp->end(); ++hscpcandidate) {
140 for(susybsm::HSCParticleCollection::iterator hscpcandidate = hscp->begin(); hscpcandidate != hscp->end(); ++hscpcandidate) {
150 caloInfoColl->resize(hscp->size());
151 for(susybsm::HSCParticleCollection::iterator hscpcandidate = hscp->begin(); hscpcandidate != hscp->end(); ++hscpcandidate, Index++) {
156 for(
int i=0;
i<(int)hscp->size();
i++) {
157 susybsm::HSCParticleCollection::iterator hscpcandidate = hscp->begin() +
i;
158 bool decision =
false;
161 hscp->erase(hscpcandidate);
175 for(
int i=0;
i<(int)hscp->size();
i++) {
176 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
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)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
double deltaR(double eta1, double eta2, double phi1, double phi2)
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
BetaCalculatorRPC * beta_calculator_RPC
std::vector< CandidateSelector * > Selectors
edm::InputTag m_trackIsoTag