6 #include <yaml-cpp/yaml.h>
21 TNamed(
"AliEmcalCorrectionComponent",
"AliEmcalCorrectionComponent"),
23 fDefaultConfiguration(),
27 fGetPassFromFileName(kTRUE),
49 AliDebug(3, Form(
"%s", __PRETTY_FUNCTION__));
62 fDefaultConfiguration(),
66 fGetPassFromFileName(kTRUE),
88 AliDebug(3, Form(
"%s", __PRETTY_FUNCTION__));
107 std::string inputObjectBranch =
"";
109 if (esdMode ==
true) {
110 inputObjectBranch =
"CaloClusters";
113 inputObjectBranch =
"caloClusters";
116 else if (objType ==
kTrack) {
117 if (esdMode ==
true) {
118 inputObjectBranch =
"Tracks";
121 inputObjectBranch =
"tracks";
125 if (esdMode ==
true) {
126 inputObjectBranch =
"EMCALCells";
129 inputObjectBranch =
"emcalCells";
134 inputObjectBranch =
"";
137 return inputObjectBranch;
155 std::string containerBranch =
"";
156 std::string containerBranchInConfiguration =
"BranchName";
158 containerBranchInConfiguration =
"cluster" + containerBranchInConfiguration;
160 else if (contType ==
kTrack) {
161 containerBranchInConfiguration =
"track" + containerBranchInConfiguration;
163 AliFatal(TString::Format(
"%s: Must specify type of container when requesting branch.", GetName()));
167 GetProperty(containerBranchInConfiguration, containerBranch);
175 if (containerBranch ==
"usedefault") {
185 else if (contType ==
kTrack)
187 if (containerBranch ==
"mcparticles") {
203 AliDebug(3, Form(
"%s", __PRETTY_FUNCTION__));
209 std::string tempString =
"";
229 AliDebug(3, Form(
"%s", __PRETTY_FUNCTION__));
239 AliDebug(3, Form(
"%s", __PRETTY_FUNCTION__));
253 AliDebug(3, Form(
"%s", __PRETTY_FUNCTION__));
272 Double_t veta = t->GetTrackEtaOnEMCal();
273 Double_t vphi = t->GetTrackPhiOnEMCal();
281 phidiff=TVector2::Phi_mpi_pi(vphi-cphi);
293 Int_t bunchCrossNo =
fEvent->GetBunchCrossNumber();
322 std::size_t sharedParameterLocation = value.find(
"sharedParameters:");
323 if (sharedParameterLocation != std::string::npos)
326 value.erase(sharedParameterLocation, sharedParameterLocation + 17);
340 TTree *inputTree = mgr->GetTree();
344 AliError(
"Pointer to tree = 0, returning");
348 TFile *inputFile = inputTree->GetCurrentFile();
350 AliError(
"Null pointer input file, returning");
354 TString fname(inputFile->GetName());
360 else if (fname.Contains(
"LHC11c") &&
362 else if (fname.Contains(
"calo") || fname.Contains(
"high_lumi"))
368 else if (fname.Contains(
"LHC14a1a"))
370 AliInfo(
"Energy calibration activated for this MC production!");
375 AliError(Form(
"Pass number string not found: %s", fname.Data()));
392 for (
Int_t iCell = 0; iCell <
fCaloCells->GetNumberOfCells(); iCell++){
394 fCaloCells->GetCell(iCell, absId, ecell, tcell, mclabel, efrac);
395 if(name.Contains(
"Energy")){
398 else if(name.Contains(
"Time")){
void AddContainer(inputObjectType type)
static std::string DetermineUseDefaultName(inputObjectType contType, Bool_t esdMode)
virtual ~AliEmcalCorrectionComponent()
virtual Bool_t UserNotify()
Container with name, TClonesArray and cuts for particles.
AliVCaloCells * fCaloCells
! pointer to calo cells
AliEMCALRecoUtils * fRecoUtils
! pointer to reco utils
AliClusterContainer * fClusCont
! pointer to the cluster container
void GetProperty(std::string propertyName, T &property, bool requiredProperty=true, std::string correctionName="")
Retrieve property.
static map_type * componentMap
std::map< std::string, AliEmcalCorrectionComponent *(*)()> map_type
Double_t fVertex[3]
!event vertex
TList * fOutput
! list of output histograms
Enhanced TList-derived class that implements correct merging for pt_hard binned production.
static bool IsSharedValue(std::string &value)
Bool_t fGetPassFromFileName
virtual Bool_t Initialize()
ClassImp(AliAnalysisTaskCRC) AliAnalysisTaskCRC
AliEmcalCorrectionComponent()
void GetEtaPhiDiff(const AliVTrack *t, const AliVCluster *v, Double_t &phidiff, Double_t &etadiff)
AliParticleContainer * fPartCont
! pointer to the track/particle container
Container structure for EMCAL clusters.
Container for MC-true particles within the EMCAL framework.
TString fFilepass
run number