|
ATLAS Offline Software
|
Go to the documentation of this file.
8 #include "GaudiKernel/MsgStream.h"
12 double threshold_histo,
int number_of_sectors) :
14 m_threshold_histo(threshold_histo),
16 m_eventsize_weightfactor(20.),
18 m_nbins_plus3(m_nbins + 3),
19 m_nbins_angle(nbins_angle),
20 m_detectorsize(detectorsize),
21 m_detectorsize_angle(detectorsize_angle),
22 m_number_of_sectors(number_of_sectors) {
36 std::unique_ptr<MuonHoughHisto2D>
histo = std::make_unique<MuonHoughHisto2D>(
nbins, -detectorsize, detectorsize, nbins_angle, 0., detectorsize_angle);
54 for (
unsigned int hitid = 0; hitid <
m_eventsize; hitid++) {
55 std::shared_ptr<MuonHoughHit> hit =
event.getHit(hitid);
64 double maximum_residu_grad,
int maximum_number)
const {
65 std::unique_ptr<MuonHoughPattern> houghpattern{};
66 std::pair<double, double> coordsmaximum;
67 std::pair<int, int> maximumbin;
70 int sector = maximumbin.first;
74 if (maximumbin.second == -1){
80 ATH_MSG_VERBOSE(
" coordinates: " << coordsmaximum.first <<
" second " << coordsmaximum.second<<
" sector: "<<
sector);
92 double maximum_residu_mm,
double maximum_residu_angle,
int sector)
const {
97 double maximum_residu_mm,
double maximum_residu_angle,
int sector)
const {
103 maximum_residu_mm, maximum_residu_angle,
sector);
109 std::pair<double, double> endpoints(-
radius + 0.00001,
radius);
123 std::vector<std::pair<int, int> > maximumbins;
125 std::vector<std::pair<std::pair<int, int>,
double> > maxima;
130 std::pair<std::pair<int, int>,
double> maximum;
131 maximum.first.first =
sector;
132 maximum.first.second = maximumbin.first;
133 maximum.second = maximumbin.second;
134 maxima.push_back(maximum);
139 unsigned int count_maxima = 0;
140 int number_of_patterns = 0;
141 std::set<int> sectors;
142 const unsigned int size = maxima.size();
143 while (count_maxima !=
size && number_of_patterns != max_patterns) {
144 std::pair<int, int> maximumbin = maxima[count_maxima].first;
147 int sector = maximumbin.first;
149 if (sectors.find(
sector) != sectors.end()) {
check =
false; }
152 maximumbins.push_back(maximumbin);
153 sectors.insert(maximumbin.first);
155 int sectormin =
sector - 1;
156 int sectorplus =
sector + 1;
160 sectors.insert(sectormin);
161 sectors.insert(sectorplus);
165 int sectorminmin = sectormin - 1;
166 int sectorplusplus = sectorplus + 1;
167 sectors.insert(sectorminmin);
168 sectors.insert(sectorplusplus);
172 number_of_patterns++;
void reserve(int)
reserve a certain size (memory) for m_histos
double getBinContent(int binnumber) const
returns x axis
MuonHoughHisto2D * getHisto(int id) const
return histogram at place id
std::pair< int, double > getMax() const
returns binnumber and maximum of histogram (doesn't use m_bins_above_threshold)
singleton-like access to IMessageSvc via open function and helper
void setMaximumIsValid(bool flag)
void push_back(std::unique_ptr< MuonHoughHisto2D >)
push_back a histogram
int size() const
returns size of container
#define ATH_MSG_VERBOSE(x)
void reset() const
resets histograms
double getBinWidthX() const
return binwidth x axis
POOL::TEvent event(POOL::TEvent::kClassAccess)
Class to provide easy MsgStream access and capabilities.
std::pair< double, double > binnumberToCoords(int binnumber, int printlevel=0) const
gives coordinates for certain binnumber
double getWeight() const
returns weight in histogram after rescaling
double getXmax() const
returns max x axis
void setMaximumHistogram(double maximumhistogram)
set maximum of histogram used to generate pattern
std::pair< int, int > getMaximumBinnumber() const
return maximum of container gives first id histogram (sector) and then maximumbin
std::pair< double, double > getCoordsMaximum(unsigned int maximum_number=0)
returns coords of maximum number maximum_number
double getXmin() const
returns min x axis
bool getAssociated() const
return if hit already associated to pattern
double getBinWidthY() const
return binwidth y axis