CMS 3D CMS Logo

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

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

Private Attributes

double growthParameterSquared_
 
double maxSizeSquared_
 
double minSizeSquared_
 
double seedThresholdPt_
 

Detailed Description

Definition at line 27 of file CMSInsideOutAlgorithm.h.

Member Typedef Documentation

typedef std::list<fastjet::PseudoJet>::iterator CMSInsideOutAlgorithm::inputListIter

Definition at line 30 of file CMSInsideOutAlgorithm.h.

Definition at line 29 of file CMSInsideOutAlgorithm.h.

Constructor & Destructor Documentation

CMSInsideOutAlgorithm::CMSInsideOutAlgorithm ( double  seedObjectPt,
double  growthParameter,
double  maxSize,
double  minSize 
)
inline

Constructor

Parameters
seeddefines the minimum ET in GeV of an object that can seed the jet
growthparametersets the growth parameter X, i.e. [dR < X/Et_jet]
min/maxsize define the min/max size of jet in deltaR. Min is included for resolution effects
seedChargecan be the following values; -1 [don't care], 0 neutral only, 1 [tracks only]

Definition at line 52 of file CMSInsideOutAlgorithm.h.

52  :
53  seedThresholdPt_(seedObjectPt),
54  growthParameterSquared_(growthParameter*growthParameter),
56  minSizeSquared_(minSize*minSize){};
tuple maxSize
&#39;/store/data/Commissioning08/BeamHalo/RECO/StuffAlmostToP5_v1/000/061/642/10A0FE34-A67D-DD11-AD05-000...

Member Function Documentation

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(), LaserDQM_cfg::input, position, and python.multivaluedict::sort().

Referenced by CMSInsideOutJetProducer::runAlgorithm().

10 {
11 
12  //make a list of input objects
13  list<fastjet::PseudoJet> input;
14  for (std::vector<fastjet::PseudoJet>::const_iterator candIter = fInput.begin();
15  candIter != fInput.end();
16  ++candIter) {
17  input.push_back(*candIter);
18  }
19 
20  while( !input.empty() && input.front().perp() > seedThresholdPt_ )
21  {
22  //get seed eta/phi
23  double seedEta = input.front().eta();
24  double seedPhi = input.front().phi();
25 
26  //find iterators to those objects that are in the max cone size
27  list<inputListIter> maxCone;
28  // add seed, then test elements after seed
29  inputListIter iCand = input.begin();
30  maxCone.push_back(iCand++);
31  for(; iCand != input.end(); ++iCand)
32  {
33  const fastjet::PseudoJet& candidate = *iCand;
34  if( reco::deltaR2(seedEta, candidate.eta(), seedPhi, candidate.phi()) < maxSizeSquared_ )
35  maxCone.push_back(iCand);
36  }
37  //sort objects by increasing DR about the seed directions
38  maxCone.sort(ListIteratorLesserByDeltaR(seedEta, seedPhi));
39  list<inputListIter>::const_iterator position = maxCone.begin();
40  bool limitReached = false;
41  double totalET = (**position).perp();
42  ++position;
43  while(position != maxCone.end() && !limitReached)
44  {
45  const fastjet::PseudoJet& theCandidate = **position;
46  double candidateET = theCandidate.perp() + totalET;
47  double candDR2 = reco::deltaR2(seedEta, theCandidate.eta(), seedPhi, theCandidate.phi());
48  if( candDR2 < minSizeSquared_ || candDR2*candidateET*candidateET < growthParameterSquared_ )
49  totalET = candidateET;
50  else
51  limitReached = true;
52  ++position;
53  }
54  //turn this into a final jet
55  fastjet::PseudoJet final;
56  for(list<inputListIter>::const_iterator iNewJet = maxCone.begin();
57  iNewJet != position;
58  ++iNewJet)
59  {
60  final += **iNewJet;
61  input.erase(*iNewJet);
62  }
63  fOutput.push_back(final);
64  } // end loop over seeds
65  GreaterByEtPseudoJet compJets;
66  sort (fOutput.begin (), fOutput.end (), compJets);
67 }
std::list< fastjet::PseudoJet >::iterator inputListIter
double deltaR2(double eta1, double phi1, double eta2, double phi2)
Definition: deltaR.h:13
static int position[264][3]
Definition: ReadPGInfo.cc:509

Member Data Documentation

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.