|
ATLAS Offline Software
|
#include <RecMomentumQualityValidation.h>
|
| RecMomentumQualityValidation (const std::string &name, ISvcLocator *pSvcLocator) |
| Standard Athena-Algorithm Constructor. More...
|
|
| ~RecMomentumQualityValidation () |
| Default Destructor. More...
|
|
StatusCode | initialize () |
| standard Athena-Algorithm method More...
|
|
StatusCode | execute () |
| standard Athena-Algorithm method More...
|
|
StatusCode | finalize () |
| standard Athena-Algorithm method More...
|
|
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 |
|
This is for automatising the 100%, 50%, 20%, 10% tables for (indet) tracks
- Author
- Wolfgang Liebig (Wolfgang.Liebig -at- cern.ch)
Definition at line 32 of file RecMomentumQualityValidation.h.
◆ StoreGateSvc_t
◆ StatIndex
◆ RecMomentumQualityValidation()
Trk::RecMomentumQualityValidation::RecMomentumQualityValidation |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~RecMomentumQualityValidation()
Trk::RecMomentumQualityValidation::~RecMomentumQualityValidation |
( |
| ) |
|
|
default |
◆ 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 Trk::RecMomentumQualityValidation::execute |
( |
| ) |
|
standard Athena-Algorithm method
Definition at line 93 of file RecMomentumQualityValidation.cxx.
109 return StatusCode::FAILURE;
121 return StatusCode::FAILURE;
126 for (;trackIterator!=trackCollection->
end();++trackIterator) {
135 TrackTruthCollection::const_iterator truthIterator
136 = trackTruthCollection->find( trackIterator - (*trackCollection).begin() );
137 if ( truthIterator == trackTruthCollection->end() ){
140 trackTruth = &((*truthIterator).second);
150 if ( genParticle && genParticle->pdg_id() == 0 ) {
152 <<
" does not conform to PDG requirements... ignore it!" <<
endmsg;
153 genParticle =
nullptr;
159 "Associated Particle ID: " << genParticle->pdg_id() <<
endmsg;
161 if ( genParticle->production_vertex() )
162 generatedTrackPerigee =
m_truthToTrack->makePerigeeParameters( genParticle );
166 bool track_has_trthits(
false);
168 = (*trackIterator)->trackStateOnSurfaces();
170 = currentTSOSList->
begin();
171 for (;itTSOS!=currentTSOSList->
end();++itTSOS) {
175 track_has_trthits=
true;
179 const TrackParameters* reconstructedPerigee = (*trackIterator)->perigeeParameters();
181 if (generatedTrackPerigee !=
nullptr) {
183 if (!reconstructedPerigee)
return StatusCode::FAILURE;
185 double this_eta = reconstructedPerigee->eta();
187 double truth_over_recP = generatedTrackPerigee->parameters()[
Trk::qOverP]
189 if ( (truth_over_recP > 0.9) && (truth_over_recP < 1.1)) {
194 if (track_has_trthits) {
201 }
else if ( (truth_over_recP > 0.8) && (truth_over_recP < 1.2) ) {
205 if (track_has_trthits) {
210 }
else if ( (truth_over_recP > 0.5) && (truth_over_recP < 1.5) ) {
213 if (track_has_trthits) {
222 delete generatedTrackPerigee;
224 double this_eta = reconstructedPerigee->eta();
234 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 Trk::RecMomentumQualityValidation::finalize |
( |
| ) |
|
◆ initialize()
StatusCode Trk::RecMomentumQualityValidation::initialize |
( |
| ) |
|
standard Athena-Algorithm method
Definition at line 49 of file RecMomentumQualityValidation.cxx.
53 if (
sc.isFailure()) { }
60 msg(MSG::INFO) <<
"Set the ToolHandle to None if track selection is supposed to be disabled" <<
endmsg;
72 return StatusCode::FAILURE;
76 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.
◆ monitorTrackFits()
void Trk::RecMomentumQualityValidation::monitorTrackFits |
( |
std::vector< unsigned int > & |
Ntracks, |
|
|
const double & |
eta |
|
) |
| |
|
staticprivate |
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ 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.
◆ printTable()
void Trk::RecMomentumQualityValidation::printTable |
( |
| ) |
const |
|
private |
method: make the output table
Definition at line 248 of file RecMomentumQualityValidation.cxx.
252 for (
unsigned int iref=100; iref<
m_nHundred[
iAll]; iref*=10, ++iw,
d+=
" ") {}
253 std::cout <<
"---------------------------------------------------------------------------------" << std::endl;
254 std::cout <<
" "<<
name() <<
" results "
255 << (
m_trackSelector.empty() ?
" " :
"(with track selection)") << std::endl;
256 std::cout <<
"---------------------------------------------------------------------------------" << std::endl;
257 std::cout <<
" q/p truth vicinity -- Any "<<
d<<
" 50% "<<
d<<
" 20% "<<
d<<
" 10%"<<
d<<
"noTruth " << std::endl;
258 std::cout <<
"---------------------------------------------------------------------------------" << std::endl;
259 std::cout <<
" total (Si+TRT) :" << std::setiosflags(std::ios::dec) << std::setw(iw+1)
261 << std::setiosflags(std::ios::dec) << std::setw(iw+1)
263 << std::setiosflags(std::ios::dec) << std::setw(iw+1)
265 << std::setiosflags(std::ios::dec) << std::setw(iw+1)
267 << std::setiosflags(std::ios::dec) << std::setw(iw+1)
270 std::cout <<
" barrel (Si+TRT) :" << std::setiosflags(std::ios::dec) << std::setw(iw+1)
272 << std::setiosflags(std::ios::dec) << std::setw(iw+1)
274 << std::setiosflags(std::ios::dec) << std::setw(iw+1)
276 << std::setiosflags(std::ios::dec) << std::setw(iw+1)
278 << std::setiosflags(std::ios::dec) << std::setw(iw+1)
281 std::cout <<
" transition :" << std::setiosflags(std::ios::dec) << std::setw(iw+1)
283 << std::setiosflags(std::ios::dec) << std::setw(iw+1)
285 << std::setiosflags(std::ios::dec) << std::setw(iw+1)
287 << std::setiosflags(std::ios::dec) << std::setw(iw+1)
289 << std::setiosflags(std::ios::dec) << std::setw(iw+1)
292 std::cout <<
" endcap (Si+TRT) :" << std::setiosflags(std::ios::dec) << std::setw(iw+1)
294 << std::setiosflags(std::ios::dec) << std::setw(iw+1)
296 << std::setiosflags(std::ios::dec) << std::setw(iw+1)
298 << std::setiosflags(std::ios::dec) << std::setw(iw+1)
300 << std::setiosflags(std::ios::dec) << std::setw(iw+1)
303 std::cout <<
"---------------------------------------------------------------------------------" << std::endl << std::endl;
◆ 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_detStore
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_idHelper
◆ m_inputTrackCollection
std::string Trk::RecMomentumQualityValidation::m_inputTrackCollection |
|
private |
◆ m_nFakeOrLost
std::vector<unsigned int> Trk::RecMomentumQualityValidation::m_nFakeOrLost |
|
private |
◆ m_nFifty
std::vector<unsigned int> Trk::RecMomentumQualityValidation::m_nFifty |
|
private |
◆ m_nHundred
std::vector<unsigned int> Trk::RecMomentumQualityValidation::m_nHundred |
|
private |
◆ m_nTen
std::vector<unsigned int> Trk::RecMomentumQualityValidation::m_nTen |
|
private |
◆ m_nTwenty
std::vector<unsigned int> Trk::RecMomentumQualityValidation::m_nTwenty |
|
private |
◆ m_tFakeOrLost
std::vector<unsigned int> Trk::RecMomentumQualityValidation::m_tFakeOrLost |
|
private |
◆ m_tFifty
std::vector<unsigned int> Trk::RecMomentumQualityValidation::m_tFifty |
|
private |
◆ m_tHundred
std::vector<unsigned int> Trk::RecMomentumQualityValidation::m_tHundred |
|
private |
◆ m_trackSelector
◆ m_trackTruthCollection
std::string Trk::RecMomentumQualityValidation::m_trackTruthCollection |
|
private |
◆ m_truthToTrack
◆ m_tTen
std::vector<unsigned int> Trk::RecMomentumQualityValidation::m_tTen |
|
private |
◆ m_tTwenty
std::vector<unsigned int> Trk::RecMomentumQualityValidation::m_tTwenty |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
HepMC::ConstGenParticlePtr scptr() const
Dereference/smart pointer.
Const iterator class for DataVector/DataList.
std::vector< unsigned int > m_nTen
std::vector< unsigned int > m_tFifty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool msgLvl(const MSG::Level lvl) const
const AtlasDetectorID * m_idHelper
bool is_trt(Identifier id) const
std::vector< unsigned int > m_tFakeOrLost
#define ATH_MSG_VERBOSE(x)
static void monitorTrackFits(std::vector< unsigned int > &, const double &)
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual void setOwner(IDataHandleHolder *o)=0
HepMC::ConstGenParticlePtr cptr() const
Dereference.
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
std::vector< unsigned int > m_nFakeOrLost
virtual StatusCode sysInitialize() override
Override sysInitialize.
std::vector< unsigned int > m_tHundred
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
::StatusCode StatusCode
StatusCode definition for legacy code.
void printTable() const
method: make the output table
std::string m_inputTrackCollection
properties from JobOptions:
std::vector< unsigned int > m_nHundred
counters
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
bool isValid() const
Validity check.
const HepMcParticleLink & particleLink() const
ToolHandle< Trk::ITruthToTrack > m_truthToTrack
Tool handle to Trk::ITruthToTrack tool.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
const GenParticle * ConstGenParticlePtr
ParametersBase< TrackParametersDim, Charged > TrackParameters
std::vector< unsigned int > m_nFifty
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
DataObjIDColl m_extendedExtraObjects
MC particle associated with a reco track + the quality of match.
#define ATH_MSG_WARNING(x)
const double mb
1mb to cm2
std::vector< unsigned int > m_nTwenty
ToolHandle< Trk::ITrackSelectorTool > m_trackSelector
Tool handle to Trk::ITrackSelectorTool.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
std::vector< unsigned int > m_tTen
AthAlgorithm()
Default constructor:
std::vector< unsigned int > m_tTwenty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
std::string m_trackTruthCollection
job option: the truth track collection name
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.