34 #include "AliAnalysisManager.h" 37 #include "AliInputEventHandler.h" 38 #include "AliVEvent.h" 47 fCorrelationHistNoPhysSel(
nullptr),
48 fCorrelationHistWithPhysSel(
nullptr)
52 AliAnalysisTaskEmcalEG1Correlation::AliAnalysisTaskEmcalEG1Correlation(
const char *taskname):
55 fCorrelationHistNoPhysSel(
nullptr),
56 fCorrelationHistWithPhysSel(
nullptr)
58 DefineOutput(1, TList::Class());
70 fCorrelationHistNoPhysSel =
new TH2D(
"fCorrelationHistNoPhysSel",
"Trigger Correlation without physics selection", triggers.size(), -0.5, triggers.size() - 0.5, triggers.size(), -0.5, triggers.size() - 0.5);
71 fCorrelationHistWithPhysSel =
new TH2D(
"fCorrelationHistWithPhysSel",
"Trigger Correlation without physics selection", triggers.size(), -0.5, triggers.size() - 0.5, triggers.size(), -0.5, triggers.size() - 0.5);
73 for(decltype(triggers.size()) itrg = 0; itrg < triggers.size(); itrg++){
91 std::bitset<8> firedTS(0), firedPS(0);
92 for(decltype(supported.size()) itrg = 0; itrg < supported.size(); itrg++){
98 for(decltype(supported.size()) itrg = 0; itrg < supported.size(); itrg++){
99 if(!firedTS.test(itrg))
continue;
100 const auto &xlabel = supported[itrg];
101 for(decltype(supported.size()) jtrg = 0; jtrg < supported.size(); jtrg++){
102 if(!firedTS.test(jtrg))
continue;
103 const auto &ylabel = supported[jtrg];
109 for(decltype(supported.size()) itrg = 0; itrg < supported.size(); itrg++){
110 if(!firedPS.test(itrg))
continue;
111 const auto &xlabel = supported[itrg];
112 for(decltype(supported.size()) jtrg = 0; jtrg < supported.size(); jtrg++){
113 if(!firedPS.test(jtrg))
continue;
114 const auto &ylabel = supported[jtrg];
122 for(
auto d : decoded){
123 if(d.Triggerclass() == trigger) {
132 bool isPhysSel =
false;
133 if(trigger.find(
"EG") != std::string::npos){
134 isPhysSel = fInputHandler->IsEventSelected() & AliVEvent::kEMCEGA;
135 }
else if(trigger.find(
"EJ") != std::string::npos){
136 isPhysSel = fInputHandler->IsEventSelected() & AliVEvent::kEMCEJE;
137 }
else if(trigger ==
"EMC7") {
138 isPhysSel = fInputHandler->IsEventSelected() & AliVEvent::kEMC7;
139 }
else if(trigger ==
"EMC8") {
140 isPhysSel = fInputHandler->IsEventSelected() & AliVEvent::kEMC8;
142 if(!isPhysSel)
return false;
148 "EMC7EG1",
"EMC8EG1",
"EMC7EG2",
"EMC7EJ1",
"EMC7EJ2",
"EMC7",
"EMC8" 153 auto mgr = AliAnalysisManager::GetAnalysisManager();
155 std::cerr <<
"No analysis manager found ..." << std::endl;
160 task->SelectCollisionCandidates(AliVEvent::kAny);
163 std::stringstream outfilename, outcontname;
164 outfilename << mgr->GetCommonFileName() <<
":EG1Correlation" << taskname;
165 outcontname <<
"HistosEG1Correlation" << taskname;
167 mgr->ConnectInput(task, 0, mgr->GetCommonInputContainer());
168 mgr->ConnectOutput(task, 1, mgr->CreateContainer(outcontname.str().data(), TList::Class(), AliAnalysisManager::kOutputContainer, outfilename.str().data()));
TH2 * fCorrelationHistWithPhysSel
! Correlation histogram with physics selection applied
void UserExec(Option_t *)
static std::vector< PWG::EMCAL::Triggerinfo > DecodeTriggerString(const std::string &triggerstring)
Decoding trigger string.
AliAnalysisTaskEmcalEG1Correlation()
std::vector< std::string > GetSupportedTriggers() const
static AliAnalysisTaskEmcalEG1Correlation * AddTaskEmcalEG1Correlation(const char *taskname)
bool IsTriggerSelectedPS(const std::string &trigger, const std::vector< PWG::EMCAL::Triggerinfo > &triggers) const
TH2 * fCorrelationHistNoPhysSel
! Correlation histogram without physics selection applied
virtual ~AliAnalysisTaskEmcalEG1Correlation()
TList * fOutput
! Container for output histograms
void UserCreateOutputObjects()
bool IsTriggerSelectedTS(const std::string &trigger, const std::vector< PWG::EMCAL::Triggerinfo > &triggers) const