Skip to content

Commit

Permalink
add option to set its material budget scaling factors (#507)
Browse files Browse the repository at this point in the history
  • Loading branch information
noferini authored Mar 4, 2022
1 parent 7beef78 commit 6044ed5
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 1 deletion.
61 changes: 60 additions & 1 deletion MC/DetectorConfig.C
Original file line number Diff line number Diff line change
Expand Up @@ -363,9 +363,68 @@ DetectorInit(Int_t tag)
{
//=================== ITS parameters ============================

AliITS *ITS = new AliITSv11("ITS","ITS v11");
AliITSv11 *ITS = new AliITSv11("ITS","ITS v11");
if( tag == kDetectorPhosOnly)
ITS->DisableStepManager();

// adjust material if requested
if(gSystem->Getenv("CONFIG_ITS_MATERIAL")){
printf("*** ITS requiring adjusment of SPD and SDD denisities\n");
TString str_conf = gSystem->Getenv("CONFIG_ITS_MATERIAL");
char currentpar[100];
int upto = str_conf.First(",");
while(upto > - 1 && upto < 100){ // more than one param
snprintf(currentpar, upto+1, "%s", str_conf.Data());
TString tstr(currentpar);
str_conf.Remove(0, upto+1);
upto = str_conf.First(",");

if(tstr.Contains("kSPDSiChip")){
float val = atof(&tstr[tstr.First("=") + 1]);
printf("kSPDSiChip = %f\n", val);
ITS->SetDensityFactor(AliITSv11::kSPDSiChip, val);// SPD Silicon chip
} else if(tstr.Contains("kSPDSiSens")){
float val = atof(&tstr[tstr.First("=") + 1]);
printf("kSPDSiSens = %f\n", val);
ITS->SetDensityFactor(AliITSv11::kSPDSiSens, val);// SPD Silicon sensor
} else if(tstr.Contains("kSPDAlBus")){
float val = atof(&tstr[tstr.First("=") + 1]);
printf("kSPDAlBus = %f\n", val);
ITS->SetDensityFactor(AliITSv11::kSPDAlBus, val);// SPD Aluminum Bus
} else if(tstr.Contains("kSPDCoolPipes")){
float val = atof(&tstr[tstr.First("=") + 1]);
printf("kSPDCoolPipes = %f\n", val);
ITS->SetDensityFactor(AliITSv11::kSPDCoolPipes, val);// SPD Phynox
} else if(tstr.Contains("kSDDSiAll")){
float val = atof(&tstr[tstr.First("=") + 1]);
printf("kSDDSiAll = %f\n", val);
ITS->SetDensityFactor(AliITSv11::kSDDSiAll, val);// SDD Silicon chip+sensor
}
}
snprintf(currentpar, 100, "%s", str_conf.Data());
TString tstr(currentpar);
if(tstr.Contains("kSPDSiChip")){
float val = atof(&tstr[tstr.First("=") + 1]);
printf("kSPDSiChip = %f\n", val);
ITS->SetDensityFactor(AliITSv11::kSPDSiChip, val);// SPD Silicon chip
} else if(tstr.Contains("kSPDSiSens")){
float val = atof(&tstr[tstr.First("=") + 1]);
printf("kSPDSiSens = %f\n", val);
ITS->SetDensityFactor(AliITSv11::kSPDSiSens, val);// SPD Silicon sensor
} else if(tstr.Contains("kSPDAlBus")){
float val = atof(&tstr[tstr.First("=") + 1]);
printf("kSPDAlBus = %f\n", val);
ITS->SetDensityFactor(AliITSv11::kSPDAlBus, val);// SPD Aluminum Bus
} else if(tstr.Contains("kSPDCoolPipes")){
float val = atof(&tstr[tstr.First("=") + 1]);
printf("kSPDCoolPipes = %f\n", val);
ITS->SetDensityFactor(AliITSv11::kSPDCoolPipes, val);// SPD Phynox
} else if(tstr.Contains("kSDDSiAll")){
float val = atof(&tstr[tstr.First("=") + 1]);
printf("kSDDSiAll = %f\n", val);
ITS->SetDensityFactor(AliITSv11::kSDDSiAll, val);// SDD Silicon chip+sensor
}
}
}

if (iTPC)
Expand Down
6 changes: 6 additions & 0 deletions MC/dpgsim.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ function COMMAND_HELP(){
echo "--keepTrackRefsFraction <percentage> Percentage of subjobs that keeps the TrackRefs file"
echo "--signalFilteringFraction <percentage> Percentage of subjobs that use signal filtering (for embedding only)"
echo "--material <densityFactor> Modify material budget by a density factor"
echo "--its-material <densityFactor> Modify its-only material budget following this syntaxt \"kSPDSiChip=1.2,kSPDSiSens=1.2,kSPDAlBus=1.2,kSPDCoolPipes=1.2,kSDDSiAll=1.12\""
echo "--purifyKineOff Switch off the PurifyKine step in simulation"
echo "--fluka Use FLUKA instead of GEANT3"
echo "--geant4 Use GEANT4 instead of GEANT3"
Expand Down Expand Up @@ -244,6 +245,7 @@ CONFIG_FASTB=""
CONFIG_VDT="on"
CONFIG_CLEANUP="on"
CONFIG_MATERIAL=""
CONFIG_ITS_MATERIAL=""
CONFIG_KEEPTRACKREFSFRACTION="0"
CONFIG_REMOVETRACKREFS="off"
CONFIG_SIGNALFILTERINGFRACTION="100"
Expand Down Expand Up @@ -471,6 +473,10 @@ while [ ! -z "$1" ]; do
CONFIG_MATERIAL="$1"
export CONFIG_MATERIAL
shift
elif [ "$option" = "--its-material" ]; then
CONFIG_ITS_MATERIAL="$1"
export CONFIG_ITS_MATERIAL
shift
elif [ "$option" = "--geant4" ]; then
CONFIG_GEANT4="on"
export CONFIG_GEANT4
Expand Down

0 comments on commit 6044ed5

Please sign in to comment.