CMS 3D CMS Logo

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 23 of file CMSInsideOutAlgorithm.h.

Member Typedef Documentation

◆ inputListIter

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

Definition at line 26 of file CMSInsideOutAlgorithm.h.

◆ LorentzVector

Definition at line 25 of file CMSInsideOutAlgorithm.h.

Constructor & Destructor Documentation

◆ CMSInsideOutAlgorithm()

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 50 of file CMSInsideOutAlgorithm.h.

51  : seedThresholdPt_(seedObjectPt),
52  growthParameterSquared_(growthParameter * growthParameter),
54  minSizeSquared_(minSize * minSize){};

Member Function Documentation

◆ run()

void CMSInsideOutAlgorithm::run ( const std::vector< fastjet::PseudoJet > &  fInput,
std::vector< fastjet::PseudoJet > &  fOutput 
)

Build from input candidate collection.

Definition at line 7 of file CMSInsideOutAlgorithm.cc.

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

References reco::deltaR2(), greaterByEtPseudoJet(), input, and position.

Referenced by CMSInsideOutJetProducer::runAlgorithm().

Member Data Documentation

◆ growthParameterSquared_

double CMSInsideOutAlgorithm::growthParameterSquared_
private

Definition at line 61 of file CMSInsideOutAlgorithm.h.

◆ maxSizeSquared_

double CMSInsideOutAlgorithm::maxSizeSquared_
private

Definition at line 62 of file CMSInsideOutAlgorithm.h.

◆ minSizeSquared_

double CMSInsideOutAlgorithm::minSizeSquared_
private

Definition at line 63 of file CMSInsideOutAlgorithm.h.

◆ seedThresholdPt_

double CMSInsideOutAlgorithm::seedThresholdPt_
private

Definition at line 60 of file CMSInsideOutAlgorithm.h.

greaterByEtPseudoJet
bool greaterByEtPseudoJet(fastjet::PseudoJet const &j1, fastjet::PseudoJet const &j2)
Definition: CompoundPseudoJet.h:82
CMSInsideOutAlgorithm::maxSizeSquared_
double maxSizeSquared_
Definition: CMSInsideOutAlgorithm.h:62
input
static const std::string input
Definition: EdmProvDump.cc:48
reco::deltaR2
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:16
position
static int position[264][3]
Definition: ReadPGInfo.cc:289
CMSInsideOutAlgorithm::minSizeSquared_
double minSizeSquared_
Definition: CMSInsideOutAlgorithm.h:63
reco_skim_cfg_mod.maxSize
maxSize
Definition: reco_skim_cfg_mod.py:154
CMSInsideOutAlgorithm::growthParameterSquared_
double growthParameterSquared_
Definition: CMSInsideOutAlgorithm.h:61
CMSInsideOutAlgorithm::seedThresholdPt_
double seedThresholdPt_
Definition: CMSInsideOutAlgorithm.h:60
CMSInsideOutAlgorithm::inputListIter
std::list< fastjet::PseudoJet >::iterator inputListIter
Definition: CMSInsideOutAlgorithm.h:26