|
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" } |
|
const HepPDT::ParticleDataTable * | m_particleDataTable |
|
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);
◆ 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.
◆ 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.
◆ 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 265 of file SegmentDriftCircleAssValidation.cxx.
267 out<<
"|---------------------------------------------------------------------|"
269 out<<
"| TRT Drift Circles | "
272 out<<
"| Good TRT particles size | "
275 out<<
"| Number good kine segments | "
278 out<<
"|---------------------------------------------------------------------|"
◆ dumptools()
MsgStream & InDet::SegmentDriftCircleAssValidation::dumptools |
( |
MsgStream & |
out | ) |
const |
|
protected |
Definition at line 214 of file SegmentDriftCircleAssValidation.cxx.
218 out<<
"|----------------------------------------------------------------"
219 <<
"----------------------------------------------------|"
222 std::string
s1;
for(
int i=0;
i<
n; ++
i)
s1.append(
" ");
s1.append(
"|");
224 std::string
s2;
for(
int i=0;
i<
n; ++
i)
s2.append(
" ");
s2.append(
"|");
226 std::string
s3;
for(
int i=0;
i<
n; ++
i)
s3.append(
" ");
s3.append(
"|");
235 <<std::setw(14)<<std::setprecision(5)<<
m_pTmin
238 out<<
"| rapidity cut | "
239 <<std::setw(14)<<std::setprecision(5)<<
m_rapcut
242 out<<
"| min Radius | "
243 <<std::setw(14)<<std::setprecision(5)<<
m_rmin
246 out<<
"| max Radius | "
247 <<std::setw(14)<<std::setprecision(5)<<
m_rmax
250 out<<
"| Min. number drift circles for generated segment | "
251 <<std::setw(14)<<std::setprecision(5)<<
m_dccut
254 out<<
"|----------------------------------------------------------------"
255 <<
"----------------------------------------------------|"
◆ efficiencyReconstruction()
void InDet::SegmentDriftCircleAssValidation::efficiencyReconstruction |
( |
| ) |
|
|
protected |
Definition at line 452 of file SegmentDriftCircleAssValidation.cxx.
460 int n = (*im).second;
465 if((*t).first!=
k)
break;
466 if((*t).second >
m)
m = (*t).second;
469 double rd = (
double)
m/
n;
if(rd>0.9)
d = 0;
470 else if(rd > 0.75)
d=1;
471 else if(rd > 0.50)
d=2;
472 else if(rd > 0.25)
d=3;
473 else if(rd <= 0.25)
d=4;
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode InDet::SegmentDriftCircleAssValidation::execute |
( |
| ) |
|
Definition at line 105 of file SegmentDriftCircleAssValidation.cxx.
111 if( !origColTracks.isValid() ){
113 return StatusCode::FAILURE;
120 if ( !prdCollection.isValid() ){
122 return StatusCode::FAILURE;
140 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 147 of file SegmentDriftCircleAssValidation.cxx.
149 if(
m_events<=0)
return StatusCode::SUCCESS;
151 std::cout<<
"|-----------------------------------------------------------------------------------|"
153 std::cout<<
"| TrackSegmentValidation statistics"<<std::endl;
158 std::cout<<
"|-----------------------------------------------------------------------------------|"
160 std::cout<<
"| TRT Particles >0.9 >0.75 >0.50 >0.25 <=0.25 |"
162 std::cout<<
"|-----------------------------------------------------------------------------------|"
167 <<std::setw(13)<<std::setprecision(5)<<
ef[0]
168 <<std::setw(13)<<std::setprecision(5)<<
ef[1]
169 <<std::setw(13)<<std::setprecision(5)<<
ef[2]
170 <<std::setw(13)<<std::setprecision(5)<<
ef[3]
171 <<std::setw(13)<<std::setprecision(5)<<
ef[4]<<
" |"
173 std::cout<<
"|-----------------------------------------------------------------------------------|"
176 return StatusCode::SUCCESS;
◆ findTruth()
Definition at line 599 of file SegmentDriftCircleAssValidation.cxx.
602 std::list<PRD_MultiTruthCollection::const_iterator>
mc;
604 auto r = prdCollection->equal_range(
d->identify());
605 for(
auto i =
r.first;
i !=
r.second &&
i != prdCollection->end(); ++
i){
609 if (
mc.empty()) Q =
false;
◆ initialize()
StatusCode InDet::SegmentDriftCircleAssValidation::initialize |
( |
| ) |
|
Definition at line 59 of file SegmentDriftCircleAssValidation.cxx.
72 IPartPropSvc* partPropSvc =
nullptr;
73 sc = service(
"PartPropSvc", partPropSvc,
true);
76 return StatusCode::FAILURE;
84 return StatusCode::FAILURE;
◆ 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 483 of file SegmentDriftCircleAssValidation.cxx.
488 std::list<PRD_MultiTruthCollection::const_iterator>
mc =
findTruth(
d,
find, prdCollection );
491 for(imc=
mc.begin();imc!=imce;++imc){
492 int k = (*imc)->second.barcode();
if(
k<=0)
continue;
495 if(!pa || !pa->production_vertex())
continue;
499 int pdg = pa->pdg_id();
501 if(!pd || std::abs(pd->charge()) < .5)
continue;
505 double pt = pa->momentum().perp();
510 double t = std::abs(pa->momentum().pz())/
pt;
515 Point3D<double>
v(pa->production_vertex()->position().x(),
516 pa->production_vertex()->position().y(),
517 pa->production_vertex()->position().z());
518 double r = sqrt(
v.x()*
v.x()+
v.y()*
v.y());
519 if( r < m_rmin || r >
m_rmax)
continue;
◆ kinpart()
Definition at line 531 of file SegmentDriftCircleAssValidation.cxx.
535 std::list<PRD_MultiTruthCollection::const_iterator> lk;
537 std::list<PRD_MultiTruthCollection::const_iterator>
mc =
findTruth(
d,
find, prdCollection );
541 for(imc=
mc.begin();imc!=imce;++imc){
543 int k = (*imc)->second.barcode();
if(
k<=0)
continue;
546 if(!pa || !pa->production_vertex())
continue;
550 int pdg = pa->pdg_id();
552 if(!pd || std::abs(pd->charge()) < .5)
continue;
556 double pt = pa->momentum().perp();
562 double t = std::abs(pa->momentum().pz())/
pt;
567 Point3D<double>
v(pa->production_vertex()->position().x(),
568 pa->production_vertex()->position().y(),
569 pa->production_vertex()->position().z());
570 double r = sqrt(
v.x()*
v.x()+
v.y()*
v.y());
571 if( r < m_rmin || r >
m_rmax)
continue;
573 lk.push_back((*imc));
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ newCirclesEvent()
Definition at line 297 of file SegmentDriftCircleAssValidation.cxx.
309 if( trtcontainer.isValid() ) {
311 InDet::TRT_DriftCircleContainer::const_iterator
w = trtcontainer->begin();
312 InDet::TRT_DriftCircleContainer::const_iterator we = trtcontainer->end ();
316 InDet::TRT_DriftCircleCollection::const_iterator
c = (*w)->begin();
317 InDet::TRT_DriftCircleCollection::const_iterator ce = (*w)->end ();
323 std::list<int> lk =
kine((*
c), prdCollection );
324 if(
int(lk.size())==0)
continue;
326 for(ik=lk.begin();ik!=ike;++ik){
329 bool isThere =
false;
332 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 381 of file SegmentDriftCircleAssValidation.cxx.
387 int KINE[200],NKINE[200];
388 for(
int i=0;
i<200;++
i){
389 KINE[
i] =0; NKINE[
i] = 0;
394 for(; iseg != isegEnd; ++ iseg) {
407 if(!trtcircle)
continue;
410 if(!RawDataClus)
continue;
412 std::list<PRD_MultiTruthCollection::const_iterator> lk =
kinpart(RawDataClus, prdCollection );
413 if (
int(lk.size())==0)
continue;
417 for(ik=lk.begin(); ik!=ike; ++ik){
418 int k = (*ik)->second.barcode();
422 for(
int n=0;
n!=NK; ++
n) {
438 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_particleDataTable
const HepPDT::ParticleDataTable* InDet::SegmentDriftCircleAssValidation::m_particleDataTable |
|
protected |
◆ 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
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
const HepPDT::ParticleDataTable * m_particleDataTable
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
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.