4#include "KVGeoImport.h"
5#include <KVMultiDetArray.h>
6#include <KVIonRangeTableMaterial.h>
10#include <KVNucleusEvent.h>
13#include <KVRangeTableGeoNavigator.h>
14#include <KVNamedParameter.h>
15#include <KVDataAnalyser.h>
40 fCurrentTrajectory.SetAddToNodes(
kFALSE);
41 fCurrentTrajectory.SetPathInTitle(
kFALSE);
42 fCheckDetVolNames =
kFALSE;
44 std::map<std::string, EColor>
colors;
50 TIter next(
g->GetListOfVolumes());
81 if (!detector)
return;
114 Info(
"ImportGeometry",
115 "Importing geometry in angular ranges : Theta=[%f,%f:%f] Phi=[%f,%f:%f]", ThetaMin, ThetaMax, dTheta, PhiMin, PhiMax, dPhi);
117 Info(
"ImportGeometry",
121 std::cout <<
"\xd" <<
"Info in <KVGeoImport::ImportGeometry>: tested " << count <<
" directions" << std::flush;
122 for (
Double_t theta = ThetaMin; theta <= ThetaMax; theta += dTheta) {
123 for (
Double_t phi = PhiMin; phi <= PhiMax; phi += dPhi) {
124 nuc->SetTheta(theta);
130 std::cout <<
"\xd" <<
"Info in <KVGeoImport::ImportGeometry>: tested " << count <<
" directions" << std::flush;
134 std::cout <<
"Info in <KVGeoImport::ImportGeometry>: tested " << count <<
" directions" << std::endl;
136 std::cout << std::endl;
138 Info(
"ImportGeometry",
145 d->GetNode()->RehashLists();
250 if (!detector_volume)
return 0;
254 bool reject_volume =
true;
255 for (
int i = 0; i < nn; ++i) {
257 reject_volume =
false;
261 if (reject_volume)
return 0;
274 if (!multilay || vol_name.
BeginsWith(
"ACTIVE_")) {
300 if (!multilay || vol_name.
BeginsWith(
"ACTIVE_")) {
316 for (
int i = 0; i < nstruc; i++) {
334 if (!multilay || vol_name.
BeginsWith(
"ACTIVE_")) {
415 d->SetName(det_name);
419 for (
int i = 0; i < nlayer; i++) {
451 Warning(
"AddLayer",
"Unknown material %s/%s used in layer %s of detector %s",
457 Warning(
"AddLayer",
"Unknown shape class %s used in layer %s of detector %s",
463 if (irmat->
IsGas()) {
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t g
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
virtual void SetNumber(UInt_t num)
virtual const Char_t * GetType() const
static TPluginHandler * LoadPlugin(const Char_t *base, const Char_t *uri="0")
static Bool_t IsRunningBatchAnalysis()
Base class for detector geometry description.
const KVPosition & GetEntranceWindow() const
KVGeoDetectorNode * GetNode()
void AddAbsorber(KVMaterial *)
void SetActiveLayer(KVMaterial *actif)
void SetActiveLayerMatrix(const TGeoHMatrix *)
Set ROOT geometry global matrix transformation to coordinate frame of active layer volume.
void SetEntranceWindowMatrix(const TGeoHMatrix *)
Set ROOT geometry global matrix transformation to coordinate frame of entrance window.
void SetEntranceWindowShape(TGeoBBox *)
Set ROOT geometry shape of entrance window.
void SetActiveLayerShape(TGeoBBox *)
Set ROOT geometry shape of active layer volume.
Abstract base class container for multi-particle events.
Path taken by particles through multidetector geometry.
Bool_t Contains(const Char_t *name) const
void ReverseOrder()
Reverse the order of the nodes in the trajectory.
void AddLast(KVGeoDetectorNode *n)
void Clear(Option_t *="")
Clear list of nodes in trajectory.
void AddInFront(KVDetector *)
void AddBehind(KVDetector *)
Import detector array described by ROOT geometry and set up corresponding KVMultiDetArray object.
KVNameValueList fAcceptedDetectorNames
KVDetector * GetCurrentDetector()
virtual void ParticleEntersNewVolume(KVNucleus *)
All detectors crossed by the particle's trajectory are added to the multidetector.
KVDetector * BuildDetector(TString det_name, TGeoVolume *det_vol)
KVGeoDNTrajectory fCurrentTrajectory
void AddAcceptedDetectorName(const char *name)
KVDetector * fLastDetector
void PropagateParticle(KVNucleus *, TVector3 *TheOrigin=nullptr)
virtual ~KVGeoImport()
Destructor.
KVIonRangeTable * fRangeTable
void AddLayer(KVDetector *, TGeoVolume *)
void SetLastDetector(KVDetector *)
void ImportGeometry(Double_t dTheta=0.1, Double_t dPhi=1.0, Double_t ThetaMin=0.0, Double_t PhiMin=0.0, Double_t ThetaMax=180.0, Double_t PhiMax=360.0)
Link physical path to node in geometry with detector.
Base class for propagation of particles through array geometry.
TGeoVolume * GetCurrentVolume() const
void SetDetectorNameFormat(const Char_t *fmt)
void PropagateEvent(KVEvent *, TVector3 *TheOrigin=0)
const TGeoHMatrix * GetCurrentMatrix() const
Returns pointer to internal copy of current global transformation matrix.
TGeoManager * GetGeometry() const
void AbsorbDetectorPaths(KVGeoNavigator *GN)
KVUniqueNameList fDetectorPaths
correspondance between physical node and detector objects
KVNameValueList fStrucNameFmt
list of user-defined formats for structure names
void SetNameCorrespondanceList(const Char_t *)
TEnv * fDetStrucNameCorrespList
list(s) of correspondance for renaming structures/detectors
virtual void PropagateParticle(KVNucleus *, TVector3 *TheOrigin=0)
TString GetCurrentPath() const
KVString fDetNameFmt
user-defined format for detector names
void SetStructureNameFormat(const Char_t *type, const Char_t *fmt)
TGeoVolume * GetCurrentDetectorNameAndVolume(KVString &, Bool_t &)
const TClonesArray & CurrentStructures() const
Base class describing elements of array geometry.
KVGeoStrucElement * GetStructure(const Char_t *name) const
KVDetector * GetDetector(const Char_t *name) const
Return detector in this structure with given name.
virtual void Add(KVBase *)
const KVSeqCollection * GetDetectors() const
Material for use in energy loss & range calculations.
Abstract base class for calculation of range & energy loss of charged particles in matter.
KVIonRangeTableMaterial * GetMaterial(const Char_t *material) const
Returns pointer to material of given name or type.
Description of physical materials used to construct detectors & targets; interface to range tables.
Base class for describing the geometry of a detector array.
virtual void DeduceIdentificationTelescopesFromGeometry()
void CalculateDetectorSegmentationIndex()
void AddTrajectory(KVGeoDNTrajectory *d)
KVGeoNavigator * GetNavigator() const
void SetGeometry(TGeoManager *)
const TSeqCollection * GetTrajectories() const
void CalculateReconstructionTrajectories()
void AssociateTrajectoriesAndNodes()
void DeduceGroupsFromTrajectories()
KVNamedParameter * GetParameter(Int_t idx) const
return the parameter object with index idx
void SetValue(const Char_t *name, value_type value)
const Char_t * GetNameAt(Int_t idx) const
Int_t GetNpar() const
return the number of stored parameters
A generic named parameter storing values of different types.
const Char_t * GetString() const
An event container for KVNucleus objects.
Description of properties and kinematics of atomic nuclei.
void SetZAandE(Int_t z, Int_t a, Double_t ekin)
Set atomic number, mass number, and kinetic energy in MeV.
Bool_t ROOTGeo() const
Returns kTRUE if ROOT geometry is used, kFALSE if not.
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
virtual void Add(TObject *obj)
virtual Int_t GetEntries() const
TObject * FindObject(const char *name) const override
virtual Double_t GetDZ() const
Double_t GetTemperature() const
Double_t GetPressure() const
virtual Double_t GetDensity() const
TGeoMaterial * GetMaterial() const
TGeoVolume * GetVolume() const
TGeoMedium * GetMedium() const
TGeoMaterial * GetMaterial() const
Int_t GetNdaughters() const
void SetTransparency(Char_t transparency=0)
TGeoNode * GetNode(const char *name) const
void SetLineColor(Color_t lcolor) override
TGeoShape * GetShape() const
virtual void SetTitle(const char *title="")
const char * GetName() const override
const char * GetTitle() const override
virtual void SetName(const char *name)
Int_t GetEntries() const override
virtual const char * ClassName() const
virtual void Warning(const char *method, const char *msgfmt,...) const
virtual void Info(const char *method, const char *msgfmt,...) const
Longptr_t ExecPlugin(int nargs)
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const