ATLAS Offline Software
Loading...
Searching...
No Matches
LArWheelSliceSolidTests.cxx File Reference
#include <iostream>
#include <stdexcept>
#include <format>
#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 591 of file LArWheelSliceSolidTests.cxx.

592{
594}
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 524 of file LArWheelSliceSolidTests.cxx.

525{
526 const double &z = x[0];
527 const double &r = p[0];
528 const double &index = p[1];
529
530 G4ThreeVector a(0., r, z);
531 double b = solid[index]->GetCalculator()->AmplitudeOfSurface(a, -1, 121) // sagging ignored, effect should be negligible, use arbitrary fan number
532 - solid[index]->GetCalculator()->AmplitudeOfSurface(a, 1, 121);
533 return b;
534}
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 544 of file LArWheelSliceSolidTests.cxx.

545{
546 const double &z = x[0];
547 const double &index = p[0];
548
549 G4double rmin, rmax;
550 get_r(solid[index]->m_BoundingShape, z, rmin, rmax);
551
552 double result = 0.;
553 G4ThreeVector a(0., rmin, z);
554 result += solid[index]->GetCalculator()->AmplitudeOfSurface(a, -1, 232) // sagging ignored, effect should be negligible, use arbitrary fan number
555 - solid[index]->GetCalculator()->AmplitudeOfSurface(a, 1, 232);
556 a[1] = rmax;
557 result += solid[index]->GetCalculator()->AmplitudeOfSurface(a, -1, 343)
558 - solid[index]->GetCalculator()->AmplitudeOfSurface(a, 1, 343);
559
560 return result;
561}
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 596 of file LArWheelSliceSolidTests.cxx.

597{
598 const double &r = x[0];
599 const double &index = p[0];
600
601 return solid[index]->get_length_at_r(r);
602}

◆ LArWheelSliceSolid_fcn_vol()

double LArWheelSliceSolid_fcn_vol ( double * x,
double * p )

Definition at line 536 of file LArWheelSliceSolidTests.cxx.

537{
538 const double &r = x[0];
539 const double &index = p[0];
540
541 return solid[index]->get_area_at_r(r);
542}

◆ LArWheelSliceSolid_get_dl()

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

Definition at line 564 of file LArWheelSliceSolidTests.cxx.

565{
566 const double &z = x[0];
567 const double &r = par[0];
568 const double &index = par[1];
569
570 const double h = 0.001;
571
572 //check what happens if z+h > m_Zmax etc
573 G4ThreeVector p(0., r, z + h);
574 G4double D1 = solid[index]->GetCalculator()->AmplitudeOfSurface(p, side, 5665); // sagging ignored, effect should be negligible, use arbitrary fan number
575 p[2] = z - h;
576 D1 -= solid[index]->GetCalculator()->AmplitudeOfSurface(p, side, 5665);
577 D1 /= 2 * h;
578
579 p[2] = z + h / 2;
580 G4double D2 = solid[index]->GetCalculator()->AmplitudeOfSurface(p, side, 5665);
581 p[2] = z - h / 2;
582 D2 -= solid[index]->GetCalculator()->AmplitudeOfSurface(p, side, 5665);
583 D2 /= h;
584
585 G4double D = (D2 * 4 - D1) / 3.;
586 G4double dl = sqrt(1 + D * D);
587
588 return dl;
589}
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 522 of file LArWheelSliceSolidTests.cxx.