forked from AliceO2Group/O2DPG
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'tpc-cleanup' of github.com:rmunzer/O2DPG into tpc-cleanup
- Loading branch information
Showing
22 changed files
with
1,507 additions
and
9 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
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
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
synchronous-workflow: "O2PDPSuite" reco,128,126,"GPU_NUM_MEM_REG_CALLBACKS=5 SYNCMODE=1 NUMAGPUIDS=1 NUMAID=0 production/dpl-workflow.sh" reco,128,126,"GPU_NUM_MEM_REG_CALLBACKS=5 SYNCMODE=1 NUMAGPUIDS=1 NUMAID=1 production/dpl-workflow.sh" | ||
synchronous-workflow-1numa: "O2PDPSuite" reco,128,126,"SYNCMODE=1 production/dpl-workflow.sh" | ||
synchronous-workflow-calib: "O2PDPSuite" reco,128,126,"GPU_NUM_MEM_REG_CALLBACKS=5 SYNCMODE=1 NUMAGPUIDS=1 NUMAID=0 WORKFLOW_PARAMETERS+=,CALIB_PROXIES production/dpl-workflow.sh" reco,128,126,"GPU_NUM_MEM_REG_CALLBACKS=5 SYNCMODE=1 NUMAGPUIDS=1 NUMAID=1 WORKFLOW_PARAMETERS+=,CALIB_PROXIES production/dpl-workflow.sh" calib,32,"AGGREGATOR_TASKS=BARREL_TF SHMSIZE=68719476736 WORKFLOW_PARAMETERS+=,CALIB_PROXIES production/aggregator-workflow.sh" calib,32,"AGGREGATOR_TASKS=BARREL_SPORADIC SHMSIZE=68719476736 WORKFLOW_PARAMETERS+=,CALIB_PROXIES production/aggregator-workflow.sh" calib,16,"AGGREGATOR_TASKS=CALO_TF SHMSIZE=34359738368 WORKFLOW_PARAMETERS+=,CALIB_PROXIES production/aggregator-workflow.sh" calib,16,"AGGREGATOR_TASKS=CALO_SPORADIC SHMSIZE=34359738368 WORKFLOW_PARAMETERS+=,CALIB_PROXIES production/aggregator-workflow.sh" calib,16,"AGGREGATOR_TASKS=MUON_TF SHMSIZE=34359738368 WORKFLOW_PARAMETERS+=,CALIB_PROXIES production/aggregator-workflow.sh" calib,16,"AGGREGATOR_TASKS=MUON_SPORADIC SHMSIZE=34359738368 WORKFLOW_PARAMETERS+=,CALIB_PROXIES production/aggregator-workflow.sh" calib,16,"AGGREGATOR_TASKS=FORWARD_TF SHMSIZE=34359738368 WORKFLOW_PARAMETERS+=,CALIB_PROXIES production/aggregator-workflow.sh" calib,16,"AGGREGATOR_TASKS=FORWARD_SPORADIC SHMSIZE=34359738368 WORKFLOW_PARAMETERS+=,CALIB_PROXIES production/aggregator-workflow.sh" calib,128,"AGGREGATOR_TASKS=TPC_IDCBOTH_SAC SHMSIZE=137438953472 WORKFLOW_PARAMETERS+=,CALIB_PROXIES production/aggregator-workflow.sh" | ||
synchronous-workflow-calib: "O2PDPSuite" reco,128,126,"GPU_NUM_MEM_REG_CALLBACKS=5 SYNCMODE=1 NUMAGPUIDS=1 NUMAID=0 WORKFLOW_PARAMETERS+=,CALIB_PROXIES production/dpl-workflow.sh" reco,128,126,"GPU_NUM_MEM_REG_CALLBACKS=5 SYNCMODE=1 NUMAGPUIDS=1 NUMAID=1 WORKFLOW_PARAMETERS+=,CALIB_PROXIES production/dpl-workflow.sh" calib,32,"AGGREGATOR_TASKS=BARREL_TF SYNCMODE=1 SHMSIZE=68719476736 WORKFLOW_PARAMETERS+=,CALIB_PROXIES production/aggregator-workflow.sh" calib,32,"AGGREGATOR_TASKS=BARREL_SPORADIC SYNCMODE=1 SHMSIZE=68719476736 WORKFLOW_PARAMETERS+=,CALIB_PROXIES production/aggregator-workflow.sh" calib,16,"AGGREGATOR_TASKS=CALO_TF SYNCMODE=1 SHMSIZE=34359738368 WORKFLOW_PARAMETERS+=,CALIB_PROXIES production/aggregator-workflow.sh" calib,16,"AGGREGATOR_TASKS=CALO_SPORADIC SYNCMODE=1 SHMSIZE=34359738368 WORKFLOW_PARAMETERS+=,CALIB_PROXIES production/aggregator-workflow.sh" calib,16,"AGGREGATOR_TASKS=MUON_TF SYNCMODE=1 SHMSIZE=34359738368 WORKFLOW_PARAMETERS+=,CALIB_PROXIES production/aggregator-workflow.sh" calib,16,"AGGREGATOR_TASKS=MUON_SPORADIC SYNCMODE=1 SHMSIZE=34359738368 WORKFLOW_PARAMETERS+=,CALIB_PROXIES production/aggregator-workflow.sh" calib,16,"AGGREGATOR_TASKS=FORWARD_TF SYNCMODE=1 SHMSIZE=34359738368 WORKFLOW_PARAMETERS+=,CALIB_PROXIES production/aggregator-workflow.sh" calib,16,"AGGREGATOR_TASKS=FORWARD_SPORADIC SYNCMODE=1 SHMSIZE=34359738368 WORKFLOW_PARAMETERS+=,CALIB_PROXIES production/aggregator-workflow.sh" calib,128,"AGGREGATOR_TASKS=TPC_IDCBOTH_SAC SHMSIZE=137438953472 WORKFLOW_PARAMETERS+=,CALIB_PROXIES production/aggregator-workflow.sh" |
This file was deleted.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
MC/config/PWGHF/ini/GeneratorHF_D2H_ccbar_and_bbbar_gap5_Mode2_CharmBaryons.ini
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,8 @@ | ||
### The external generator derives from GeneratorPythia8. | ||
[GeneratorExternal] | ||
fileName=${O2DPG_ROOT}/MC/config/PWGHF/external/generator/generator_pythia8_gaptriggered_hf.C | ||
funcName=GeneratorPythia8GapTriggeredCharmAndBeauty(5, -1.5, 1.5, -1.5, 1.5, {4132, 4332, 4232}) | ||
|
||
[GeneratorPythia8] | ||
config=${O2DPG_ROOT}/MC/config/PWGHF/pythia8/generator/pythia8_charmhadronic_with_decays_Mode2.cfg | ||
includePartonEvent=true |
124 changes: 124 additions & 0 deletions
124
MC/config/PWGHF/ini/tests/GeneratorHF_D2H_ccbar_and_bbbar_gap5_Mode2_CharmBaryons.C
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,124 @@ | ||
int External() { | ||
std::string path{"o2sim_Kine.root"}; | ||
|
||
int checkPdgQuarkOne{4}; | ||
int checkPdgQuarkTwo{5}; | ||
float ratioTrigger = 1./5; // one event triggered out of 5 | ||
|
||
std::vector<int> checkPdgHadron{4132, 4332, 4232}; | ||
std::map<int, std::vector<std::vector<int>>> checkHadronDecays{ // sorted pdg of daughters | ||
{4132, {{211, 3312}}}, // Xic0 | ||
{4332, {{211, 3334}, {211, 3312}}}, // Omegac0 | ||
{4232, {{313, 2212}, {211, 321, 2212}, {211, 3324}, {211, 211, 3312}}} //Xic+ | ||
}; | ||
|
||
TFile file(path.c_str(), "READ"); | ||
if (file.IsZombie()) { | ||
std::cerr << "Cannot open ROOT file " << path << "\n"; | ||
return 1; | ||
} | ||
|
||
auto tree = (TTree *)file.Get("o2sim"); | ||
std::vector<o2::MCTrack> *tracks{}; | ||
tree->SetBranchAddress("MCTrack", &tracks); | ||
o2::dataformats::MCEventHeader *eventHeader = nullptr; | ||
tree->SetBranchAddress("MCEventHeader.", &eventHeader); | ||
|
||
int nEventsMB{}, nEventsInjOne{}, nEventsInjTwo{}; | ||
int nQuarksOne{}, nQuarksTwo{}, nSignals{}, nSignalGoodDecay{}; | ||
auto nEvents = tree->GetEntries(); | ||
|
||
for (int i = 0; i < nEvents; i++) { | ||
tree->GetEntry(i); | ||
|
||
// check subgenerator information | ||
if (eventHeader->hasInfo(o2::mcgenid::GeneratorProperty::SUBGENERATORID)) { | ||
bool isValid = false; | ||
int subGeneratorId = eventHeader->getInfo<int>(o2::mcgenid::GeneratorProperty::SUBGENERATORID, isValid); | ||
if (subGeneratorId == 0) { | ||
nEventsMB++; | ||
} else if (subGeneratorId == checkPdgQuarkOne) { | ||
nEventsInjOne++; | ||
} else if (subGeneratorId == checkPdgQuarkTwo) { | ||
nEventsInjTwo++; | ||
} | ||
} | ||
|
||
for (auto &track : *tracks) { | ||
auto pdg = track.GetPdgCode(); | ||
if (std::abs(pdg) == checkPdgQuarkOne) { | ||
nQuarksOne++; | ||
continue; | ||
} | ||
if (std::abs(pdg) == checkPdgQuarkTwo) { | ||
nQuarksTwo++; | ||
continue; | ||
} | ||
if (std::find(checkPdgHadron.begin(), checkPdgHadron.end(), std::abs(pdg)) != checkPdgHadron.end()) { // found signal | ||
nSignals++; // count signal PDG | ||
|
||
std::vector<int> pdgsDecay{}; | ||
std::vector<int> pdgsDecayAntiPart{}; | ||
for (int j{track.getFirstDaughterTrackId()}; j <= track.getLastDaughterTrackId(); ++j) { | ||
auto pdgDau = tracks->at(j).GetPdgCode(); | ||
pdgsDecay.push_back(pdgDau); | ||
if (pdgDau != 333) { // phi is antiparticle of itself | ||
pdgsDecayAntiPart.push_back(-pdgDau); | ||
} else { | ||
pdgsDecayAntiPart.push_back(pdgDau); | ||
} | ||
} | ||
|
||
std::sort(pdgsDecay.begin(), pdgsDecay.end()); | ||
std::sort(pdgsDecayAntiPart.begin(), pdgsDecayAntiPart.end()); | ||
|
||
for (auto &decay : checkHadronDecays[std::abs(pdg)]) { | ||
if (pdgsDecay == decay || pdgsDecayAntiPart == decay) { | ||
nSignalGoodDecay++; | ||
break; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
std::cout << "--------------------------------\n"; | ||
std::cout << "# Events: " << nEvents << "\n"; | ||
std::cout << "# MB events: " << nEventsMB << "\n"; | ||
std::cout << Form("# events injected with %d quark pair: ", checkPdgQuarkOne) << nEventsInjOne << "\n"; | ||
std::cout << Form("# events injected with %d quark pair: ", checkPdgQuarkTwo) << nEventsInjTwo << "\n"; | ||
std::cout << Form("# %d (anti)quarks: ", checkPdgQuarkOne) << nQuarksOne << "\n"; | ||
std::cout << Form("# %d (anti)quarks: ", checkPdgQuarkTwo) << nQuarksTwo << "\n"; | ||
std::cout <<"# signal hadrons: " << nSignals << "\n"; | ||
std::cout <<"# signal hadrons decaying in the correct channel: " << nSignalGoodDecay << "\n"; | ||
|
||
if (nEventsMB < nEvents * (1 - ratioTrigger) * 0.95 || nEventsMB > nEvents * (1 - ratioTrigger) * 1.05) { // we put some tolerance since the number of generated events is small | ||
std::cerr << "Number of generated MB events different than expected\n"; | ||
return 1; | ||
} | ||
if (nEventsInjOne < nEvents * ratioTrigger * 0.5 * 0.95 || nEventsInjOne > nEvents * ratioTrigger * 0.5 * 1.05) { | ||
std::cerr << "Number of generated events injected with " << checkPdgQuarkOne << " different than expected\n"; | ||
return 1; | ||
} | ||
if (nEventsInjTwo < nEvents * ratioTrigger * 0.5 * 0.95 || nEventsInjTwo > nEvents * ratioTrigger * 0.5 * 1.05) { | ||
std::cerr << "Number of generated events injected with " << checkPdgQuarkTwo << " different than expected\n"; | ||
return 1; | ||
} | ||
|
||
if (nQuarksOne < nEvents * ratioTrigger) { // we expect anyway more because the same quark is repeated several time, after each gluon radiation | ||
std::cerr << "Number of generated (anti)quarks " << checkPdgQuarkOne << " lower than expected\n"; | ||
return 1; | ||
} | ||
if (nQuarksTwo < nEvents * ratioTrigger) { // we expect anyway more because the same quark is repeated several time, after each gluon radiation | ||
std::cerr << "Number of generated (anti)quarks " << checkPdgQuarkTwo << " lower than expected\n"; | ||
return 1; | ||
} | ||
|
||
float fracForcedDecays = float(nSignalGoodDecay) / nSignals; | ||
if (fracForcedDecays < 0.9) { // we put some tolerance (e.g. due to oscillations which might change the final state) | ||
std::cerr << "Fraction of signals decaying into the correct channel " << fracForcedDecays << " lower than expected\n"; | ||
return 1; | ||
} | ||
|
||
return 0; | ||
} |
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
10 changes: 10 additions & 0 deletions
10
MC/config/PWGLF/ini/GeneratorLF_Resonances_PbPb5360_injection.ini
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,10 @@ | ||
[GeneratorExternal] | ||
fileName=${O2DPG_ROOT}/MC/config/PWGLF/pythia8/generator_pythia8_LF.C | ||
funcName=generateLF("${O2DPG_ROOT}/MC/config/PWGLF/pythia8/generator/resonancelistgun_inj.json", true, 4) | ||
|
||
[GeneratorPythia8] | ||
config=${O2_ROOT}/share/Generators/egconfig/pythia8_hi.cfg | ||
|
||
[DecayerPythia8] # after for transport code! | ||
config[0]=${O2DPG_ROOT}/MC/config/common/pythia8/decayer/base.cfg | ||
config[1]=${O2DPG_ROOT}/MC/config/PWGLF/pythia8/generator/resonances.cfg |
10 changes: 10 additions & 0 deletions
10
MC/config/PWGLF/ini/GeneratorLF_Resonances_PbPb5360_trigger.ini
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,10 @@ | ||
[GeneratorExternal] | ||
fileName=${O2DPG_ROOT}/MC/config/PWGLF/pythia8/generator_pythia8_LF.C | ||
funcName=generateLF("${O2DPG_ROOT}/MC/config/PWGLF/pythia8/generator/resonancelistgun_trig.json", true, 4) | ||
|
||
[GeneratorPythia8] | ||
config=${O2_ROOT}/share/Generators/egconfig/pythia8_hi.cfg | ||
|
||
[DecayerPythia8] # after for transport code! | ||
config[0]=${O2DPG_ROOT}/MC/config/common/pythia8/decayer/base.cfg | ||
config[1]=${O2DPG_ROOT}/MC/config/PWGLF/pythia8/generator/resonances.cfg |
10 changes: 10 additions & 0 deletions
10
MC/config/PWGLF/ini/GeneratorLF_Resonances_pp1360_injection.ini
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,10 @@ | ||
[GeneratorExternal] | ||
fileName=${O2DPG_ROOT}/MC/config/PWGLF/pythia8/generator_pythia8_LF.C | ||
funcName=generateLF("${O2DPG_ROOT}/MC/config/PWGLF/pythia8/generator/resonancelistgun_inj.json", true, 4) | ||
|
||
# [GeneratorPythia8] # if triggered then this will be used as the background event | ||
# config=${O2DPG_ROOT}/MC/config/PWGLF/pythia8/generator/pythia8_inel_136tev.cfg | ||
|
||
[DecayerPythia8] # after for transport code! | ||
config[0]=${O2DPG_ROOT}/MC/config/common/pythia8/decayer/base.cfg | ||
config[1]=${O2DPG_ROOT}/MC/config/PWGLF/pythia8/generator/resonances.cfg |
10 changes: 10 additions & 0 deletions
10
MC/config/PWGLF/ini/GeneratorLF_Resonances_pp1360_trigger.ini
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,10 @@ | ||
[GeneratorExternal] | ||
fileName=${O2DPG_ROOT}/MC/config/PWGLF/pythia8/generator_pythia8_LF.C | ||
funcName=generateLF("${O2DPG_ROOT}/MC/config/PWGLF/pythia8/generator/resonancelistgun_trig.json", true, 4) | ||
|
||
[GeneratorPythia8] # if triggered then this will be used as the background event | ||
config=${O2DPG_ROOT}/MC/config/PWGLF/pythia8/generator/pythia8_inel_136tev.cfg | ||
|
||
[DecayerPythia8] # after for transport code! | ||
config[0]=${O2DPG_ROOT}/MC/config/common/pythia8/decayer/base.cfg | ||
config[1]=${O2DPG_ROOT}/MC/config/PWGLF/pythia8/generator/resonances.cfg |
10 changes: 10 additions & 0 deletions
10
MC/config/PWGLF/ini/GeneratorLF_Resonances_pp900_injection.ini
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,10 @@ | ||
[GeneratorExternal] | ||
fileName=${O2DPG_ROOT}/MC/config/PWGLF/pythia8/generator_pythia8_LF.C | ||
funcName=generateLF("${O2DPG_ROOT}/MC/config/PWGLF/pythia8/generator/resonancelistgun_inj.json", true, 4) | ||
|
||
# [GeneratorPythia8] # if triggered then this will be used as the background event | ||
# config=${O2DPG_ROOT}/MC/config/PWGLF/pythia8/generator/pythia8_inel_pp900gev.cfg | ||
|
||
[DecayerPythia8] # after for transport code! | ||
config[0]=${O2DPG_ROOT}/MC/config/common/pythia8/decayer/base.cfg | ||
config[1]=${O2DPG_ROOT}/MC/config/PWGLF/pythia8/generator/resonances.cfg |
10 changes: 10 additions & 0 deletions
10
MC/config/PWGLF/ini/GeneratorLF_Resonances_pp900_trigger.ini
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,10 @@ | ||
[GeneratorExternal] | ||
fileName=${O2DPG_ROOT}/MC/config/PWGLF/pythia8/generator_pythia8_LF.C | ||
funcName=generateLF("${O2DPG_ROOT}/MC/config/PWGLF/pythia8/generator/resonancelistgun_trig.json", true, 4) | ||
|
||
[GeneratorPythia8] # if triggered then this will be used as the background event | ||
config=${O2DPG_ROOT}/MC/config/PWGLF/pythia8/generator/pythia8_inel_pp900gev.cfg | ||
|
||
[DecayerPythia8] # after for transport code! | ||
config[0]=${O2DPG_ROOT}/MC/config/common/pythia8/decayer/base.cfg | ||
config[1]=${O2DPG_ROOT}/MC/config/PWGLF/pythia8/generator/resonances.cfg |
Oops, something went wrong.