AliPhysics  ef3b16e (ef3b16e)
AliEmcalCorrectionPHOSCorrections.cxx
Go to the documentation of this file.
1 // AliEmcalCorrectionPHOSCorrections
2 //
3 
5 
6 #include "AliClusterContainer.h"
7 #include "AliPHOSTenderSupply.h"
8 
12 
13 // Actually registers the class with the base class
15 
20  AliEmcalCorrectionComponent("AliEmcalCorrectionPHOSCorrections"),
21  fIsMC(kFALSE),
22  fOptions()
23 {
24 }
25 
30 {
31  if (fPHOSTender) {
32  fPHOSTender->Delete();
33  }
34 }
35 
40 {
41  // Initialization
43 
44  GetProperty("isMC", fIsMC);
45 
46  std::string options = "";
47  GetProperty("options", options);
48  fOptions = options.c_str();
49 
50  Bool_t isEmbedded = kFALSE;
51  GetProperty("isEmbedded", isEmbedded);
52 
53  // Create PHOS Tender Supply and configure it
54  fPHOSTender = new AliPHOSTenderSupply("PHOStenderEmb");
55  if(fIsMC) { //handle MC data
56  fPHOSTender->SetMCProduction(fOptions.Data());
57  }
58 
59  // Check if main event or embedded event clusters should be corrected (only applicable for embedding analyses)
60  if (isEmbedded) {
61  SetUsingInputEvent(kFALSE);
62  fPHOSTender->SetTask(&fEventManager);
63  }
64 
65  return kTRUE;
66 }
67 
72 {
74 
75  // Nothing to be done.
76 
77 }
78 
83 {
85 
87 
88  fPHOSTender->ProcessEvent();
89 
90  return kTRUE;
91 }
92 
97 {
99 
100  if (runChanged) {
101 
102  TString passNum(fFilepass(4,5));
103  Int_t pass = passNum.Atoi();
104  fPHOSTender->SetReconstructionPass(pass);
105 
106  fPHOSTender->InitTender();
107  }
108  return runChanged;
109 }
static RegisterCorrectionComponent< AliEmcalCorrectionPHOSCorrections > reg
int Int_t
Definition: External.C:63
AliPHOSTenderSupply * fPHOSTender
! Pointer to PHOS Tender Supply
Base class for correction components in the EMCal correction framework.
Wrapper for PHOS Tender to be executed through the EMCal correction framework.
AliEmcalCorrectionEventManager fEventManager
Minimal task which inherits from AliAnalysisTaskSE and manages access to the event.
bool Bool_t
Definition: External.C:53
TString fFilepass
Input data pass number.
bool GetProperty(std::string propertyName, T &property, bool requiredProperty=true, std::string correctionName="")
Retrieve property.