17#ifndef TRT_TrackSegmentsMaker_ECcosmics_H
18#define TRT_TrackSegmentsMaker_ECcosmics_H
21#include "GaudiKernel/ToolHandle.h"
79 (
const std::string&,
const std::string&,
const IInterface*);
82 virtual StatusCode
finalize ()
override;
88 virtual std::unique_ptr<InDet::ITRT_TrackSegmentsMaker::IEventData>
newEvent(
const EventContext& ctx)
const override;
89 virtual std::unique_ptr<InDet::ITRT_TrackSegmentsMaker::IEventData>
newRegion(
const EventContext& ctx,
const std::vector<IdentifierHash>&)
const override;
96 virtual void find(
const EventContext &ctx,
111 virtual MsgStream&
dump (MsgStream & out)
const override;
112 virtual std::ostream&
dump (std::ostream& out)
const override;
125 std::vector<std::vector<const InDet::TRT_DriftCircle*> *>
::iterator sit,sitE;
128 for(;sit!=sitE;++sit){
139 std::list<const InDet::TRT_DriftCircle*>
m_sectors[2][20][16];
141 std::vector<std::vector<const InDet::TRT_DriftCircle*> *>
m_seeds;
167 "Switch to destinguish between phase calculation and full reco"};
172 {
this,
"PRDtoTrackMap",
""};
175 {
this,
"RIOonTrackToolYesDr",
176 "InDet::TRT_DriftCircleOnTrackTool/TRT_DriftCircleOnTrackTool",
177 "RI0_onTrack creator with drift information"};
179 {
this,
"RIOonTrackToolNoDr",
180 "InDet::TRT_DriftCircleOnTrackNoDriftTimeTool/TRT_DriftCircleOnTrackNoDriftTimeTool",
181 "RI0_onTrack creator without drift information"};
184 "Shall the drifttime be used or only tube hits?"};
186 "Scalefactor for uncertainty of tube hits"};
188 "Scalefactor for uncertainty of drifttime hits"};
190 "Scalefactor for uncertainty of tube hits flagged as noise"};
192 "Loose cut on ToT (preselection)"};
194 "Hard cut on ToT (preselection)"};
196 "Upper cut on ToT (preselection)"};
198 "Minimum number of driftcircles to form a seed"};
200 "Maximum number of good hits (i.e. after noise cut) in endcap"};
222 void create_segment(std::vector<const InDet::TRT_DriftCircle*> *seed,
237 static double phidiff(
double a,
double b);
241 bool accepted(
const std::list<const InDet::TRT_DriftCircle*>::iterator compareIt,
242 std::list<const InDet::TRT_DriftCircle*> &
container,
243 double phiLimit,
double dzLimit)
const;
Property holding a SG store/key/clid from which a ReadHandle is made.
The Detector Manager for all TRT Detector elements, it acts as the interface to the detector elements...
std::array< std::vector< std::vector< Used_t > >, 3 > TRT_DetElemUsedMap
TF1 * m_fitf_ztanphi_approx
approx function to fit tan(phi) vs.
TF1 * m_fitf_ztanphi
analytic function to fit tan(phi) vs.
std::vector< std::vector< const InDet::TRT_DriftCircle * > * > m_seeds
Vector of seeds.
std::list< const InDet::TRT_DriftCircle * > m_goodHits
List containing potenitally good hits.
TF1 * m_fitf_zphi_approx
anpprox function to fit phi vs.
TF1 * m_fitf_zphi
analytic function to fit phi vs.
std::list< const InDet::TRT_DriftCircle * > m_noiseHits
List containing potentially noise hits.
std::list< const InDet::TRT_DriftCircle * > m_sectors[2][20][16]
Divide into two endcaps and each endcap into 16 sectors in phi and 20 in z.
double m_a_steigung[1000]
std::list< Trk::TrackSegment * >::iterator m_segiterator
Iterator over found segments.
std::list< Trk::TrackSegment * > m_segments
List of found segments.
AlgTool that creates TrackSegments out of TRT Driftcircles in the special case of cosmic runs in SR1.
virtual StatusCode finalize() override
DoubleProperty m_cutToTLoose
BooleanProperty m_useDriftTime
virtual void find(const EventContext &ctx, InDet::ITRT_TrackSegmentsMaker::IEventData &event_data, InDet::TRT_DetElementLink_xk::TRT_DetElemUsedMap &used) const override
DoubleProperty m_cutToTTight
SG::ReadHandleKey< InDet::TRT_DriftCircleContainer > m_trtname
TRTs container.
BooleanProperty m_phaseMode
ToolHandle< Trk::IRIO_OnTrackCreator > m_riomakerN
DoubleProperty m_cutToTUpper
bool accepted(const std::list< const InDet::TRT_DriftCircle * >::iterator compareIt, std::list< const InDet::TRT_DriftCircle * > &container, double phiLimit, double dzLimit) const
is the hit accepted?
SG::ReadHandleKey< Trk::PRDtoTrackMap > m_prdToTrackMap
DoubleProperty m_scaleFactorDrift
DoubleProperty m_scaleTube
IntegerProperty m_hitLimit
void endEvent(InDet::ITRT_TrackSegmentsMaker::IEventData &event_data) const override
void setFitFunctions(TRT_TrackSegmentsMaker_ECcosmics::EventData &event_data) const
virtual Trk::TrackSegment * next(InDet::ITRT_TrackSegmentsMaker::IEventData &event_data) const override
int evaluate_seed(int endcap, int zslice, int sector, const double *p, TRT_TrackSegmentsMaker_ECcosmics::EventData &event_data) const
Evaluate how many dc match this seed.
virtual ~TRT_TrackSegmentsMaker_ECcosmics()
virtual StatusCode initialize() override
void create_segment(std::vector< const InDet::TRT_DriftCircle * > *seed, TRT_TrackSegmentsMaker_ECcosmics::EventData &event_data) const
Create segment out of a seed.
TRT_TrackSegmentsMaker_ECcosmics(const std::string &, const std::string &, const IInterface *)
Constructor with parameters.
ToolHandle< Trk::IRIO_OnTrackCreator > m_riomakerD
bool is_suspicious(const InDet::TRT_DriftCircle *dc, std::vector< const InDet::TRT_DriftCircle * > *seed) const
checks if a hit that matches the segment looks suspicious (i.e.
virtual std::unique_ptr< InDet::ITRT_TrackSegmentsMaker::IEventData > newEvent(const EventContext &ctx) const override
void retrieveHits(TRT_TrackSegmentsMaker_ECcosmics::EventData &event_data) const
sort hits into good/noise lists
bool find_seed(int endcap, int zslice, int sector, TRT_TrackSegmentsMaker_ECcosmics::EventData &event_data) const
Find seed in the given sector/zslice/endcap.
TF1 * perform_fit(int count, TRT_TrackSegmentsMaker_ECcosmics::EventData &event_data) const
Perform the fit and return a function that provides the fitted phi information.
static std::mutex s_fitMutex
DoubleProperty m_scaleTubeNoise
static double phidiff(double a, double b)
provide the proper subtraction of two phi values
IntegerProperty m_minDCSeed
virtual std::unique_ptr< InDet::ITRT_TrackSegmentsMaker::IEventData > newRegion(const EventContext &ctx, const std::vector< IdentifierHash > &) const override
A PRD is mapped onto all contributing particles.
Property holding a SG store/key/clid from which a ReadHandle is made.
This is an Identifier helper class for the TRT subdetector.
Base for a helper class to pass mutable storage to tools.
Base class for all TrackSegment implementations, extends the common MeasurementBase.
Class for a generic track segment that holdes polymorphic Trk::MeasurementBase objects,...
holding In fact this class is here in order to allow STL container for all features This class is sho...
int count(std::string s, const std::string ®x)
count how many occurances of a regx are in a string
Ensure that the ATLAS eigen extensions are properly loaded.