ATLAS Offline Software
Public Types | Public Member Functions | Private Attributes | List of all members
LVL1TGCTrigger::TGCTrackSelector Class Reference

#include <TGCTrackSelector.h>

Collaboration diagram for LVL1TGCTrigger::TGCTrackSelector:

Public Types

enum  { MaxNumber_of_TrackCandidate_in = 7 }
 

Public Member Functions

 TGCTrackSelector (const TGCSectorLogic *sL=0)
 
 ~TGCTrackSelector ()
 
void reset ()
 
void input (TGCRPhiCoincidenceOut *rPhiOut)
 
bool select (std::shared_ptr< TGCTrackSelectorOut > TrackcandidateOut)
 
TGCTrackSelectorOut getTrackSelectorOut (int index)
 
bool compare (TGCRPhiCoincidenceOut *track1, TGCRPhiCoincidenceOut *track2)
 

Private Attributes

std::unique_ptr< TGCRPhiCoincidenceOutm_coincidenceIn [MaxNumber_of_TrackCandidate_in]
 
int m_trackPriorityRank [MaxNumber_of_TrackCandidate_in]
 
int m_numberOfCandidate_In
 
int m_numberOfCandidate_Out
 
const TGCSectorLogicm_sectorLogic
 

Detailed Description

Definition at line 15 of file TGCTrackSelector.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
MaxNumber_of_TrackCandidate_in 

Definition at line 27 of file TGCTrackSelector.h.

Constructor & Destructor Documentation

◆ TGCTrackSelector()

LVL1TGCTrigger::TGCTrackSelector::TGCTrackSelector ( const TGCSectorLogic sL = 0)

Definition at line 14 of file TGCTrackSelector.cxx.

14  :
17  m_sectorLogic(sL) {
18  for(int i_track=0; i_track!=MaxNumber_of_TrackCandidate_in; i_track++){
19  m_trackPriorityRank[i_track] = 0;
20  }
21 }

◆ ~TGCTrackSelector()

LVL1TGCTrigger::TGCTrackSelector::~TGCTrackSelector ( )

Definition at line 23 of file TGCTrackSelector.cxx.

24 {
25 }

Member Function Documentation

◆ compare()

bool LVL1TGCTrigger::TGCTrackSelector::compare ( TGCRPhiCoincidenceOut track1,
TGCRPhiCoincidenceOut track2 
)

Definition at line 92 of file TGCTrackSelector.cxx.

92  {
93  // The definition of priority is not fixed. This function wiil be updated.
94  if(track1->getpT() > track2->getpT()){return true;}
95  if(track1->getpT() < track2->getpT()){return false;}
96  else{
97  // when the pt level of 2 tracks are same, track with large R is selected.
98  if(track1->getIdSSC()<track2->getIdSSC()){return true;}
99  if(track1->getIdSSC()>track2->getIdSSC()){return false;}
100  }
101  return true;
102 }

◆ getTrackSelectorOut()

TGCTrackSelectorOut LVL1TGCTrigger::TGCTrackSelector::getTrackSelectorOut ( int  index)

◆ input()

void LVL1TGCTrigger::TGCTrackSelector::input ( TGCRPhiCoincidenceOut rPhiOut)

Definition at line 38 of file TGCTrackSelector.cxx.

38  {
39  if(rPhiOut!=0){
40  if(rPhiOut->getpT()!=0){
43  }
44  }
45 }

◆ reset()

void LVL1TGCTrigger::TGCTrackSelector::reset ( )

Definition at line 28 of file TGCTrackSelector.cxx.

28  {
31 
32  for(int i_track=0;i_track!=MaxNumber_of_TrackCandidate_in;i_track++){
33  m_trackPriorityRank[i_track]=0;
34  }
35 }

◆ select()

bool LVL1TGCTrigger::TGCTrackSelector::select ( std::shared_ptr< TGCTrackSelectorOut TrackcandidateOut)

compare between all combination

Definition at line 48 of file TGCTrackSelector.cxx.

48  {
49 
50  if(m_numberOfCandidate_In==0){return false;}
51 
52 
56  for(int track1=0;track1!=m_numberOfCandidate_In-1 && m_numberOfCandidate_In!=0;track1++){
57  for(int track2=track1+1;track2!=m_numberOfCandidate_In;track2++){
58  bool compare_result=compare(m_coincidenceIn[track1].get(),m_coincidenceIn[track2].get()); //1>2 true:1 1<2 false:0
59 
60  //TrackPriorityRank : Smaller value is high priority.
61  m_trackPriorityRank[track1]+=(int)!compare_result;
62  m_trackPriorityRank[track2]+=(int)compare_result;
63  }
64  }
65 
70  if(m_trackPriorityRank[track]<=3){
71 
72  int R= 2*m_coincidenceIn[track]->getIdSSC()+m_coincidenceIn[track]->getR() - (m_sectorLogic->getRegion()==TGCRegionType::ENDCAP ? 1 : 0);
73  TrackcandidateOut->setR(m_numberOfCandidate_Out,R);
74  TrackcandidateOut->setPhi(m_numberOfCandidate_Out,m_coincidenceIn[track]->getPhi());
75  TrackcandidateOut->setPtLevel(m_numberOfCandidate_Out,m_coincidenceIn[track]->getpT());
76  TrackcandidateOut->setDR(m_numberOfCandidate_Out,2*m_coincidenceIn[track]->getDR());
77  TrackcandidateOut->setDPhi(m_numberOfCandidate_Out,m_coincidenceIn[track]->getDPhi());
78  TrackcandidateOut->setInnerVeto(m_numberOfCandidate_Out,m_coincidenceIn[track]->getInnerVeto());
79  TrackcandidateOut->setCharge(m_numberOfCandidate_Out,m_coincidenceIn[track]->getCharge());
80  TrackcandidateOut->setCoincidenceType(m_numberOfCandidate_Out,m_coincidenceIn[track]->getCoincidenceType());
81  TrackcandidateOut->setGoodMFFlag(m_numberOfCandidate_Out,m_coincidenceIn[track]->getGoodMFFlag());
82  TrackcandidateOut->setInnerCoincidenceFlag(m_numberOfCandidate_Out,m_coincidenceIn[track]->getInnerCoincidenceFlag());
84  }
85  }
86 
87  reset();
88 
89  return true;
90 }

Member Data Documentation

◆ m_coincidenceIn

std::unique_ptr<TGCRPhiCoincidenceOut> LVL1TGCTrigger::TGCTrackSelector::m_coincidenceIn[MaxNumber_of_TrackCandidate_in]
private

Definition at line 33 of file TGCTrackSelector.h.

◆ m_numberOfCandidate_In

int LVL1TGCTrigger::TGCTrackSelector::m_numberOfCandidate_In
private

Definition at line 37 of file TGCTrackSelector.h.

◆ m_numberOfCandidate_Out

int LVL1TGCTrigger::TGCTrackSelector::m_numberOfCandidate_Out
private

Definition at line 38 of file TGCTrackSelector.h.

◆ m_sectorLogic

const TGCSectorLogic* LVL1TGCTrigger::TGCTrackSelector::m_sectorLogic
private

Definition at line 40 of file TGCTrackSelector.h.

◆ m_trackPriorityRank

int LVL1TGCTrigger::TGCTrackSelector::m_trackPriorityRank[MaxNumber_of_TrackCandidate_in]
private

Definition at line 34 of file TGCTrackSelector.h.


The documentation for this class was generated from the following files:
LVL1TGCTrigger::TGCRegionType::ENDCAP
@ ENDCAP
LVL1TGCTrigger::TGCSectorLogic::getRegion
TGCRegionType getRegion() const
Definition: TGCSectorLogic.h:62
LVL1TGCTrigger::TGCTrackSelector::compare
bool compare(TGCRPhiCoincidenceOut *track1, TGCRPhiCoincidenceOut *track2)
Definition: TGCTrackSelector.cxx:92
LVL1TGCTrigger::TGCTrackSelector::m_sectorLogic
const TGCSectorLogic * m_sectorLogic
Definition: TGCTrackSelector.h:40
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
LVL1TGCTrigger::TGCTrackSelector::m_numberOfCandidate_In
int m_numberOfCandidate_In
Definition: TGCTrackSelector.h:37
IDTPM::getPhi
float getPhi(const xAOD::TrackParticle &p)
Accessor utility function for getting the value of phi.
Definition: TrackParametersHelper.h:55
LVL1TGCTrigger::TGCTrackSelector::m_numberOfCandidate_Out
int m_numberOfCandidate_Out
Definition: TGCTrackSelector.h:38
LVL1TGCTrigger::TGCTrackSelector::m_coincidenceIn
std::unique_ptr< TGCRPhiCoincidenceOut > m_coincidenceIn[MaxNumber_of_TrackCandidate_in]
Definition: TGCTrackSelector.h:33
LVL1TGCTrigger::TGCTrackSelector::reset
void reset()
Definition: TGCTrackSelector.cxx:28
LVL1TGCTrigger::TGCTrackSelector::MaxNumber_of_TrackCandidate_in
@ MaxNumber_of_TrackCandidate_in
Definition: TGCTrackSelector.h:27
AnalysisUtils::Delta::R
double R(const INavigable4Momentum *p1, const double v_eta, const double v_phi)
Definition: AnalysisMisc.h:49
LVL1TGCTrigger::TGCTrackSelector::m_trackPriorityRank
int m_trackPriorityRank[MaxNumber_of_TrackCandidate_in]
Definition: TGCTrackSelector.h:34
get
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition: hcg.cxx:127
xAOD::track
@ track
Definition: TrackingPrimitives.h:512