|
ATLAS Offline Software
|
#include <SharedHitMapper.h>
|
| SharedHitMapper (const std::string &name, ISvcLocator *pSvcLocator) |
|
virtual | ~SharedHitMapper () |
|
virtual StatusCode | initialize () |
|
virtual StatusCode | execute () |
|
virtual StatusCode | finalize () |
|
int | numberSharedBLayer () const |
|
int | numberSharedPix () const |
|
int | numberSharedSct () const |
|
virtual StatusCode | sysInitialize () override |
| Override sysInitialize. More...
|
|
virtual const DataObjIDColl & | extraOutputDeps () const override |
| Return the list of extra output dependencies. More...
|
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
Definition at line 21 of file SharedHitMapper.h.
◆ StoreGateSvc_t
◆ SharedHitMapper()
SharedHitMapper::SharedHitMapper |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~SharedHitMapper()
SharedHitMapper::~SharedHitMapper |
( |
| ) |
|
|
virtual |
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode SharedHitMapper::execute |
( |
| ) |
|
|
virtual |
retrieve input tracks:
Definition at line 102 of file SharedHitMapper.cxx.
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;
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ extraOutputDeps()
const DataObjIDColl & AthAlgorithm::extraOutputDeps |
( |
| ) |
const |
|
overridevirtualinherited |
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 50 of file AthAlgorithm.cxx.
57 return Algorithm::extraOutputDeps();
◆ finalize()
StatusCode SharedHitMapper::finalize |
( |
| ) |
|
|
virtual |
◆ initialize()
StatusCode SharedHitMapper::initialize |
( |
| ) |
|
|
virtual |
Definition at line 86 of file SharedHitMapper.cxx.
98 std::cout<<
name()<<
" initialized"<<std::endl;
99 return StatusCode::SUCCESS;
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ numberSharedBLayer()
int SharedHitMapper::numberSharedBLayer |
( |
| ) |
const |
◆ numberSharedPix()
int SharedHitMapper::numberSharedPix |
( |
| ) |
const |
◆ numberSharedSct()
int SharedHitMapper::numberSharedSct |
( |
| ) |
const |
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ renounce()
◆ renounceArray()
◆ sysInitialize()
StatusCode AthAlgorithm::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_deltaRCut
double SharedHitMapper::m_deltaRCut |
|
private |
◆ m_detStore
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_inputTrackCollection
std::string SharedHitMapper::m_inputTrackCollection |
|
private |
◆ m_nbpd
const int SharedHitMapper::m_nbpd = 3 |
|
staticprivate |
◆ m_nbpl
const int SharedHitMapper::m_nbpl = 3 |
|
staticprivate |
◆ m_nbsd
const int SharedHitMapper::m_nbsd = 9 |
|
staticprivate |
◆ m_nbsl
const int SharedHitMapper::m_nbsl = 4 |
|
staticprivate |
◆ m_npd
int SharedHitMapper::m_npd[m_nbpd] |
|
private |
◆ m_npl
int SharedHitMapper::m_npl[m_nbpl] |
|
private |
◆ m_nsd
int SharedHitMapper::m_nsd[m_nbsd] |
|
private |
◆ m_nsl
int SharedHitMapper::m_nsl[m_nbsl] |
|
private |
◆ m_pixelId
if true use shared info from track summary instead of recomputing them
Definition at line 41 of file SharedHitMapper.h.
◆ m_qualOrder
bool SharedHitMapper::m_qualOrder |
|
private |
◆ m_sctId
◆ m_sharedHitMapLocation
std::string SharedHitMapper::m_sharedHitMapLocation |
|
private |
◆ m_useTrackSummaryShared
bool SharedHitMapper::m_useTrackSummaryShared |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
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.
std::vector< pairTrkRio > vecpairTrkRio
int numberSharedBLayer() 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
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
std::pair< const xAOD::TrackParticle *, const Trk::RIO_OnTrack * > pairTrkRio
int numberSharedPix() const
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
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].
#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.
virtual void setOwner(IDataHandleHolder *o)=0
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].
virtual StatusCode sysInitialize() override
Override sysInitialize.
bool m_qualOrder
pairs of tracks with dR>dRCut not considered
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
msgSvc
Provide convenience handles for various services.
::StatusCode StatusCode
StatusCode definition for legacy code.
std::string m_sharedHitMapLocation
location of inputTracks in StoreGate
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
@ numberOfSCTHoles
number of SCT holes [unit8_t].
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
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.
DataObjIDColl m_extendedExtraObjects
int numberSharedSct() const
#define ATH_MSG_WARNING(x)
const double mb
1mb to cm2
Identifier identify() const
return the identifier -extends MeasurementBase
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
@ numberOfInnermostPixelLayerSharedHits
number of Pixel 0th layer barrel hits shared by several tracks.
@ numberOfSCTHits
number of hits in SCT [unit8_t].
AthAlgorithm()
Default constructor:
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.
size_type size() const noexcept
Returns the number of elements in the collection.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
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...