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

#include <PFTrackFiller.h>

Collaboration diagram for PFTrackFiller:

Public Member Functions

 PFTrackFiller ()
 ~PFTrackFiller ()

Static Public Member Functions

static void fillTracksToRecover (PFData &data)
static void fillTracksToConsider (PFData &data, eflowRecTrackContainer &recTrackContainer)

Detailed Description

Definition at line 7 of file PFTrackFiller.h.

Constructor & Destructor Documentation

◆ PFTrackFiller()

PFTrackFiller::PFTrackFiller ( )
inline

Definition at line 10 of file PFTrackFiller.h.

10{};

◆ ~PFTrackFiller()

PFTrackFiller::~PFTrackFiller ( )
inline

Definition at line 11 of file PFTrackFiller.h.

11{};

Member Function Documentation

◆ fillTracksToConsider()

void PFTrackFiller::fillTracksToConsider ( PFData & data,
eflowRecTrackContainer & recTrackContainer )
static

Definition at line 57 of file PFTrackFiller.cxx.

58{
59 for (unsigned int count = 0; count < recTrackContainer.size(); count++) data.tracks.push_back(recTrackContainer[count]);
60}
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
size_type size() const noexcept
Returns the number of elements in the collection.
int count(std::string s, const std::string &regx)
count how many occurances of a regx are in a string
Definition hcg.cxx:146

◆ fillTracksToRecover()

void PFTrackFiller::fillTracksToRecover ( PFData & data)
static

Definition at line 5 of file PFTrackFiller.cxx.

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}
bool isSubtracted() const
void setIsRecovered()
void clearClusterMatches()
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.

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