void AddTaskEmcalQA() { enum { kMinBias, //kEMCalL0, kEMCalL1G1, //kEMCalL1G2, kEMCalL1J1, //kEMCalL1J2, //kDCalL0, kDCalL1G1, //kDCalL1G2, kDCalL1J1, //kDCalL1J2, kLastTrig }; TString gCaloTriggerNames[kLastTrig]; gCaloTriggerNames[kMinBias] = "CINT7-B-NOPF-CENT"; //gCaloTriggerNames[kEMCalL0] = "CEMC7-B-NOPF-CENTNOPMD"; gCaloTriggerNames[kEMCalL1G1] = "CINT7EG1-B-NOPF-CENTNOPMD"; //gCaloTriggerNames[kEMCalL1G2] = "CINT7EG2-B-NOPF-CENTNOPMD"; gCaloTriggerNames[kEMCalL1J1] = "CINT7EJ1-B-NOPF-CENTNOPMD"; //gCaloTriggerNames[kEMCalL1J2] = "CINT7EJ2-B-NOPF-CENTNOPMD"; //gCaloTriggerNames[kDCalL0] = "CDMC7-B-NOPF-CENTNOPMD"; gCaloTriggerNames[kDCalL1G1] = "CINT7DG1-B-NOPF-CENTNOPMD"; //gCaloTriggerNames[kDCalL1G2] = "CINT7DG2-B-NOPF-CENTNOPMD"; gCaloTriggerNames[kDCalL1J1] = "CINT7DJ1-B-NOPF-CENTNOPMD"; //gCaloTriggerNames[kDCalL1J2] = "CINT7DJ2-B-NOPF-CENTNOPMD"; TString gCaloTriggerLabels[kLastTrig]; gCaloTriggerLabels[kMinBias] = "INT7"; //gCaloTriggerLabels[kEMCalL0] = "EMC7"; gCaloTriggerLabels[kEMCalL1G1] = "EMCEG1"; //gCaloTriggerLabels[kEMCalL1G2] = "EMCEG2"; gCaloTriggerLabels[kEMCalL1J1] = "EMCEJ1"; //gCaloTriggerLabels[kEMCalL1J2] = "EMCEJ2"; //gCaloTriggerLabels[kDCalL0] = "DMC7"; gCaloTriggerLabels[kDCalL1G1] = "DMCEG1"; //gCaloTriggerLabels[kDCalL1G2] = "DMCEG2"; gCaloTriggerLabels[kDCalL1J1] = "DMCEJ1"; //gCaloTriggerLabels[kDCalL1J2] = "DMCEJ2"; gROOT->LoadMacro("$ALICE_PHYSICS/PWGJE/EMCALJetTasks/macros/AddTaskSAQA.C"); gROOT->LoadMacro("$ALICE_PHYSICS/PWGJE/EMCALJetTasks/macros/AddTaskSAJF.C"); gROOT->LoadMacro("$ALICE_PHYSICS/PWG/EMCAL/macros/AddTaskEmcalTriggerQA.C"); gROOT->LoadMacro("$ALICE_PHYSICS/PWGJE/EMCALJetTasks/macros/AddTaskEmcalJet.C"); gROOT->LoadMacro("$ALICE_PHYSICS/PWGJE/EMCALJetTasks/macros/AddTaskRho.C"); AliEmcalJetTask* ktJetTask = AddTaskEmcalJet(AliEmcalJetTask::kKT | AliEmcalJetTask::kFullJet | AliEmcalJetTask::kR020Jet, "", "CaloClusters", 0., 0.30, 0.005); AliEmcalJetTask* aktJetTask = AddTaskEmcalJet(AliEmcalJetTask::kAKT | AliEmcalJetTask::kFullJet | AliEmcalJetTask::kR020Jet, "", "CaloClusters", 0., 0.30, 0.005); AliAnalysisTaskRho* rhoTaskEMCal = AddTaskRho(ktJetTask->GetName(), "", "CaloClusters", "NeutralRhoEMCal", 0.2, "EMCAL", 0.01, 0, 0, 1, kTRUE, "EMCal"); rhoTaskEMCal->SetUseNewCentralityEstimation(kTRUE); rhoTaskEMCal->SetNCentBins(5); rhoTaskEMCal->SetHistoBins(50, 0, 100); rhoTaskEMCal->GetJetContainer(0)->SetJetPtCut(0.1); AliAnalysisTaskRho* rhoTaskDCal = AddTaskRho(ktJetTask->GetName(), "", "CaloClusters", "NeutralRhoDCal", 0.2, "DCAL", 0.01, 0, 0, 1, kTRUE, "DCal"); rhoTaskDCal->SetUseNewCentralityEstimation(kTRUE); rhoTaskDCal->SetNCentBins(5); rhoTaskDCal->SetHistoBins(50, 0, 100); rhoTaskDCal->GetJetContainer(0)->SetJetPtCut(0.1); for (Int_t i = 0; i < kLastTrig; i++) { TString suffix; AliEmcalTriggerQATask* pTriggerQA = AddTaskEmcalTriggerQA("EmcalTriggers", 0, 0, gCaloTriggerLabels[i]); pTriggerQA->SetEMCalTriggerMode(AliAnalysisTaskEmcal::kNoSpecialTreatment); pTriggerQA->SetTrigClass(gCaloTriggerNames[i]); pTriggerQA->SetUseNewCentralityEstimation(kTRUE); pTriggerQA->SetNCentBins(5); pTriggerQA->SetADCperBin(15); suffix = gCaloTriggerLabels[i]; AliAnalysisTaskSAQA *pQATaskAfter = AddTaskSAQA("", "CaloClusters", "EMCALCells", "", "", 0, 0, 0, 0., 0., "TPC", suffix); pQATaskAfter->GetClusterContainer(0)->SetClusECut(0.); pQATaskAfter->GetClusterContainer(0)->SetClusPtCut(0.); pQATaskAfter->GetClusterContainer(0)->SetClusNonLinCorrEnergyCut(0.15); pQATaskAfter->SetDefaultClusterEnergy(AliVCluster::kNonLinCorr); pQATaskAfter->SetHistoBins(150, 0, 150); pQATaskAfter->SetEMCalTriggerMode(AliAnalysisTaskEmcal::kNoSpecialTreatment); pQATaskAfter->SetTrigClass(gCaloTriggerNames[i]); pQATaskAfter->SetVzRange(-999,999); pQATaskAfter->SetUseNewCentralityEstimation(kTRUE); pQATaskAfter->SetNCentBins(5); if (gCaloTriggerLabels[i] == "INT7" || gCaloTriggerLabels[i].BeginsWith("EMCE")) { suffix = gCaloTriggerLabels[i]; AliAnalysisTaskSAJF *pJFTask = AddTaskSAJF("", "CaloClusters", aktJetTask->GetName(), "NeutralRhoDCal", 0.2, 1, 0., "EMCALfid", 1, suffix); pJFTask->SetEMCalTriggerMode(AliAnalysisTaskEmcal::kNoSpecialTreatment); pJFTask->SetTrigClass(gCaloTriggerNames[i]); pJFTask->SetVzRange(-999,999); pJFTask->SetUseNewCentralityEstimation(kTRUE); pJFTask->SetNCentBins(5); pJFTask->SetHistoBins(200,0,200); } if (gCaloTriggerLabels[i] == "INT7" || gCaloTriggerLabels[i].BeginsWith("DMCE")) { suffix = gCaloTriggerLabels[i]; AliAnalysisTaskSAJF *pJFTask = AddTaskSAJF("", "CaloClusters", aktJetTask->GetName(), "NeutralRhoEMCal", 0.2, 1, 0., "DCALfid", 1, suffix); pJFTask->SetEMCalTriggerMode(AliAnalysisTaskEmcal::kNoSpecialTreatment); pJFTask->SetTrigClass(gCaloTriggerNames[i]); pJFTask->SetVzRange(-999,999); pJFTask->SetUseNewCentralityEstimation(kTRUE); pJFTask->SetNCentBins(5); pJFTask->SetHistoBins(200,0,200); } } }
AliAnalysisTaskEmcalDiJetAna* AddTaskEmcalDiJetAna(TString kTracksName = "PicoTracks", TString kClusName = "caloClusterCorr", Double_t R = 0.4, Double_t ptminTrack = 0.15, Double_t etminClus = 0.3, Int_t rhoType = 0, TString trigClass = "", const char *CentEst = "V0A", Int_t pSel = AliVEvent::kINT7, Int_t matchFullCh = AliAnalysisTaskEmcalDiJetBase::kNoMatching, Double_t ptTrackBias = 0., Int_t corrType = AliAnalysisTaskEmcalDiJetBase::kCorrelateTwo, Float_t nefCut = 10., Int_t nCentBins = 5, Double_t scaleFact = 1.28 ) { enum AlgoType {kKT, kANTIKT}; enum JetType {kFULLJETS, kCHARGEDJETS, kNEUTRALJETS}; // #### Define manager and data container names AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); if (!mgr) { ::Error("AddTaskEmcalDiJet", "No analysis manager to connect to."); return NULL; } // Check the analysis type using the event handlers connected to the analysis manager. //============================================================================== if (!mgr->GetInputEventHandler()) { ::Error("AddTaskEmcalDiJet", "This task requires an input event handler"); return NULL; } // #### Add necessary jet finder tasks gROOT->LoadMacro("$ALICE_PHYSICS/PWGJE/EMCALJetTasks/macros/AddTaskEmcalJet.C"); AliEmcalJetTask* jetFinderTaskFull = AddTaskEmcalJet(kTracksName, kClusName, kANTIKT, R, kFULLJETS, ptminTrack, etminClus,0.005,1,"Jet",1.); AliEmcalJetTask* jetFinderTaskCharged = AddTaskEmcalJet(kTracksName, kClusName, kANTIKT, R, kCHARGEDJETS, ptminTrack, etminClus,0.005,1,"Jet",1.); jetFinderTaskFull->SelectCollisionCandidates(AliVEvent::kAny); jetFinderTaskCharged->SelectCollisionCandidates(AliVEvent::kAny); TString strJetsFull = jetFinderTaskFull->GetName(); TString strJetsCh = jetFinderTaskCharged->GetName(); // Add kt jet finder and rho task in case we want background subtraction gROOT->LoadMacro("$ALICE_PHYSICS/PWGJE/EMCALJetTasks/macros/AddTaskRhoSparse.C"); AliEmcalJetTask *jetFinderKt; AliEmcalJetTask *jetFinderAKt; AliAnalysisTaskRhoSparse *rhoTask; if(rhoType==1) { jetFinderKt = AddTaskEmcalJet(kTracksName, kClusName, kKT, R, kCHARGEDJETS, ptminTrack, etminClus,0.005,1,"Jet",0.); jetFinderAKt = AddTaskEmcalJet(kTracksName, kClusName, kANTIKT, R, kCHARGEDJETS, ptminTrack, etminClus,0.005,1,"Jet",1.); jetFinderKt->SelectCollisionCandidates(AliVEvent::kAny); jetFinderAKt->SelectCollisionCandidates(AliVEvent::kAny); TF1 *fScale = new TF1("fScale","[0]",0.,100.); fScale->SetParameter(0,scaleFact); TString rhoSparseName = Form("RhoSparseR%03d",(int)(100*R)); rhoTask = AddTaskRhoSparse(jetFinderKt->GetName(), jetFinderAKt->GetName(), kTracksName.Data(), kClusName.Data(), rhoSparseName.Data(), R, "TPC", 0.01, 0.15, 0, fScale, 0, kTRUE, rhoSparseName.Data(), kTRUE ); rhoTask->SetCentralityEstimator(CentEst); } TString wagonName = Form("DiJet_%s_%s_Rho%dTC%sMatch%dHadTrig%d",strJetsFull.Data(),strJetsCh.Data(),rhoType,trigClass.Data(),matchFullCh,(Int_t)(ptTrackBias)); //Configure DiJet task AliAnalysisTaskEmcalDiJetAna *taskDiJet = NULL; taskDiJet = new AliAnalysisTaskEmcalDiJetAna(wagonName.Data()); taskDiJet->SetUseAliAnaUtils(kTRUE); taskDiJet->SetVzRange(-10.,10.); taskDiJet->SetTriggerClass(trigClass.Data()); if(ptminTrack==0.) { taskDiJet->SetIsPythia(kTRUE); taskDiJet->SetDoFullFull(kTRUE); } taskDiJet->SetJetCorrelationType(corrType); Printf("strJetsFull: %s",strJetsFull.Data()); Printf("strJetsCh: %s",strJetsCh.Data()); taskDiJet->AddParticleContainer(kTracksName.Data()); taskDiJet->AddClusterContainer(kClusName.Data()); taskDiJet->SetContainerFull(0); taskDiJet->SetContainerCharged(1); taskDiJet->AddJetContainer(strJetsFull.Data(),"EMCAL",R); taskDiJet->AddJetContainer(strJetsCh.Data(),"TPC",R); taskDiJet->SetZLeadingCut(0.98,0.98,0); taskDiJet->SetNEFCut(0.,nefCut,0); for(Int_t i=0; i<2; i++) { taskDiJet->SetPercAreaCut(0.6, i); taskDiJet->SetPtBiasJetTrack(ptTrackBias,i); } taskDiJet->SetRhoType(rhoType); if(rhoType==1) { taskDiJet->SetRhoName(rhoTask->GetOutRhoScaledName(),0); taskDiJet->SetRhoName(rhoTask->GetOutRhoName(),1); } taskDiJet->SetCentralityEstimator(CentEst); taskDiJet->SetCentRange(0.,100.); taskDiJet->SetNCentBins(nCentBins); taskDiJet->SelectCollisionCandidates(pSel); taskDiJet->SetFullChargedMatchingType(matchFullCh); taskDiJet->SetDoChargedCharged(kTRUE); taskDiJet->SetDoFullCharged(kTRUE); taskDiJet->SetMatchFullCharged(kFALSE); mgr->AddTask(taskDiJet); //Connnect input mgr->ConnectInput (taskDiJet, 0, mgr->GetCommonInputContainer() ); //Connect output AliAnalysisDataContainer *coutput1 = 0x0; TString contName(wagonName); contName += "_histos"; // TString outputfile = Form("%s:%s",AliAnalysisManager::GetCommonFileName(),wagonName.Data()); TString outputfile = Form("%s",AliAnalysisManager::GetCommonFileName()); coutput1 = mgr->CreateContainer(contName.Data(), TList::Class(),AliAnalysisManager::kOutputContainer,outputfile); mgr->ConnectOutput(taskDiJet,1,coutput1); return taskDiJet; }