Project
Loading...
Searching...
No Matches
o2sim_geometry_doctor.cxx File Reference

Audits a placed geometry against the magnetic field it will be transported in. More...

#include "Field/MagneticField.h"
#include <TFile.h>
#include <TGeoBBox.h>
#include <TGeoCone.h>
#include <TGeoEltu.h>
#include <TGeoManager.h>
#include <TGeoMatrix.h>
#include <TGeoMedium.h>
#include <TGeoNode.h>
#include <TGeoPcon.h>
#include <TGeoPgon.h>
#include <TGeoShape.h>
#include <TGeoTube.h>
#include <TGeoVolume.h>
#include <TRandom3.h>
#include <TVectorD.h>
#include <boost/program_options.hpp>
#include <nlohmann/json.hpp>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <fstream>
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <utility>
#include <vector>

Go to the source code of this file.

Typedefs

using json = nlohmann::json
 

Functions

int main (int argc, char **argv)
 

Detailed Description

Audits a placed geometry against the magnetic field it will be transported in.

The tool reads a geometry file and a magnetic field, and answers two questions that cannot be answered by looking at either one alone:

  • where does the geometry fail to express the field's structure – a logical volume placed both inside and outside the field, or a mother whose own material straddles the boundary, so that no per-medium field flag can be right for all of its placements;
  • where does it already express it wrongly – a medium with ifield == 0, which asks the transport engine for straight lines, sitting in real field.

It detects and proposes. It never modifies a geometry.

The field enters in two ways. A support model (an outer bound on where |B| exceeds a threshold, maximised over phi) supplies the geometric argument: a placement whose extent misses every band of the model is field-free, and that is the only way this tool ever concludes "field-free". Sampling enters only in the opposite direction, to disprove – finding field inside a volume settles the question, finding none does not.

Reading the geometry needs no detector code: a medium's ifield flag and its sensitivity are GSTMED parameters 1 and 0 of the TGeoMedium, and are recovered from the file itself.

Definition in file o2sim_geometry_doctor.cxx.

Typedef Documentation

◆ json

using json = nlohmann::json

Definition at line 73 of file o2sim_geometry_doctor.cxx.

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 1521 of file o2sim_geometry_doctor.cxx.