ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Reconstruction
eflowRec
src
PFTrackFiller.cxx
Go to the documentation of this file.
1
#include "
PFTrackFiller.h
"
2
3
#include "
eflowCaloObject.h
"
4
5
void
PFTrackFiller::fillTracksToRecover
(
PFData
&data)
6
{
7
8
for
(
auto
thisEflowCaloObject : *data.caloObjects){
9
10
unsigned
int
nTrk = thisEflowCaloObject->nTracks();
11
12
if
(0 == thisEflowCaloObject->nClusters()){
13
//If there are no matched clusters we mark each track in thisEflowCaloObject has one that has been processed ("subtracted")
14
//and continue to the next eflowCaloObject
15
for
(
unsigned
int
iTrk = 0; iTrk < nTrk; ++iTrk) {
16
eflowRecTrack
* thisEfRecTrack = thisEflowCaloObject->efRecTrack(iTrk);
17
if
(!thisEfRecTrack->
isSubtracted
()) thisEfRecTrack->
setSubtracted
();
18
}
//loop on tracks on thisEflowCaloObject
19
continue
;
20
}
//if thisEflowCaloObject has zero CaloCluster
21
22
//ignore cluster only systems and go to the next eflowCaloObject
23
if
(nTrk == 0)
continue
;
24
25
//Else process systems with only tracks or combinations of tracks and clusters
26
27
//Create a vector to keep a list of tracks we don't want to consider
28
std::vector<eflowRecTrack*> updatedTracks;
29
30
for
(
unsigned
int
iTrack = 0; iTrack < nTrk; ++iTrack){
31
eflowRecTrack
* thisEfRecTrack = thisEflowCaloObject->efRecTrack(iTrack);
32
//If this track was already processed ("subtracted") we continue on to the next track
33
if
(thisEfRecTrack->
isSubtracted
()){
34
updatedTracks.push_back(thisEfRecTrack);
35
continue
;
36
}
37
//remove existing matched CaloCluster and add this track to our list that we want to consider
38
//for charged hadron subtraction
39
thisEfRecTrack->
clearClusterMatches
();
40
//flag that this track underwent split showers recovery
41
thisEfRecTrack->
setIsRecovered
();
42
data.tracks.push_back(thisEfRecTrack);
43
}
//loop on tracks in thisEflowCaloObject
44
45
//Now remove all tracks from thisEflowCaloObject
46
thisEflowCaloObject->clearTracks();
47
//Add back the tracks we won't consider for charged hadron subtraction (if any)
48
if
(!updatedTracks.empty()) thisEflowCaloObject->addTracks(updatedTracks);
49
//SHOULD WE ALWAYS DO THIS? TO BE TESTED
50
else
thisEflowCaloObject->clearLinks();
51
}
52
53
std::sort
(data.tracks.begin(),data.tracks.end(),
eflowRecTrack::SortDescendingPt
());
54
55
}
56
57
void
PFTrackFiller::fillTracksToConsider
(
PFData
&data,
eflowRecTrackContainer
&recTrackContainer)
58
{
59
for
(
unsigned
int
count
= 0;
count
< recTrackContainer.
size
();
count
++) data.tracks.push_back(recTrackContainer[
count
]);
60
}
PFTrackFiller.h
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
PFTrackFiller::fillTracksToConsider
static void fillTracksToConsider(PFData &data, eflowRecTrackContainer &recTrackContainer)
Definition
PFTrackFiller.cxx:57
PFTrackFiller::fillTracksToRecover
static void fillTracksToRecover(PFData &data)
Definition
PFTrackFiller.cxx:5
eflowRecTrackContainer
Definition
eflowRecTrack.h:195
eflowRecTrack::SortDescendingPt
Definition
eflowRecTrack.h:161
eflowRecTrack
This class extends the information about a xAOD::Track.
Definition
eflowRecTrack.h:49
eflowRecTrack::isSubtracted
bool isSubtracted() const
Definition
eflowRecTrack.h:84
eflowRecTrack::setIsRecovered
void setIsRecovered()
Definition
eflowRecTrack.h:111
eflowRecTrack::setSubtracted
void setSubtracted()
Definition
eflowRecTrack.cxx:99
eflowRecTrack::clearClusterMatches
void clearClusterMatches()
Definition
eflowRecTrack.h:74
eflowCaloObject.h
count
int count(std::string s, const std::string ®x)
count how many occurances of a regx are in a string
Definition
hcg.cxx:148
std::sort
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
Definition
DVL_algorithms.h:554
PFData
Definition
PFData.h:16
Generated on
for ATLAS Offline Software by
1.17.0