ATLAS Offline Software
Loading...
Searching...
No Matches
FastJetInterfaceTool Class Reference

Wrapper for fastjet verion 2.4.4. More...

#include <FastJetInterfaceTool.h>

Inheritance diagram for FastJetInterfaceTool:
Collaboration diagram for FastJetInterfaceTool:

Public Types

typedef fastjet::PseudoJet fjet_t
typedef std::vector< fjet_tfjetlist_t

Public Member Functions

 FastJetInterfaceTool (const std::string &n)
 Standard AlgTool constructor.
virtual ~FastJetInterfaceTool ()
 Base class destructor.
virtual StatusCode initialize ()
 Initialize tool.
virtual StatusCode execute (const fjetlist_t &inJets, fjetlist_t &outJets)
 Execute method.
virtual fastjet::ClusterSequence * clusterSequence ()
 Access fastjet ClusterSequence.
virtual const fastjet::ClusterSequence * clusterSequence () const
 Access fastjet ClusterSequence.
template<class S>
S * specificClusterSequence ()
 Access to specific cluster sequence.
template<class S>
const S * specificClusterSequence () const
 Access to specific cluster sequence.
const fastjet::JetDefinition * getJetDefinition () const
 Access fastjet JetDefinition.
const fastjet::AreaDefinition * getAreaDefinition () const
 Access fastjet AreaDefinition.
const std::string getAreaDefinitionType () const
 Access fastjet area definition type.
const FastJetInterface::algomap_tgetKnownAlgorithms ()
 Get known jet algorithms.
const FastJetInterface::strategymap_tgetKnownStrategies ()
 Get known jet finding strategies.
const FastJetInterface::schememap_tgetKnownRecombinationSchemes ()
 Get known recombination schemes.
const FastJetInterface::splitMergeScaleMap_tgetKnownSplitMergeScales ()
 Get known split merge scales.
const FastJetInterface::areamap_tgetKnownAreas ()
 Get known area types.
virtual void print () const
 Print the state of the tool.
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const
Additional helper functions, not directly mimicking Athena
template<class T>
const T * getProperty (const std::string &name) const
 Get one of the tool's properties.
const std::string & msg_level_name () const __attribute__((deprecated))
 A deprecated function for getting the message level's name.
const std::string & getName (const void *ptr) const
 Get the name of an object that is / should be in the event store.
SG::sgkey_t getKey (const void *ptr) const
 Get the (hashed) key of an object that is in the event store.

Protected Types

typedef StatusCode(FastJetInterfaceTool::* PROCESSOR) (const FastJetInterface::fjetlist_t &inJets, FastJetInterface::fjetlist_t &outJets)
 Processor function pointer type.
typedef StatusCode(FastJetInterfaceTool::* EXTRACTOR) (FastJetInterface::fjetlist_t &outJets)
 Extractor function pointer type.

Protected Member Functions

bool checkConfig (const std::string &key, fastjet::JetAlgorithm &fjalg)
 Check configuration keyword for jet algorithm.
bool checkConfig (const std::string &key, fastjet::Strategy &fjstr)
 Check configuration keyword for jet clustering strategy.
bool checkConfig (const std::string &key, fastjet::RecombinationScheme &fjrs)
 Check configuration keyword for recombination scheme.
bool checkConfig (const std::string &key, fastjet::SISConePlugin::SplitMergeScale &fjsms)
 Check configuration keyword for SIS Cone split merge scale.
bool checkConfig (const std::string &tag, fastjet::AreaType &fjart)
 Check configuration keyword for jet area type.
const std::string & configName (fastjet::JetAlgorithm fjalg)
 Get keyword for fastjet configuration.
const std::string & configName (fastjet::Strategy fjstr)
 Get keyword for fastjet configuration.
const std::string & configName (fastjet::RecombinationScheme fjrs)
 Get keyword for fastjet configuration.
const std::string & configName (fastjet::SISConePlugin::SplitMergeScale fjsms)
 Get keyword for fastjet configuration.
const std::string & configName (fastjet::AreaType fjart)
 Get keyword for fastjet configuration.
StatusCode f_processWithoutArea (const FastJetInterface::fjetlist_t &inJets, FastJetInterface::fjetlist_t &outJets)
 Processor implementation: cluster sequence without area calculation.
StatusCode f_processWithArea (const FastJetInterface::fjetlist_t &inJets, FastJetInterface::fjetlist_t &outJets)
 Processor implementation: cluster sequence with area calculation.
StatusCode configJetAreas ()
 Configures jet area calculation strategy.
StatusCode f_extractInclusive (FastJetInterface::fjetlist_t &outJets)
 Inclusive extractor implementation.
StatusCode f_extractExclDcut (FastJetInterface::fjetlist_t &outJets)
 Exclusive extractor implementation.
StatusCode f_extractExclNjets (FastJetInterface::fjetlist_t &outJets)
 Exclusive extractor implementation.
virtual void updateRandomSeeds ()
 Set the area rnd seed according to run/event numbers.
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Protected Attributes

std::string m_clusterSequenceType
 fastjet property: cluster sequence type
std::string m_jetAlgorithmType
 fastjet property: jet algorithm
std::string m_clusterStrategyType
 fastjet property: cluster strategy
std::string m_recombinationSchemeType
 fastjet property: recombination scheme
double m_CMS_seedThreshold
 fastjet property for CMS Cone plugin: seed threshold
double m_SIS_overlapThreshold
 fastjet property for SIS Cone plugin: overlap threshold
int m_SIS_nPass
 fastjet property for SIS Cone plugin: max number of passes
double m_SIS_protojetPtMin
 fastjet property for SIS Cone plugin: protojet min pt
bool m_SIS_doCaching
 fastjet property for SIS Cone plugin: do caching
std::string m_SIS_splitMergeScale_STRING
 fastjet property for SIS Cone plugin: split merge scale
double m_SIS_splitMergeStopScale
 fastjet property for SIS Cone plugin: split merge stop scale
double m_radius
 Jet algorithm property: radius/distance parameter.
bool m_inclusive
 Jet algorithm control property: inclusive/exclusive jet finding.
double m_exclusiveDcut
 Exclusive jet finder property: d cut.
int m_exclusiveNjets
 Exclusive jet finder property: number of jets requested.
double m_pTmin
 Inclusive jet finder property: pTmin cut.
bool m_doJetArea
 Tool property: flag controls if jet area is calculated.
std::string m_jetAreaDefinitionType
 fastjet property: jet area definition
double m_voronoiEffectiveRfact
 fastjet property: Voronoi area effective radius
double m_ghostedMaxRap
 fastjet property: ghost area rapidity limit (max)
double m_ghostedMinRap
 fastjet property: ghost area rapidity limit (min)
int m_ghostedRepeat
 fastjet property: ghost area calculation repeatitions
double m_ghostedArea
 fastjet property: size of area coverded by each ghost
double m_ghostedGridScatter
 fastjet property: scatter of ghosts on grid
double m_ghostedKtScatter
 fastjet property: scatter of kT of ghosts
double m_ghostedMeanKt
 fastjet property: average kT of ghosts
fastjet::JetAlgorithm m_jetAlgorithm
 fastjet tag: jet algorithm
fastjet::Strategy m_strategy
 fastjet tag: jet clustering strategy
fastjet::AreaType m_areaType
 fastjet tag: jet area type
fastjet::RecombinationScheme m_recombinationScheme
 fastjet tag: recombination scheme
fastjet::SISConePlugin::SplitMergeScale m_SIS_splitMergeScale
 fastjet tag: SIS split merge scale
fastjet::JetDefinition * m_jetDefinition
 Pointer to jet definition.
fastjet::ClusterSequence * m_clusterSequence
 Pointer to actual cluster sequence.
fastjet::AreaDefinition * m_areaDefinition
 Pointer to area definition.
uint64_t m_baseRNDSeed
 Base seed for random generator. Constructed from m_jetAlgorithm and m_radius.
uint64_t m_userRNDSeed
 Seed modifier for random generator : a user property (default to 0, i.e m_baseRNDSeed is unmodified)
PROCESSOR m_processor
 Pointer to processor.
EXTRACTOR m_extractor
 Pointer to extractor.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

unsigned int m_failedExecCtr
 Execution failure counter.
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Static Private Attributes

static const std::string m_invalidKeyReference = "INVALID_KEY"
 Reference for invalid fastjet tag.
static const unsigned int m_failedExecCtrMax = 10
 Execution failure counter reporting cut-off.

Detailed Description

Wrapper for fastjet verion 2.4.4.

This wrapper provides the dictionary to translate a Athena tool configuration to known fastjet configurations at initilization. It executes the requested fastjet methods and provides access to the results. The data interfaces are purely based on the fastjet data model. This tool should therefore be wrapped by a module linking the fastjet data model to the Athena event data models for jet inputs.

The present version implements a rather large subset of fastjet functionality as is available in fastjet version 2.4.4. Accessing the largely improved features of fastjet versions 3.0.0 and up require adaptations of this tool.

Remarks on process control:

If Inclusive is false , exclusive jets are returned (a) based on \( d_{cut} \) if ExclusiveDcut > 0 or (b) based on \( N_{jet} \) if ExclusiveDcut < 0.

Definition at line 107 of file FastJetInterfaceTool.h.

Member Typedef Documentation

◆ EXTRACTOR

typedef StatusCode(FastJetInterfaceTool::* FastJetInterfaceTool::EXTRACTOR) (FastJetInterface::fjetlist_t &outJets)
protected

Extractor function pointer type.

Definition at line 415 of file FastJetInterfaceTool.h.

◆ fjet_t

typedef fastjet::PseudoJet IFastJetInterfaceTool::fjet_t
inherited

Definition at line 29 of file IFastJetInterfaceTool.h.

◆ fjetlist_t

typedef std::vector<fjet_t> IFastJetInterfaceTool::fjetlist_t
inherited

Definition at line 30 of file IFastJetInterfaceTool.h.

◆ PROCESSOR

typedef StatusCode(FastJetInterfaceTool::* FastJetInterfaceTool::PROCESSOR) (const FastJetInterface::fjetlist_t &inJets, FastJetInterface::fjetlist_t &outJets)
protected

Processor function pointer type.

Definition at line 411 of file FastJetInterfaceTool.h.

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ FastJetInterfaceTool()

FastJetInterfaceTool::FastJetInterfaceTool ( const std::string & n)

Standard AlgTool constructor.

Definition at line 129 of file FastJetInterfaceTool.cxx.

130 : asg::AsgTool(n)
131 // jet clustering and jet definition --- ////////// jet clustering
132 , m_clusterSequenceType("ClusterSequence") // <--{ not used right now!
133 , m_jetAlgorithmType("anti-kt") //
134 , m_clusterStrategyType("Best") //
136 , m_CMS_seedThreshold(15.) //
137 , m_SIS_overlapThreshold(0.75) //
138 , m_SIS_nPass(0) //
139 , m_SIS_protojetPtMin(0.0) //
140 , m_SIS_doCaching(false) //
141 , m_SIS_splitMergeScale_STRING("PtTilde") //
143 , m_radius(0.4) //
144 , m_inclusive(true) //
145 , m_exclusiveDcut(0.5) //
146 , m_exclusiveNjets(3) //
147 , m_pTmin(0.) //
148 // jet areas --------------------------- ////////// jet areas
149 , m_doJetArea(false) //
150 , m_jetAreaDefinitionType("VoronoiArea") //
151 // Voronoi area specs // -- Voronoi
153 // ghosted area specs // -- ghosted -- //
154 , m_ghostedMaxRap(fastjet::gas::def_ghost_maxrap) //
156 , m_ghostedRepeat(fastjet::gas::def_repeat) //
157 , m_ghostedArea(fastjet::gas::def_ghost_area) //
158 , m_ghostedGridScatter(fastjet::gas::def_grid_scatter) //
159 , m_ghostedKtScatter(fastjet::gas::def_pt_scatter) //
160 , m_ghostedMeanKt(fastjet::gas::def_mean_ghost_pt) //
161 // process control ----------------------///////////////////
162 , m_failedExecCtr(0)
163 // presets ////////// private data presets
164 , m_jetDefinition((fastjet::JetDefinition*)nullptr)
165 , m_clusterSequence((fastjet::ClusterSequence*)nullptr)
166 , m_areaDefinition((fastjet::AreaDefinition*)nullptr)
167 , m_baseRNDSeed (0)
168 , m_userRNDSeed (0)
169{
170 //declareInterface<IFastJetInterfaceTool>(this);
171 // setup choices
172 // declareProperty("ClusterSequence",m_clusterSequenceType);
174 // parameters for kt-style jets
177 // parameters for CMS cone jets
178 declareProperty("CMS_SeedThreshold",m_CMS_seedThreshold);
179 // parameters for SIS cone jets
180 declareProperty("SIS_OverlapThreshold",m_SIS_overlapThreshold);
181 declareProperty("SIS_NumPassMax",m_SIS_nPass);
182 declareProperty("SIS_ProtojetPtMin",m_SIS_protojetPtMin);
183 declareProperty("SIS_DoCaching",m_SIS_doCaching);
184 declareProperty("SIS_SplitMergeScale",m_SIS_splitMergeScale_STRING);
185 declareProperty("SIS_SplitMergeStopScale",m_SIS_splitMergeStopScale);
186 // parameters for jet finders/jet definition
187 declareProperty("Radius",m_radius);
188 declareProperty("Inclusive",m_inclusive);
189 declareProperty("InclusivePtMin",m_pTmin);
190 declareProperty("ExclusiveDcut",m_exclusiveDcut);
191 declareProperty("ExclusiveNjets",m_exclusiveNjets);
192 // parameters for areas
193 declareProperty("CalculateJetArea",m_doJetArea);
195 declareProperty("VoronoiEffectiveRfact",m_voronoiEffectiveRfact);
196 declareProperty("GhostMaxRapidity",m_ghostedMaxRap);
197 declareProperty("GhostMinRapidity",m_ghostedMinRap);
198 declareProperty("GhostRepeats",m_ghostedRepeat);
199 declareProperty("GhostAreaSize",m_ghostedArea);
200 declareProperty("GhostGridScatter",m_ghostedGridScatter);
201 declareProperty("GhostKtScatter",m_ghostedKtScatter);
202 declareProperty("GhostMeanKt",m_ghostedMeanKt);
203
204 declareProperty("UserRNDSeed", m_userRNDSeed = 0, "Added to the base RND seed for active areas. USE WITH CARE !");
205
206 // default processor
209 // other presets (will be set/overwritten in initialize)
210 m_jetAlgorithm = fastjet::antikt_algorithm;
211 m_strategy = fastjet::Best;
212 m_areaType = fastjet::voronoi_area;
213 m_recombinationScheme = fastjet::E_scheme;
214#ifndef XAOD_STANDALONE
215 m_SIS_splitMergeScale = fastjet::SISConePlugin::SM_pttilde;
216#endif
217
218}
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
double m_exclusiveDcut
Exclusive jet finder property: d cut.
std::string m_clusterSequenceType
fastjet property: cluster sequence type
std::string m_clusterStrategyType
fastjet property: cluster strategy
fastjet::RecombinationScheme m_recombinationScheme
fastjet tag: recombination scheme
unsigned int m_failedExecCtr
Execution failure counter.
EXTRACTOR m_extractor
Pointer to extractor.
double m_ghostedMeanKt
fastjet property: average kT of ghosts
uint64_t m_baseRNDSeed
Base seed for random generator. Constructed from m_jetAlgorithm and m_radius.
int m_exclusiveNjets
Exclusive jet finder property: number of jets requested.
std::string m_jetAreaDefinitionType
fastjet property: jet area definition
double m_SIS_protojetPtMin
fastjet property for SIS Cone plugin: protojet min pt
fastjet::AreaDefinition * m_areaDefinition
Pointer to area definition.
double m_ghostedKtScatter
fastjet property: scatter of kT of ghosts
bool m_SIS_doCaching
fastjet property for SIS Cone plugin: do caching
int m_SIS_nPass
fastjet property for SIS Cone plugin: max number of passes
fastjet::Strategy m_strategy
fastjet tag: jet clustering strategy
fastjet::AreaType m_areaType
fastjet tag: jet area type
PROCESSOR m_processor
Pointer to processor.
double m_CMS_seedThreshold
fastjet property for CMS Cone plugin: seed threshold
fastjet::JetDefinition * m_jetDefinition
Pointer to jet definition.
std::string m_jetAlgorithmType
fastjet property: jet algorithm
bool m_doJetArea
Tool property: flag controls if jet area is calculated.
bool m_inclusive
Jet algorithm control property: inclusive/exclusive jet finding.
StatusCode f_extractInclusive(FastJetInterface::fjetlist_t &outJets)
Inclusive extractor implementation.
double m_ghostedMinRap
fastjet property: ghost area rapidity limit (min)
double m_ghostedArea
fastjet property: size of area coverded by each ghost
fastjet::ClusterSequence * m_clusterSequence
Pointer to actual cluster sequence.
StatusCode f_processWithoutArea(const FastJetInterface::fjetlist_t &inJets, FastJetInterface::fjetlist_t &outJets)
Processor implementation: cluster sequence without area calculation.
double m_SIS_splitMergeStopScale
fastjet property for SIS Cone plugin: split merge stop scale
int m_ghostedRepeat
fastjet property: ghost area calculation repeatitions
std::string m_SIS_splitMergeScale_STRING
fastjet property for SIS Cone plugin: split merge scale
fastjet::JetAlgorithm m_jetAlgorithm
fastjet tag: jet algorithm
double m_pTmin
Inclusive jet finder property: pTmin cut.
fastjet::SISConePlugin::SplitMergeScale m_SIS_splitMergeScale
fastjet tag: SIS split merge scale
std::string m_recombinationSchemeType
fastjet property: recombination scheme
double m_ghostedGridScatter
fastjet property: scatter of ghosts on grid
double m_radius
Jet algorithm property: radius/distance parameter.
uint64_t m_userRNDSeed
Seed modifier for random generator : a user property (default to 0, i.e m_baseRNDSeed is unmodified)
double m_ghostedMaxRap
fastjet property: ghost area rapidity limit (max)
double m_SIS_overlapThreshold
fastjet property for SIS Cone plugin: overlap threshold
double m_voronoiEffectiveRfact
fastjet property: Voronoi area effective radius

◆ ~FastJetInterfaceTool()

FastJetInterfaceTool::~FastJetInterfaceTool ( )
virtual

Base class destructor.

Definition at line 220 of file FastJetInterfaceTool.cxx.

221{
225
226}

Member Function Documentation

◆ checkConfig() [1/5]

bool FastJetInterfaceTool::checkConfig ( const std::string & key,
fastjet::JetAlgorithm & fjalg )
protected

Check configuration keyword for jet algorithm.

Returns
true if keyword is valid, else false
Parameters
[in]keyclient provided keyword
[out]fjalgfastjet tag

Definition at line 458 of file FastJetInterfaceTool.cxx.

460{
461 const algomap_t& map = this->getKnownAlgorithms();
462 return chkConfig(key,fjalg,map);
463}
const FastJetInterface::algomap_t & getKnownAlgorithms()
Get known jet algorithms.
static bool chkConfig(const std::string &key, D &tag, const M &map)
General configuration check.
std::map< std::string, fastjet::JetAlgorithm > algomap_t
Mapping keyword on fastjet jet algorithm tag.

◆ checkConfig() [2/5]

bool FastJetInterfaceTool::checkConfig ( const std::string & key,
fastjet::RecombinationScheme & fjrs )
protected

Check configuration keyword for recombination scheme.

Returns
true if keyword is valid, else false
Parameters
[in]keyclient provided keyword
[out]fjrsfastjet tag

Definition at line 472 of file FastJetInterfaceTool.cxx.

474{
475 const schememap_t& map = this->getKnownRecombinationSchemes();
476 return chkConfig(key,fjrs,map);
477}
const FastJetInterface::schememap_t & getKnownRecombinationSchemes()
Get known recombination schemes.
std::map< std::string, fastjet::RecombinationScheme > schememap_t
Mapping keyword on fastjet recombination scheme tag.

◆ checkConfig() [3/5]

bool FastJetInterfaceTool::checkConfig ( const std::string & key,
fastjet::SISConePlugin::SplitMergeScale & fjsms )
protected

Check configuration keyword for SIS Cone split merge scale.

Returns
true if keyword is valid, else false
Parameters
[in]keyclient provided keyword
[out]fjsmsfastjet tag

Definition at line 480 of file FastJetInterfaceTool.cxx.

482{
484 return chkConfig(key,fjsms,map);
485}
const FastJetInterface::splitMergeScaleMap_t & getKnownSplitMergeScales()
Get known split merge scales.
std::map< std::string, fastjet::SISConePlugin::SplitMergeScale > splitMergeScaleMap_t
Mapping keyword on fastjet SIS Cone split merge scale tag.

◆ checkConfig() [4/5]

bool FastJetInterfaceTool::checkConfig ( const std::string & key,
fastjet::Strategy & fjstr )
protected

Check configuration keyword for jet clustering strategy.

Returns
true if keyword is valid, else false
Parameters
[in]keyclient provided keyword
[out]fjstrfastjet tag

Definition at line 465 of file FastJetInterfaceTool.cxx.

467{
468 const strategymap_t& map = this->getKnownStrategies();
469 return chkConfig(key,fjstr,map);
470}
const FastJetInterface::strategymap_t & getKnownStrategies()
Get known jet finding strategies.
std::map< std::string, fastjet::Strategy > strategymap_t
Mapping keyword on fastjet clustering strategy tag.

◆ checkConfig() [5/5]

bool FastJetInterfaceTool::checkConfig ( const std::string & tag,
fastjet::AreaType & fjart )
protected

Check configuration keyword for jet area type.

Returns
true if keyword is valid, else false
Parameters
[in]keyclient provided keyword
[out]fjartfastjet tag

Definition at line 488 of file FastJetInterfaceTool.cxx.

490{
491 const areamap_t& map = this->getKnownAreas();
492 return chkConfig(key,fjart,map);
493}
const FastJetInterface::areamap_t & getKnownAreas()
Get known area types.
std::map< std::string, fastjet::AreaType > areamap_t
Mapping keyword on fastjet area type tag.

◆ clusterSequence() [1/2]

fastjet::ClusterSequence * FastJetInterfaceTool::clusterSequence ( )
virtual

Access fastjet ClusterSequence.

Returns
Pointer to actual ClusterSequence object. Note that this object will only be updated after invoking the FastJetInterfaceTool::execute(...) method.

The object pointed to can be modified by client.

Implements IFastJetInterfaceTool.

Definition at line 576 of file FastJetInterfaceTool.cxx.

577{ return m_clusterSequence; }

◆ clusterSequence() [2/2]

const fastjet::ClusterSequence * FastJetInterfaceTool::clusterSequence ( ) const
virtual

Access fastjet ClusterSequence.

Returns
Const pointer to actual ClusterSequence object. Note that this object will only be updated after invoking the FastJetInterfaceTool::execute(...) method.

The object pointed to cannot be modified by client.

Implements IFastJetInterfaceTool.

Definition at line 579 of file FastJetInterfaceTool.cxx.

580{ return m_clusterSequence; }

◆ configJetAreas()

StatusCode FastJetInterfaceTool::configJetAreas ( )
protected

Configures jet area calculation strategy.

Returns
StatusCode::SUCCESS if area algorithm configured alright, else StatusCode::FAILURE (most likely indicates invalid area algorithm specs in the properties of the tool).

Definition at line 591 of file FastJetInterfaceTool.cxx.

592{
593 // check area type
594 const areamap_t& map = getKnownAreas();
595 const auto pPair = map.find("default");
596 if (pPair == map.end()){
597 return StatusCode::FAILURE;
598 }
599 m_areaType = pPair->second;
601 { return StatusCode::FAILURE; }
602 // area definition according to type
603 switch ( m_areaType )
604 {
605 // Voronoi
606 case fastjet::voronoi_area:
608 new
609 fastjet::AreaDefinition(fastjet::VoronoiAreaSpec(m_voronoiEffectiveRfact));
610 break;
611 // Ghosted
612 case fastjet::active_area:
613 case fastjet::active_area_explicit_ghosts:
614 case fastjet::one_ghost_passive_area:
615 case fastjet::passive_area:
616 {
617 fastjet::GhostedAreaSpec Garea_spec(m_ghostedMinRap,
624
625 // create a seed from the jet alg and the seed
626 m_baseRNDSeed = CxxUtils::crc64 ("FastJet");
630 // seed will be modified and reset in the Garea_spec for each event (see updateRandomSeeds() ).
631
632 ATH_MSG_DEBUG(" Base seed = "<< m_baseRNDSeed<< " user seed ="<< m_userRNDSeed );
633
634 m_areaDefinition = new fastjet::AreaDefinition(Garea_spec,
635 m_areaType);
636 break;
637 }
638 // others
639 default:
640 m_areaDefinition = new fastjet::AreaDefinition(m_areaType);
641 break;
642 } // switch through area options
643
644 // configure processor
645 return StatusCode::SUCCESS;
646}
#define ATH_MSG_DEBUG(x)
bool checkConfig(const std::string &key, fastjet::JetAlgorithm &fjalg)
Check configuration keyword for jet algorithm.
uint64_t crc64(const CRCTable &table, const char *data, size_t data_len)
Find the CRC-64 of a string,.
Definition crc64.cxx:696
uint64_t crc64addint(uint64_t crc, uint64_t x)
Extend a previously-calculated CRC to include an int.
Definition crc64.cxx:732

◆ configName() [1/5]

const std::string & FastJetInterfaceTool::configName ( fastjet::AreaType fjart)
protected

Get keyword for fastjet configuration.

Returns
Keyword if fastjet tag is known, else reference to "unknown"
Parameters
[in]fjrsfastjet area type tag

Definition at line 522 of file FastJetInterfaceTool.cxx.

523{
524 const areamap_t& map = this->getKnownAreas();
525 return cfgName(fjart,map,m_invalidKeyReference);
526}
static const std::string m_invalidKeyReference
Reference for invalid fastjet tag.
const std::string & cfgName(D tag, const M &map, const std::string &invalidKey)
General configuration keyword finder.

◆ configName() [2/5]

const std::string & FastJetInterfaceTool::configName ( fastjet::JetAlgorithm fjalg)
protected

Get keyword for fastjet configuration.

Returns
Keyword if fastjet tag is known, else reference to "unknown"
Parameters
[in]fjalgfastjet jet algorithm tag

Definition at line 495 of file FastJetInterfaceTool.cxx.

496{
497 const algomap_t& map = this->getKnownAlgorithms();
498 return cfgName(fjalg,map,m_invalidKeyReference);
499}

◆ configName() [3/5]

const std::string & FastJetInterfaceTool::configName ( fastjet::RecombinationScheme fjrs)
protected

Get keyword for fastjet configuration.

Returns
Keyword if fastjet tag is known, else reference to "unknown"
Parameters
[in]fjrsfastjet recombination scheme tag

Definition at line 508 of file FastJetInterfaceTool.cxx.

509{
510 const schememap_t& map = this->getKnownRecombinationSchemes();
511 return cfgName(fjrs,map,m_invalidKeyReference);
512}

◆ configName() [4/5]

const std::string & FastJetInterfaceTool::configName ( fastjet::SISConePlugin::SplitMergeScale fjsms)
protected

Get keyword for fastjet configuration.

Returns
Keyword if fastjet tag is known, else reference to "unknown"
Parameters
[in]fjsmsfastjet SIS Cone split merge scale tag

Definition at line 516 of file FastJetInterfaceTool.cxx.

517{
519 return cfgName(fjsms,map,m_invalidKeyReference);
520}

◆ configName() [5/5]

const std::string & FastJetInterfaceTool::configName ( fastjet::Strategy fjstr)
protected

Get keyword for fastjet configuration.

Returns
Keyword if fastjet tag is known, else reference to "unknown"
Parameters
[in]fjstrfastjet jet clustering strategy tag

Definition at line 501 of file FastJetInterfaceTool.cxx.

502{
503 const strategymap_t& map = this->getKnownStrategies();
504 return cfgName(fjstr,map,m_invalidKeyReference);
505}

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode FastJetInterfaceTool::execute ( const fjetlist_t & inJets,
fjetlist_t & outJets )
virtual

Execute method.

Executes the requested fastjet configuration.

Parameters
[in]inJetsreference to non-modifiable list of input objects
[out]outJetsreference to modifiable list of output jets
Returns
StatusCode::SUCCESS independent of successful execution

Implements IFastJetInterfaceTool.

Definition at line 419 of file FastJetInterfaceTool.cxx.

421{
422 // clean up
423 ATH_MSG_DEBUG( " FastJetInterfaceTool::execute injet size = "<< inJets.size() );
424
425 if ( m_clusterSequence != nullptr )
426 {
427 delete m_clusterSequence;
428 m_clusterSequence = (fastjet::ClusterSequence*)nullptr;
429 }
430
431 if ( ((this->*m_processor)(inJets,outJets)).isFailure() )
432 {
435 {
436 msg(MSG::WARNING) << "Cannot allocate new fastjet::ClusterSequence,"
437 << " no jets found (message "
438 << m_failedExecCtr << " of "
439 << m_failedExecCtrMax << ")" << endmsg;
440 }
442 {
443 msg(MSG::WARNING) << "Cannot allocate new fastjet::ClusterSequence,"
444 << " no jets found (message "
445 << m_failedExecCtr << " of "
446 << m_failedExecCtrMax << ") [last message]"
447 << endmsg;
448 }
449 outJets.clear();
450 }
451 return StatusCode::SUCCESS;
452}
#define endmsg
static const unsigned int m_failedExecCtrMax
Execution failure counter reporting cut-off.
MsgStream & msg
Definition testRead.cxx:32

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ f_extractExclDcut()

StatusCode FastJetInterfaceTool::f_extractExclDcut ( FastJetInterface::fjetlist_t & outJets)
protected

Exclusive extractor implementation.

Extracts exclusive jet sample defined by \( d_{cut} \) .

Parameters
[out]outJetsreference to modifiable PseudoJet collection containing exclusive jet sample
Returns
StatusCode::SUCCESS if everything is ok.

Definition at line 569 of file FastJetInterfaceTool.cxx.

570{
571 outJets = m_clusterSequence->exclusive_jets(m_exclusiveDcut);
572 ATH_MSG_DEBUG( " extract exclusiveDcut outjets N= "<< outJets.size() );
573 return ! outJets.empty() ? StatusCode::SUCCESS : StatusCode::FAILURE;
574}

◆ f_extractExclNjets()

StatusCode FastJetInterfaceTool::f_extractExclNjets ( FastJetInterface::fjetlist_t & outJets)
protected

Exclusive extractor implementation.

Extracts exclusive jet sample defined by \( N_{jets} \) .

Parameters
[out]outJetsreference to modifiable PseudoJet collection containing exclusive jet sample
Returns
StatusCode::SUCCESS if everything is ok.

Definition at line 561 of file FastJetInterfaceTool.cxx.

562{
563 outJets = m_clusterSequence->exclusive_jets(m_exclusiveNjets);
564 ATH_MSG_DEBUG( " extract exclusiveNjets outjets N= "<< outJets.size() );
565
566 return !outJets.empty() ? StatusCode::SUCCESS : StatusCode::FAILURE;
567}

◆ f_extractInclusive()

StatusCode FastJetInterfaceTool::f_extractInclusive ( FastJetInterface::fjetlist_t & outJets)
protected

Inclusive extractor implementation.

Extracts inclusive jets above a given \( p_T \) cut, as defined in the InclusivePtMin property.

Parameters
[out]outJetsreference to modifiable PseudoJet collection containing inclusive jet sample
Returns
StatusCode::SUCCESS if everything is ok.

Definition at line 554 of file FastJetInterfaceTool.cxx.

555{
556 outJets = m_clusterSequence->inclusive_jets(m_pTmin);
557 ATH_MSG_DEBUG( " extract inclusive outjets N= "<< outJets.size() );
558 return !outJets.empty() ? StatusCode::SUCCESS : StatusCode::FAILURE;
559}

◆ f_processWithArea()

StatusCode FastJetInterfaceTool::f_processWithArea ( const FastJetInterface::fjetlist_t & inJets,
FastJetInterface::fjetlist_t & outJets )
protected

Processor implementation: cluster sequence with area calculation.

Sets up and executes a fastjet::ClusterSequence with finds jets with a client configured area calculation.

Returns
StatusCode::SUCCESS if execution ok, StatusCode::FAILURE if e.g. pointer to fastjet::ClusterSequence invalid, or returned jet list is empty.
Parameters
[in]inJetsreference to non-modifiable list of fastjet::PseudoJet objects
[out]outJetsreference to modifiable list of fastjet::PseudoJet objects to store output

Definition at line 542 of file FastJetInterfaceTool.cxx.

544{
545
546 updateRandomSeeds(); // make sure rnd seeds depend on event & run numbers
547 m_clusterSequence = (fastjet::ClusterSequence*)
548 new fastjet::ClusterSequenceArea(inJets,*m_jetDefinition,*m_areaDefinition);
549
550 return m_clusterSequence != nullptr
551 ? (this->*m_extractor)(outJets) : StatusCode::FAILURE;
552}
virtual void updateRandomSeeds()
Set the area rnd seed according to run/event numbers.

◆ f_processWithoutArea()

StatusCode FastJetInterfaceTool::f_processWithoutArea ( const FastJetInterface::fjetlist_t & inJets,
FastJetInterface::fjetlist_t & outJets )
protected

Processor implementation: cluster sequence without area calculation.

Sets up and executes a fastjet::ClusterSequence with finds jets without area calculation.

Returns
StatusCode::SUCCESS if execution ok, StatusCode::FAILURE if e.g. pointer to fastjet::ClusterSequence invalid, or returned jet list is empty.
Parameters
[in]inJetsreference to non-modifiable list of fastjet::PseudoJet objects
[out]outJetsreference to modifiable list of fastjet::PseudoJet objects to store output

Definition at line 532 of file FastJetInterfaceTool.cxx.

534{
535 ATH_MSG_DEBUG( " processing without area " );
536 m_clusterSequence = new fastjet::ClusterSequence(inJets,*m_jetDefinition);
537 ATH_MSG_DEBUG( " processed without area " );
538 return m_clusterSequence != nullptr
539 ? (this->*m_extractor)(outJets) : StatusCode::FAILURE;
540}

◆ getAreaDefinition()

const fastjet::AreaDefinition * FastJetInterfaceTool::getAreaDefinition ( ) const
virtual

Access fastjet AreaDefinition.

Returns
Const pointer to actual AreaDefinition object.

The object pointed to cannot be modified by client.

Implements IFastJetInterfaceTool.

Definition at line 585 of file FastJetInterfaceTool.cxx.

586{ return m_areaDefinition; }

◆ getAreaDefinitionType()

const std::string FastJetInterfaceTool::getAreaDefinitionType ( ) const
virtual

Access fastjet area definition type.

Returns
Const string of actual area definition type.

The string returned cannot be modified by client.

Implements IFastJetInterfaceTool.

Definition at line 588 of file FastJetInterfaceTool.cxx.

589{ return m_jetAreaDefinitionType; }

◆ getJetDefinition()

const fastjet::JetDefinition * FastJetInterfaceTool::getJetDefinition ( ) const
virtual

Access fastjet JetDefinition.

Returns
Const pointer to actual JetDefinition object.

The object pointed to cannot be modified by client.

Implements IFastJetInterfaceTool.

Definition at line 582 of file FastJetInterfaceTool.cxx.

583{ return m_jetDefinition; }

◆ getKey()

SG::sgkey_t asg::AsgTool::getKey ( const void * ptr) const
inherited

Get the (hashed) key of an object that is in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::TEvent both provide ways for getting the SG::sgkey_t key for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getName
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The hashed key of the object in the store. If not found, an invalid (zero) key.

Definition at line 119 of file AsgTool.cxx.

119 {
120
121#ifdef XAOD_STANDALONE
122 // In case we use @c xAOD::TEvent, we have a direct function call
123 // for this.
124 return evtStore()->event()->getKey( ptr );
125#else
126 const SG::DataProxy* proxy = evtStore()->proxy( ptr );
127 return ( proxy == nullptr ? 0 : proxy->sgkey() );
128#endif // XAOD_STANDALONE
129 }
ServiceHandle< StoreGateSvc > & evtStore()

◆ getKnownAlgorithms()

const algomap_t & FastJetInterfaceTool::getKnownAlgorithms ( )

Get known jet algorithms.

Map of jet algorithm keywords and fastjet tags

Definition at line 27 of file FastJetInterfaceTool.cxx.

28{
30 static const FastJetInterface::algomap_t knownAlgorithms = {
31 // kt-style algorithms
32 {"default", fastjet::antikt_algorithm},
33 {"kt", fastjet::kt_algorithm},
34 {"anti-kt", fastjet::antikt_algorithm},
35 {"cambridge", fastjet::cambridge_algorithm},
36 {"genkt", fastjet::genkt_algorithm},
37 {"passive cambridge", fastjet::cambridge_for_passive_algorithm},
38 {"passive genkt", fastjet::genkt_for_passive_algorithm},
39 // add also ATLAS kt-style
40 {"Kt", fastjet::kt_algorithm},
41 {"AntiKt", fastjet::antikt_algorithm},
42 {"CamKt", fastjet::cambridge_algorithm},
43 // Plugin algorithms
44 {"CMSCone", fastjet::plugin_algorithm},
45 {"SISCone", fastjet::plugin_algorithm},
46 };
47 return knownAlgorithms;
48}

◆ getKnownAreas()

const areamap_t & FastJetInterfaceTool::getKnownAreas ( )

Get known area types.

Map of jet area keywords and fastjet tags

Definition at line 110 of file FastJetInterfaceTool.cxx.

111{
113 static const FastJetInterface::areamap_t knownAreas = {
114 {"default", fastjet::voronoi_area},
115 {"ActiveArea", fastjet::active_area},
116 {"ActiveAreaExplicitGhost", fastjet::active_area_explicit_ghosts},
117 {"PassiveArea", fastjet::passive_area},
118 {"1GhostPassiveArea", fastjet::one_ghost_passive_area},
119 {"VoronoiArea", fastjet::voronoi_area},
120 };
121 return knownAreas;
122}

◆ getKnownRecombinationSchemes()

const schememap_t & FastJetInterfaceTool::getKnownRecombinationSchemes ( )

Get known recombination schemes.

Map of recombination scheme keywords and fastjet tags

Definition at line 74 of file FastJetInterfaceTool.cxx.

75{
77 static const FastJetInterface::schememap_t knownRecombinationSchemes = {
78 {"default", fastjet::E_scheme},
79 {"E", fastjet::E_scheme},
80 {"pt", fastjet::pt_scheme},
81 {"pt2", fastjet::pt2_scheme},
82 {"Et", fastjet::Et_scheme},
83 {"Et2", fastjet::Et2_scheme},
84 {"BIpt", fastjet::BIpt_scheme},
85 {"BIpt2", fastjet::BIpt2_scheme},
86 };
87 return knownRecombinationSchemes;
88}

◆ getKnownSplitMergeScales()

const splitMergeScaleMap_t & FastJetInterfaceTool::getKnownSplitMergeScales ( )

Get known split merge scales.

Map of split merge scale keywords and fastjet tags

Definition at line 91 of file FastJetInterfaceTool.cxx.

92{
93#ifndef XAOD_STANDALONE
95 static const FastJetInterface::splitMergeScaleMap_t knownSplitMergeScales = {
96 {"default", fastjet::SISConePlugin::SM_pttilde},
97 {"pttilde", fastjet::SISConePlugin::SM_pttilde},
98 {"PtTilde", fastjet::SISConePlugin::SM_pttilde},
99 {"Pt", fastjet::SISConePlugin::SM_pt},
100 {"Et", fastjet::SISConePlugin::SM_Et},
101 {"mt", fastjet::SISConePlugin::SM_mt},
102 };
103#else
104 static const FastJetInterface::splitMergeScaleMap_t knownSplitMergeScales;
105#endif
106 return knownSplitMergeScales;
107}

◆ getKnownStrategies()

const strategymap_t & FastJetInterfaceTool::getKnownStrategies ( )

Get known jet finding strategies.

Map of jet clustering strategy keywords and fastjet tags

Definition at line 51 of file FastJetInterfaceTool.cxx.

52{
54 static const FastJetInterface::strategymap_t knownStrategies = {
55 {"default", fastjet::Best},
56 {"Best", fastjet::Best},
57 {"N2MinHeapTiled", fastjet::N2MinHeapTiled},
58 {"N2Tiled", fastjet::N2Tiled},
59 {"N2PoorTiled", fastjet::N2PoorTiled},
60 {"N2Plain", fastjet::N2Plain},
61 {"N3Dumb", fastjet::N3Dumb},
62 {"NlnN", fastjet::NlnN},
63 {"NlnN3pi", fastjet::NlnN3pi},
64 {"NlnN4pi", fastjet::NlnN4pi},
65 {"NlnNCam4pi", fastjet::NlnNCam4pi},
66 {"NlnNCam2pi2R", fastjet::NlnNCam2pi2R},
67 {"NlnNCam", fastjet::NlnNCam},
68 {"plugin_strategy", fastjet::plugin_strategy},
69 };
70 return knownStrategies;
71}

◆ getName()

const std::string & asg::AsgTool::getName ( const void * ptr) const
inherited

Get the name of an object that is / should be in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::TEvent both provide ways for getting the std::string name for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getKey
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The string name of the object in the store. If not found, an empty string.

Definition at line 106 of file AsgTool.cxx.

106 {
107
108#ifdef XAOD_STANDALONE
109 // In case we use @c xAOD::TEvent, we have a direct function call
110 // for this.
111 return evtStore()->event()->getName( ptr );
112#else
113 const SG::DataProxy* proxy = evtStore()->proxy( ptr );
114 static const std::string dummy = "";
115 return ( proxy == nullptr ? dummy : proxy->name() );
116#endif // XAOD_STANDALONE
117 }

◆ getProperty()

template<class T>
const T * asg::AsgTool::getProperty ( const std::string & name) const
inherited

Get one of the tool's properties.

◆ initialize()

StatusCode FastJetInterfaceTool::initialize ( void )
virtual

Initialize tool.

Checks properties and configure fastjet

Reimplemented from asg::AsgTool.

Definition at line 232 of file FastJetInterfaceTool.cxx.

233{
234 ATH_MSG_DEBUG( " initialize " );
235
236 // check requested jet algorithm
237 ATH_MSG_INFO("Algorithm type \042" << m_jetAlgorithmType << "\042");
239 {
240 msg(MSG::ERROR) << "FastJet configuration error: "
241 << "Unknown jet algorithm \042"
242 << m_jetAlgorithmType << "\042 requested"
243 << endmsg;
244 return StatusCode::FAILURE;
245 }
246 // check requested recombination scheme
247 ATH_MSG_INFO("Recombination type \042" << m_recombinationSchemeType << "\042");
249 {
250 msg(MSG::ERROR) << "FastJet configuration error: "
251 << "Unknown recombination scheme \042"
252 << m_recombinationScheme << "\042 requested"
253 << endmsg;
254 return StatusCode::FAILURE;
255 }
256 // check requested strategy
257 ATH_MSG_INFO("Cluster strategy type \042" << m_clusterStrategyType << "\042");
259 {
260 msg(MSG::ERROR) << "FastJet configuration error: "
261 << "Unknown clustering strategy \042"
262 << m_clusterStrategyType << "\042 requested" << endmsg;
263 return StatusCode::FAILURE;
264 }
265
266 // determine the type of jet algorithm we have (kt-style vs plugins)
267 enum jetAlgTypeEnum { unknown_type, Kt_type, CMS_type, SIS_type } jetAlgType = Kt_type;
268 if (m_jetAlgorithm == fastjet::plugin_algorithm)
269 {
270 if (!m_jetAlgorithmType.compare("CMSCone"))
271 jetAlgType = CMS_type;
272 else if(!m_jetAlgorithmType.compare("SISCone"))
273 jetAlgType = SIS_type;
274 else
275 jetAlgType = unknown_type;
276 }
277 if (jetAlgType == unknown_type)
278 {
279 msg(MSG::ERROR) << "FastJet configuration error: "
280 << "Unknown jet algorithm plugin \042"
281 << m_jetAlgorithmType << "\042 requested" << endmsg;
282 return StatusCode::FAILURE;
283 }
284
285#ifndef XAOD_STANDALONE
286
287 // define jets depending on the jet type
288 if (jetAlgType == CMS_type)
289 m_jetDefinition = new fastjet::JetDefinition(new fastjet::CMSIterativeConePlugin(m_radius,m_CMS_seedThreshold));
290 else if (jetAlgType == SIS_type)
291 m_jetDefinition = new fastjet::JetDefinition(new fastjet::SISConePlugin(m_radius,
298 ));
299 else
300 m_jetDefinition = new fastjet::JetDefinition(m_jetAlgorithm,
301 m_radius,
303 m_strategy);
304#else
305 // no athena error on SIS or CMS
306 if ( (jetAlgType == CMS_type) || (jetAlgType == SIS_type)){
307 ATH_MSG_ERROR("CMS and SIScone plugin not supporeted outside athena yet");
308 return StatusCode::FAILURE;
309 }else
310 m_jetDefinition = new fastjet::JetDefinition(m_jetAlgorithm,
311 m_radius,
313 m_strategy);
314#endif
315
316
317 // without area calculation
318 if ( !m_doJetArea )
319 {
321 }
322 // with area calculation
323 else
324 {
325 ATH_MSG_INFO("Jet area type \042" << m_jetAreaDefinitionType << "\042");
326 if ( this->configJetAreas().isFailure() )
327 {
328 msg(MSG::ERROR) << "FastJet configuration error: "
329 << "Clustering with areas requested but area type"
330 << "\042" << m_jetAreaDefinitionType
331 << "\042 is not known" << endmsg;
332 return StatusCode::FAILURE;
333 }
335 }
336
337 // configure inclusive/exclusive jet extractor
338 if ( m_inclusive )
339 {
341 } // inclusive jet finder
342 else
343 {
344 // Priority:
345 //
346 // if !inclusive:
347 // m_exclusiveDcut > 0 -> yes
348 // m_exclusiveDcut <= 0 -> m_exclusiveNjets >= 0 -> yes
349 // m_exclusiveNjets < 0 -> error
350 if ( m_exclusiveDcut > 0. )
351 {
353 }
354 else
355 {
356 if ( m_exclusiveNjets >= 0 )
357 {
359 }
360 else
361 {
362 msg(MSG::ERROR) << "Invalid configuration for exclusive "
363 << "jet finder, one of ExclusiveDcut("
365 << ") or ExclusiveNjets("
367 << ") properties should be >= 0."
368 << endmsg;
369 return StatusCode::FAILURE;
370 } // invalid configuration of exclusive jet finder
371 } // exclusive jet finder using Njet cut
372 } // exclusive jet finder using Dcut
373
374 // print configuration
375 msg(MSG::INFO) << "JetAlgorithm ................ \042"
376 << m_jetAlgorithmType << "\042" << endmsg;
377 msg(MSG::INFO) << "Radius ...................... " << m_radius << endmsg;
378 if (jetAlgType == Kt_type)
379 {
380 msg(MSG::INFO) << "Recombination scheme ........ \042"
381 << m_recombinationSchemeType << "\042" << endmsg;
382 msg(MSG::INFO) << "Strategy .................... \042"
383 << m_clusterStrategyType << "\042" << endmsg;
384 }
385 else if (jetAlgType == CMS_type)
386 msg(MSG::INFO) << "CMS seed threshold .......... "
388 else if (jetAlgType == SIS_type)
389 {
390 msg(MSG::INFO) << "SIS overlap threshold ....... "
392 msg(MSG::INFO) << "SIS max num pass ............ "
393 << m_SIS_nPass << endmsg;
394 msg(MSG::INFO) << "SIS protojet Pt min ......... "
396 msg(MSG::INFO) << "SIS do caching .............. "
397 << (m_SIS_doCaching ? std::string("yes") : std::string("no")) << endmsg;
398 msg(MSG::INFO) << "SIS split/merge scale ....... \042"
399 << m_SIS_splitMergeScale_STRING << "\042" << endmsg;
400 msg(MSG::INFO) << "SIS split/merge stop scale .. "
402 }
403 if ( m_doJetArea )
404 {
405 msg(MSG::INFO) << "Calculate jet areas ......... yes" << endmsg;
406 msg(MSG::INFO) << "Area type ................... \042"
407 << m_jetAreaDefinitionType << "\042" << endmsg;
408 }
409
410
411
412 return StatusCode::SUCCESS;
413}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_INFO(x)
StatusCode configJetAreas()
Configures jet area calculation strategy.
StatusCode f_extractExclNjets(FastJetInterface::fjetlist_t &outJets)
Exclusive extractor implementation.
StatusCode f_processWithArea(const FastJetInterface::fjetlist_t &inJets, FastJetInterface::fjetlist_t &outJets)
Processor implementation: cluster sequence with area calculation.
StatusCode f_extractExclDcut(FastJetInterface::fjetlist_t &outJets)
Exclusive extractor implementation.

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ msg()

MsgStream & AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msg_level_name()

const std::string & asg::AsgTool::msg_level_name ( ) const
inherited

A deprecated function for getting the message level's name.

Instead of using this, weirdly named function, user code should get the string name of the current minimum message level (in case they really need it...), with:

MSG::name( msg().level() )

This function's name doesn't follow the ATLAS coding rules, and as such will be removed in the not too distant future.

Returns
The string name of the current minimum message level that's printed

Definition at line 101 of file AsgTool.cxx.

101 {
102
103 return MSG::name( msg().level() );
104 }
MsgStream & msg() const
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
Definition MsgLevel.cxx:19

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ print()

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ specificClusterSequence() [1/2]

template<class S>
S * FastJetInterfaceTool::specificClusterSequence ( )
inline

Access to specific cluster sequence.

The template parameter S is expect to be set to an object type derived from the basic fastjet ClusterSequence

Returns
Pointer to actual S object. Note that this object will only be updated after invoking the FastJetInterfaceTool::execute(...) method.

The object pointed to can be modified by client.

Definition at line 168 of file FastJetInterfaceTool.h.

169 { return dynamic_cast<S*>(this->clusterSequence()); }
virtual fastjet::ClusterSequence * clusterSequence()
Access fastjet ClusterSequence.

◆ specificClusterSequence() [2/2]

template<class S>
const S * FastJetInterfaceTool::specificClusterSequence ( ) const
inline

Access to specific cluster sequence.

The template parameter S is expect to be set to an object type derived from the basic fastjet ClusterSequence

Returns
Const pointer to actual S object. Note that this object will only be updated after invoking the FastJetInterfaceTool::execute(...) method.

The object pointed to cannot be modified by client.

Definition at line 184 of file FastJetInterfaceTool.h.

185 { return dynamic_cast<const S*>(this->clusterSequence()); }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and DerivationFramework::CfAthAlgTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateRandomSeeds()

void FastJetInterfaceTool::updateRandomSeeds ( )
protectedvirtual

Set the area rnd seed according to run/event numbers.

Definition at line 651 of file FastJetInterfaceTool.cxx.

652{
653
654
655 std::vector<int> seed;
656
657 fastjet::GhostedAreaSpec & Garea_spec = m_areaDefinition->ghost_spec() ;
658 Garea_spec.get_random_status (seed);
659
660 unsigned int evnum = 0;
661 unsigned int runnum = 0;
662
663 const xAOD::EventInfo* ei = nullptr;
664 if (evtStore()->retrieve (ei,"EventInfo").isSuccess()){
665 evnum = ei->eventNumber();
666 runnum = ei->runNumber();
667 }
668
669 // Use both event and run nunmber to reset the random seeds
671 crc = CxxUtils::crc64addint (crc, runnum);
672
673 // Tacitly assuming that there are no consistency requirements
674 // on the RNG state (true for the current RNG that fastjet uses).
675 // Use fixed data sizes for crossplatform reproducibility.
676 for (size_t i = 0; i < seed.size(); i++) {
677 seed[i] = static_cast<int> (static_cast<uint32_t> (crc));
678 crc = (crc >> 32) ^ crc;
679 }
680
681
682 Garea_spec.set_random_status (seed);
683 seed.clear();
684 Garea_spec.get_random_status (seed);
685 ATH_MSG_DEBUG("area def "<< m_areaDefinition<< " ghost spec= "<< &Garea_spec << " crc= "<< crc<< " seed0="<< seed[0] << " seed1="<<seed[1]);
686
687}
uint32_t runNumber() const
The current event's run number.
uint64_t eventNumber() const
The current event's event number.
EventInfo_v1 EventInfo
Definition of the latest event info version.
setEventNumber uint32_t

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_areaDefinition

fastjet::AreaDefinition* FastJetInterfaceTool::m_areaDefinition
protected

Pointer to area definition.

Definition at line 402 of file FastJetInterfaceTool.h.

◆ m_areaType

fastjet::AreaType FastJetInterfaceTool::m_areaType
protected

fastjet tag: jet area type

Definition at line 390 of file FastJetInterfaceTool.h.

◆ m_baseRNDSeed

uint64_t FastJetInterfaceTool::m_baseRNDSeed
protected

Base seed for random generator. Constructed from m_jetAlgorithm and m_radius.

Definition at line 405 of file FastJetInterfaceTool.h.

◆ m_clusterSequence

fastjet::ClusterSequence* FastJetInterfaceTool::m_clusterSequence
protected

Pointer to actual cluster sequence.

Definition at line 400 of file FastJetInterfaceTool.h.

◆ m_clusterSequenceType

std::string FastJetInterfaceTool::m_clusterSequenceType
protected

fastjet property: cluster sequence type

Definition at line 226 of file FastJetInterfaceTool.h.

◆ m_clusterStrategyType

std::string FastJetInterfaceTool::m_clusterStrategyType
protected

fastjet property: cluster strategy

Definition at line 230 of file FastJetInterfaceTool.h.

◆ m_CMS_seedThreshold

double FastJetInterfaceTool::m_CMS_seedThreshold
protected

fastjet property for CMS Cone plugin: seed threshold

Definition at line 235 of file FastJetInterfaceTool.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_doJetArea

bool FastJetInterfaceTool::m_doJetArea
protected

Tool property: flag controls if jet area is calculated.

Definition at line 261 of file FastJetInterfaceTool.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_exclusiveDcut

double FastJetInterfaceTool::m_exclusiveDcut
protected

Exclusive jet finder property: d cut.

Definition at line 254 of file FastJetInterfaceTool.h.

◆ m_exclusiveNjets

int FastJetInterfaceTool::m_exclusiveNjets
protected

Exclusive jet finder property: number of jets requested.

Definition at line 256 of file FastJetInterfaceTool.h.

◆ m_extractor

EXTRACTOR FastJetInterfaceTool::m_extractor
protected

Pointer to extractor.

Definition at line 421 of file FastJetInterfaceTool.h.

◆ m_failedExecCtr

unsigned int FastJetInterfaceTool::m_failedExecCtr
private

Execution failure counter.

Definition at line 376 of file FastJetInterfaceTool.h.

◆ m_failedExecCtrMax

const unsigned int FastJetInterfaceTool::m_failedExecCtrMax = 10
staticprivate

Execution failure counter reporting cut-off.

Definition at line 378 of file FastJetInterfaceTool.h.

◆ m_ghostedArea

double FastJetInterfaceTool::m_ghostedArea
protected

fastjet property: size of area coverded by each ghost

Definition at line 273 of file FastJetInterfaceTool.h.

◆ m_ghostedGridScatter

double FastJetInterfaceTool::m_ghostedGridScatter
protected

fastjet property: scatter of ghosts on grid

Definition at line 275 of file FastJetInterfaceTool.h.

◆ m_ghostedKtScatter

double FastJetInterfaceTool::m_ghostedKtScatter
protected

fastjet property: scatter of kT of ghosts

Definition at line 277 of file FastJetInterfaceTool.h.

◆ m_ghostedMaxRap

double FastJetInterfaceTool::m_ghostedMaxRap
protected

fastjet property: ghost area rapidity limit (max)

Definition at line 267 of file FastJetInterfaceTool.h.

◆ m_ghostedMeanKt

double FastJetInterfaceTool::m_ghostedMeanKt
protected

fastjet property: average kT of ghosts

Definition at line 279 of file FastJetInterfaceTool.h.

◆ m_ghostedMinRap

double FastJetInterfaceTool::m_ghostedMinRap
protected

fastjet property: ghost area rapidity limit (min)

Definition at line 269 of file FastJetInterfaceTool.h.

◆ m_ghostedRepeat

int FastJetInterfaceTool::m_ghostedRepeat
protected

fastjet property: ghost area calculation repeatitions

Definition at line 271 of file FastJetInterfaceTool.h.

◆ m_inclusive

bool FastJetInterfaceTool::m_inclusive
protected

Jet algorithm control property: inclusive/exclusive jet finding.

Definition at line 252 of file FastJetInterfaceTool.h.

◆ m_invalidKeyReference

const std::string FastJetInterfaceTool::m_invalidKeyReference = "INVALID_KEY"
staticprivate

Reference for invalid fastjet tag.

Definition at line 373 of file FastJetInterfaceTool.h.

◆ m_jetAlgorithm

fastjet::JetAlgorithm FastJetInterfaceTool::m_jetAlgorithm
protected

fastjet tag: jet algorithm

Definition at line 386 of file FastJetInterfaceTool.h.

◆ m_jetAlgorithmType

std::string FastJetInterfaceTool::m_jetAlgorithmType
protected

fastjet property: jet algorithm

Definition at line 228 of file FastJetInterfaceTool.h.

◆ m_jetAreaDefinitionType

std::string FastJetInterfaceTool::m_jetAreaDefinitionType
protected

fastjet property: jet area definition

Definition at line 263 of file FastJetInterfaceTool.h.

◆ m_jetDefinition

fastjet::JetDefinition* FastJetInterfaceTool::m_jetDefinition
protected

Pointer to jet definition.

Definition at line 398 of file FastJetInterfaceTool.h.

◆ m_processor

PROCESSOR FastJetInterfaceTool::m_processor
protected

Pointer to processor.

Definition at line 419 of file FastJetInterfaceTool.h.

◆ m_pTmin

double FastJetInterfaceTool::m_pTmin
protected

Inclusive jet finder property: pTmin cut.

Definition at line 258 of file FastJetInterfaceTool.h.

◆ m_radius

double FastJetInterfaceTool::m_radius
protected

Jet algorithm property: radius/distance parameter.

Definition at line 250 of file FastJetInterfaceTool.h.

◆ m_recombinationScheme

fastjet::RecombinationScheme FastJetInterfaceTool::m_recombinationScheme
protected

fastjet tag: recombination scheme

Definition at line 392 of file FastJetInterfaceTool.h.

◆ m_recombinationSchemeType

std::string FastJetInterfaceTool::m_recombinationSchemeType
protected

fastjet property: recombination scheme

Definition at line 232 of file FastJetInterfaceTool.h.

◆ m_SIS_doCaching

bool FastJetInterfaceTool::m_SIS_doCaching
protected

fastjet property for SIS Cone plugin: do caching

Definition at line 243 of file FastJetInterfaceTool.h.

◆ m_SIS_nPass

int FastJetInterfaceTool::m_SIS_nPass
protected

fastjet property for SIS Cone plugin: max number of passes

Definition at line 239 of file FastJetInterfaceTool.h.

◆ m_SIS_overlapThreshold

double FastJetInterfaceTool::m_SIS_overlapThreshold
protected

fastjet property for SIS Cone plugin: overlap threshold

Definition at line 237 of file FastJetInterfaceTool.h.

◆ m_SIS_protojetPtMin

double FastJetInterfaceTool::m_SIS_protojetPtMin
protected

fastjet property for SIS Cone plugin: protojet min pt

Definition at line 241 of file FastJetInterfaceTool.h.

◆ m_SIS_splitMergeScale

fastjet::SISConePlugin::SplitMergeScale FastJetInterfaceTool::m_SIS_splitMergeScale
protected

fastjet tag: SIS split merge scale

Definition at line 395 of file FastJetInterfaceTool.h.

◆ m_SIS_splitMergeScale_STRING

std::string FastJetInterfaceTool::m_SIS_splitMergeScale_STRING
protected

fastjet property for SIS Cone plugin: split merge scale

Definition at line 245 of file FastJetInterfaceTool.h.

◆ m_SIS_splitMergeStopScale

double FastJetInterfaceTool::m_SIS_splitMergeStopScale
protected

fastjet property for SIS Cone plugin: split merge stop scale

Definition at line 247 of file FastJetInterfaceTool.h.

◆ m_strategy

fastjet::Strategy FastJetInterfaceTool::m_strategy
protected

fastjet tag: jet clustering strategy

Definition at line 388 of file FastJetInterfaceTool.h.

◆ m_userRNDSeed

uint64_t FastJetInterfaceTool::m_userRNDSeed
protected

Seed modifier for random generator : a user property (default to 0, i.e m_baseRNDSeed is unmodified)

Definition at line 407 of file FastJetInterfaceTool.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.

◆ m_voronoiEffectiveRfact

double FastJetInterfaceTool::m_voronoiEffectiveRfact
protected

fastjet property: Voronoi area effective radius

Definition at line 265 of file FastJetInterfaceTool.h.


The documentation for this class was generated from the following files: