-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Import geant4maker. #659
Open
klendathu2k
wants to merge
68
commits into
star-bnl:main
Choose a base branch
from
klendathu2k:import-geant4maker-rebased
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Import geant4maker. #659
Changes from 8 commits
Commits
Show all changes
68 commits
Select commit
Hold shift + click to select a range
05dab3a
[g4star] Expose partcile stack for the geant4 application.
klendathu2k 4ef0d92
[geant4star] Load packages required for G4* for 64bit builds.
klendathu2k 78ea6c0
... and the CLHEP package required by G4 as well ...
klendathu2k e4a4ba7
Fix duplicate.
klendathu2k 6dca37a
Restore gcomad for agstar dummy routines
klendathu2k 5c25821
Extern causes issues at runtime
klendathu2k b5a7f99
Duplicate load removed.
klendathu2k 6c1e9dc
Make multi-engine simulation the default. Comment out the "NAME:engi…
klendathu2k 40e8340
Handle ROOT version dependence for VMC library.
klendathu2k f164cd2
Add VMC include path if separate from ROOT.
klendathu2k 80f70bb
Load VMC, G3/G4 VMC and concrete libraries for 64bit builds.
klendathu2k ca409ab
Invoke local copy for sensitive volume materials.
klendathu2k 6597aec
Different set of sensitive volumes in sTGC geometry.
klendathu2k 23627ac
Think we really want muons here...
klendathu2k d7b18de
Volume sensitivitiy can be flagged in either the material or medium b…
klendathu2k cfc6767
... and definitely want them here...
klendathu2k 1a136be
libgeom not needed for geant3vmc / fix EEmcUtil chain option.
klendathu2k 9dcbce8
Add g3 vmc as default chain option.
klendathu2k 0f5dace
libPhysics does not need to be preloaded.
klendathu2k 7b3f604
Reduce unneccesary verbosity.
klendathu2k 4012f0c
Apply the NODEBUG environment variable.
klendathu2k b3285d7
[g4star] Expose partcile stack for the geant4 application.
klendathu2k 00e6e42
[geant4star] Load packages required for G4* for 64bit builds.
klendathu2k 5e2f517
... and the CLHEP package required by G4 as well ...
klendathu2k 4e93513
Fix duplicate.
klendathu2k 42b1eb0
Restore gcomad for agstar dummy routines
klendathu2k e46192d
Extern causes issues at runtime
klendathu2k 151231a
Duplicate load removed.
klendathu2k 75d5ccf
Make multi-engine simulation the default. Comment out the "NAME:engi…
klendathu2k 250e023
Handle ROOT version dependence for VMC library.
klendathu2k 9ff6986
Add VMC include path if separate from ROOT.
klendathu2k c9324af
Load VMC, G3/G4 VMC and concrete libraries for 64bit builds.
klendathu2k 89ebf66
Invoke local copy for sensitive volume materials.
klendathu2k d00c2b7
Different set of sensitive volumes in sTGC geometry.
klendathu2k e860df6
Think we really want muons here...
klendathu2k da18036
Volume sensitivitiy can be flagged in either the material or medium b…
klendathu2k b20950b
... and definitely want them here...
klendathu2k ceddeb4
libgeom not needed for geant3vmc / fix EEmcUtil chain option.
klendathu2k 8d3d5fb
Add g3 vmc as default chain option.
klendathu2k 6797477
libPhysics does not need to be preloaded.
klendathu2k 383a1ce
Reduce unneccesary verbosity.
klendathu2k e6b4a73
Apply the NODEBUG environment variable.
klendathu2k 7f4a3d9
Do not build geant4star if we are not at 64bit and we are not at leas…
klendathu2k ac2a2bc
Remove dead code.
klendathu2k 570cc5a
Cleanup comments.
klendathu2k 109bb35
Merge branch 'import-geant4maker-rebased' of https://github.com/klend…
klendathu2k 210df98
libVMC --> LIBVMC
klendathu2k ea7c71a
Problem between chair and keyboard... the EEmcUtil class is provided…
klendathu2k 40631c8
ROOT5 / CINT doesn't replace the LIBVMC definition which concatinatin…
klendathu2k 7d8abe0
Merge branch 'main' into import-geant4maker-rebased
klendathu2k 1e1cd29
Local code implies local search path for headers.
klendathu2k 9123eee
Cling wrap... to prevent ROOT from ingesting class definitions multip…
klendathu2k 400539f
From PR#693
klendathu2k 16cc33b
When geant4maker is set, we should add the geantBranch to the output …
klendathu2k 029e112
Add pythia6 chain option.
klendathu2k c3f6681
Output implies geant4out, not geantout.
klendathu2k 5e8ebff
Option to load geant tables w/out other dependencies.
klendathu2k fa71fe4
The protected against both CINT and CLING.
klendathu2k 9ca2b32
Remove ancient version of geant3 vmc from our source tree.
klendathu2k 476fdf9
TGeant3TGeo available under the TGeant3/ directory.
klendathu2k deca9e8
...
klendathu2k 4ca7499
Use R__LOAD_LIBRARY rather than initialization macro. Add valgrind o…
klendathu2k f462b52
This removes the internal CLHEP library distributed with G4, so we ca…
klendathu2k e630bf0
Use R__LOAD_LIBRARY ...
klendathu2k b80757e
Clingwrap header files.
klendathu2k b204aee
Add (possibly nonfunctional) hijing macro.
klendathu2k 5612264
Will need to expose TCallf77 in 32bit builds as well. So make sure w…
klendathu2k 14e8592
Handle the (hopefully rare) case where truth track is not defined.
klendathu2k File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#ifndef __AgMLBtofVolumeId_h__ | ||
#define __AgMLBtofVolumeId_h__ | ||
|
||
#include <StarVMC/StarAgmlLib/AgMLExtension.h> | ||
#include <StMessMgr.h> | ||
|
||
class AgMLBtofVolumeId : public AgMLVolumeId { | ||
public: | ||
|
||
AgMLBtofVolumeId(){} | ||
// Applies to btog.version = 8 with btog.choice =13 (run 13 onwards) | ||
|
||
virtual int id( int* numbv ) const { | ||
|
||
int rileft = numbv[0]; | ||
int sector = numbv[1]; | ||
int module = numbv[2]; | ||
int layer = numbv[3]; | ||
|
||
// Adjust for GMT modules | ||
if ( rileft==1 ) { | ||
if ( sector== 8 ) module += 4; | ||
if ( sector==23 ) module += 4; | ||
} | ||
else if ( rileft==2 ) { | ||
if ( sector == 33 ) module += 4; | ||
if ( sector == 48 ) module += 4; | ||
} | ||
|
||
int _id = layer + 10 * (module + 100 * (sector+100*rileft) ); | ||
|
||
return _id; | ||
|
||
}; | ||
}; | ||
|
||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
#ifndef __AgMLEEmcVolumeId_h__ | ||
#define __AgMLEEmcVolumeId_h__ | ||
|
||
#include <StarVMC/StarAgmlLib/AgMLExtension.h> | ||
#include <TGeoNavigator.h> | ||
#include <StMessMgr.h> | ||
#include <TLorentzVector.h> | ||
#include <TVirtualMC.h> | ||
#include <TMath.h> | ||
|
||
#include <TString.h> | ||
#include <StMessMgr.h> | ||
|
||
class AgMLEEmcVolumeId : public AgMLVolumeId { | ||
|
||
const int onoff = 1; | ||
const int fillmode = 3; | ||
const int sectormap[2][6] = { | ||
{ 4, 5, 6, 7, 8, 9}, | ||
{10,11,12, 1, 2, 3} | ||
}; | ||
|
||
|
||
public: | ||
|
||
AgMLEEmcVolumeId() : AgMLVolumeId() { /* nada */ }; | ||
|
||
virtual int id( int* numbv ) const { | ||
|
||
// cd == ESCI | ||
int rileft = onoff; | ||
int shift = 0; | ||
|
||
int wheel = numbv[0]; | ||
int section = numbv[1]; | ||
int idx = numbv[2]; | ||
int phi30d = sectormap[wheel-1][idx-1]; // sector number | ||
int subsec = numbv[3]; // subsection (i.e. layer) within each section | ||
int sublay = numbv[4]; // ??? | ||
int phi = numbv[5]; // phibin in sector | ||
int eta = numbv[6]; | ||
|
||
int depth = subsec + 3 * ( section - 1 ); | ||
|
||
// int volumeid = 100000*rileft + 1000*(5*(phi30d-1)+phi) + 10*eta + depth; | ||
|
||
int volumeid = 100000 * rileft | ||
+ 1000 * ( 5 * ( phi30d-1 ) + phi ) | ||
+ 10 * eta | ||
+ depth; | ||
|
||
// LOG_INFO << Form("AgML EEmc VolumdId = wheel=%i section=%i idx=%i phi30d=%i subsection=%i %i %i %i %i", | ||
// numbv[0], | ||
// numbv[1], | ||
// numbv[2], | ||
// phi30d, | ||
// numbv[3], | ||
// numbv[4], | ||
// numbv[5], | ||
// numbv[6], | ||
// volumeid ) << endm; | ||
|
||
|
||
return volumeid; | ||
|
||
}; | ||
}; | ||
|
||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
#ifndef __AgMLEmcVolumeId_h__ | ||
#define __AgMLEmcVolumeId_h__ | ||
|
||
#include <StarVMC/StarAgmlLib/AgMLExtension.h> | ||
#include <TGeoNavigator.h> | ||
#include <StMessMgr.h> | ||
#include <TLorentzVector.h> | ||
#include <TVirtualMC.h> | ||
#include <TMath.h> | ||
|
||
#include <TString.h> | ||
#include <StMessMgr.h> | ||
|
||
class AgMLEmcVolumeId : public AgMLVolumeId { | ||
|
||
const int numberOfEtaRings = 20; | ||
|
||
public: | ||
|
||
AgMLEmcVolumeId() : AgMLVolumeId() { /* nada */ }; | ||
|
||
virtual int id( int* numbv ) const { | ||
|
||
|
||
int rileft = numbv[0]; // east barrel vs west barrel | ||
int phi = numbv[1]; // module | ||
int superl = numbv[2]; // before / after SMD layer | ||
|
||
TLorentzVector _direction(0,0,0,0); | ||
TVirtualMC::GetMC()->TrackPosition( _direction ); | ||
|
||
double xg[4], xl[4]; | ||
_direction.GetXYZT( xg ); | ||
double pseudoRapidity = TMath::Abs(_direction.Eta()); | ||
|
||
// Obtain local coordinates from global coordinates | ||
TVirtualMC::GetMC()->Gmtod( xg, xl, 1 ); | ||
|
||
// Calculate the eta ring and submodule | ||
int eta_tow = ( pseudoRapidity * double(numberOfEtaRings) ) + 1.0; | ||
int phi_sub = ( xl[1]>= 0 )? 1 : 0; // (-13,0)=0, (0,13)=1 | ||
|
||
// LOG_INFO << Form("eta=%f xlocal=%f %f %f | phi_sub=%i eta_tow=%i", pseudoRapidity, xl[0], xl[1], xl[2],phi_sub,eta_tow) << endm; | ||
|
||
int volumeid = -999; | ||
|
||
if ( rileft==1 ) { | ||
phi = 60 - phi + 1; | ||
if ( phi_sub==0 ) { | ||
phi_sub=2; | ||
} | ||
} | ||
else { | ||
phi = 60+phi; | ||
phi_sub = phi_sub + 1; | ||
} | ||
|
||
volumeid=10000000*rileft+100000*eta_tow+100*phi+10*phi_sub+superl; | ||
|
||
return volumeid; | ||
|
||
}; | ||
}; | ||
|
||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#ifndef __AgMLEpdVolumeId_h__ | ||
#define __AgMLEpdVolumeId_h__ | ||
|
||
#include <StarVMC/StarAgmlLib/AgMLExtension.h> | ||
#include <StMessMgr.h> | ||
|
||
class AgMLEpdVolumeId : public AgMLVolumeId { | ||
public: | ||
|
||
AgMLEpdVolumeId(){} | ||
|
||
virtual int id( int* numbv ) const { | ||
|
||
int epdm = numbv[0]; // 1=east, 2=west | ||
int epss = numbv[1]; // 1 for PP1, 2 for PP2, PP-postion 1'o,2'o clock etc | ||
int epdt = numbv[2]; // 1:T1 trap, 2:T1 Triangular, 3:T2 Thin, 4:T3 Thick | ||
|
||
/* | ||
|
||
" EPD volume_id " | ||
" 100,000 : east or west " | ||
" 1,000 : Position clock wise, 1 to 12 " | ||
" 10 : Tile number 1 to 31, refer EPD Drupal page" | ||
" 1 : 1 T1 trap or T2 thin; 0 T1 triangular or T2 thick | ||
|
||
*/ | ||
|
||
int _id = 0; | ||
_id += 100000 * epdm; | ||
_id += 1000 * epss; | ||
_id += 10 * ( epdt%2 + epdt/2 ); | ||
_id += 1 * ( epdt%2 ); | ||
|
||
return _id; | ||
|
||
}; | ||
}; | ||
|
||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#ifndef __AgMLFstVolumeId_h__ | ||
#define __AgMLFstVolumeId_h__ | ||
|
||
#include <StarVMC/StarAgmlLib/AgMLExtension.h> | ||
#include <StMessMgr.h> | ||
|
||
class AgMLFstVolumeId : public AgMLVolumeId { | ||
public: | ||
|
||
AgMLFstVolumeId(){} | ||
|
||
virtual int id( int* numbv ) const { | ||
|
||
static const int mapping[] = { 2, 3, 1 }; | ||
|
||
int disk = numbv[0]; | ||
int wedge = numbv[1]; | ||
assert( numbv[2]>0 && numbv[2]<=3 ); | ||
int sensor = mapping[ numbv[2]-1 ]; | ||
|
||
|
||
return 1000*disk + 10*wedge + sensor; | ||
|
||
}; | ||
}; | ||
|
||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#ifndef __AgMLHcaVolumeId_h__ | ||
#define __AgMLHcaVolumeId_h__ | ||
|
||
#include <StarVMC/StarAgmlLib/AgMLExtension.h> | ||
#include <StMessMgr.h> | ||
|
||
class AgMLHcaVolumeId : public AgMLVolumeId { | ||
public: | ||
|
||
AgMLHcaVolumeId(){} | ||
|
||
virtual int id( int* numbv ) const { | ||
|
||
int mod = numbv[0]; // module | ||
int tow = numbv[1]; // tower | ||
|
||
return 1000*mod + tow; | ||
|
||
}; | ||
}; | ||
|
||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#ifndef __AgMLMtdVolumeId_h__ | ||
#define __AgMLMtdVolumeId_h__ | ||
|
||
#include <StarVMC/StarAgmlLib/AgMLExtension.h> | ||
#include <StMessMgr.h> | ||
|
||
class AgMLMtdVolumeId : public AgMLVolumeId { | ||
public: | ||
|
||
AgMLMtdVolumeId(){} | ||
// Applies to btog.version = 8 with btog.choice =13 (run 13 onwards) | ||
|
||
virtual int id( int* numbv ) const { | ||
|
||
int sector = numbv[0]; | ||
int module = numbv[1]; | ||
int layer = numbv[2]; | ||
|
||
return 1000 * sector + 100 * module + layer; | ||
|
||
}; | ||
}; | ||
|
||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#ifndef __AgMLPreVolumeId_h__ | ||
#define __AgMLPreVolumeId_h__ | ||
|
||
#include <StarVMC/StarAgmlLib/AgMLExtension.h> | ||
#include <StMessMgr.h> | ||
|
||
class AgMLPreVolumeId : public AgMLVolumeId { | ||
public: | ||
|
||
AgMLPreVolumeId(){} | ||
|
||
virtual int id( int* numbv ) const { | ||
|
||
int layer = numbv[0]; // layer | ||
int slat = numbv[1]; // slat | ||
|
||
return 1000*layer + slat; | ||
|
||
}; | ||
}; | ||
|
||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#ifndef __AgMLStgVolumeId_h__ | ||
#define __AgMLStgVolumeId_h__ | ||
|
||
#include <StarVMC/StarAgmlLib/AgMLExtension.h> | ||
#include <StMessMgr.h> | ||
|
||
class AgMLStgVolumeId : public AgMLVolumeId { | ||
|
||
static const int version = 2; | ||
|
||
public: | ||
|
||
AgMLStgVolumeId(){} | ||
|
||
virtual int id( int* numbv ) const { | ||
|
||
int station = (numbv[0]-1) / 4 + 1; | ||
int chamber = (numbv[0]-1) % 4 + 1; | ||
|
||
if ( version == 2 ) | ||
return 10*station + chamber; | ||
else | ||
return numbv[0]; | ||
|
||
}; | ||
}; | ||
|
||
|
||
#endif |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AgMLBTofVolumeId and similarly named classes implement the unique volume IDs defined in pams/sim/g2t/g2t_volume_id.g. They provide the unique associated between hits and hardware channels.