PandaRoot
PndApollonius::TripletSolution Struct Reference

A structure that defines a solution of a triplet (an Apollonius Circle and all hits close to the circle). More...

#include <PndApolloniusTriplet.h>

Public Types

enum  detID {
  MVDpixel, MVDstrip, STT, GEM,
  NOTDEFINED
}
 

Public Member Functions

 TripletSolution ()
 Constructor. More...
 
 TripletSolution (TVector3 track)
 Constructor. More...
 
void AddHits (detID detector, std::vector< FairHit *> data)
 A vector of hits is added. More...
 
void AddHits (std::vector< PndSttHit *> sttHits)
 A vector of STT hits is added. More...
 
void AddHit (detID detector, FairHit *data)
 One hit of a specific subdetector is added. More...
 
int GetNHits ()
 Returns the total number of hits in a TripletSolution. More...
 
TVector2 HitOnTrack (FairHit *hit)
 Determins a vector from the circle center to the corresponding hit. More...
 
void IsClockwise ()
 Determins the rotation of the circle, i.e. if the particle mooves clockwise or not. More...
 
void SortHits (TVector2 &firstHit, detID detector)
 Sorts the hits based on the angle from first hit to circle center vs hit to circle center. More...
 
void SortStt (PndSttGeometryMap *fGeometryMap)
 Sorts the STT hits: first based on the STT layer to determine the first hit and after that based on the angle from first hit to circle center vs hit to circle center. More...
 
FairHit * GetFirstHit (PndSttGeometryMap *fGeometryMap)
 Sorts the STT hits: first based on the STT layer to determine the first hit and after that based on the angle from first hit to circle center vs hit to circle center. More...
 
void SortAllHits (PndSttGeometryMap *fGeometryMap)
 Sorts all hits depending on if the track changed or not. More...
 
bool IsReasonableHit (FairHit *CurrentHit, FairHit *PriviousHit)
 Tests if a specific hit is a reasonable hit of the track (based on the angle and the rotation of the track) More...
 

Public Attributes

std::vector< std::string > detID_Names {"MVD_Pixel", "MVD_Strip", "STT", "GEM", "NOTDEFINED"}
 
Triplet fTriplet {nullptr, nullptr, nullptr}
 
TVector3 fTrack
 
std::map< detID, std::vector< FairHit * > > fHits
 
std::vector< FairHit * > fAllHits
 
double fMeanSquare = 1000000.
 
bool fClockwise = true
 

Friends

std::ostream & operator<< (std::ostream &output, const TripletSolution &t)
 

Detailed Description

A structure that defines a solution of a triplet (an Apollonius Circle and all hits close to the circle).

Definition at line 57 of file PndApolloniusTriplet.h.

Member Enumeration Documentation

◆ detID

Constructor & Destructor Documentation

◆ TripletSolution() [1/2]

PndApollonius::TripletSolution::TripletSolution ( )
inline

Constructor.

Definition at line 63 of file PndApolloniusTriplet.h.

63 {};

◆ TripletSolution() [2/2]

PndApollonius::TripletSolution::TripletSolution ( TVector3  track)
inline

Constructor.

Parameters
[in]trackA TVector3 that defines the circle parameters (x_center, y_center, R) from the Apollonius Circle

Definition at line 69 of file PndApolloniusTriplet.h.

Member Function Documentation

◆ AddHit()

void PndApollonius::TripletSolution::AddHit ( detID  detector,
FairHit *  data 
)
inline

One hit of a specific subdetector is added.

Parameters
[in]detectorID of the corresponding subdetector (MVD, STT or GEM)
[in]dataA pointer to one specific hit of a subdetector that belong to the track

Definition at line 97 of file PndApolloniusTriplet.h.

98  {
99  if (fHits.count(detector) == 0) {
100  fHits[detector];
101  }
102  if (std::find(fHits[detector].begin(), fHits[detector].end(), data) == fHits[detector].end()) { // add only if hit is not in dataset
103  fHits[detector].push_back(data);
104  fAllHits.push_back(data);
105  }
106  }
std::map< detID, std::vector< FairHit * > > fHits
std::vector< FairHit * > fAllHits

◆ AddHits() [1/2]

void PndApollonius::TripletSolution::AddHits ( detID  detector,
std::vector< FairHit *>  data 
)
inline

A vector of hits is added.

Parameters
[in]detectorID of the corresponding subdetector (MVD, STT or GEM)
[in]dataAll hits of one subdetector that belong to the track

Definition at line 76 of file PndApolloniusTriplet.h.

77  {
78  fHits[detector] = data;
79  fAllHits.insert(fAllHits.end(), data.begin(), data.end());
80  }
std::map< detID, std::vector< FairHit * > > fHits
std::vector< FairHit * > fAllHits

◆ AddHits() [2/2]

void PndApollonius::TripletSolution::AddHits ( std::vector< PndSttHit *>  sttHits)
inline

A vector of STT hits is added.

Parameters
[in]sttHitsAll hits of the STT that belong to the track as PndSttHit.

Definition at line 86 of file PndApolloniusTriplet.h.

87  {
88  fHits[STT].insert(fHits[STT].end(), sttHits.begin(), sttHits.end());
89  fAllHits.insert(fAllHits.end(), sttHits.begin(), sttHits.end());
90  }
std::map< detID, std::vector< FairHit * > > fHits
std::vector< FairHit * > fAllHits

◆ GetFirstHit()

FairHit* PndApollonius::TripletSolution::GetFirstHit ( PndSttGeometryMap fGeometryMap)

Sorts the STT hits: first based on the STT layer to determine the first hit and after that based on the angle from first hit to circle center vs hit to circle center.

Parameters
[in]fGeometryMapThe Geometry map of the detector
[out]FairHitReturns the first hit of the track

◆ GetNHits()

int PndApollonius::TripletSolution::GetNHits ( )
inline

◆ HitOnTrack()

TVector2 PndApollonius::TripletSolution::HitOnTrack ( FairHit *  hit)
inline

Determins a vector from the circle center to the corresponding hit.

Parameters
[in]hitThe corresponding hit
[out]TVector2The vector from the circle center to the corresponding hit

Definition at line 116 of file PndApolloniusTriplet.h.

116 { return TVector2(hit->GetX() - fTrack.X(), hit->GetY() - fTrack.Y()); }

◆ IsClockwise()

void PndApollonius::TripletSolution::IsClockwise ( )

Determins the rotation of the circle, i.e. if the particle mooves clockwise or not.

◆ IsReasonableHit()

bool PndApollonius::TripletSolution::IsReasonableHit ( FairHit *  CurrentHit,
FairHit *  PriviousHit 
)

Tests if a specific hit is a reasonable hit of the track (based on the angle and the rotation of the track)

Parameters
[in]CurrentHitThe current hit
[in]PriviousHitThe previous hit of the track

◆ SortAllHits()

void PndApollonius::TripletSolution::SortAllHits ( PndSttGeometryMap fGeometryMap)

Sorts all hits depending on if the track changed or not.

Parameters
[in]fGeometryMapThe Geometry map of the detector to return the STT layer

◆ SortHits()

void PndApollonius::TripletSolution::SortHits ( TVector2 &  firstHit,
detID  detector 
)

Sorts the hits based on the angle from first hit to circle center vs hit to circle center.

Parameters
[in]firstHitThe first hit of the track
[in]detectorThe corresponding subdetector

◆ SortStt()

void PndApollonius::TripletSolution::SortStt ( PndSttGeometryMap fGeometryMap)

Sorts the STT hits: first based on the STT layer to determine the first hit and after that based on the angle from first hit to circle center vs hit to circle center.

Parameters
[in]fGeometryMapThe Geometry map of the detector to return the STT layer

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  output,
const TripletSolution t 
)
friend

Definition at line 156 of file PndApolloniusTriplet.h.

157  {
158  output << "Track x/y/r " << t.fTrack.X() << "/" << t.fTrack.Y() << "/" << t.fTrack.Z() << " ";
159  if (t.fTriplet.fTripletHits[0] != nullptr) {
160  output << " trip: " << t.fTriplet.fTripletHits[0]->GetTubeID() << "/" << t.fTriplet.fTripletHits[1]->GetTubeID() << "/" << t.fTriplet.fTripletHits[2]->GetTubeID() << " ";
161  }
162  if (t.fHits.count(TripletSolution::detID::MVDpixel) > 0) {
163  output << t.detID_Names.at(TripletSolution::detID::MVDpixel) << " : ";
164  for (auto hit : t.fHits.at(TripletSolution::detID::MVDpixel)) {
165  output << hit->GetEntryNr() << "/";
166  }
167  output << " ";
168  }
169  if (t.fHits.count(TripletSolution::detID::MVDstrip) > 0) {
170  output << t.detID_Names.at(TripletSolution::detID::MVDstrip) << " : ";
171  for (auto hit : t.fHits.at(TripletSolution::detID::MVDstrip)) {
172  output << hit->GetEntryNr() << "/";
173  }
174  output << " ";
175  }
176  if (t.fHits.count(TripletSolution::detID::STT) > 0) {
177  output << t.detID_Names.at(TripletSolution::detID::STT) << " : ";
178  for (auto hit : t.fHits.at(TripletSolution::detID::STT)) {
179  PndSttHit *myHit = static_cast<PndSttHit *>(hit);
180  output << myHit->GetTubeID() << "/";
181  }
182  output << " ";
183  }
184  if (t.fHits.count(TripletSolution::detID::GEM) > 0) {
185  output << t.detID_Names.at(TripletSolution::detID::GEM) << " : ";
186  for (auto hit : t.fHits.at(TripletSolution::detID::GEM)) {
187  output << hit->GetEntryNr() << "/";
188  }
189  output << " ";
190  }
191 
192  output << "MSD: " << t.fMeanSquare;
193  return output;
194  }
Int_t GetTubeID() const
Definition: PndSttHit.h:71
#define GEM

Member Data Documentation

◆ detID_Names

std::vector<std::string> PndApollonius::TripletSolution::detID_Names {"MVD_Pixel", "MVD_Strip", "STT", "GEM", "NOTDEFINED"}

Definition at line 60 of file PndApolloniusTriplet.h.

◆ fAllHits

std::vector<FairHit *> PndApollonius::TripletSolution::fAllHits

Definition at line 199 of file PndApolloniusTriplet.h.

◆ fClockwise

bool PndApollonius::TripletSolution::fClockwise = true

Definition at line 201 of file PndApolloniusTriplet.h.

◆ fHits

std::map<detID, std::vector<FairHit *> > PndApollonius::TripletSolution::fHits

Definition at line 198 of file PndApolloniusTriplet.h.

◆ fMeanSquare

double PndApollonius::TripletSolution::fMeanSquare = 1000000.

Definition at line 200 of file PndApolloniusTriplet.h.

◆ fTrack

TVector3 PndApollonius::TripletSolution::fTrack

Definition at line 197 of file PndApolloniusTriplet.h.

◆ fTriplet

Triplet PndApollonius::TripletSolution::fTriplet {nullptr, nullptr, nullptr}

Definition at line 196 of file PndApolloniusTriplet.h.


The documentation for this struct was generated from the following file: