ATLAS Offline Software
Loading...
Searching...
No Matches
TIDA Namespace Reference

Test for xAOD. More...

Classes

class  Associator
class  Chain
class  Event
class  Feature
 actual template of the Feature wrapper - stores a pointer to an object and inherits from FeatureBase More...
class  FeatureBase
 very basic Feature base class just so that we can store derived classes onto the store More...
class  FeatureStore
class  Histogram
class  Histogram2D
class  HistogramBase
class  Reference
class  ReferenceMap
class  Roi
class  Track
class  Vertex

Functions

std::ostream & operator<< (std::ostream &s, const Reference &r)
bool isGoodOffline (const Analysis::Electron &elec)
bool isGoodOffline (const Analysis::Muon &muon)

Detailed Description

Test for xAOD.

Function Documentation

◆ isGoodOffline() [1/2]

bool TIDA::isGoodOffline ( const Analysis::Electron & elec)

Definition at line 122 of file OfflineObjectSelection.cxx.

122 {
123 if ( elec.trackParticle() && elec.isem(egammaPID::ElectronMediumPP)==0 ) {
124 //medium++ ID
125 if (elec.author() == 1 || elec.author() == 3) {
126 //Author = track or track+calo
127 return true;
128 }
129 }
130 return false;
131}
unsigned int isem(unsigned int mask=egammaPIDObs::ALL, egammaPIDObs::PID pid=egammaPIDObs::IsEM) const
ID flag with cuts, 0:e, >1:jet.
Definition egamma.cxx:761
const Rec::TrackParticle * trackParticle(unsigned int index=0) const
pointer to TrackParticle
Definition egamma.cxx:389
unsigned int author() const
Reconstruction Author.
Definition egamma.h:245
const unsigned int ElectronMediumPP
Medium++ electron selecton.

◆ isGoodOffline() [2/2]

bool TIDA::isGoodOffline ( const Analysis::Muon & muon)

maybe select all these track based quantitied om the TIDA::Track, so we dont have to fuss with is it xAOD/is it not xAOD etc

Definition at line 134 of file OfflineObjectSelection.cxx.

134 {
135 if (!muon.isLoose()) {
136 //Tight muon
137 return false;
138 }
139
140 //Based on https://svnweb.cern.ch/trac/atlasgrp/browser/Physics/Common/OSCAR/OSSelectors/trunk/src/OSSelectMuon.cxx
141 if (muon.hasInDetTrackParticle()) {
142 const Rec::TrackParticle* idTrack = muon.inDetTrackParticle();
143 const Trk::TrackSummary* summary = idTrack->trackSummary();
144 if (!summary) return false;
145
148
149 // Expect B-Layer hit info not available for Rec::TrackParticle
150
151 // Pix hits
152 int nPixelHits = summary->get(Trk::numberOfPixelHits);
153 int numberOfPixelDeadSensors = summary->get(Trk::numberOfPixelDeadSensors);
154 nPixelHits += numberOfPixelDeadSensors;
155 if (nPixelHits < 2) return false;
156
157 // SCT hits
158 int nSCTHits = summary->get(Trk::numberOfSCTHits);
159 int numberOfSCTDeadSensors = summary->get(Trk::numberOfSCTDeadSensors);
160 nSCTHits += numberOfSCTDeadSensors;
161 if (nSCTHits < 6) return false;
162
163 // Pix+ + SCT holes
164 int numberOfPixelHoles=muon.numberOfPixelHoles();
165 int numberOfSCTHoles=muon.numberOfSCTHoles();
166 if ( numberOfPixelHoles+numberOfSCTHoles > 2) return false;
167
168 float etaTrack = fabs(idTrack->eta()); // Need to extrapolate in principle
169 int nTrtHits = summary->get(Trk::numberOfTRTHits);
170 int nTrtOutliers = summary->get(Trk::numberOfTRTOutliers);
171
172 if (etaTrack < 1.9) {
173 if ((nTrtHits + nTrtOutliers) < 5 ) return false;
174 if (nTrtOutliers >= (0.9 * (nTrtHits + nTrtOutliers))) return false;
175 } else {
176 if ((nTrtHits + nTrtOutliers) > 5) {
177 if (nTrtOutliers >= (0.9 * (nTrtHits + nTrtOutliers))) return false;
178 }
179 }
180 return true;
181 }
182 return false;
183}
virtual double eta() const =0
pseudo rapidity
const TrackSummary * trackSummary() const
accessor function for TrackSummary.
A summary of the information contained by a track.
@ numberOfPixelHits
number of pixel layers on track with absence of hits
@ numberOfPixelDeadSensors
number of pixel hits with broad errors (width/sqrt(12))

◆ operator<<()

std::ostream & TIDA::operator<< ( std::ostream & s,
const Reference & r )

Definition at line 83 of file TIDAReference.h.

83 {
84 s << "[ Reference: " << r.name() << "\n";
85 s << " " << r.selector()->size() << "\n";
86 s << " " << r.tom()->size() << "\n";
87 s << " " << *r.tom() << "]";
88 return s;
89}
int r
Definition globals.cxx:22