9 #include "GaudiKernel/MsgStream.h" 
   12                                                                                double detectorsize_angle, 
double threshold_histo,
 
   13                                                                                int number_of_sectors) :
 
   14     MuonHoughTransformer(
"MuonHoughTransformer_CurvedAtACylinder", 
nbins, nbins_angle, detectorsize, detectorsize_angle, threshold_histo, number_of_sectors) {
 
   26         if (x0 > 15.) x0 = 15 + (x0 - 15) * 0.5;  
 
   28         double curvature = -3. * 3500. * 20.25 / (x0 - 19.75);  
 
   46     int sectorhit = 
sector(hit);
 
   53         if (!isbarrel && std::abs(
ratio) > 0.5) 
break;
 
   59         const double weight_curvature =
 
   67         if (thetas[0] > 0. && thetas[0] < 
M_PI) {
 
   70             const double weight_curvature_theta = weight_curvature * (0.5 + 0.5 * 
std::sin(thetas[0]));
 
   72             fillHisto(
i + 0.5, theta_in_grad, weight_curvature_theta, 2 * sectorhit);  
 
   78         if (thetas[1] > 0. && thetas[1] < 
M_PI) {
 
   81             const double weight_curvature_theta = weight_curvature * (0.5 + 0.5 * 
std::sin(thetas[1]));
 
   82             fillHisto(-
i - 0.5, theta_in_grad, weight_curvature_theta, 2 * sectorhit);  
 
   90     const int filled_binnumber = 
histo->fill(xbin, theta_in_grad, 
weight);
 
   96         const double reduced_weight = 0.8 * 
weight;  
 
  111     const double fifth_weight = 0.2 * 
weight;
 
  116         histo->fill(upperright, fifth_weight);
 
  120         histo->fill(lowerleft, fifth_weight);
 
  123         histo->fill(upperright, fifth_weight);
 
  124         histo->fill(lowerleft, fifth_weight);
 
  126             histo->fill(upperright - 2, -fifth_weight);
 
  127             histo->fill(lowerleft + 2, -fifth_weight);
 
  130     return filled_binnumber;
 
  134                                                                                      std::pair<double, double> coordsmaximum,
 
  135                                                                                      double max_residu_mm, 
double ,
 
  136                                                                                      int maxsector)
 const {
 
  140     double etheta{0.}, sin_phi{0.}, cos_phi{0.}, sin_theta{0.}, cos_theta{0.}, ephi{0.};
 
  142     double invcurvature{0.}, curvature{0.};
 
  145         invcurvature = 1. / curvature;
 
  148         int index = 
static_cast<int>(std::floor(std::abs(coordsmaximum.first)));
 
  154         curvature = 1. / invcurvature;
 
  158     int sector_1 = maxsector / 2;  
 
  159     int sector_2 = sector_1 + 1;
 
  160     int sector_3 = sector_1 - 1;
 
  162     if (maxsector % 2 == 1) {                                      
 
  164     } 
else if (sector_3 < 0) {
 
  169          << 
" coordsmaximumfirst: " << coordsmaximum.first << 
" curvature: " << curvature 
 
  170          << 
" coordsmaximumsecond: " << coordsmaximum.second << 
" coordsmaximumsecondinrad: " << 
theta  
  171          << 
" MuonHoughTransformer_CurvedAtACylinder::size of event: " << 
event.size() 
 
  172          << 
" allowed sectors: " << sector_1 << 
" , " << sector_2 << 
" & " << sector_3 );
 
  174     for (
unsigned int i = 0; 
i < 
event.size(); 
i++) {
 
  175         std::shared_ptr<MuonHoughHit> hit = 
event.getHit(
i);
 
  176         int sectorhit = 
sector(hit);
 
  177         if (sectorhit == sector_1 || sectorhit == sector_2 || sectorhit == sector_3) {
 
  182             double scale = radius3d / 5000.;
 
  184             double residu_distance_mm = std::abs(sdis);
 
  188                                 << 
" max_residu_mm*scale: " << max_residu_mm * 
scale);
 
  190             if (std::abs(residu_distance_mm) < max_residu_mm * 
scale)  
 
  199                     ATH_MSG_VERBOSE(
"hit added to houghpattern! Sector number: " << sectorhit 
 
  200                                     <<
" associated earlier "<<
event.getHit(
i)->getAssociated());
 
  202                     event.getHit(
i)->setAssociated(
true);
 
  204                     sin_theta += sctheta.
sn;
 
  205                     cos_theta += sctheta.
cs;
 
  211     etheta = std::atan2(sin_theta, cos_theta);
 
  213     ephi = std::atan2(sin_phi, cos_phi);