 |
ATLAS Offline Software
|
Go to the documentation of this file.
18 typedef std::pair<const xAOD::TrackParticle*, const Trk::RIO_OnTrack*>
pairTrkRio;
27 m_assocs.insert(std::make_pair(trk,shPattern));
30 int shPattern = 100000*shB + 1000*shS + 100*shP;
31 m_assocs.insert(std::make_pair(trk,shPattern));
34 int tempSharedPattern(0);
37 if(aI!=aE) tempSharedPattern = aI->second;
38 return tempSharedPattern/100000;
41 int tempSharedPattern(0);
44 if(aI!=aE) tempSharedPattern = aI->second;
45 return ((tempSharedPattern%100000)%1000)/100;
48 int tempSharedPattern(0);
51 if(aI!=aE) tempSharedPattern = aI->second;
52 return (tempSharedPattern%100000)/1000;
56 std::cout<<
"SharedHitTrackAssoc has "<<this->
size()<<
" elements:"<<std::endl;
60 std::cout <<
"--> track: "
61 <<
" Eta= " << aI->first->eta()
62 <<
" Phi= " << aI->first->phi()
63 <<
" pT= " << aI->first->pt()
64 <<
" Shared pattern= " << aI->second
98 std::cout<<
name()<<
" initialized"<<std::endl;
99 return StatusCode::SUCCESS;
109 if (
sc.isFailure()) {
111 return StatusCode::SUCCESS;
123 for (; trk1I!=trkE; ++trk1I) {
128 if (nbs < 0) nbs = 0;
129 if (nps < 0) nps = 0;
130 if (nss < 0) nss = 0;
131 if(nbs+nps+nss>0) assoc->
add( (*trk1I), nbs, nps, nss);
141 for (; trk1I!=trkE; ++trk1I) {
144 ATH_MSG_ERROR(
"Can't get the original track ! Please run on ESD");
145 return StatusCode::SUCCESS;
150 int np1 = 0, np2 = 0, ns1 = 0, ns2 = 0;
151 int nhp1 = 0, nhp2 = 0, nhs1 = 0, nhs2 = 0, nh1 = 0, nh2 = 0;
152 int nprec1 = 0, nprec2 = 0;
153 double chi21 = 0., chi22 = 0.;
155 chi21 = (*trk1I)->chiSquared();
162 q1 = 10000*(2*nprec1-nh1) -
int(20.*chi21/
float(nprec1));
170 ATH_MSG_VERBOSE(
"First track (pT="<<t1p4.Pt()<<
", eta="<<t1p4.Eta ()<<
") has " <<
mb->size() <<
" RIOs on track");
183 for (; trk2I!=trkE; ++trk2I) {
184 if(trk2I==trk1I)
continue;
187 ATH_MSG_ERROR(
"Can't get the original track ! Please run on ESD");
188 return StatusCode::SUCCESS;
191 double deltaR = t1p4.DeltaR(t2p4);
197 chi22 = (*trk2I)->chiSquared();
204 q2 = 10000*(2*nprec2-nh2) -
int(20.*chi22/
float(nprec2));
205 if (q1 > q2)
continue;
208 nextMb =
mb->begin();
209 for(; nextMb != lastMb; ++nextMb) {
213 if( (!pixl) && (!ssct) )
continue;
243 if (nextMb ==
mb->begin())
ATH_MSG_VERBOSE(
"Second track (pT="<<t2p4.Pt()<<
") has " << mb2->
size() <<
" RIOs on track");
245 for(; nextMb2 != lastMb2; ++nextMb2) {
249 if( (!pixl2) && (!ssct2) )
continue;
252 ATH_MSG_DEBUG(
"Shared hit ! Track1 Pt = " << t1p4.Pt() <<
" Track2 Pt = " << t2p4.Pt());
254 ATH_MSG_VERBOSE(
"Track1 chi2 = " << chi21 <<
" nprec = " << nprec1 <<
" (np,ns) = (" << np1 <<
" , " << ns1 <<
") " <<
" nhole = " << nh1 <<
" (nhp,nhs) = (" << nhp1 <<
" , " << nhs1 <<
") " <<
" quality = " << q1);
255 ATH_MSG_VERBOSE(
"Track2 chi2 = " << chi22 <<
" nprec = " << nprec2 <<
" (np,ns) = (" << np2 <<
" , " << ns2 <<
") " <<
" nhole = " << nh2 <<
" (nhp,nhs) = (" << nhp2 <<
" , " << nhs2 <<
") " <<
" quality = " << q2);
259 ATH_MSG_DEBUG(sl[0] <<
" "<< sl[1] <<
" " << sl[2] <<
" " << sl[3]);
263 if (pl[
i] &&
std::find(myvecTrkRio.begin(), myvecTrkRio.end(),
p) == myvecTrkRio.end()) {
m_npl[
i]++;myvecTrkRio.push_back(
p);}
266 if (
pd[
i] &&
std::find(myvecTrkRio.begin(), myvecTrkRio.end(),
p) == myvecTrkRio.end()) {
m_npd[
i]++;myvecTrkRio.push_back(
p);}
269 if (sl[
i] &&
std::find(myvecTrkRio.begin(), myvecTrkRio.end(),
p) == myvecTrkRio.end()) {
m_nsl[
i]++;myvecTrkRio.push_back(
p);}
272 if (
sd[
i] &&
std::find(myvecTrkRio.begin(), myvecTrkRio.end(),
p) == myvecTrkRio.end()) {
m_nsd[
i]++;myvecTrkRio.push_back(
p);}
299 return StatusCode::SUCCESS;
303 return StatusCode::SUCCESS;
This is an Identifier helper class for the Pixel subdetector. This class is a factory for creating co...
bool is_pixel(Identifier id) const
@ numberOfPixelHoles
number of pixel layers on track with absence of hits [unit8_t].
Const iterator class for DataVector/DataList.
This is an Identifier helper class for the SCT subdetector. This class is a factory for creating comp...
std::vector< pairTrkRio > vecpairTrkRio
int numberSharedBLayer() const
int numberSharedPix(const xAOD::TrackParticle *const trk) const
@ numberOfSCTSharedHits
number of SCT hits shared by several tracks [unit8_t].
std::string find(const std::string &s)
return a remapped string
bool m_useTrackSummaryShared
bool is_sct(Identifier id) const
std::pair< const xAOD::TrackParticle *, const Trk::RIO_OnTrack * > pairTrkRio
int numberSharedPix() const
const PixelID * m_pixelId
if true use shared info from track summary instead of recomputing them
@ numberOfPixelHits
these are the pixel hits, including the b-layer [unit8_t].
int numberSharedSct(const xAOD::TrackParticle *const trk) const
#define ATH_MSG_VERBOSE(x)
std::string m_inputTrackCollection
void add(const xAOD::TrackParticle *const trk, int shPattern)
bool is_blayer(const Identifier &id) const
Test for b-layer - WARNING: id MUST be pixel id, otherwise answer is not accurate....
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
TLorentzVector FourMom_t
Definition of the 4-momentum type.
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
bool is_barrel(const Identifier &id) const
Test for barrel - WARNING: id MUST be pixel id, otherwise answer is not accurate. Use SiliconID for g...
@ numberOfPixelSharedHits
number of Pixel all-layer hits shared by several tracks [unit8_t].
bool m_qualOrder
pairs of tracks with dR>dRCut not considered
msgSvc
Provide convenience handles for various services.
virtual StatusCode finalize()
::StatusCode StatusCode
StatusCode definition for legacy code.
int numberSharedBLayer(const xAOD::TrackParticle *const trk) const
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Assoc::const_iterator AssocIter
std::string m_sharedHitMapLocation
location of inputTracks in StoreGate
@ numberOfSCTHoles
number of SCT holes [unit8_t].
int layer_disk(const Identifier &id) const
double m_deltaRCut
location of sharedHitMap in StoreGate
int layer_disk(const Identifier &id) const
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
int numberSharedSct() const
const double mb
1mb to cm2
Identifier identify() const
return the identifier -extends MeasurementBase
@ numberOfInnermostPixelLayerSharedHits
number of Pixel 0th layer barrel hits shared by several tracks.
virtual StatusCode execute()
@ numberOfSCTHits
number of hits in SCT [unit8_t].
SharedHitMapper(const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode initialize()
Class describing a TrackParticle.
const Trk::Track * track() const
Returns a pointer (which can be NULL) to the Trk::Track which was used to make this TrackParticle.
virtual ~SharedHitMapper()
size_type size() const noexcept
Returns the number of elements in the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
bool is_barrel(const Identifier &id) const
Test for barrel - WARNING: id MUST be sct id, otherwise answer is not accurate. Use SiliconID for gen...