Skip to content

Commit

Permalink
Merge branch 'mchiu-bnl-psTOF'
Browse files Browse the repository at this point in the history
  • Loading branch information
pinkenburg committed Aug 3, 2017
2 parents ae7e014 + 30f2092 commit 0c3c1f6
Show file tree
Hide file tree
Showing 12 changed files with 49 additions and 109 deletions.
7 changes: 2 additions & 5 deletions macros/g4simulations/Fun4All_G4_EICDetector.C
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ int Fun4All_G4_EICDetector(
bool do_svtx_track = do_svtx_cell && true;
bool do_svtx_eval = do_svtx_track && true;

bool do_preshower = false;

bool do_cemc = true;
bool do_cemc_cell = do_cemc && true;
bool do_cemc_twr = do_cemc_cell && true;
Expand Down Expand Up @@ -119,7 +117,7 @@ int Fun4All_G4_EICDetector(

// establish the geometry and reconstruction setup
gROOT->LoadMacro("G4Setup_EICDetector.C");
G4Init(do_svtx,do_preshower,do_cemc,do_hcalin,do_magnet,do_hcalout,do_pipe,do_FGEM,do_EGEM,do_FEMC,do_FHCAL,do_EEMC,do_DIRC,do_RICH,do_Aerogel,n_TPC_layers);
G4Init(do_svtx,do_cemc,do_hcalin,do_magnet,do_hcalout,do_pipe,do_FGEM,do_EGEM,do_FEMC,do_FHCAL,do_EEMC,do_DIRC,do_RICH,do_Aerogel,n_TPC_layers);

int absorberactive = 0; // set to 1 to make all absorbers active volumes
// const string magfield = "1.5"; // if like float -> solenoidal field in T, if string use as fieldmap name (including path)
Expand Down Expand Up @@ -219,7 +217,7 @@ int Fun4All_G4_EICDetector(
// Detector description
//---------------------

G4Setup(absorberactive, magfield, TPythia6Decayer::kAll,do_svtx,do_preshower,do_cemc,do_hcalin,do_magnet,do_hcalout,do_pipe,do_FGEM,do_EGEM,do_FEMC,do_FHCAL,do_EEMC,do_DIRC,do_RICH,do_Aerogel,magfield_rescale);
G4Setup(absorberactive, magfield, TPythia6Decayer::kAll,do_svtx,do_cemc,do_hcalin,do_magnet,do_hcalout,do_pipe,do_FGEM,do_EGEM,do_FEMC,do_FHCAL,do_EEMC,do_DIRC,do_RICH,do_Aerogel,magfield_rescale);

}

Expand Down Expand Up @@ -369,7 +367,6 @@ int Fun4All_G4_EICDetector(
G4DSTreader_EICDetector( outputFile, //
/*int*/ absorberactive ,
/*bool*/ do_svtx ,
/*bool*/ do_preshower ,
/*bool*/ do_cemc ,
/*bool*/ do_hcalin ,
/*bool*/ do_magnet ,
Expand Down
7 changes: 2 additions & 5 deletions macros/g4simulations/Fun4All_G4_fsPHENIX.C
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ int Fun4All_G4_fsPHENIX(
bool do_svtx_track = do_svtx_cell && true;
bool do_svtx_eval = do_svtx_track && false;

bool do_preshower = false;

bool do_cemc = true;
bool do_cemc_cell = do_cemc && true;
bool do_cemc_twr = do_cemc_cell && true;
Expand Down Expand Up @@ -108,7 +106,7 @@ int Fun4All_G4_fsPHENIX(

// establish the geometry and reconstruction setup
gROOT->LoadMacro("G4Setup_fsPHENIX.C");
G4Init(do_svtx,do_preshower,do_cemc,do_hcalin,do_magnet,do_hcalout,do_pipe,do_FGEM,do_FEMC,do_FHCAL,n_TPC_layers);
G4Init(do_svtx,do_cemc,do_hcalin,do_magnet,do_hcalout,do_pipe,do_FGEM,do_FEMC,do_FHCAL,n_TPC_layers);

int absorberactive = 0; // set to 1 to make all absorbers active volumes
// const string magfield = "1.5"; // if like float -> solenoidal field in T, if string use as fieldmap name (including path)
Expand Down Expand Up @@ -214,7 +212,7 @@ int Fun4All_G4_fsPHENIX(
//---------------------

G4Setup(absorberactive, magfield, TPythia6Decayer::kAll,
do_svtx, do_preshower, do_cemc, do_hcalin, do_magnet, do_hcalout, do_pipe,
do_svtx, do_cemc, do_hcalin, do_magnet, do_hcalout, do_pipe,
do_FGEM, do_FEMC, do_FHCAL,
magfield_rescale);

Expand Down Expand Up @@ -376,7 +374,6 @@ int Fun4All_G4_fsPHENIX(
G4DSTreader_fsPHENIX( outputFile, //
/*int*/ absorberactive ,
/*bool*/ do_svtx ,
/*bool*/ do_preshower ,
/*bool*/ do_cemc ,
/*bool*/ do_hcalin ,
/*bool*/ do_magnet ,
Expand Down
9 changes: 4 additions & 5 deletions macros/g4simulations/Fun4All_G4_sPHENIX.C
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ int Fun4All_G4_sPHENIX(
bool do_svtx_track = do_svtx_cell && true;
bool do_svtx_eval = do_svtx_track && true;

bool do_preshower = false;

bool do_pstof = true;

bool do_cemc = true;
bool do_cemc_cell = do_cemc && true;
Expand Down Expand Up @@ -110,7 +109,7 @@ int Fun4All_G4_sPHENIX(

// establish the geometry and reconstruction setup
gROOT->LoadMacro("G4Setup_sPHENIX.C");
G4Init(do_svtx,do_preshower,do_cemc,do_hcalin,do_magnet,do_hcalout,do_pipe,n_TPC_layers);
G4Init(do_svtx,do_pstof,do_cemc,do_hcalin,do_magnet,do_hcalout,do_pipe,n_TPC_layers);

int absorberactive = 1; // set to 1 to make all absorbers active volumes
// const string magfield = "1.5"; // if like float -> solenoidal field in T, if string use as fieldmap name (including path)
Expand Down Expand Up @@ -290,7 +289,7 @@ int Fun4All_G4_sPHENIX(
//---------------------

G4Setup(absorberactive, magfield, TPythia6Decayer::kAll,
do_svtx, do_preshower, do_cemc, do_hcalin, do_magnet, do_hcalout, do_pipe, magfield_rescale);
do_svtx, do_pstof, do_cemc, do_hcalin, do_magnet, do_hcalout, do_pipe, magfield_rescale);
}

//---------
Expand Down Expand Up @@ -441,7 +440,7 @@ int Fun4All_G4_sPHENIX(
G4DSTreader( outputFile, //
/*int*/ absorberactive ,
/*bool*/ do_svtx ,
/*bool*/ do_preshower ,
/*bool*/ do_pstof ,
/*bool*/ do_cemc ,
/*bool*/ do_hcalin ,
/*bool*/ do_magnet ,
Expand Down
13 changes: 0 additions & 13 deletions macros/g4simulations/G4Setup_EICDetector.C
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ double no_overlapp = 0.0001; // added to radii to avoid overlapping volumes
bool overlapcheck = false; // set to true if you want to check for overlaps

void G4Init(bool do_svtx = true,
bool do_preshower = false,
bool do_cemc = true,
bool do_hcalin = true,
bool do_magnet = true,
Expand Down Expand Up @@ -33,12 +32,6 @@ void G4Init(bool do_svtx = true,
SvtxInit(n_TPC_layers);
}

if (do_preshower)
{
gROOT->LoadMacro("G4_PreShower.C");
PreShowerInit();
}

if (do_cemc)
{
gROOT->LoadMacro("G4_CEmc_Spacal.C");
Expand Down Expand Up @@ -118,7 +111,6 @@ int G4Setup(const int absorberactive = 0,
const string &field ="1.5",
const EDecayType decayType = TPythia6Decayer::kAll,
const bool do_svtx = true,
const bool do_preshower = false,
const bool do_cemc = true,
const bool do_hcalin = true,
const bool do_magnet = true,
Expand Down Expand Up @@ -182,11 +174,6 @@ int G4Setup(const int absorberactive = 0,
// SVTX
if (do_svtx) radius = Svtx(g4Reco, radius, absorberactive);

//----------------------------------------
// PRESHOWER

if (do_preshower) radius = PreShower(g4Reco, radius, absorberactive);

//----------------------------------------
// CEMC
//
Expand Down
13 changes: 0 additions & 13 deletions macros/g4simulations/G4Setup_fsPHENIX.C
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ double no_overlapp = 0.0001; // added to radii to avoid overlapping volumes
bool overlapcheck = false; // set to true if you want to check for overlaps

void G4Init(bool do_svtx = true,
bool do_preshower = false,
bool do_cemc = true,
bool do_hcalin = true,
bool do_magnet = true,
Expand All @@ -27,12 +26,6 @@ void G4Init(bool do_svtx = true,
SvtxInit(n_TPC_layers);
}

if (do_preshower)
{
gROOT->LoadMacro("G4_PreShower.C");
PreShowerInit();
}

if (do_cemc)
{
gROOT->LoadMacro("G4_CEmc_Spacal.C");
Expand Down Expand Up @@ -80,7 +73,6 @@ int G4Setup(const int absorberactive = 0,
const string &field ="1.5",
const EDecayType decayType = TPythia6Decayer::kAll,
const bool do_svtx = true,
const bool do_preshower = false,
const bool do_cemc = true,
const bool do_hcalin = true,
const bool do_magnet = true,
Expand Down Expand Up @@ -140,11 +132,6 @@ int G4Setup(const int absorberactive = 0,
// SVTX
if (do_svtx) radius = Svtx(g4Reco, radius, absorberactive);

//----------------------------------------
// PRESHOWER

if (do_preshower) radius = PreShower(g4Reco, radius, absorberactive);

//----------------------------------------
// CEMC
//
Expand Down
14 changes: 7 additions & 7 deletions macros/g4simulations/G4Setup_sPHENIX.C
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ double no_overlapp = 0.0001; // added to radii to avoid overlapping volumes
bool overlapcheck = false; // set to true if you want to check for overlaps

void G4Init(bool do_svtx = true,
bool do_preshower = false,
bool do_pstof = true,
bool do_cemc = true,
bool do_hcalin = true,
bool do_magnet = true,
Expand All @@ -25,10 +25,10 @@ void G4Init(bool do_svtx = true,
SvtxInit(n_TPC_layers);
}

if (do_preshower)
if (do_pstof)
{
gROOT->LoadMacro("G4_PreShower.C");
PreShowerInit();
gROOT->LoadMacro("G4_PSTOF.C");
PSTOFInit();
}

if (do_cemc)
Expand Down Expand Up @@ -61,7 +61,7 @@ int G4Setup(const int absorberactive = 0,
const string &field ="1.5",
const EDecayType decayType = TPythia6Decayer::kAll,
const bool do_svtx = true,
const bool do_preshower = false,
const bool do_pstof = true,
const bool do_cemc = true,
const bool do_hcalin = true,
const bool do_magnet = true,
Expand Down Expand Up @@ -117,9 +117,9 @@ int G4Setup(const int absorberactive = 0,
if (do_svtx) radius = Svtx(g4Reco, radius, absorberactive);

//----------------------------------------
// PRESHOWER
// PSTOF

if (do_preshower) radius = PreShower(g4Reco, radius, absorberactive);
if (do_pstof) radius = PSTOF(g4Reco, radius, absorberactive);

//----------------------------------------
// CEMC
Expand Down
2 changes: 1 addition & 1 deletion macros/g4simulations/G4_CEmc_Spacal.C
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ CEmc_1DProjectiveSpacal(PHG4Reco *g4Reco, double radius, const int crossings, co

if (radius > emc_inner_radius)
{
cout << "inconsistency: preshower radius+thickness: " << radius
cout << "inconsistency: pstof outer radius: " << radius
<< " larger than emc inner radius: " << emc_inner_radius
<< endl;
gSystem->Exit(-1);
Expand Down
7 changes: 6 additions & 1 deletion macros/g4simulations/G4_DSTReader.C
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ void
G4DSTreader( const char * outputFile = "G4sPHENIXCells.root",//
int absorberactive = 1, //
bool do_svtx = true, //
bool do_preshower = false, //
bool do_pstof = true, //
bool do_cemc = true, //
bool do_hcalin = true, //
bool do_magnet = true, //
Expand Down Expand Up @@ -52,6 +52,11 @@ G4DSTreader( const char * outputFile = "G4sPHENIXCells.root",//
ana->AddNode("SVTX");
}

if (do_pstof)
{
ana->AddNode("PSTOF_0");
}

if (do_cemc)
{
ana->AddNode("CEMC");
Expand Down
1 change: 0 additions & 1 deletion macros/g4simulations/G4_DSTReader_EICDetector.C
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ void
G4DSTreader_EICDetector( const char * outputFile = "G4sPHENIXCells.root",//
int absorberactive = 1, //
bool do_svtx = true, //
bool do_preshower = false, //
bool do_cemc = true, //
bool do_hcalin = true, //
bool do_magnet = true, //
Expand Down
1 change: 0 additions & 1 deletion macros/g4simulations/G4_DSTReader_fsPHENIX.C
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ void
G4DSTreader_fsPHENIX( const char * outputFile = "G4sPHENIXCells.root",//
int absorberactive = 1, //
bool do_svtx = true, //
bool do_preshower = false, //
bool do_cemc = true, //
bool do_hcalin = true, //
bool do_magnet = true, //
Expand Down
27 changes: 27 additions & 0 deletions macros/g4simulations/G4_PSTOF.C
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// $Id$

/*!
* \file ${file_name}
* \brief Macro setting up the barrel mRPC psTOF
* \author Mickey Chiu <[email protected]>
* \version $Revision$
* \date $Date$
*/

void PSTOFInit()
{}

double PSTOF(PHG4Reco* g4Reco, double radius, const int absorberactive = 0)
{
gSystem->Load("libg4detectors.so");
gSystem->Load("libg4testbench.so");


PHG4PSTOFSubsystem *pstof = new PHG4PSTOFSubsystem( "PSTOF" );
pstof->SuperDetector("PSTOF");
// pstof->SetActive(-1,1); // set all modules active
g4Reco->registerSubsystem( pstof );

// returns the outer radius to check for overlaps with next detector
return 90.;
}
57 changes: 0 additions & 57 deletions macros/g4simulations/G4_PreShower.C

This file was deleted.

0 comments on commit 0c3c1f6

Please sign in to comment.