Page Menu
Home
HEPForge
Search
Configure Global Search
Log In
Files
F8308660
VariableR.hh
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Subscribers
None
VariableR.hh
View Options
// VariableR Package
// Questions/Comments? jthaler@jthaler.net
//
// Copyright (c) 2009-2013
// David Krohn, Jesse Thaler, and Lian-Tao Wang
//
//----------------------------------------------------------------------
// This file is part of FastJet contrib.
//
// It is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2 of the License, or (at
// your option) any later version.
//
// It is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
// License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this code. If not, see <http://www.gnu.org/licenses/>.
//----------------------------------------------------------------------
#ifndef __FASTJET_CONTRIB_VARIABLER_HH__
#define __FASTJET_CONTRIB_VARIABLER_HH__
#include
<fastjet/internal/base.hh>
#include
"fastjet/JetDefinition.hh"
#include
"fastjet/PseudoJet.hh"
#include
"fastjet/ClusterSequence.hh"
#include
<map>
#include
<queue>
using
namespace
std
;
FASTJET_BEGIN_NAMESPACE
// defined in fastjet/internal/base.hh
namespace
contrib
{
////////
//
// Helper Functions and Enums
//
////////
// Store two jets and a distance measure
struct
JetDistancePair
{
int
j1
,
j2
;
double
distance
;
};
// Class for comparing JetDistancePairs
class
CompareJetDistancePair
{
public
:
CompareJetDistancePair
(){};
bool
operator
()
(
const
JetDistancePair
&
lhs
,
const
JetDistancePair
&
rhs
)
const
{
return
(
lhs
.
distance
>
rhs
.
distance
);
}
};
// Type of clustering
enum
VRClustType
{
CALIKE
,
KTLIKE
,
AKTLIKE
};
////////
//
// Core VR Code
//
////////
// TODO: Need to document this class
class
VR
:
public
JetDefinition
::
Plugin
{
private
:
double
_rho2
,
_min_r2
,
_max_r2
;
VRClustType
_clust_type
;
bool
_precluster
;
JetDefinition
_pre_jet_def
;
void
Precluster
(
ClusterSequence
&
cs
,
set
<
int
>&
unmerged_jets
)
const
;
void
MergeJetWithBeam
(
ClusterSequence
&
clust_seq
,
JetDistancePair
&
jdp
,
set
<
int
>&
unmerged_jets
)
const
;
void
MergeJets
(
ClusterSequence
&
clust_seq
,
JetDistancePair
&
jdp
,
priority_queue
<
JetDistancePair
,
vector
<
JetDistancePair
>
,
CompareJetDistancePair
>
&
jet_queue
,
set
<
int
>&
unmerged_jets
)
const
;
inline
double
GetJJDistanceMeasure
(
const
PseudoJet
&
j1
,
const
PseudoJet
&
j2
)
const
;
inline
double
GetJBDistanceMeasure
(
const
PseudoJet
&
jet
)
const
;
void
SetupDistanceMeasures
(
ClusterSequence
&
clust_seq
,
vector
<
JetDistancePair
>
&
jet_vec
,
set
<
int
>&
unmerged_jets
)
const
;
public
:
VR
(
double
rho
,
double
min_r
,
double
max_r
,
VRClustType
clust_type
,
bool
precluster
=
false
);
void
run_clustering
(
fastjet
::
ClusterSequence
&
cs
)
const
;
virtual
string
description
()
const
;
virtual
double
R
()
const
;
};
////////
//
// For backwards compatibility, keep old constructors
//
////////
class
AKTVR
:
public
VR
{
public
:
AKTVR
(
double
rho
,
double
max_r
)
:
VR
(
rho
,
0.0
,
max_r
,
AKTLIKE
)
{}
};
class
CAVR
:
public
VR
{
public
:
CAVR
(
double
rho
,
double
max_r
)
:
VR
(
rho
,
0.0
,
max_r
,
CALIKE
)
{}
};
class
KTVR
:
public
VR
{
public
:
KTVR
(
double
rho
,
double
max_r
)
:
VR
(
rho
,
0.0
,
max_r
,
KTLIKE
)
{}
};
}
// namespace contrib
FASTJET_END_NAMESPACE
#endif
// __FASTJET_CONTRIB_VARIABLER_HH__
File Metadata
Details
Attached
Mime Type
text/x-c
Expires
Sat, Dec 21, 12:47 PM (1 d, 20 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4022822
Default Alt Text
VariableR.hh (3 KB)
Attached To
rFASTJETSVN fastjetsvn
Event Timeline
Log In to Comment