ATLAS Offline Software
Static Public Member Functions | Private Member Functions | List of all members
VP1TrackSummary Class Reference

#include <VP1TrackSummary.h>

Collaboration diagram for VP1TrackSummary:

Static Public Member Functions

static bool countHits (const Trk::Track *, unsigned &nPixelHits, unsigned &nSCTHits, unsigned &nTRTHits, unsigned &nhits_muon_phi, unsigned &nhits_rpc, unsigned &nhits_mdt, unsigned &nhits_tgc, unsigned &nhits_csc, unsigned &nhits_mm, unsigned &nhits_stgc)
 
static bool countHits (const Trk::Segment *, unsigned &nPixelHits, unsigned &nSCTHits, unsigned &nTRTHits, unsigned &nhits_muon_phi, unsigned &nhits_rpc, unsigned &nhits_mdt, unsigned &nhits_tgc, unsigned &nhits_csc, unsigned &nhits_mm, unsigned &nhits_stgc)
 
static void addCounts (std::set< const Trk::TrkDetElementBase * > &detelems, const Trk::MeasurementBase *meas, const AtlasDetectorID *idhelper, unsigned &nPixelHits, unsigned &nSCTHits, unsigned &nTRTHits, unsigned &nhits_muon_phi, unsigned &nhits_rpc, unsigned &nhits_mdt, unsigned &nhits_tgc, unsigned &nhits_csc, unsigned &nhits_mm, unsigned &nhits_stgc)
 

Private Member Functions

 VP1TrackSummary ()
 
 ~VP1TrackSummary ()
 

Detailed Description

Definition at line 25 of file VP1TrackSummary.h.

Constructor & Destructor Documentation

◆ VP1TrackSummary()

VP1TrackSummary::VP1TrackSummary ( )
private

◆ ~VP1TrackSummary()

VP1TrackSummary::~VP1TrackSummary ( )
private

Member Function Documentation

◆ addCounts()

void VP1TrackSummary::addCounts ( std::set< const Trk::TrkDetElementBase * > &  detelems,
const Trk::MeasurementBase meas,
const AtlasDetectorID idhelper,
unsigned &  nPixelHits,
unsigned &  nSCTHits,
unsigned &  nTRTHits,
unsigned &  nhits_muon_phi,
unsigned &  nhits_rpc,
unsigned &  nhits_mdt,
unsigned &  nhits_tgc,
unsigned &  nhits_csc,
unsigned &  nhits_mm,
unsigned &  nhits_stgc 
)
static

Definition at line 92 of file VP1TrackSummary.cxx.

105 {
106  const Trk::CompetingRIOsOnTrack* crot = dynamic_cast<const Trk::CompetingRIOsOnTrack*>(meas);
107 
108  if (crot){
109  unsigned int i = 0;
110  for (;i<crot->numberOfContainedROTs();++i){
111  detelems.insert(crot->rioOnTrack(i).detectorElement());
112  }
113  }else if (meas) {
114  const Trk::Surface * surf = &(meas->associatedSurface());
115  detelems.insert( surf ? surf->associatedDetectorElement() : nullptr);
116  }
117 
118  std::set<const Trk::TrkDetElementBase*>::const_iterator it = detelems.begin(), itEnd=detelems.end();
119  for (;it!=itEnd;++it){
120  const Trk::TrkDetElementBase* detelem=*it;
121  if (!detelem) continue;
122  Identifier id = detelem->identify();
123  if (!id.is_valid())
124  continue;
125  if (idhelper->is_pixel(id)) ++nPixelHits;
126  else if (idhelper->is_sct(id)) ++nSCTHits;
127  else if (idhelper->is_trt(id)) ++nTRTHits;
128  else if (idhelper->is_mdt(id)) ++nhits_mdt;
129  else if (idhelper->is_rpc(id)) ++nhits_rpc;
130  else if (idhelper->is_tgc(id)) ++nhits_tgc;
131  else if (idhelper->is_csc(id)) ++nhits_csc;
132  else if (idhelper->is_mm(id)) ++nhits_mm;
133  else if (idhelper->is_stgc(id)) ++nhits_stgc;
134  }// FIXME! Implement Muon phi hits
135  nhits_muon_phi=0;
136  detelems.clear();
137 }

◆ countHits() [1/2]

bool VP1TrackSummary::countHits ( const Trk::Segment seg,
unsigned &  nPixelHits,
unsigned &  nSCTHits,
unsigned &  nTRTHits,
unsigned &  nhits_muon_phi,
unsigned &  nhits_rpc,
unsigned &  nhits_mdt,
unsigned &  nhits_tgc,
unsigned &  nhits_csc,
unsigned &  nhits_mm,
unsigned &  nhits_stgc 
)
static

Definition at line 62 of file VP1TrackSummary.cxx.

74 {
75  nPixelHits = nSCTHits = nTRTHits = nhits_muon_phi = nhits_rpc = nhits_mdt = nhits_tgc = nhits_csc = nhits_mm = nhits_stgc = 0;
76  if (!seg)
77  return false;
78 
79  const AtlasDetectorID * idhelper = VP1DetInfo::atlasIDHelper();
80  if (!idhelper)
81  return false;
82 
83  std::set<const Trk::TrkDetElementBase*> detelems;// Need several to handle #$$%ing cROTs. EJWM
84  std::vector< const Trk::MeasurementBase * >::const_iterator tsos_iter = seg->containedMeasurements().begin(), tsos_end = seg->containedMeasurements().end();
85  for (; tsos_iter != tsos_end; ++tsos_iter) {
86  const Trk::MeasurementBase* meas = *tsos_iter;
87  addCounts(detelems, meas, idhelper, nPixelHits , nSCTHits , nTRTHits , nhits_muon_phi , nhits_rpc , nhits_mdt , nhits_tgc , nhits_csc, nhits_mm, nhits_stgc);
88  }
89  return true;
90 }

◆ countHits() [2/2]

bool VP1TrackSummary::countHits ( const Trk::Track trk,
unsigned &  nPixelHits,
unsigned &  nSCTHits,
unsigned &  nTRTHits,
unsigned &  nhits_muon_phi,
unsigned &  nhits_rpc,
unsigned &  nhits_mdt,
unsigned &  nhits_tgc,
unsigned &  nhits_csc,
unsigned &  nhits_mm,
unsigned &  nhits_stgc 
)
static

Definition at line 30 of file VP1TrackSummary.cxx.

42 {
43  nPixelHits = nSCTHits = nTRTHits = nhits_muon_phi = nhits_rpc = nhits_mdt = nhits_tgc = nhits_csc = nhits_mm = nhits_stgc = 0;
44  if (!trk)
45  return false;
46 
47  const AtlasDetectorID * idhelper = VP1DetInfo::atlasIDHelper();
48  if (!idhelper)
49  return false;
50 
51  std::set<const Trk::TrkDetElementBase*> detelems;// Need several to handle #$$%ing cROTs. EJWM
54  for (; tsos_iter != tsos_end; ++tsos_iter) {
55  const Trk::MeasurementBase* meas = *tsos_iter ? (*tsos_iter)->measurementOnTrack() : nullptr;
56  VP1TrackSummary::addCounts(detelems, meas, idhelper, nPixelHits , nSCTHits , nTRTHits , nhits_muon_phi , nhits_rpc , nhits_mdt , nhits_tgc , nhits_csc, nhits_mm, nhits_stgc);
57  }
58  return true;
59 }

The documentation for this class was generated from the following files:
AtlasDetectorID::is_pixel
bool is_pixel(Identifier id) const
Definition: AtlasDetectorID.h:760
AtlasDetectorID::is_rpc
bool is_rpc(Identifier id) const
Definition: AtlasDetectorID.h:875
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
Trk::Surface::associatedDetectorElement
const TrkDetElementBase * associatedDetectorElement() const
return associated Detector Element
AtlasDetectorID::is_csc
bool is_csc(Identifier id) const
Definition: AtlasDetectorID.h:891
AtlasDetectorID::is_sct
bool is_sct(Identifier id) const
Definition: AtlasDetectorID.h:770
Trk::Track::trackStateOnSurfaces
const Trk::TrackStates * trackStateOnSurfaces() const
return a pointer to a const DataVector of const TrackStateOnSurfaces.
skel.it
it
Definition: skel.GENtoEVGEN.py:396
AtlasDetectorID::is_mm
bool is_mm(Identifier id) const
Definition: AtlasDetectorID.h:913
Trk::TrkDetElementBase
Definition: TrkDetElementBase.h:52
VP1DetInfo::atlasIDHelper
static const AtlasDetectorID * atlasIDHelper()
Definition: VP1DetInfo.cxx:157
AtlasDetectorID::is_trt
bool is_trt(Identifier id) const
Definition: AtlasDetectorID.h:782
Trk::TrkDetElementBase::identify
virtual Identifier identify() const =0
Identifier.
IDTPM::nPixelHits
float nPixelHits(const U &p)
Definition: TrackParametersHelper.h:354
VP1TrackSummary::addCounts
static void addCounts(std::set< const Trk::TrkDetElementBase * > &detelems, const Trk::MeasurementBase *meas, const AtlasDetectorID *idhelper, unsigned &nPixelHits, unsigned &nSCTHits, unsigned &nTRTHits, unsigned &nhits_muon_phi, unsigned &nhits_rpc, unsigned &nhits_mdt, unsigned &nhits_tgc, unsigned &nhits_csc, unsigned &nhits_mm, unsigned &nhits_stgc)
Definition: VP1TrackSummary.cxx:92
Trk::CompetingRIOsOnTrack::rioOnTrack
virtual const RIO_OnTrack & rioOnTrack(unsigned int) const =0
returns the RIO_OnTrack (also known as ROT) objects depending on the integer.
Trk::CompetingRIOsOnTrack::numberOfContainedROTs
virtual unsigned int numberOfContainedROTs() const =0
Number of RIO_OnTracks to be contained by this CompetingRIOsOnTrack.
lumiFormat.i
int i
Definition: lumiFormat.py:85
IDTPM::nSCTHits
float nSCTHits(const U &p)
Definition: TrackParametersHelper.h:393
AtlasDetectorID::is_tgc
bool is_tgc(Identifier id) const
Definition: AtlasDetectorID.h:902
IDTPM::nTRTHits
float nTRTHits(const U &p)
Definition: TrackParametersHelper.h:446
Trk::Segment::containedMeasurements
const std::vector< const Trk::MeasurementBase * > & containedMeasurements() const
returns the vector of Trk::MeasurementBase objects
Definition: Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h:166
Trk::CompetingRIOsOnTrack
Base class for all CompetingRIOsOnTack implementations, extends the common MeasurementBase.
Definition: CompetingRIOsOnTrack.h:64
Trk::MeasurementBase
Definition: MeasurementBase.h:58
Trk::MeasurementBase::associatedSurface
virtual const Surface & associatedSurface() const =0
Interface method to get the associated Surface.
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
AtlasDetectorID::is_stgc
bool is_stgc(Identifier id) const
Definition: AtlasDetectorID.h:924
Trk::RIO_OnTrack::detectorElement
virtual const TrkDetElementBase * detectorElement() const =0
returns the detector element, assoicated with the PRD of this class
Trk::Surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:75
AtlasDetectorID
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
Definition: AtlasDetectorID.h:57
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
AtlasDetectorID::is_mdt
bool is_mdt(Identifier id) const
Definition: AtlasDetectorID.h:859
Identifier
Definition: IdentifierFieldParser.cxx:14