#include <CMSInsideOutAlgorithm.h>
Classes | |
class | ListIteratorLesserByDeltaR |
Public Types | |
typedef std::list < fastjet::PseudoJet > ::iterator | inputListIter |
typedef reco::Particle::LorentzVector | LorentzVector |
Public Member Functions | |
CMSInsideOutAlgorithm (double seedObjectPt, double growthParameter, double maxSize, double minSize) | |
void | run (const std::vector< fastjet::PseudoJet > &fInput, std::vector< fastjet::PseudoJet > &fOutput) |
Build from input candidate collection. | |
Private Attributes | |
double | growthParameterSquared_ |
double | maxSizeSquared_ |
double | minSizeSquared_ |
double | seedThresholdPt_ |
Definition at line 27 of file CMSInsideOutAlgorithm.h.
typedef std::list<fastjet::PseudoJet>::iterator CMSInsideOutAlgorithm::inputListIter |
Definition at line 30 of file CMSInsideOutAlgorithm.h.
Definition at line 29 of file CMSInsideOutAlgorithm.h.
CMSInsideOutAlgorithm::CMSInsideOutAlgorithm | ( | double | seedObjectPt, |
double | growthParameter, | ||
double | maxSize, | ||
double | minSize | ||
) | [inline] |
Constructor
seed | defines the minimum ET in GeV of an object that can seed the jet |
growthparameter | sets the growth parameter X, i.e. [dR < X/Et_jet] |
min/max | size define the min/max size of jet in deltaR. Min is included for resolution effects |
seedCharge | can be the following values; -1 [don't care], 0 neutral only, 1 [tracks only] |
Definition at line 52 of file CMSInsideOutAlgorithm.h.
: seedThresholdPt_(seedObjectPt), growthParameterSquared_(growthParameter*growthParameter), maxSizeSquared_(maxSize*maxSize), minSizeSquared_(minSize*minSize){};
void CMSInsideOutAlgorithm::run | ( | const std::vector< fastjet::PseudoJet > & | fInput, |
std::vector< fastjet::PseudoJet > & | fOutput | ||
) |
Build from input candidate collection.
Definition at line 9 of file CMSInsideOutAlgorithm.cc.
References reco::deltaR2(), Geom::deltaR2(), LaserDQM_cfg::input, position, and python::multivaluedict::sort().
Referenced by CMSInsideOutJetProducer::runAlgorithm().
{ //make a list of input objects list<fastjet::PseudoJet> input; for (std::vector<fastjet::PseudoJet>::const_iterator candIter = fInput.begin(); candIter != fInput.end(); ++candIter) { input.push_back(*candIter); } while( !input.empty() && input.front().perp() > seedThresholdPt_ ) { //get seed eta/phi double seedEta = input.front().eta(); double seedPhi = input.front().phi(); //find iterators to those objects that are in the max cone size list<inputListIter> maxCone; // add seed, then test elements after seed inputListIter iCand = input.begin(); maxCone.push_back(iCand++); for(; iCand != input.end(); ++iCand) { const fastjet::PseudoJet& candidate = *iCand; if( reco::deltaR2(seedEta, candidate.eta(), seedPhi, candidate.phi()) < maxSizeSquared_ ) maxCone.push_back(iCand); } //sort objects by increasing DR about the seed directions maxCone.sort(ListIteratorLesserByDeltaR(seedEta, seedPhi)); list<inputListIter>::const_iterator position = maxCone.begin(); bool limitReached = false; double totalET = (**position).perp(); ++position; while(position != maxCone.end() && !limitReached) { const fastjet::PseudoJet& theCandidate = **position; double candidateET = theCandidate.perp() + totalET; double candDR2 = reco::deltaR2(seedEta, theCandidate.eta(), seedPhi, theCandidate.phi()); if( candDR2 < minSizeSquared_ || candDR2*candidateET*candidateET < growthParameterSquared_ ) totalET = candidateET; else limitReached = true; ++position; } //turn this into a final jet fastjet::PseudoJet final; for(list<inputListIter>::const_iterator iNewJet = maxCone.begin(); iNewJet != position; ++iNewJet) { final += **iNewJet; input.erase(*iNewJet); } fOutput.push_back(final); } // end loop over seeds GreaterByEtPseudoJet compJets; sort (fOutput.begin (), fOutput.end (), compJets); }
double CMSInsideOutAlgorithm::growthParameterSquared_ [private] |
Definition at line 65 of file CMSInsideOutAlgorithm.h.
double CMSInsideOutAlgorithm::maxSizeSquared_ [private] |
Definition at line 66 of file CMSInsideOutAlgorithm.h.
double CMSInsideOutAlgorithm::minSizeSquared_ [private] |
Definition at line 67 of file CMSInsideOutAlgorithm.h.
double CMSInsideOutAlgorithm::seedThresholdPt_ [private] |
Definition at line 64 of file CMSInsideOutAlgorithm.h.