-
Notifications
You must be signed in to change notification settings - Fork 531
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PWGHF] Add the possibility to run MC Gen only for HF derived data (#…
…9357) Co-authored-by: Vít Kučera <vit.kucera@cern.ch>
- Loading branch information
Showing
10 changed files
with
349 additions
and
171 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
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 |
---|---|---|
@@ -0,0 +1,76 @@ | ||
// Copyright 2019-2020 CERN and copyright holders of ALICE O2. | ||
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. | ||
// All rights not expressly granted are reserved. | ||
// | ||
// This software is distributed under the terms of the GNU General Public | ||
// License v3 (GPL Version 3), copied verbatim in the file "COPYING". | ||
// | ||
// In applying this license CERN does not waive the privileges and immunities | ||
// granted to it by virtue of its status as an Intergovernmental Organization | ||
// or submit itself to any jurisdiction. | ||
|
||
/// \file candidateCreatorMcGen.cxx | ||
/// \brief McGen only selection of heavy-flavour particles | ||
/// | ||
/// \author Nima Zardoshti, nima.zardoshti@cern.ch, CERN | ||
|
||
#include <memory> | ||
#include <string> | ||
#include <vector> | ||
|
||
#include <TPDGCode.h> | ||
|
||
#include "CommonConstants/PhysicsConstants.h" | ||
#include "Framework/AnalysisTask.h" | ||
#include "Framework/HistogramRegistry.h" | ||
#include "Framework/runDataProcessing.h" | ||
#include "Framework/RunningWorkflowInfo.h" | ||
|
||
#include "PWGHF/DataModel/CandidateReconstructionTables.h" | ||
#include "PWGHF/Utils/utilsMcGen.h" | ||
|
||
using namespace o2; | ||
using namespace o2::analysis; | ||
using namespace o2::framework; | ||
|
||
/// Reconstruction of heavy-flavour 2-prong decay candidates | ||
struct HfCandidateCreatorMcGen { | ||
|
||
Produces<aod::HfCand2ProngMcGen> rowMcMatchGen2Prong; | ||
Produces<aod::HfCand3ProngMcGen> rowMcMatchGen3Prong; | ||
Produces<aod::HfCandBplusMcGen> rowMcMatchGenBplus; | ||
Produces<aod::HfCandB0McGen> rowMcMatchGenB0; | ||
Configurable<bool> fill2Prong{"fill2Prong", false, "fill table for 2 prong candidates"}; | ||
Configurable<bool> fill3Prong{"fill3Prong", false, "fill table for 3 prong candidates"}; | ||
Configurable<bool> fillBplus{"fillBplus", false, "fill table for for B+ candidates"}; | ||
Configurable<bool> fillB0{"fillB0", false, "fill table for B0 candidates"}; | ||
Configurable<bool> rejectBackground2Prong{"rejectBackground2Prong", false, "Reject particles from PbPb background for 2 prong candidates"}; | ||
Configurable<bool> rejectBackground3Prong{"rejectBackground3Prong", false, "Reject particles from PbPb background for 3 prong candidates"}; | ||
Configurable<bool> createDplus{"createDplus", false, "Create D+ in 3 prong"}; | ||
Configurable<bool> createDs{"createDs", false, "Create Ds in 3 prong"}; | ||
Configurable<bool> createLc{"createLc", false, "Create Lc in 3 prong"}; | ||
Configurable<bool> createXic{"createXic", false, "Create Xic in 3 prong"}; | ||
|
||
void process(aod::McCollision const&, | ||
aod::McParticles const& mcParticles) | ||
{ | ||
if (fill2Prong) { | ||
hf_mc_gen::fillMcMatchGen2Prong(mcParticles, rowMcMatchGen2Prong, rejectBackground2Prong); | ||
} | ||
if (fill3Prong) { | ||
hf_mc_gen::fillMcMatchGen3Prong(mcParticles, rowMcMatchGen3Prong, rejectBackground3Prong, createDplus, createDs, createLc, createXic); | ||
} | ||
if (fillBplus) { | ||
hf_mc_gen::fillMcMatchGenBplus(mcParticles, rowMcMatchGenBplus); | ||
} | ||
if (fillB0) { | ||
hf_mc_gen::fillMcMatchGenB0(mcParticles, rowMcMatchGenB0); | ||
} | ||
} | ||
}; | ||
|
||
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) | ||
{ | ||
return WorkflowSpec{ | ||
adaptAnalysisTask<HfCandidateCreatorMcGen>(cfgc)}; | ||
} |
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
Oops, something went wrong.