CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
CMSIterativeConeAlgorithm Class Reference

#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. More...
 

Private Attributes

double theConeRadius
 
double theSeedThreshold
 

Detailed Description

CMSIterativeConeAlgorithm - iterative cone algorithm without jet merging/splitting. Originally implemented in ORCA by H.P.Wellish. Documented in CMS NOTE-2006/036

Author
A.Ulyanov, ITEP

Definition at line 18 of file CMSIterativeConeAlgorithm.h.

Constructor & Destructor Documentation

CMSIterativeConeAlgorithm::CMSIterativeConeAlgorithm ( double  seed,
double  radius 
)
inline
Constructor
Parameters
seeddefines the minimum ET in GeV of a tower that can seed a jet.
radiusdefines the maximum radius of a jet in eta-phi space.

Definition at line 24 of file CMSIterativeConeAlgorithm.h.

Member Function Documentation

void CMSIterativeConeAlgorithm::run ( const JetReco::InputCollection fInput,
JetReco::OutputCollection fOutput 
) const

Find the ProtoJets from the collection of input Candidates.

Definition at line 19 of file CMSIterativeConeAlgorithm.cc.

References Geom::deltaR2(), reco::Candidate::et(), reco::Candidate::eta(), eta(), input, align_cfg::iteration, M_PI, phi, reco::Candidate::phi(), and python.multivaluedict::sort().

19  {
20  if (!fOutput) return;
21  //make a list of input objects ordered by ET
22  list<InputItem> input;
23  for (InputCollection::const_iterator towerIter = fInput.begin();
24  towerIter != fInput.end(); ++towerIter) {
25  input.push_back(*towerIter);
26  }
27  GreaterByEtRef <InputItem> compCandidate;
28  input.sort(compCandidate);
29 
30  //find jets
31  while( !input.empty() && input.front()->et() > theSeedThreshold ) {
32  //cone centre
33  double eta0=input.front()->eta();
34  double phi0=input.front()->phi();
35  //protojet properties
36  double eta=0;
37  double phi=0;
38  double et=0;
39  //list of towers in cone
40  list< list<InputItem>::iterator> cone;
41  for(int iteration=0;iteration<100;iteration++){
42  cone.clear();
43  eta=0;
44  phi=0;
45  et=0;
46  for(list<InputItem>::iterator inp=input.begin();
47  inp!=input.end();inp++){
48  InputItem tower = *inp;
49  if( deltaR2(eta0,phi0,tower->eta(),tower->phi()) <
51  cone.push_back(inp);
52  eta+= tower->et()*tower->eta();
53  double dphi=tower->phi()-phi0;
54  if(dphi>M_PI) dphi-=2*M_PI;
55  else if(dphi<=-M_PI) dphi+=2*M_PI;
56  phi+=tower->et()*dphi;
57  et +=tower->et();
58  }
59  }
60  eta=eta/et;
61  phi=phi0+phi/et;
62  if(phi>M_PI)phi-=2*M_PI;
63  else if(phi<=-M_PI)phi+=2*M_PI;
64 
65  if(fabs(eta-eta0)<.001 && fabs(phi-phi0)<.001) break;//stable cone found
66  eta0=eta;
67  phi0=phi;
68  }
69 
70  //make a final jet and remove the jet constituents from the input list
71  InputCollection jetConstituents;
72  list< list<InputItem>::iterator>::const_iterator inp;
73  for(inp=cone.begin();inp!=cone.end();inp++) {
74  jetConstituents.push_back(**inp);
75  input.erase(*inp);
76  }
77  fOutput->push_back (ProtoJet (jetConstituents));
78 
79  } //loop over seeds ended
80  GreaterByPt<ProtoJet> compJets;
81  sort (fOutput->begin (), fOutput->end (), compJets);
82 }
virtual double et() const =0
transverse energy
virtual float eta() const =0
momentum pseudorapidity
std::vector< InputItem > InputCollection
Definition: JetRecoTypes.h:61
virtual float phi() const =0
momentum azimuthal angle
Transient Jet class used by the reconstruction algorithms.
Definition: ProtoJet.h:25
T eta() const
static std::string const input
Definition: EdmProvDump.cc:44
tuple iteration
Definition: align_cfg.py:5
double deltaR2(const Vector1 &v1, const Vector2 &v2)
Definition: VectorUtil.h:78
#define M_PI
Definition: BFit3D.cc:3
Definition: DDAxes.h:10

Member Data Documentation

double CMSIterativeConeAlgorithm::theConeRadius
private

Definition at line 35 of file CMSIterativeConeAlgorithm.h.

double CMSIterativeConeAlgorithm::theSeedThreshold
private

Definition at line 34 of file CMSIterativeConeAlgorithm.h.