|
ATLAS Offline Software
|
#include <PFSubtractionTool.h>
|
ToolHandle< IEFlowCellEOverPTool > | m_theEOverPTool {this, "eflowCellEOverPTool", "eflowCellEOverPTool", "Energy Flow E/P Values and Shower Parameters Tool"} |
| Tool for getting e/p values and hadronic shower cell ordering principle parameters. More...
|
|
std::unique_ptr< eflowEEtaBinnedParameters > | m_binnedParameters |
|
std::unique_ptr< PFMatch::TrackEtaPhiInFixedLayersProvider > | m_trkpos |
| Track position provider to be used to preselect clusters. More...
|
|
ToolHandle< PFTrackClusterMatchingTool > | m_theMatchingTool {this, "PFTrackClusterMatchingTool", "PFTrackClusterMatchingTool/CalObjBldMatchingTool", "The track-cluster matching tool"} |
| Default track-cluster matching tool. More...
|
|
ToolHandle< PFTrackClusterMatchingTool > | m_theMatchingToolForPull_015 {this, "PFTrackClusterMatchingTool_015", "PFTrackClusterMatchingTool/PFPullMatchingTool_015", "The 0.15 track-cluster matching tool to calculate the pull"} |
|
ToolHandle< PFTrackClusterMatchingTool > | m_theMatchingToolForPull_02 {this, "PFTrackClusterMatchingTool_02", "PFTrackClusterMatchingTool/PFPullMatchingTool_02", "The 0.2 track-cluster matching tool to calculate the pull"} |
|
Gaudi::Property< bool > | m_recoverSplitShowers {this,"RecoverSplitShowers",false,"Toggle whether we are recovering split showers or not"} |
| Toggle whether we are recovering split showers or not. More...
|
|
Gaudi::Property< int > | m_nClusterMatchesToUse {this, "nClusterMatchesToUse", 1, "Number of clusters to match to each track"} |
| Number of clusters to match to each track if not doing recover split shower subtraction. More...
|
|
Gaudi::Property< bool > | m_isHLLHC {this, "isHLLHC", false, "Toggle whether we have the HLLHC setup"} |
| Toggle whether we have the HLLHC setup. More...
|
|
Gaudi::Property< bool > | m_calcEOverP {this, "CalcEOverP", false, "Toggle EOverP algorithm mode, whereby no charged shower subtraction is performed"} |
| Toggle EOverP algorithm mode, whereby no charged shower subtraction is performed. More...
|
|
Gaudi::Property< double > | m_consistencySigmaCut {this, "ConsistencySigmaCut", 1.0, "Parameter that controls whether a track, in a track-cluster system, will be processed by the split shower recovery algorithm"} |
| Parameter that controls whether a track, in a track-cluster system, will be processed by the split shower recovery algorithm. More...
|
|
Gaudi::Property< double > | m_subtractionSigmaCut {this, "SubtractionSigmaCut", 1.5, "Parameter that controls whether to use retain remaining calorimeter energy in track-cluster system, after charged shower subtraction"} |
| Parameter that controls whether to use retain remaining calorimeter energy in track-cluster system, after charged shower subtraction. More...
|
|
Gaudi::Property< bool > | m_addCPData {this,"addCPData",false,"Toggle whether to decorate FlowElements with addutional data for Combined Performance studies "} |
| Toggle whether to decorate eflowRecTrack with addutional data for Combined Performance studies. More...
|
|
PFCalcRadialEnergyProfiles | m_pfCalc {} |
|
PFSubtractionStatusSetter | m_pfSubtractionStatusSetter {} |
|
PFSubtractionEnergyRatioCalculator | m_pfSubtractionEnergyRatioCalculator {} |
|
eflowSubtract::Subtractor | m_subtractor {} |
|
ToolHandle< PFEnergyPredictorTool > | m_NNEnergyPredictorTool {this, "NNEnergyPredictorTool", "","Tool for getting predictiing the energy using an ONNX model "} |
| Tool for getting predictiing the energy using an ONNX model. More...
|
|
Gaudi::Property< bool > | m_useNNEnergy {this, "useNNEnergy", false, "Toggle whether we use the neural net energy"} |
| Toggle whether we use the neural net energy. More...
|
|
Gaudi::Property< bool > | m_useTruthMatching {this, "useTrackClusterTruthMatching", false, "Toggle whether to cheat and use truth information for track-cluster matching"} |
| Toggle whether to cheat and use truth information for track-cluster matching - only for performance studies! More...
|
|
Gaudi::Property< bool > | m_useTruthForChargedShowerSubtraction {this, "useTruthForChargedShowerSubtraction", false, "Toggle whether we use truth information for the charged shower subtraction or not"} |
| Toggle whether we use truth information for the charged shower subtraction or not. More...
|
|
Gaudi::Property< bool > | m_useFullCellTruthSubtraction {this,"useFullCellTruthSubtraction",false,"Toggle whether we fully remove a cell with a truth deposit or reweight it based on truth contribution"} |
| Toggle whether we fully remove a cell with a truth deposit or reweight it based on truth contribution. More...
|
|
ToolHandle< PFSimulateTruthShowerTool > | m_theTruthShowerSimulator {this, "PFSimulateTruthShowerTool", "", "The truth shower simulator"} |
|
SG::ReadDecorHandleKey< xAOD::CaloClusterContainer > | m_caloClusterReadDecorHandleKeyNLeadingTruthParticles {this,"CaloClusterReadDecorHandleKey_NLeadingTruthParticles",""} |
| Read handle key to decorate CaloCluster with threeN leading truth particle barcode and energy. More...
|
|
Gaudi::Property< bool > | m_useLegacyEBinIndex {this, "useLegacyEBinIndex", true, "Toggle whether we use the legacy energy bin index"} |
| Further discussion about why this flag exists can be found in https://its.cern.ch/jira/browse/ATLJETMET-1692 and https://indico.cern.ch/event/1388633/contributions/5837876/attachments/2809591/4903439/PFlow_EOverP_Feb2024.pdf The Jira report discusses assorted problems with the treatment of energy bin indexes for the lookup of e/p values. More...
|
|
Definition at line 34 of file PFSubtractionTool.h.
◆ PFSubtractionTool()
PFSubtractionTool::PFSubtractionTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ~PFSubtractionTool()
PFSubtractionTool::~PFSubtractionTool |
( |
| ) |
|
|
default |
◆ addSubtractedCells()
Definition at line 596 of file PFSubtractionTool.cxx.
598 unsigned int numTracks = thisEflowCaloObject.
nTracks();
600 for (
unsigned int iTrack = 0; iTrack < numTracks; ++iTrack){
602 for (
auto thisPair : clusterList){
◆ canAnnihilate()
bool PFSubtractionTool::canAnnihilate |
( |
double |
expectedEnergy, |
|
|
double |
sigma, |
|
|
double |
clusterEnergy |
|
) |
| const |
|
private |
◆ execute()
◆ finalize()
StatusCode PFSubtractionTool::finalize |
( |
| ) |
|
◆ initialize()
StatusCode PFSubtractionTool::initialize |
( |
| ) |
|
Definition at line 31 of file PFSubtractionTool.cxx.
41 ATH_MSG_ERROR(
"Failed to get TrackPositionProvider for cluster preselection!");
42 return StatusCode::FAILURE;
64 return StatusCode::SUCCESS;
◆ isEOverPFail()
bool PFSubtractionTool::isEOverPFail |
( |
double |
expectedEnergy, |
|
|
double |
sigma, |
|
|
double |
clusterEnergy |
|
) |
| const |
|
private |
Definition at line 558 of file PFSubtractionTool.cxx.
560 if ((expectedEnergy == 0) && (clusterEnergy > 0))
return false;
◆ matchAndCreateEflowCaloObj()
unsigned int PFSubtractionTool::matchAndCreateEflowCaloObj |
( |
PFData & |
data | ) |
const |
|
private |
This matches ID tracks and CaloClusters, and then creates eflowCaloObjects.
No point to do anything if e/p reference bin does not exist
Add cluster matches needed for pull calculation (in eflowCaloObject::simulateShowers) which is used to determine whether to run the charged shower subtraction or not. / Clusters in both a cone of 0.15 and 0.2 are needed for this. / The clusters in a cone of 0.2 are also used as the matched cluster list for recover split showers mode.
Start loop from nCaloObj, which should be zero on a first pass
Definition at line 101 of file PFSubtractionTool.cxx.
104 unsigned int nMatches(0);
107 const unsigned int nCaloObj =
data.caloObjects->size();
108 const EventContext &ctx = Gaudi::Hive::currentContext();
111 for (
auto *thisEfRecTrack :
data.tracks)
114 if (!thisEfRecTrack->hasBin()) {
115 std::unique_ptr<eflowCaloObject> thisEflowCaloObject = std::make_unique<eflowCaloObject>();
116 thisEflowCaloObject->
addTrack(thisEfRecTrack);
117 data.caloObjects->push_back(std::move(thisEflowCaloObject));
127 std::vector<eflowTrackClusterLink*> bestClusters;
128 std::vector<float> deltaRPrime;
137 TruthLink truthLink = truthLinkAccessor(*(thisEfRecTrack->getTrack()));
140 if (truthLink.
isValid()) trackMatchedTruthParticle = *truthLink;
142 if (trackMatchedTruthParticle){
146 if (!caloClusterReadDecorHandleNLeadingTruthParticles.isValid()){
147 ATH_MSG_WARNING(
"Failed to retrieve CaloCluster decoration with key " << caloClusterReadDecorHandleNLeadingTruthParticles.key());
150 for (
auto * thisCluster :
data.clusters){
155 std::string::size_type
pos = decorHandleName.find(
".");
156 std::string decorName = decorHandleName.substr(
pos+1);
160 std::vector<std::pair<unsigned int, double > > barCodeTruthPairs =
accessor(*(thisCluster->getCluster()));
162 for (
auto &barCodeTruthPair : barCodeTruthPairs){
163 if (barCodeTruthPair.first ==
barcode){
165 bestClusters.push_back(thisLink);
172 else ATH_MSG_WARNING(
"Track with pt, eta and phi " << thisEfRecTrack->getTrack()->pt() <<
", " << thisEfRecTrack->getTrack()->eta() <<
" and " << thisEfRecTrack->getTrack()->phi() <<
" does not have a valid truth pointer");
180 for (
auto &matchpair : bestClusters_02)
183 float distancesq = matchpair.second;
185 if (distancesq < 0.15 * 0.15)
189 thisEfRecTrack->addAlternativeClusterMatch(trackClusterLink,
"cone_015");
191 thisEfRecTrack->addAlternativeClusterMatch(trackClusterLink,
"cone_02");
196 for (
auto thePair : matchedClusters) {
198 if (
m_addCPData) deltaRPrime.push_back(std::sqrt(thePair.second));
202 const std::vector<eflowTrackClusterLink*>* matchedClusters_02 = thisEfRecTrack->getAlternativeClusterMatches(
"cone_02");
203 if (!matchedClusters_02)
continue;
204 else bestClusters = *matchedClusters_02;
207 if (bestClusters.empty())
continue;
211 for (
auto *thisClusterLink : bestClusters ) {
213 ATH_MSG_DEBUG(
"Matched this track to cluster with e,pt, eta and phi " << thisCluster->
e() <<
", " << thisCluster->
pt() <<
", " << thisCluster->
eta() <<
" and " << thisCluster->
phi());
221 for (
auto *trkClusLink : bestClusters){
227 if (
std::find(
data.clusters.begin(),
data.clusters.end(), trkClusLink->getCluster()) ==
data.clusters.end()) {
234 thisEfRecTrack->addClusterMatch(trackClusterLink);
236 thisEfRecTrack->addDeltaRPrime(deltaRPrime[
linkIndex]);
244 std::vector<eflowRecCluster *>
clusters(
data.clusters.begin(),
data.clusters.end());
247 ATH_MSG_DEBUG(
"Created " << nCaloObjects <<
" eflowCaloObjects.");
249 for (
auto thisEFlowCaloObject : *(
data.caloObjects)){
250 ATH_MSG_DEBUG(
"This eflowCaloObject has " << thisEFlowCaloObject->nTracks() <<
" tracks and " << thisEFlowCaloObject->nClusters() <<
" clusters ");
251 for (
unsigned int count = 0;
count < thisEFlowCaloObject->nTracks();
count++){
253 ATH_MSG_DEBUG(
"Have track with e, pt, eta and phi of " << thisTrack->
e() <<
", " << thisTrack->
pt() <<
", " << thisTrack->
eta() <<
" and " << thisTrack->
phi());
255 for (
unsigned int count = 0;
count < thisEFlowCaloObject->nClusters();
count++){
257 ATH_MSG_DEBUG(
"Have cluster with e, pt, eta and phi of " << thisCluster->
e() <<
", " << thisCluster->
pt() <<
", " << thisCluster->
eta() <<
" and " << thisCluster->
phi());
262 const double gaussianRadius = 0.032;
263 const double gaussianRadiusError = 1.0e-3;
264 const double maximumRadiusSigma = 3.0;
272 for (
unsigned int iCalo = nCaloObj; iCalo <
data.caloObjects->size(); ++iCalo) {
280 else return nCaloObj;
◆ performSubtraction() [1/2]
void PFSubtractionTool::performSubtraction |
( |
const unsigned int & |
startingPoint, |
|
|
PFData & |
data |
|
) |
| const |
|
private |
Definition at line 283 of file PFSubtractionTool.cxx.
284 unsigned int nEFCaloObs =
data.caloObjects->size();
285 for (
unsigned int iCalo = startingPoint; iCalo < nEFCaloObs; ++iCalo) {
◆ performSubtraction() [2/2]
void PFSubtractionTool::performSubtraction |
( |
eflowCaloObject & |
thisEflowCaloObject | ) |
const |
|
private |
Definition at line 291 of file PFSubtractionTool.cxx.
295 unsigned int nClusters = thisEflowCaloObject.
nClusters();
296 unsigned int nTrackMatches = thisEflowCaloObject.
nTracks();
298 ATH_MSG_DEBUG(
"Have got an eflowCaloObject with " << nClusters <<
" clusters and " << nTrackMatches <<
" track matches");
301 for (
unsigned int iTrack = 0; iTrack < nTrackMatches; ++iTrack){
311 if (nTrackMatches < 1)
return;
319 if (
isEOverPFail(expectedEnergy, expectedSigma, clusterEnergy))
return;
322 const std::vector<std::pair<eflowTrackClusterLink *, std::pair<float, float>>> &matchedTrackList = thisEflowCaloObject.
efRecLink();
324 ATH_MSG_DEBUG(
"Matched Track List has size " << matchedTrackList.size());
328 for (
unsigned int iTrack = 0; iTrack < nTrackMatches; ++iTrack)
331 ATH_MSG_DEBUG(
"eflowCaloObject has track match with E, pt and eta " << thisTrack->
e() <<
", " << thisTrack->
pt() <<
" and " << thisTrack->
eta());
335 ATH_MSG_DEBUG(
"About to perform subtraction for this eflowCaloObject");
337 bool wasAnnihilated =
false;
342 if (
canAnnihilate(expectedEnergy, expectedSigma, clusterEnergy)){
344 wasAnnihilated =
true;
346 std::vector<std::pair<xAOD::CaloCluster *, bool>> clusterList;
347 std::map<xAOD::CaloCluster *, double> clusterEnergyMap;
348 unsigned nCluster = thisEflowCaloObject.
nClusters();
349 for (
unsigned iCluster = 0; iCluster < nCluster; ++iCluster){
353 ATH_MSG_DEBUG(
"We are going to annihilate. ExpectedEnergy, expectedSigma and clusterEnergy are " << expectedEnergy <<
", " << expectedSigma <<
" and " << clusterEnergy);
355 for (
auto thisPair : clusterList)
356 ATH_MSG_DEBUG(
"Annihilating cluster with E and eta " << thisPair.first->e() <<
" and " << thisPair.first->eta());
363 Subtractor::annihilateClusters(clusterList);
366 for (
auto thisPair : clusterList)
367 ATH_MSG_DEBUG(
"Have Annihilated cluster with E and eta " << thisPair.first->e() <<
" and " << thisPair.first->eta());
370 for (
unsigned iTrack = 0; iTrack < thisEflowCaloObject.
nTracks(); ++iTrack){
371 eflowRecTrack *thisEfRecTrack = (matchedTrackList[iTrack].first)->getTrack();
379 for (
unsigned iTrack = 0; iTrack < thisEflowCaloObject.
nTracks(); ++iTrack){
386 if (!thisEfRecTrack->
hasBin())
continue;
392 ATH_MSG_DEBUG(
"Am not in dense environment for this eflowCaloObject");
395 std::vector<eflowRecCluster *> matchedClusters;
397 matchedClusters.reserve(
links.size());
398 for (
auto* thisEFlowTrackClusterLink :
links)
399 matchedClusters.push_back(thisEFlowTrackClusterLink->getCluster());
402 matchedClusters.end(),
406 for (
auto* thisClus : matchedClusters)
408 "Haved matched cluster "
409 << thisClus->getCluster()->index() <<
" with e,pt, eta and phi of "
410 << thisClus->getCluster()->e() <<
", "
411 << thisClus->getCluster()->pt() <<
", "
412 << thisClus->getCluster()->eta() <<
" and "
413 << thisClus->getCluster()->phi() <<
" will be subtracted");
417 std::vector<std::pair<xAOD::CaloCluster *, bool>> clusterSubtractionList;
418 clusterSubtractionList.reserve(matchedClusters.size());
419 std::map<xAOD::CaloCluster *, double> clusterEnergyMap;
420 for (
auto *thisEFlowRecCluster : matchedClusters){
422 clusterSubtractionList.emplace_back(thisCluster,
false);
423 clusterEnergyMap[thisCluster] = thisCluster->
e();
426 ATH_MSG_DEBUG(
"Have filled clusterSubtractionList for this eflowCaloObject");
428 unsigned int trackIndex = thisEfRecTrack->
getTrack()->
index();
431 auto sumClusEnergy = [](
double accumulator, std::pair<xAOD::CaloCluster *, bool> thisPair){
return accumulator += thisPair.first->e();};
432 double totalClusterEnergy =
std::accumulate(clusterSubtractionList.begin(),clusterSubtractionList.end(),0.0,sumClusEnergy);
438 for (
auto thisPair : clusterSubtractionList)
439 ATH_MSG_DEBUG(
"Annihilating cluster with E and eta " << thisPair.first->e() <<
" and " << thisPair.first->eta());
444 Subtractor::annihilateClusters(clusterSubtractionList);
447 std::vector<std::pair<float, float>> clusterSubtractedEnergyRatios;
458 totalClusterEnergy =
std::accumulate(clusterSubtractionList.begin(),clusterSubtractionList.end(),0.0,sumClusEnergy);
464 for (
auto thisPair : clusterSubtractionList){
465 ATH_MSG_DEBUG(
"Annihilating remnant cluster with E and eta " << thisPair.first->e() <<
" and " << thisPair.first->eta());
469 std::vector<std::pair<float, float>> clusterSubtractedEnergyRatios;
475 std::vector<std::pair<float, float>> clusterSubtractedEnergyRatios;
482 ATH_MSG_DEBUG(
"Have subtracted charged shower for this eflowRecTrack");
◆ performTruthSubtraction() [1/2]
void PFSubtractionTool::performTruthSubtraction |
( |
eflowCaloObject & |
thisEflowCaloObject | ) |
const |
|
private |
Definition at line 505 of file PFSubtractionTool.cxx.
507 for (
unsigned iTrack = 0; iTrack < thisEflowCaloObject.
nTracks(); ++iTrack){
512 if (!thisEfRecTrack->
hasBin())
continue;
522 for (
auto thisLink :
links){
533 for (; theCell != lastCell; ++theCell){
537 double oldCellEnergy = theCell->
energy()*(theCell.
weight());
538 double subtractedCellWeight = (oldCellEnergy - truthEnergy)/oldCellEnergy;
544 float oldEnergy = thisCluster->
e();
546 if (0.0 != oldEnergy) {
547 float energyAdjustment = thisCluster->
e() / oldEnergy;
548 thisCluster->
setRawE(thisCluster->
rawE() * energyAdjustment);
◆ performTruthSubtraction() [2/2]
void PFSubtractionTool::performTruthSubtraction |
( |
PFData & |
data | ) |
const |
|
private |
Definition at line 492 of file PFSubtractionTool.cxx.
496 unsigned int nEFCaloObs =
data.caloObjects->size();
498 for (
unsigned int iCalo = 0; iCalo < nEFCaloObs; ++iCalo) {
◆ printAllClusters()
Definition at line 581 of file PFSubtractionTool.cxx.
583 for (
const auto *thisEFRecCluster : recClusterContainer){
584 if (thisEFRecCluster->getTrackMatches().empty()) {
588 std::vector<eflowTrackClusterLink*> theTrackLinks = thisEFRecCluster->getTrackMatches();
589 for (
auto *thisTrack : theTrackLinks){
◆ printCluster()
◆ printTrack()
◆ m_addCPData
Gaudi::Property<bool> PFSubtractionTool::m_addCPData {this,"addCPData",false,"Toggle whether to decorate FlowElements with addutional data for Combined Performance studies "} |
|
private |
◆ m_binnedParameters
◆ m_calcEOverP
Gaudi::Property<bool> PFSubtractionTool::m_calcEOverP {this, "CalcEOverP", false, "Toggle EOverP algorithm mode, whereby no charged shower subtraction is performed"} |
|
private |
Toggle EOverP algorithm mode, whereby no charged shower subtraction is performed.
Definition at line 90 of file PFSubtractionTool.h.
◆ m_caloClusterReadDecorHandleKeyNLeadingTruthParticles
◆ m_consistencySigmaCut
Gaudi::Property<double> PFSubtractionTool::m_consistencySigmaCut {this, "ConsistencySigmaCut", 1.0, "Parameter that controls whether a track, in a track-cluster system, will be processed by the split shower recovery algorithm"} |
|
private |
Parameter that controls whether a track, in a track-cluster system, will be processed by the split shower recovery algorithm.
Definition at line 93 of file PFSubtractionTool.h.
◆ m_isHLLHC
Gaudi::Property<bool> PFSubtractionTool::m_isHLLHC {this, "isHLLHC", false, "Toggle whether we have the HLLHC setup"} |
|
private |
◆ m_nClusterMatchesToUse
Gaudi::Property<int> PFSubtractionTool::m_nClusterMatchesToUse {this, "nClusterMatchesToUse", 1, "Number of clusters to match to each track"} |
|
private |
Number of clusters to match to each track if not doing recover split shower subtraction.
Definition at line 84 of file PFSubtractionTool.h.
◆ m_NNEnergyPredictorTool
ToolHandle<PFEnergyPredictorTool> PFSubtractionTool::m_NNEnergyPredictorTool {this, "NNEnergyPredictorTool", "","Tool for getting predictiing the energy using an ONNX model "} |
|
private |
◆ m_pfCalc
◆ m_pfSubtractionEnergyRatioCalculator
◆ m_pfSubtractionStatusSetter
◆ m_recoverSplitShowers
Gaudi::Property<bool> PFSubtractionTool::m_recoverSplitShowers {this,"RecoverSplitShowers",false,"Toggle whether we are recovering split showers or not"} |
|
private |
Toggle whether we are recovering split showers or not.
Definition at line 81 of file PFSubtractionTool.h.
◆ m_subtractionSigmaCut
Gaudi::Property<double> PFSubtractionTool::m_subtractionSigmaCut {this, "SubtractionSigmaCut", 1.5, "Parameter that controls whether to use retain remaining calorimeter energy in track-cluster system, after charged shower subtraction"} |
|
private |
Parameter that controls whether to use retain remaining calorimeter energy in track-cluster system, after charged shower subtraction.
Definition at line 96 of file PFSubtractionTool.h.
◆ m_subtractor
◆ m_theEOverPTool
ToolHandle<IEFlowCellEOverPTool> PFSubtractionTool::m_theEOverPTool {this, "eflowCellEOverPTool", "eflowCellEOverPTool", "Energy Flow E/P Values and Shower Parameters Tool"} |
|
private |
Tool for getting e/p values and hadronic shower cell ordering principle parameters.
Definition at line 66 of file PFSubtractionTool.h.
◆ m_theMatchingTool
◆ m_theMatchingToolForPull_015
◆ m_theMatchingToolForPull_02
◆ m_theTruthShowerSimulator
ToolHandle<PFSimulateTruthShowerTool> PFSubtractionTool::m_theTruthShowerSimulator {this, "PFSimulateTruthShowerTool", "", "The truth shower simulator"} |
|
private |
◆ m_trkpos
◆ m_useFullCellTruthSubtraction
Gaudi::Property<bool> PFSubtractionTool::m_useFullCellTruthSubtraction {this,"useFullCellTruthSubtraction",false,"Toggle whether we fully remove a cell with a truth deposit or reweight it based on truth contribution"} |
|
private |
Toggle whether we fully remove a cell with a truth deposit or reweight it based on truth contribution.
Definition at line 121 of file PFSubtractionTool.h.
◆ m_useLegacyEBinIndex
Gaudi::Property<bool> PFSubtractionTool::m_useLegacyEBinIndex {this, "useLegacyEBinIndex", true, "Toggle whether we use the legacy energy bin index"} |
|
private |
◆ m_useNNEnergy
Gaudi::Property<bool> PFSubtractionTool::m_useNNEnergy {this, "useNNEnergy", false, "Toggle whether we use the neural net energy"} |
|
private |
◆ m_useTruthForChargedShowerSubtraction
Gaudi::Property<bool> PFSubtractionTool::m_useTruthForChargedShowerSubtraction {this, "useTruthForChargedShowerSubtraction", false, "Toggle whether we use truth information for the charged shower subtraction or not"} |
|
private |
Toggle whether we use truth information for the charged shower subtraction or not.
Definition at line 118 of file PFSubtractionTool.h.
◆ m_useTruthMatching
Gaudi::Property<bool> PFSubtractionTool::m_useTruthMatching {this, "useTrackClusterTruthMatching", false, "Toggle whether to cheat and use truth information for track-cluster matching"} |
|
private |
Toggle whether to cheat and use truth information for track-cluster matching - only for performance studies!
Definition at line 115 of file PFSubtractionTool.h.
The documentation for this class was generated from the following files:
This class extends the information about a xAOD::CaloCluster.
virtual double phi() const
The azimuthal angle ( ) of the particle.
virtual double pt() const override final
The transverse momentum ( ) of the particle.
unsigned nClusters() const
char data[hepevt_bytes_allocation_ATLAS]
double getExpectedEnergy() const
This class calculates the LHED (Layer of Highest Energy Density) in a cluster or group of clusters.
const std::vector< std::pair< eflowTrackClusterLink *, std::pair< float, float > > > & efRecLink() const
std::string find(const std::string &s)
return a remapped string
Helper class to provide type-safe access to aux data.
bool isInDenseEnvironment() const
static void fillClustersToRecover(PFData &data)
void addTrackMatch(eflowTrackClusterLink *trackMatch)
void calculateSubtractedEnergyRatios(const std::vector< std::pair< xAOD::CaloCluster *, bool >> &clusterSubtractionList, std::map< xAOD::CaloCluster *, double > &clusterEnergyMap, std::vector< std::pair< float, float >> &clusterSubtractedEnergyRatios) const
For each xAOD::CaloCluster in clusterSubtractionList we calculate the ratio of new to old energy afte...
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
void markAllTracksAnnihStatus(eflowCaloObject &thisEflowCaloObject) const
Set the ratio of new to old cluster energy, to zero, for all cluster matched to all tracks attached t...
double getCellTruthEnergy(const CaloCell *cell) const
bool accumulate(AccumulateMap &map, std::vector< module_t > const &modules, FPGATrackSimMatrixAccumulator const &acc)
Accumulates an accumulator (e.g.
weight_t weight() const
Accessor for weight associated to this cell.
const_iterator begin() const
const begin method
unsigned index() const
Accessor for the index of the cell in the CaloCellContainer.
An internal EDM object which stores information about systems of associated tracks and calorimeter cl...
void subtractTracksFromClusters(eflowRecTrack *efRecTrack, std::vector< std::pair< xAOD::CaloCluster *, bool >> &clusterSubtractionList, const bool &addCPData) const
Stores pointers to an eflowRecTrack and an eflowRecCluster.
bool isValid() const
Test to see if the link can be dereferenced.
static std::unique_ptr< IPositionProvider > Get(const std::string &positionType)
weight_t weight() const
Accessor for weight associated to this cell.
double energy() const
get energy (data member)
void addSubtractedCaloCell(ElementLink< CaloCellContainer > theCellLink, const double &weight)
double getExpectedVariance() const
void addTrack(eflowRecTrack *track)
This class extends the information about a xAOD::Track.
Bookkeeping of cells that make up a cluster Simplified replacement for CaloCellLink,...
const std::vector< eflowTrackClusterLink * > & getClusterMatches() const
Description of a calorimeter cluster.
const eflowRecTrack * efRecTrack(int i) const
void setRawE(flt_t)
Set Energy for signal state UNCALIBRATED.
bool removeCell(const CaloCell *ptr)
Method to remove a cell to the cluster (slow!) (Beware: Kinematics not updated!)
Handle class for reading a decoration on an object.
virtual double eta() const
The pseudorapidity ( ) of the particle.
bool isSubtracted() const
Class describing a truth particle in the MC record.
void calculate(const PFData &data) const
void markSubtractionStatus(const std::vector< std::pair< xAOD::CaloCluster *, bool >> &clusterList, std::vector< std::pair< float, float >> &clusterSubtractedEnergyRatios, eflowCaloObject &thisEflowCaloObject, unsigned int trackIndex) const
Set the ratio of new to old cluster energy for each cluster matched to a track with trackIndex.
void calculateSubtractedEnergyRatiosForAnnih(const std::vector< std::pair< xAOD::CaloCluster *, bool >> &clusterSubtractionList, std::map< xAOD::CaloCluster *, double > &clusterEnergyMap, std::vector< std::pair< float, float >> &clusterSubtractedEnergyRatios) const
If we have decided to annihiliate all clusters in clusterSubtractionList we use this function to set ...
double getEExpect() const
MsgStream & msg() const
The standard message stream.
void setRawEta(flt_t)
Set for signal state UNCALIBRATED.
xAOD::CaloCluster * getCluster()
size_t index() const
Return the index of this element within its container.
int barcode() const
Barcode.
eflowCellSubtractionFacilitator m_facilitator
const CaloClusterCellLink * getCellLinks() const
Get a pointer to the CaloClusterCellLink object (const version)
static eflowTrackClusterLink * getInstance(eflowRecTrack *track, eflowRecCluster *cluster, const EventContext &ctx=Gaudi::Hive::currentContext())
virtual double pt() const
The transverse momentum ( ) of the particle (negative for negative-energy clusters)
const xAOD::TrackParticle * getTrack() const
static unsigned int makeTrkCluCaloObjects(eflowRecTrackContainer *eflowTrackContainer, eflowRecClusterContainer *eflowClusterContainer, eflowCaloObjectContainer *caloObjectContainer)
static void fillClustersToConsider(PFData &data, eflowRecClusterContainer &recClusterContainer)
virtual double e() const override final
The total energy of the particle.
const_iterator end() const
const end method
const AccessorWrapper< T > * accessor(xAOD::JetAttribute::AttributeID id)
Returns an attribute accessor corresponding to an AttributeID.
static void fillTracksToConsider(PFData &data, eflowRecTrackContainer &recTrackContainer)
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
#define ATH_MSG_WARNING(x)
const eflowRecCluster * efRecCluster(int i) const
double getVarEExpect() const
CaloClusterCellLink * getOwnCellLinks()
Get a pointer to the owned CaloClusterCellLink object (non-const version)
static void calculateKine(xAOD::CaloCluster *clu, const bool useweight=true, const bool updateLayers=true, const bool useGPUCriteria=false)
Helper class to calculate cluster kinematics based on cells.
double getClusterEnergy() const
@ linkIndex
link index for multiple track and vertex matches
Class describing a TrackParticle.
static void fillTracksToRecover(PFData &data)
void reweight(const weight_t newWeight)
Update the weight.
const_iterator to loop over cells belonging to a cluster
virtual double e() const
The total energy of the particle.
void simulateShower(eflowLayerIntegrator *integrator, const eflowEEtaBinnedParameters *binnedParameters, const PFEnergyPredictorTool *energyP, bool useLegacyEnergyBinIndexing)
virtual double phi() const override final
The azimuthal angle ( ) of the particle (has range to .)
void setRawPhi(flt_t)
Set for signal state UNCALIBRATED.
static void annihilateClusters(std::vector< std::pair< xAOD::CaloCluster *, bool >> &clusters)