Fork me on GitHub

source: git/external/fastjet/plugins/CDFCones/MidPointAlgorithm.hh@ 5babc8b

ImprovedOutputFile Timing dual_readout llp
Last change on this file since 5babc8b was d7d2da3, checked in by pavel <pavel@…>, 12 years ago

move branches/ModularDelphes to trunk

  • Property mode set to 100644
File size: 3.0 KB
Line 
1#ifndef _MIDPOINT_ALGORITHM_HH_
2#define _MIDPOINT_ALGORITHM_HH_
3
4//----------------------------------------------------------------------
5// This file distributed with FastJet has been obtained from
6// http://www.pa.msu.edu/~huston/Les_Houches_2005/JetClu+Midpoint-StandAlone.tgz
7//
8// Permission to distribute it with FastJet has been granted by Joey
9// Huston (see the COPYING file in the main FastJet directory for
10// details).
11// Changes from the original file are listed below.
12//----------------------------------------------------------------------
13
14// History of changes compared to the original MidPointAlgorithm.hh file
15//
16// 2009-01-17 Gregory Soyez <soyez@fastjet.fr>
17//
18// * put the code in the fastjet::cdf namespace
19//
20// 2007-03-10 Gavin Salam <salam@lpthe.jussieu.fr>
21//
22// * added support for the pttilde scale choice in the CDF midpoint code
23//
24// 2007-02-21 Gavin Salam <salam@lpthe.jussieu.fr>
25//
26// * added option of choosing the scale used in the split-merge
27// procedure (pt [default], Et or mt)
28//
29// 2006-09-24 Gavin Salam <salam@lpthe.jussieu.fr>
30//
31// * removed the local_sort method
32//
33// 2006-09-24 Gavin Salam <salam@lpthe.jussieu.fr>
34//
35// * added JetClu+MidPoint to FastJet
36
37
38#include "PhysicsTower.hh"
39#include "Cluster.hh"
40#include <vector>
41
42#include <fastjet/internal/base.hh>
43
44FASTJET_BEGIN_NAMESPACE
45
46namespace cdf{
47
48class MidPointAlgorithm
49{
50 public:
51 enum SplitMergeScale {SM_pt, SM_Et, SM_mt, SM_pttilde};
52
53 private:
54 double _seedThreshold;
55 double _coneRadius;
56 double _coneAreaFraction;
57 int _maxPairSize;
58 int _maxIterations;
59 double _overlapThreshold;
60 SplitMergeScale _smScale;
61
62 public:
63 MidPointAlgorithm():
64 _seedThreshold(1),
65 _coneRadius(0.7),
66 _coneAreaFraction(0.25),
67 _maxPairSize(2),
68 _maxIterations(100),
69 _overlapThreshold(0.75),
70 _smScale(SM_pt)
71 {}
72 MidPointAlgorithm(double st, double cr, double caf, int mps, int mi, double ot, SplitMergeScale sm = SM_pt):
73 _seedThreshold(st),
74 _coneRadius(cr),
75 _coneAreaFraction(caf),
76 _maxPairSize(mps),
77 _maxIterations(mi),
78 _overlapThreshold(ot),
79 _smScale(sm)
80 {}
81 void findStableConesFromSeeds(std::vector<PhysicsTower>& particles, std::vector<Cluster>& stableCones);
82 void findStableConesFromMidPoints(std::vector<PhysicsTower>& particles, std::vector<Cluster>& stableCones);
83 void iterateCone(volatile double startRapidity, volatile double startPhi, volatile double startPt, std::vector<PhysicsTower>& particles,
84 std::vector<Cluster>& stableCones, bool reduceConeSize);
85 void addClustersToPairs(std::vector<int>& testPair, std::vector< std::vector<int> >& pairs,
86 std::vector< std::vector<bool> >& distanceOK, int maxClustersInPair);
87 void splitAndMerge(std::vector<Cluster>& stableCones, std::vector<Cluster>& jets);
88 void run(std::vector<PhysicsTower>& particles, std::vector<Cluster>& jets);
89
90 /// sort the clusters into whatever order is
91 void local_sort(std::vector<Cluster>&);
92
93};
94
95} // namespace cdf
96
97FASTJET_END_NAMESPACE
98
99#endif
Note: See TracBrowser for help on using the repository browser.