|
ATLAS Offline Software
|
#include <SegmentDriftCircleAssValidation.h>
|
| SegmentDriftCircleAssValidation (const std::string &name, ISvcLocator *pSvcLocator) |
|
virtual | ~SegmentDriftCircleAssValidation () |
|
StatusCode | initialize () |
|
StatusCode | execute () |
|
StatusCode | finalize () |
|
MsgStream & | dump (MsgStream &out) const |
|
std::ostream & | dump (std::ostream &out) 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 |
|
|
int | m_nprint |
|
SG::ReadHandleKey< Trk::SegmentCollection > | m_origtrackKey { this, "OrigTracksLocation", "TRTSegments", "TRT Segments collection name" } |
|
SG::ReadHandleKey< PRD_MultiTruthCollection > | m_PRDTruthTRTKey { this, "TruthNameTRT", "PRD_MultiTruthTRT", "PRD Multitruth collection name" } |
|
SG::ReadHandleKey< TRT_DriftCircleContainer > | m_circlesTRTKey { this, "TRT_DriftCirclesName", "TRT_DriftCircles", "TRT Driftcircle container name" } |
|
double | m_pTmin |
|
double | m_tcut |
|
double | m_rapcut |
|
int | m_dccut |
|
double | m_rmin |
|
double | m_rmax |
|
int | m_events |
|
int | m_ncircles |
|
std::multimap< int, const Trk::PrepRawData * > | m_kinecircle |
|
std::list< int > | m_allBarcodes |
|
int | m_nqsegments |
|
std::list< int > | m_particles |
|
std::multimap< int, int > | m_allParticles |
|
std::multimap< int, int > | m_tracks |
|
int | m_efficiency [5] {} |
|
◆ StoreGateSvc_t
◆ SegmentDriftCircleAssValidation()
InDet::SegmentDriftCircleAssValidation::SegmentDriftCircleAssValidation |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~SegmentDriftCircleAssValidation()
virtual InDet::SegmentDriftCircleAssValidation::~SegmentDriftCircleAssValidation |
( |
| ) |
|
|
inlinevirtual |
◆ 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()
◆ dump() [1/2]
MsgStream & InDet::SegmentDriftCircleAssValidation::dump |
( |
MsgStream & |
out | ) |
const |
◆ dump() [2/2]
std::ostream & InDet::SegmentDriftCircleAssValidation::dump |
( |
std::ostream & |
out | ) |
const |
◆ dumpevent()
MsgStream & InDet::SegmentDriftCircleAssValidation::dumpevent |
( |
MsgStream & |
out | ) |
const |
|
protected |
Definition at line 248 of file SegmentDriftCircleAssValidation.cxx.
250 out<<
"|---------------------------------------------------------------------|"
252 out<<
"| TRT Drift Circles | "
255 out<<
"| Good TRT particles size | "
258 out<<
"| Number good kine segments | "
261 out<<
"|---------------------------------------------------------------------|"
◆ dumptools()
MsgStream & InDet::SegmentDriftCircleAssValidation::dumptools |
( |
MsgStream & |
out | ) |
const |
|
protected |
Definition at line 197 of file SegmentDriftCircleAssValidation.cxx.
201 out<<
"|----------------------------------------------------------------"
202 <<
"----------------------------------------------------|"
205 std::string
s1;
for(
int i=0;
i<
n; ++
i)
s1.append(
" ");
s1.append(
"|");
207 std::string
s2;
for(
int i=0;
i<
n; ++
i)
s2.append(
" ");
s2.append(
"|");
209 std::string
s3;
for(
int i=0;
i<
n; ++
i)
s3.append(
" ");
s3.append(
"|");
218 <<std::setw(14)<<std::setprecision(5)<<
m_pTmin
221 out<<
"| rapidity cut | "
222 <<std::setw(14)<<std::setprecision(5)<<
m_rapcut
225 out<<
"| min Radius | "
226 <<std::setw(14)<<std::setprecision(5)<<
m_rmin
229 out<<
"| max Radius | "
230 <<std::setw(14)<<std::setprecision(5)<<
m_rmax
233 out<<
"| Min. number drift circles for generated segment | "
234 <<std::setw(14)<<std::setprecision(5)<<
m_dccut
237 out<<
"|----------------------------------------------------------------"
238 <<
"----------------------------------------------------|"
◆ efficiencyReconstruction()
void InDet::SegmentDriftCircleAssValidation::efficiencyReconstruction |
( |
| ) |
|
|
protected |
Definition at line 435 of file SegmentDriftCircleAssValidation.cxx.
443 int n = (*im).second;
448 if((*t).first!=
k)
break;
449 if((*t).second >
m)
m = (*t).second;
452 double rd = (
double)
m/
n;
if(rd>0.9)
d = 0;
453 else if(rd > 0.75)
d=1;
454 else if(rd > 0.50)
d=2;
455 else if(rd > 0.25)
d=3;
456 else if(rd <= 0.25)
d=4;
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode InDet::SegmentDriftCircleAssValidation::execute |
( |
| ) |
|
Definition at line 88 of file SegmentDriftCircleAssValidation.cxx.
94 if( !origColTracks.isValid() ){
96 return StatusCode::FAILURE;
103 if ( !prdCollection.isValid() ){
105 return StatusCode::FAILURE;
123 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 InDet::SegmentDriftCircleAssValidation::finalize |
( |
| ) |
|
Definition at line 130 of file SegmentDriftCircleAssValidation.cxx.
132 if(
m_events<=0)
return StatusCode::SUCCESS;
134 std::cout<<
"|-----------------------------------------------------------------------------------|"
136 std::cout<<
"| TrackSegmentValidation statistics"<<std::endl;
141 std::cout<<
"|-----------------------------------------------------------------------------------|"
143 std::cout<<
"| TRT Particles >0.9 >0.75 >0.50 >0.25 <=0.25 |"
145 std::cout<<
"|-----------------------------------------------------------------------------------|"
150 <<std::setw(13)<<std::setprecision(5)<<
ef[0]
151 <<std::setw(13)<<std::setprecision(5)<<
ef[1]
152 <<std::setw(13)<<std::setprecision(5)<<
ef[2]
153 <<std::setw(13)<<std::setprecision(5)<<
ef[3]
154 <<std::setw(13)<<std::setprecision(5)<<
ef[4]<<
" |"
156 std::cout<<
"|-----------------------------------------------------------------------------------|"
159 return StatusCode::SUCCESS;
◆ findTruth()
Definition at line 582 of file SegmentDriftCircleAssValidation.cxx.
585 std::list<PRD_MultiTruthCollection::const_iterator>
mc;
587 auto r = prdCollection->equal_range(
d->identify());
588 for(
auto i =
r.first;
i !=
r.second &&
i != prdCollection->end(); ++
i){
592 if (
mc.empty()) Q =
false;
◆ initialize()
StatusCode InDet::SegmentDriftCircleAssValidation::initialize |
( |
| ) |
|
◆ 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.
◆ isTheSameStrawElement()
◆ kine()
Definition at line 466 of file SegmentDriftCircleAssValidation.cxx.
471 std::list<PRD_MultiTruthCollection::const_iterator>
mc =
findTruth(
d,
find, prdCollection );
474 for(imc=
mc.begin();imc!=imce;++imc){
478 if(!pa || !pa->production_vertex())
continue;
482 int pdg = pa->pdg_id();
488 double pt = pa->momentum().perp();
493 double t = std::abs(pa->momentum().pz())/
pt;
498 Point3D<double>
v(pa->production_vertex()->position().x(),
499 pa->production_vertex()->position().y(),
500 pa->production_vertex()->position().z());
501 double r = sqrt(
v.x()*
v.x()+
v.y()*
v.y());
502 if( r < m_rmin || r >
m_rmax)
continue;
◆ kinpart()
Definition at line 514 of file SegmentDriftCircleAssValidation.cxx.
518 std::list<PRD_MultiTruthCollection::const_iterator> lk;
520 std::list<PRD_MultiTruthCollection::const_iterator>
mc =
findTruth(
d,
find, prdCollection );
524 for(imc=
mc.begin();imc!=imce;++imc){
529 if(!pa || !pa->production_vertex())
continue;
533 int pdg = pa->pdg_id();
539 double pt = pa->momentum().perp();
545 double t = std::abs(pa->momentum().pz())/
pt;
550 Point3D<double>
v(pa->production_vertex()->position().x(),
551 pa->production_vertex()->position().y(),
552 pa->production_vertex()->position().z());
553 double r = sqrt(
v.x()*
v.x()+
v.y()*
v.y());
554 if( r < m_rmin || r >
m_rmax)
continue;
556 lk.push_back((*imc));
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ newCirclesEvent()
Definition at line 280 of file SegmentDriftCircleAssValidation.cxx.
292 if( trtcontainer.isValid() ) {
294 InDet::TRT_DriftCircleContainer::const_iterator
w = trtcontainer->begin();
295 InDet::TRT_DriftCircleContainer::const_iterator we = trtcontainer->end ();
299 InDet::TRT_DriftCircleCollection::const_iterator
c = (*w)->begin();
300 InDet::TRT_DriftCircleCollection::const_iterator ce = (*w)->end ();
306 std::list<int> lk =
kine((*
c), prdCollection );
307 if(
int(lk.size())==0)
continue;
309 for(ik=lk.begin();ik!=ike;++ik){
312 bool isThere =
false;
315 if((*ik)==(*ii)) isThere =
true;
◆ 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.
◆ QualityTracksSelection()
int InDet::SegmentDriftCircleAssValidation::QualityTracksSelection |
( |
| ) |
|
|
protected |
◆ 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.
◆ tracksComparison()
Get the track segment
Definition at line 364 of file SegmentDriftCircleAssValidation.cxx.
370 int KINE[200],NKINE[200];
371 for(
int i=0;
i<200;++
i){
372 KINE[
i] =0; NKINE[
i] = 0;
377 for(; iseg != isegEnd; ++ iseg) {
390 if(!trtcircle)
continue;
393 if(!RawDataClus)
continue;
395 std::list<PRD_MultiTruthCollection::const_iterator> lk =
kinpart(RawDataClus, prdCollection );
396 if (
int(lk.size())==0)
continue;
400 for(ik=lk.begin(); ik!=ike; ++ik){
405 for(
int n=0;
n!=NK; ++
n) {
421 for(
int n=0;
n!=NK; ++
n) {
◆ updateVHKA()
◆ m_allBarcodes
std::list<int> InDet::SegmentDriftCircleAssValidation::m_allBarcodes |
|
protected |
◆ m_allParticles
std::multimap<int,int> InDet::SegmentDriftCircleAssValidation::m_allParticles |
|
protected |
◆ m_circlesTRTKey
◆ m_dccut
int InDet::SegmentDriftCircleAssValidation::m_dccut |
|
protected |
◆ m_detStore
◆ m_efficiency
int InDet::SegmentDriftCircleAssValidation::m_efficiency[5] {} |
|
protected |
◆ m_events
int InDet::SegmentDriftCircleAssValidation::m_events |
|
protected |
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_kinecircle
◆ m_ncircles
int InDet::SegmentDriftCircleAssValidation::m_ncircles |
|
protected |
◆ m_nprint
int InDet::SegmentDriftCircleAssValidation::m_nprint |
|
protected |
◆ m_nqsegments
int InDet::SegmentDriftCircleAssValidation::m_nqsegments |
|
protected |
◆ m_origtrackKey
◆ m_particles
std::list<int> InDet::SegmentDriftCircleAssValidation::m_particles |
|
protected |
◆ m_PRDTruthTRTKey
◆ m_pTmin
double InDet::SegmentDriftCircleAssValidation::m_pTmin |
|
protected |
◆ m_rapcut
double InDet::SegmentDriftCircleAssValidation::m_rapcut |
|
protected |
◆ m_rmax
double InDet::SegmentDriftCircleAssValidation::m_rmax |
|
protected |
◆ m_rmin
double InDet::SegmentDriftCircleAssValidation::m_rmin |
|
protected |
◆ m_tcut
double InDet::SegmentDriftCircleAssValidation::m_tcut |
|
protected |
◆ m_tracks
std::multimap<int,int> InDet::SegmentDriftCircleAssValidation::m_tracks |
|
protected |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
JetConstituentVector::iterator iterator
Const iterator class for DataVector/DataList.
virtual const TRT_DriftCircle * prepRawData() const override final
returns the PrepRawData - is a TRT_DriftCircle in this scope
bool isNucleus(const T &p)
PDG rule 16: Nuclear codes are given as 10-digit numbersĀ±10LZZZAAAI.
std::string find(const std::string &s)
return a remapped string
SG::ReadHandleKey< Trk::SegmentCollection > m_origtrackKey
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
MsgStream & dumptools(MsgStream &out) const
std::list< PRD_MultiTruthCollection::const_iterator > findTruth(const InDet::TRT_DriftCircle *, bool &, const PRD_MultiTruthCollection *)
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool msgLvl(const MSG::Level lvl) const
std::list< int > kine(const InDet::TRT_DriftCircle *, const PRD_MultiTruthCollection *prdCollection)
const std::string & key() const
Return the StoreGate ID for the referenced object.
bool isTheSameStrawElement(int, const Trk::PrepRawData *)
MsgStream & dumpevent(MsgStream &out) const
std::multimap< int, int > m_tracks
unsigned int numberOfMeasurementBases() const
Return the number of contained Trk::MeasurementBase (s)
void newCirclesEvent(const PRD_MultiTruthCollection *)
int QualityTracksSelection()
virtual void setOwner(IDataHandleHolder *o)=0
std::list< int > m_particles
Class to handle pseudo-measurements in fitters and on track objects.
virtual StatusCode sysInitialize() override
Override sysInitialize.
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
::StatusCode StatusCode
StatusCode definition for legacy code.
const MeasurementBase * measurement(unsigned int) const
returns the Trk::MeasurementBase objects depending on the integer
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
void efficiencyReconstruction()
std::list< PRD_MultiTruthCollection::const_iterator > kinpart(const InDet::TRT_DriftCircle *, const PRD_MultiTruthCollection *)
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
const GenParticle * ConstGenParticlePtr
double charge(const T &p)
void tracksComparison(const Trk::SegmentCollection *, const PRD_MultiTruthCollection *)
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
DataObjIDColl m_extendedExtraObjects
std::multimap< int, const Trk::PrepRawData * > m_kinecircle
std::list< int > m_allBarcodes
SG::ReadHandleKey< PRD_MultiTruthCollection > m_PRDTruthTRTKey
#define ATH_MSG_WARNING(x)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
SG::ReadHandleKey< TRT_DriftCircleContainer > m_circlesTRTKey
AthAlgorithm()
Default constructor:
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
std::multimap< int, int > m_allParticles
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.