#include <CMSIterativeConeAlgorithm.h>
Public Member Functions | |
CMSIterativeConeAlgorithm (double seed, double radius) | |
void | run (const JetReco::InputCollection &fInput, JetReco::OutputCollection *fOutput) const |
Find the ProtoJets from the collection of input Candidates. | |
Private Attributes | |
double | theConeRadius |
double | theSeedThreshold |
CMSIterativeConeAlgorithm - iterative cone algorithm without jet merging/splitting. Originally implemented in ORCA by H.P.Wellish. Documented in CMS NOTE-2006/036
Definition at line 19 of file CMSIterativeConeAlgorithm.h.
CMSIterativeConeAlgorithm::CMSIterativeConeAlgorithm | ( | double | seed, |
double | radius | ||
) | [inline] |
Constructor
seed | defines the minimum ET in GeV of a tower that can seed a jet. |
radius | defines the maximum radius of a jet in eta-phi space. |
Definition at line 25 of file CMSIterativeConeAlgorithm.h.
: theSeedThreshold(seed), theConeRadius(radius) { }
void CMSIterativeConeAlgorithm::run | ( | const JetReco::InputCollection & | fInput, |
JetReco::OutputCollection * | fOutput | ||
) | const |
Find the ProtoJets from the collection of input Candidates.
Definition at line 20 of file CMSIterativeConeAlgorithm.cc.
References Geom::deltaR2(), eta(), LaserDQM_cfg::input, align_cfg::iteration, M_PI, phi, and python::multivaluedict::sort().
{ if (!fOutput) return; //make a list of input objects ordered by ET list<InputItem> input; for (InputCollection::const_iterator towerIter = fInput.begin(); towerIter != fInput.end(); ++towerIter) { input.push_back(*towerIter); } GreaterByEtRef <InputItem> compCandidate; input.sort(compCandidate); //find jets while( !input.empty() && input.front()->et() > theSeedThreshold ) { //cone centre double eta0=input.front()->eta(); double phi0=input.front()->phi(); //protojet properties double eta=0; double phi=0; double et=0; //list of towers in cone list< list<InputItem>::iterator> cone; for(int iteration=0;iteration<100;iteration++){ cone.clear(); eta=0; phi=0; et=0; for(list<InputItem>::iterator inp=input.begin(); inp!=input.end();inp++){ InputItem tower = *inp; if( deltaR2(eta0,phi0,tower->eta(),tower->phi()) < theConeRadius*theConeRadius) { cone.push_back(inp); eta+= tower->et()*tower->eta(); double dphi=tower->phi()-phi0; if(dphi>M_PI) dphi-=2*M_PI; else if(dphi<=-M_PI) dphi+=2*M_PI; phi+=tower->et()*dphi; et +=tower->et(); } } eta=eta/et; phi=phi0+phi/et; if(phi>M_PI)phi-=2*M_PI; else if(phi<=-M_PI)phi+=2*M_PI; if(fabs(eta-eta0)<.001 && fabs(phi-phi0)<.001) break;//stable cone found eta0=eta; phi0=phi; } //make a final jet and remove the jet constituents from the input list InputCollection jetConstituents; list< list<InputItem>::iterator>::const_iterator inp; for(inp=cone.begin();inp!=cone.end();inp++) { jetConstituents.push_back(**inp); input.erase(*inp); } fOutput->push_back (ProtoJet (jetConstituents)); } //loop over seeds ended GreaterByPt<ProtoJet> compJets; sort (fOutput->begin (), fOutput->end (), compJets); }
double CMSIterativeConeAlgorithm::theConeRadius [private] |
Definition at line 36 of file CMSIterativeConeAlgorithm.h.
double CMSIterativeConeAlgorithm::theSeedThreshold [private] |
Definition at line 35 of file CMSIterativeConeAlgorithm.h.