ATLAS Offline Software
Loading...
Searching...
No Matches
LArWheelSliceSolidTests.cxx File Reference
#include <iostream>
#include <stdexcept>
#include "boost/io/ios_state.hpp"
#include <map>
#include "TRandom3.h"
#include "TF1.h"
#include "TNtupleD.h"
#include "TFile.h"
#include "TROOT.h"
#include "GeoSpecialShapes/LArWheelCalculator.h"
#include "LArWheelSliceSolid.h"
#include "CLHEP/Units/SystemOfUnits.h"
#include "CLHEP/Units/PhysicalConstants.h"
#include <stdlib.h>
#include "CxxUtils/checker_macros.h"

Go to the source code of this file.

Functions

static void get_r (const G4VSolid *p, G4double z, G4double &rmin, G4double &rmax)
double LArWheelSliceSolid_fcn_area (double *x, double *p)
double LArWheelSliceSolid_fcn_vol (double *x, double *p)
double LArWheelSliceSolid_fcn_area_on_pc (double *x, double *p)
double LArWheelSliceSolid_get_dl (double *x, double *par, G4int side)
static double fcn_length (double *x, double *p)
double LArWheelSliceSolid_fcn_side_area (double *x, double *p)

Variables

 ATLAS_NO_CHECK_FILE_THREAD_SAFETY
static double IntPrecision = 0.0001
static TRandom * rnd = 0
static std::map< double, LArWheelSliceSolid * > solid

Function Documentation

◆ fcn_length()

double fcn_length ( double * x,
double * p )
static

Definition at line 595 of file LArWheelSliceSolidTests.cxx.

596{
598}
double LArWheelSliceSolid_get_dl(double *x, double *par, G4int side)
#define x

◆ get_r()

void get_r ( const G4VSolid * p,
G4double z,
G4double & rmin,
G4double & rmax )
static

Definition at line 58 of file LArWheelSliceSolidTests.cxx.

61{
62 G4ThreeVector from(10.*CLHEP::m, 0., z);
63 rmax = from[0] - p->DistanceToIn(from, G4ThreeVector(-1., 0., 0.));
64 from[0] = 0.;
65 rmin = p->DistanceToIn(from, G4ThreeVector(1., 0., 0.));
66}
#define z

◆ LArWheelSliceSolid_fcn_area()

double LArWheelSliceSolid_fcn_area ( double * x,
double * p )

Definition at line 528 of file LArWheelSliceSolidTests.cxx.

529{
530 const double &z = x[0];
531 const double &r = p[0];
532 const double &index = p[1];
533
534 G4ThreeVector a(0., r, z);
535 double b = solid[index]->GetCalculator()->AmplitudeOfSurface(a, -1, 121) // sagging ignored, effect should be negligible, use arbitrary fan number
536 - solid[index]->GetCalculator()->AmplitudeOfSurface(a, 1, 121);
537 return b;
538}
static Double_t a
static std::map< double, LArWheelSliceSolid * > solid
int r
Definition globals.cxx:22
Definition index.py:1

◆ LArWheelSliceSolid_fcn_area_on_pc()

double LArWheelSliceSolid_fcn_area_on_pc ( double * x,
double * p )

Definition at line 548 of file LArWheelSliceSolidTests.cxx.

549{
550 const double &z = x[0];
551 const double &index = p[0];
552
553 G4double rmin, rmax;
554 get_r(solid[index]->m_BoundingShape, z, rmin, rmax);
555
556 double result = 0.;
557 G4ThreeVector a(0., rmin, z);
558 result += solid[index]->GetCalculator()->AmplitudeOfSurface(a, -1, 232) // sagging ignored, effect should be negligible, use arbitrary fan number
559 - solid[index]->GetCalculator()->AmplitudeOfSurface(a, 1, 232);
560 a[1] = rmax;
561 result += solid[index]->GetCalculator()->AmplitudeOfSurface(a, -1, 343)
562 - solid[index]->GetCalculator()->AmplitudeOfSurface(a, 1, 343);
563
564 return result;
565}
static void get_r(const G4VSolid *p, G4double z, G4double &rmin, G4double &rmax)

◆ LArWheelSliceSolid_fcn_side_area()

double LArWheelSliceSolid_fcn_side_area ( double * x,
double * p )

Definition at line 600 of file LArWheelSliceSolidTests.cxx.

601{
602 const double &r = x[0];
603 const double &index = p[0];
604
605 return solid[index]->get_length_at_r(r);
606}

◆ LArWheelSliceSolid_fcn_vol()

double LArWheelSliceSolid_fcn_vol ( double * x,
double * p )

Definition at line 540 of file LArWheelSliceSolidTests.cxx.

541{
542 const double &r = x[0];
543 const double &index = p[0];
544
545 return solid[index]->get_area_at_r(r);
546}

◆ LArWheelSliceSolid_get_dl()

double LArWheelSliceSolid_get_dl ( double * x,
double * par,
G4int side )

Definition at line 568 of file LArWheelSliceSolidTests.cxx.

569{
570 const double &z = x[0];
571 const double &r = par[0];
572 const double &index = par[1];
573
574 const double h = 0.001;
575
576 //check what happens if z+h > m_Zmax etc
577 G4ThreeVector p(0., r, z + h);
578 G4double D1 = solid[index]->GetCalculator()->AmplitudeOfSurface(p, side, 5665); // sagging ignored, effect should be negligible, use arbitrary fan number
579 p[2] = z - h;
580 D1 -= solid[index]->GetCalculator()->AmplitudeOfSurface(p, side, 5665);
581 D1 /= 2 * h;
582
583 p[2] = z + h / 2;
584 G4double D2 = solid[index]->GetCalculator()->AmplitudeOfSurface(p, side, 5665);
585 p[2] = z - h / 2;
586 D2 -= solid[index]->GetCalculator()->AmplitudeOfSurface(p, side, 5665);
587 D2 /= h;
588
589 G4double D = (D2 * 4 - D1) / 3.;
590 G4double dl = sqrt(1 + D * D);
591
592 return dl;
593}
Header file for AthHistogramAlgorithm.

Variable Documentation

◆ ATLAS_NO_CHECK_FILE_THREAD_SAFETY

ATLAS_NO_CHECK_FILE_THREAD_SAFETY

Definition at line 25 of file LArWheelSliceSolidTests.cxx.

◆ IntPrecision

double IntPrecision = 0.0001
static

Definition at line 27 of file LArWheelSliceSolidTests.cxx.

◆ rnd

TRandom* rnd = 0
static

Definition at line 68 of file LArWheelSliceSolidTests.cxx.

◆ solid

std::map<double, LArWheelSliceSolid *> solid
static

Definition at line 526 of file LArWheelSliceSolidTests.cxx.