CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CMSInsideOutAlgorithm.h
Go to the documentation of this file.
1 #ifndef RecoJets_JetAlgorithms_CMSInsideOutAlgorithm_h
2 #define RecoJets_JetAlgorithms_CMSInsideOutAlgorithm_h
3 
13 #include <list>
14 #include <algorithm>
15 
18 #include <limits>
19 #include <vector>
20 #include <list>
21 
22 #include "fastjet/PseudoJet.hh"
23 
24 
25 
26 
28  public:
30  typedef std::list<fastjet::PseudoJet>::iterator inputListIter;
31  // binary predicate to sort a std::list of std::list<InputItem> iterators by increasing deltaR
32  // from a eta-phi point specified in the ctor
34  public: ListIteratorLesserByDeltaR(const double& eta, const double& phi):seedEta_(eta),seedPhi_(phi){}
35  bool operator()(const inputListIter& A, const inputListIter& B) const {
36  double deltaR2A = reco::deltaR2( (*A).eta(), seedEta_, (*A).phi(), seedPhi_ );
37  double deltaR2B = reco::deltaR2( (*B).eta(), seedEta_, (*B).phi(), seedPhi_ );
38  return
39  fabs(deltaR2A - deltaR2B) > std::numeric_limits<double>::epsilon() ? deltaR2A < deltaR2B :
40  reco::deltaPhi((*A).phi(), seedPhi_) < reco::deltaPhi((*B).phi(), seedPhi_);
41  };
42  private:
43  double seedEta_, seedPhi_;
44  };
45 
52  CMSInsideOutAlgorithm(double seedObjectPt, double growthParameter, double maxSize, double minSize):
53  seedThresholdPt_(seedObjectPt),
54  growthParameterSquared_(growthParameter*growthParameter),
55  maxSizeSquared_(maxSize*maxSize),
56  minSizeSquared_(minSize*minSize){};
57 
58 
59 
61  void run(const std::vector<fastjet::PseudoJet>& fInput, std::vector<fastjet::PseudoJet> & fOutput);
62 
63  private:
68 };
69 
70 #endif
T eta() const
std::list< fastjet::PseudoJet >::iterator inputListIter
reco::Particle::LorentzVector LorentzVector
tuple maxSize
&#39;/store/data/Commissioning08/BeamHalo/RECO/StuffAlmostToP5_v1/000/061/642/10A0FE34-A67D-DD11-AD05-000...
double deltaR2(const T1 &t1, const T2 &t2)
Definition: deltaR.h:36
CMSInsideOutAlgorithm(double seedObjectPt, double growthParameter, double maxSize, double minSize)
double deltaPhi(double phi1, double phi2)
Definition: deltaPhi.h:12
ListIteratorLesserByDeltaR(const double &eta, const double &phi)
bool operator()(const inputListIter &A, const inputListIter &B) const
void run(const std::vector< fastjet::PseudoJet > &fInput, std::vector< fastjet::PseudoJet > &fOutput)
Build from input candidate collection.
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Particle.h:21
Definition: DDAxes.h:10