11 #include <TClonesArray.h> 14 #include "AliAnalysisManager.h" 21 #include "AliVEventHandler.h" 22 #include "AliAnalysisDataContainer.h" 57 Int_t maxJetIds[] = {-1, -1};
61 for (
Int_t ij = 0; ij < Njets; ++ij) {
64 AliError(Form(
"%s: Could not receive jet %d", GetName(), ij));
71 if (jet->
Pt() > maxJetPts[0]) {
72 maxJetPts[1] = maxJetPts[0];
73 maxJetIds[1] = maxJetIds[0];
74 maxJetPts[0] = jet->
Pt();
76 }
else if (jet->
Pt() > maxJetPts[1]) {
77 maxJetPts[1] = jet->
Pt();
91 for (
Int_t iJets = 0; iJets < Njets; ++iJets) {
94 if (iJets == maxJetIds[0] || iJets == maxJetIds[1])
99 AliError(Form(
"%s: Could not receive jet %d", GetName(), iJets));
106 rhovec[NjetAcc] = jet->
Pt() / jet->
Area();
113 Double_t rho = TMath::Median(NjetAcc, rhovec);
127 const char* nTracks,
const char* nClusters,
const char* nRho,
135 if (!mgr) { ::Error(
"AddTaskRho",
"No analysis manager to connect to.");
return NULL; }
139 AliVEventHandler* handler = mgr->GetInputEventHandler();
140 if (!handler) { ::Error(
"AddTaskEmcalJetSpectraQA",
"This task requires an input event handler");
return NULL; }
150 if (handler->InheritsFrom(
"AliESDInputHandler")) {
153 else if (handler->InheritsFrom(
"AliAODInputHandler")) {
164 if (trackName ==
"usedefault") {
165 if (dataType ==
kESD) {
166 trackName =
"Tracks";
168 else if (dataType == kAOD) {
169 trackName =
"tracks";
176 if (clusName ==
"usedefault") {
177 if (dataType ==
kESD) {
178 clusName =
"CaloClusters";
180 else if (dataType == kAOD) {
181 clusName =
"caloClusters";
188 TString name(
"AliAnalysisTaskRho");
189 if (strcmp(suffix,
"") != 0) {
195 if (mgrTask)
return mgrTask;
200 if (trackName ==
"mcparticles") {
204 else if (trackName ==
"tracks" || trackName ==
"Tracks") {
207 else if (!trackName.IsNull()) {
227 mgr->AddTask(rhotask);
230 mgr->ConnectInput(rhotask, 0, mgr->GetCommonInputContainer());
233 contname +=
"_histos";
234 AliAnalysisDataContainer *coutput1 = mgr->CreateContainer(contname.Data(),
235 TList::Class(), AliAnalysisManager::kOutputContainer,
236 Form(
"%s", AliAnalysisManager::GetCommonFileName()));
237 mgr->ConnectOutput(rhotask, 1, coutput1);
void SetOutRhoName(const char *name)
Container with name, TClonesArray and cuts for particles.
AliJetContainer * AddJetContainer(const char *n, TString defaultCutType, Float_t jetRadius=0.4)
AliClusterContainer * AddClusterContainer(const char *n)
Create new cluster container and attach it to the task.
Container for particles within the EMCAL framework.
static AliAnalysisTaskRho * AddTaskRhoNew(const char *nTracks="usedefault", const char *nClusters="usedefault", const char *nRho="Rho", Double_t jetradius=0.2, UInt_t acceptance=AliEmcalJet::kTPCfid, AliJetContainer::EJetType_t jetType=AliJetContainer::kChargedJet, const Bool_t histo=kFALSE, AliJetContainer::ERecoScheme_t rscheme=AliJetContainer::pt_scheme, const char *suffix="")
AliParticleContainer * GetParticleContainer(Int_t i=0) const
Get particle container attached to this task.
AliRhoParameter * fOutRhoScaled
output rho object
void SetJetPtCut(Float_t cut)
AliParticleContainer * AddParticleContainer(const char *n)
Create new particle container and attach it to the task.
Double_t fCent
!event centrality
AliMCParticleContainer * AddMCParticleContainer(const char *n)
Create new container for MC particles and attach it to the task.
TClonesArray * fJets
! jets
virtual Double_t GetScaleFactor(Double_t cent)
AliTrackContainer * AddTrackContainer(const char *n)
Create new track container and attach it to the task.
void SelectPhysicalPrimaries(Bool_t s)
Represent a jet reconstructed using the EMCal jet framework.
void SetClusPtCut(Double_t cut)
Bool_t Run()
Run function. This is the core function of the analysis and contains the user code. Therefore users have to implement this function.
virtual Bool_t AcceptJet(AliEmcalJet *jet, Int_t c=0)
EDataType_t
Switch for the data type.
void SetClusECut(Double_t cut)
void SetDefaultClusterEnergy(Int_t d)
AliRhoParameter * fOutRho
Container structure for EMCAL clusters.
Container for MC-true particles within the EMCAL framework.
Container for jet within the EMCAL jet framework.
void SetClusHadCorrEnergyCut(Double_t cut)