Skip to content

Commit

Permalink
move string replacing from multiple macros to GetTriggerBCMaskAndMu.C
Browse files Browse the repository at this point in the history
  • Loading branch information
gconesab committed Jun 22, 2020
1 parent bf80625 commit a1c92c9
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 34 deletions.
9 changes: 2 additions & 7 deletions MC/CustomGenerators/DPG/Dpmjet_Pileup_Cent.C
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,9 @@ AliGenerator *GeneratorCustom(){
Double_t mu=0.001;
TString bcm=GetTriggerBCMaskAndMu(mu);

// swap H and L to match requirement of AliGenPileup
bcm.ReplaceAll("H","X");
bcm.ReplaceAll("L","H");
bcm.ReplaceAll("X","L");

//printf(" BC mask = %s\n",bcm.Data());
printf(" mu = %f\n",mu);
printf(" Energy = %f\n",energyConfig);
//printf(" mu = %f\n",mu);
//printf(" Energy = %f\n",energyConfig);

// Set the pileup interaction generator
// The second argument is the pileup rate
Expand Down
9 changes: 2 additions & 7 deletions MC/CustomGenerators/DPG/EPOS_Pileup_Cent.C
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,9 @@ AliGenerator *GeneratorCustom(){
Double_t mu=0.001;
TString bcm=GetTriggerBCMaskAndMu(mu);

// swap H and L to match requirement of AliGenPileup
bcm.ReplaceAll("H","X");
bcm.ReplaceAll("L","H");
bcm.ReplaceAll("X","L");

//printf(" BC mask = %s\n",bcm.Data());
printf(" mu = %f\n",mu);
printf(" Energy = %f\n",energyConfig);
//printf(" mu = %f\n",mu);
//printf(" Energy = %f\n",energyConfig);

// Set the pileup interaction generator
// The second argument is the pileup rate
Expand Down
9 changes: 2 additions & 7 deletions MC/CustomGenerators/DPG/Hijing_Pileup.C
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,9 @@ AliGenerator *GeneratorCustom(){
Double_t mu=0.001;
TString bcm=GetTriggerBCMaskAndMu(mu);

// swap H and L to match requirement of AliGenPileup
bcm.ReplaceAll("H","X");
bcm.ReplaceAll("L","H");
bcm.ReplaceAll("X","L");

//printf(" BC mask = %s\n",bcm.Data());
printf(" mu = %f\n",mu);
printf(" Energy = %f\n",energyConfig);
//printf(" mu = %f\n",mu);
//printf(" Energy = %f\n",energyConfig);

// Set the pileup interaction generator
// The second argument is the pileup rate
Expand Down
9 changes: 2 additions & 7 deletions MC/CustomGenerators/DPG/Hijing_Pileup_Cent.C
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,10 @@ AliGenerator *GeneratorCustom(){

Double_t mu=0.001;
TString bcm=GetTriggerBCMaskAndMu(mu);

// swap H and L to match requirement of AliGenPileup
bcm.ReplaceAll("H","X");
bcm.ReplaceAll("L","H");
bcm.ReplaceAll("X","L");

//printf(" BC mask = %s\n",bcm.Data());
printf(" mu = %f\n",mu);
printf(" Energy = %f\n",energyConfig);
//printf(" mu = %f\n",mu);
//printf(" Energy = %f\n",energyConfig);

// Set the pileup interaction generator
// The second argument is the pileup rate
Expand Down
8 changes: 2 additions & 6 deletions MC/CustomGenerators/DPG/PerformanceGenerator_Pileup.C
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,9 @@ AliGenerator * GeneratorCustom() {
Double_t mu=0.001;
TString bcm=GetTriggerBCMaskAndMu(mu);

// swap H and L to match requirement of AliGenPileup
bcm.ReplaceAll("H","X");
bcm.ReplaceAll("L","H");
bcm.ReplaceAll("X","L");
//printf(" BC mask = %s\n",bcm.Data());
printf(" mu = %f\n",mu);
printf(" Energy = %f\n",energyConfig);
//printf(" mu = %f\n",mu);
//printf(" Energy = %f\n",energyConfig);

// Set the pileup interaction generator
// The second argument is the pileup rate
Expand Down
5 changes: 5 additions & 0 deletions Utils/GetTriggerBCMaskAndMu.C
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ TString GetTriggerBCMaskAndMu( double& mu, int run = -1 )

TString maskStr = mask->GetTitle();

// swap H and L to match requirement of AliGenPileup
maskStr.ReplaceAll("H","X");
maskStr.ReplaceAll("L","H");
maskStr.ReplaceAll("X","L");

printf("GetTriggerBCMaskAndMu() -- mask %s\n",maskStr.Data());

//
Expand Down

0 comments on commit a1c92c9

Please sign in to comment.