|
ATLAS Offline Software
|
Go to the documentation of this file.
32 (
const std::string&
t,
const std::string&
n,
const IInterface*
p)
35 declareInterface<ITRT_TrackSegmentsMaker>(
this);
66 return StatusCode::FAILURE;
77 return StatusCode::FAILURE;
108 std::unique_ptr<InDet::ITRT_TrackSegmentsMaker::IEventData>
119 if(not trtcontainer.
isValid()) {
120 std::stringstream
msg;
122 throw std::runtime_error(
msg.str());
129 if (!prd_to_track_map.
isValid()) {
132 prd_to_track_map_cptr = prd_to_track_map.
cptr();
136 std::unique_ptr<TRT_TrackSegmentsMaker_ATLxk::EventData>
137 event_data = std::make_unique<TRT_TrackSegmentsMaker_ATLxk::EventData>(trtcontainer.
cptr(), condData.
m_cirsize);
143 InDet::TRT_DriftCircleContainer::const_iterator
144 w = trtcontainer->begin(),we = trtcontainer->end();
163 unsigned int ad = 1000*
b+
l;
167 InDet::TRT_DriftCircleCollection::const_iterator
168 c = (*w)->begin(), ce = (*w)->end();
171 if(prd_to_track_map_cptr && prd_to_track_map_cptr->
isUsed(*(*
c)))
continue;
178 float Fs = std::atan2(
sc.y(),
sc.x());
if(Fs<0.) Fs+=
pi2;
179 event_data->m_circles[
n].set((*
c),Fs,ad);
188 event_data->m_clusters =
n;
189 return std::unique_ptr<InDet::ITRT_TrackSegmentsMaker::IEventData>(event_data.release());
196 std::unique_ptr<InDet::ITRT_TrackSegmentsMaker::IEventData>
198 (
const EventContext& ctx,
const std::vector<IdentifierHash>& vTRT)
const
207 if(not trtcontainer.
isValid()) {
215 if (!prd_to_track_map.
isValid()) {
218 prd_to_track_map_cptr = prd_to_track_map.
cptr();
221 std::unique_ptr<TRT_TrackSegmentsMaker_ATLxk::EventData>
222 event_data = std::make_unique<TRT_TrackSegmentsMaker_ATLxk::EventData>(trtcontainer.
cptr(), condData.
m_cirsize);
231 std::vector<IdentifierHash>::const_iterator
d=vTRT.begin(),de=vTRT.end();
235 const auto *
w = trtcontainer->indexFindPtr((*
d));
248 unsigned int ad = 1000*
b+
l;
250 InDet::TRT_DriftCircleCollection::const_iterator
251 c =
w->begin(), ce =
w->end();
255 if(prd_to_track_map_cptr && prd_to_track_map_cptr->
isUsed(*(*
c)))
continue;
262 float Fs = std::atan2(
sc.y(),
sc.x());
if(Fs<0.) Fs+=
pi2;
263 event_data->m_circles[
n].set((*
c),Fs,ad);
272 event_data->m_clusters =
n;
274 return std::unique_ptr<InDet::ITRT_TrackSegmentsMaker::IEventData>( event_data.release() );
313 for(
unsigned int n=0;
n!=
mc; ++
n) {
322 unsigned char max = 0;
323 unsigned int maxbin = 0;
325 for(
unsigned int s=
sb;
s<=
se; ++
s) {
337 unsigned int nbins = 0 ;
338 unsigned int fbin = 99999999;
339 for(bc = event_data.
m_bincluster.begin(); bc!=bce; ++bc) {
341 if((*bc).first==fbin) ++
nbins;
344 fbin=(*bc).first;
nbins = 1;
355 if (!prd_to_track_map.
isValid()) {
358 prd_to_track_map_cptr = prd_to_track_map.
cptr();
408 std::string fieldmode[9] ={
"NoField" ,
"ConstantField",
"SolenoidalField",
409 "ToroidalField" ,
"Grid3DField" ,
"RealisticField" ,
410 "UndefinedField",
"AthenaField" ,
"?????" };
413 if(mode<0 || mode>8 )
mode = 8;
415 int n = 62-fieldmode[
mode].size();
416 std::string
s3;
for(
int i=0;
i<
n; ++
i)
s3.append(
" ");
s3.append(
"|");
419 std::string
s4;
for(
int i=0;
i<
n; ++
i)
s4.append(
" ");
s4.append(
"|");
422 std::string s7;
for(
int i=0;
i<
n; ++
i) s7.append(
" "); s7.append(
"|");
425 out<<
"|----------------------------------------------------------------------"
426 <<
"-------------------|"
429 out<<
"| Magnetic field mode | "<<fieldmode[
mode] <<
s3<<std::endl;
431 out<<
"| Min. number straws | "
434 out<<
"| Number neg. bar. layers | "
437 out<<
"| Number pos. bar. layers | "
440 out<<
"| Number neg. end. layers | "
443 out<<
"| Number pos. end. layers | "
446 out<<
"| Number neg. bar. straws | "
449 out<<
"| Number pos. bar. straws | "
452 out<<
"| Number neg. end. straws | "
455 out<<
"| Number pos. end. straws | "
458 out<<
"| Number azimut. channels | "
461 out<<
"| Number moment. channels | "
464 out<<
"| Number histog. channels | "
467 out<<
"| Number cluster links | "
470 out<<
"| Use PRD-to-track assoc.?| "
473 out<<
"| Remove noise ? | "
476 out<<
"|----------------------------------------------------------------------"
477 <<
"-------------------|"
491 out<<
"|----------------------------------------------------------------------"
492 <<
"-------------------|"
494 out<<
"| Number drift circles | "
497 out<<
"| Number local calls | "
498 <<std::setw(12)<<event_data.
m_nlocal
500 out<<
"| Number found segments | "
503 out<<
"| Number save segments | "
506 out<<
"|----------------------------------------------------------------------"
507 <<
"-------------------|"
599 std::multimap<const InDet::TRT_DriftCircle*,Trk::TrackSegment*>::const_iterator
607 for(bc=bcb; bc!=bce; ++bc) {
609 if((*bc).first!=
bin)
break;
622 for(bc=bcb; bc!=bce; ++bc) {
624 unsigned int n = (*bc).second;
631 for(;
s<=
se; ++
s) {
if(condData.
m_ndzdr[
s]==ndzdr)
break;}
645 fm = Fo+fm/
float(nfree);
648 else if(fm <-
pi) fm = fmod(fm-
pi,
pi2)+
pi;
652 double pin = 1./(
pT*std::sqrt((1.+condData.
m_dzdr[ndzdr]*condData.
m_dzdr[ndzdr])));
655 auto Tp =
PS.createUniqueTrackParameters(
656 0., 0., fm, std::atan2(1., condData.
m_dzdr[ndzdr]), pin, std::nullopt);
682 std::vector<const Trk::MeasurementBase*>::const_iterator
685 if(prd_to_track_map) {
689 int nu = 0, ntot = 0;
690 for(++
s;
s!=
se; ++
s) {
708 if (Xi2 > 6) quality-=9;
709 else if(Xi2 > 5.) quality-=7;
710 else if(Xi2 > 3.) quality-=5;
711 else if(Xi2 > 2.) quality-=3;
712 else if(Xi2 > 1.) quality-=1;
721 for(++
s;
s!=
se; ++
s) {
735 std::multimap<int,Trk::TrackSegment*>::reverse_iterator
742 std::vector<const Trk::MeasurementBase*>::const_iterator
743 s =(*qs).second->containedMeasurements().begin(),
744 se =(*qs).second->containedMeasurements().end ();
746 for(++
s;
s!=
se; ++
s) {
753 if(nfree >= 7) event_data.
m_segments.push_back((*qs).second);
754 else delete (*qs).second;
768 unsigned int maxb =
bin ;
def retrieve(aClass, aKey=None)
JetConstituentVector::iterator iterator
void findLocaly(const EventContext &ctx, unsigned int, const Trk::PRDtoTrackMap *prd_to_track_map, TRT_TrackSegmentsMaker_ATLxk::EventData &event_data, InDet::TRT_DetElementLink_xk::TRT_DetElemUsedMap &used) const
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
std::multimap< int,Trk::TrackSegment * > m_qualitySegment
static MsgStream & dumpEvent(MsgStream &out, InDet::ITRT_TrackSegmentsMaker::IEventData &event_data)
std::vector< Identifier > ID
const TRT_DriftCircle * circle() const
const_pointer_type cptr()
Dereference the pointer.
virtual MsgStream & dump(MsgStream &out) const override
unsigned int layer() const
SG::ReadHandleKey< Trk::PRDtoTrackMap > m_prdToTrackMap
std::multimap< const InDet::TRT_DriftCircle *, Trk::TrackSegment * > m_clusterSegment
virtual std::unique_ptr< InDet::ITRT_TrackSegmentsMaker::IEventData > newEvent(const EventContext &ctx) const override
bool msgLvl(const MSG::Level lvl) const
std::unique_ptr< InDet::ITRT_TrackExtensionTool::IEventData > m_extEventData
std::list< Trk::TrackSegment * >::iterator m_segiterator
MsgStream & dumpConditions(MsgStream &out) const
const std::string & key() const
Return the StoreGate ID for the referenced object.
FloatProperty m_sharedfrac
void fillHistogramm(float, int, TRT_TrackSegmentsMaker_ATLxk::EventData &event_data) const
unsigned int numberOfMeasurementBases() const
Return the number of contained Trk::MeasurementBase (s)
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
void analyseHistogramm(unsigned char &, unsigned int &, float, int, TRT_TrackSegmentsMaker_ATLxk::EventData &event_data) const
@ FastField
call the fast field access method of the FieldSvc
double get(ParamDefs par) const
Retrieve specified parameter (const version).
const TRT_TrackSegmentsToolCondData_xk * getConditionsData() const
int straw(const Identifier &id) const
void endEvent(InDet::ITRT_TrackSegmentsMaker::IEventData &event_data) const override
::StatusCode StatusCode
StatusCode definition for legacy code.
unsigned int buffer() const
const std::vector< const Trk::MeasurementBase * > & containedMeasurements() const
returns the vector of Trk::MeasurementBase objects
static void segmentsPreparation(TRT_TrackSegmentsMaker_ATLxk::EventData &event_data)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
virtual StatusCode initialize() override
int straw_layer(const Identifier &id) const
int layer_or_wheel(const Identifier &id) const
SG::ReadHandleKey< InDet::TRT_DriftCircleContainer > m_trtname
ToolHandle< ITRT_TrackExtensionTool > m_extensionTool
bool isUsed(const PrepRawData &prd) const
does this PRD belong to at least one track?
@ FullField
Field is set to be realistic, but within a given Volume.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
std::multimap< unsigned int, unsigned int > m_bincluster
unsigned char H[227500 *4]
void eraseHistogramm(TRT_TrackSegmentsMaker_ATLxk::EventData &event_data) const
@ NoField
Field is set to 0., 0., 0.,.
virtual ~TRT_TrackSegmentsMaker_ATLxk()
SG::ReadCondHandleKey< InDet::TRT_TrackSegmentsToolCondData_xk > m_condDataKey
virtual Trk::TrackSegment * next(InDet::ITRT_TrackSegmentsMaker::IEventData &event_data) const override
BooleanProperty m_removeNoise
Trk::MagneticFieldProperties m_fieldprop
virtual const Amg::Vector3D & globalPosition() const =0
Interface method to get the global Position.
StatusCode initialize(bool used=true)
virtual void find(const EventContext &ctx, InDet::ITRT_TrackSegmentsMaker::IEventData &event_data, InDet::TRT_DetElementLink_xk::TRT_DetElemUsedMap &used) const override
Eigen::Matrix< double, 3, 1 > Vector3D
MagneticFieldMode magneticFieldMode() const
Returns the MagneticFieldMode as specified.
virtual const Trk::PrepRawData * prepRawData() const =0
returns the PrepRawData (also known as RIO) object to which this RIO_OnTrack is associated.
const LocalParameters & localParameters() const
Interface method to get the LocalParameters.
std::list< Trk::TrackSegment * > m_segments
StringProperty m_fieldmode
TRT_DriftCircleLinkN_xk * m_circles
virtual StatusCode finalize() override
double chiSquared() const
returns the of the overall track fit
IntegerProperty m_clustersCut
std::array< std::vector< std::vector< Used_t > >, 3 > TRT_DetElemUsedMap
int numberDoF() const
returns the number of degrees of freedom of the overall track or vertex fit as integer
const float & phi() const
static EventData & getPrivateEventData(InDet::ITRT_TrackSegmentsMaker::IEventData &virt_event_data)
virtual std::unique_ptr< InDet::ITRT_TrackSegmentsMaker::IEventData > newRegion(const EventContext &ctx, const std::vector< IdentifierHash > &) const override
union InDet::TRT_TrackSegmentsMaker_ATLxk::EventData::@97 m_U
Handle class for reading from StoreGate.
const FitQuality * fitQuality() const
return the FitQuality object, returns NULL if no FitQuality is defined
unsigned int localMaximum(unsigned int, TRT_TrackSegmentsMaker_ATLxk::EventData &event_data) const
std::multimap< unsigned int, unsigned int >::reverse_iterator m_sizebin_iterator
std::multimap< unsigned int, unsigned int > m_sizebin
TRT_TrackSegmentsMaker_ATLxk(const std::string &, const std::string &, const IInterface *)