-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[g4star] Expose partcile stack for the geant4 application.
[g4star] Update stacker and agml extension classes to enable multi engine tracking and user defined hits in the geant4 application. Few additional fixes and cleanups in the code. [g4star] Import the StGeant4Maker into the repository. Builds under root 6.24 (with some additional compilation flags). [g4star] Defer mysql load until StBFChain can do it. [g4star] Add geant4vmc, geant4mk and fastjet chain options. Load libfastjet with stargen package b/c one or more filters depends on it. (Should consider splitting filters into sep chain opt). [g4star] Cleanup commented out includes. [g4star] Reduce compile time warnings... [g4star] ... more reduction of compiler warnings ... and even more reduction of compiler warnings... [g4star] And modify cons to pickup the include paths to geant4 and geant4 vmc libraries
- Loading branch information
1 parent
6638b49
commit 36978ba
Showing
79 changed files
with
25,523 additions
and
26 deletions.
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.