/** * @file AddTaskForwarddNdeta.C * @author Christian Holm Christensen * @date Fri Jan 28 10:22:26 2011 * * @brief Script to add a multiplicity task for the central * @f$\eta@f$ region * * * @ingroup pwglf_forward_scripts_tasks */ /** * Create the MCTruth @f$ dN/d\eta@f$ analysis task * * @param trig Trigger to use * @param vzMin Smallest @f$ v_z@f$ * @param vzMax Biggest @f$ v_z@f$ * @param useCent Whether to use the centrality or not * @param scheme Normalisation scheme * @param cutEdges Whether to cut edges when rebinning * @param trigEff Trigger efficiency * @param trigEff0 Trigger efficiency for 0-bin * @param corrEmpty Correct for empty bins * * @return Newly created and configured task * * @ingroup pwglf_forward_dndeta */ AliAnalysisTask* AddTaskMCTruthdNdeta(const char* config = "dNdetaConfig.C", const char* trig = "INEL", Double_t vzMin = -10, Double_t vzMax = +10, const char* cent = "", const char* scheme = 0, Double_t trigEff = 1, Double_t trigEff0 = 1, Bool_t satOnly = false) { // --- Load libraries ---------------------------------------------- gROOT->LoadClass("AliAODForwardMult", "libPWGLFforward2"); // --- Get analysis manager ---------------------------------------- AliAnalysisManager* mgr = AliAnalysisManager::GetAnalysisManager(); // --- Make our object --------------------------------------------- AliMCTruthdNdetaTask* task = new AliMCTruthdNdetaTask("MCTruth"); // Set the vertex range to use task->SetIpZRange(vzMin, vzMax); // Set the trigger mask to use (INEL,INEL>0,NSD) task->SetTriggerMask(trig); // Set the trigger efficiency task->SetTriggerEff(trigEff); // 0.997535); task->SetTriggerEff0(trigEff0); // Bit mask of // // kNone Normalise to accepted events // kEventLevel Normalise to all events in selected range // kAltEventLevel Normalise to all events in selected range // kBackground Also correct for background triggers // kShape Correct shape // // kNone, kEventLevel, and kAltEventLevel are mutually exclusive. // If neither kEventLevel, nor kAltEventLevel is specified, then // kNone is assumed. kBackground (when implemented) only makes // sense with kEventLevel and kAltEventLevel. Furthermore, there // are some constants that encode the common cases // // kFull = kEventLevel | kBackground | kShape // kAltFull = kAltEventLevel | kBackground | kShape // // Default is kFull task->SetNormalizationScheme(AliBasedNdetaTask::kFull); if (scheme) task->SetNormalizationScheme(scheme); // Set the centrality bins to use. These are mutually exclusive. // Note, that a bin specified as a-b, covers the interval from a, // inclusive to b exclusive. An upper bound of 100 is treated // especially, and the upper bound is inclusive in that case . if (useCent) { if (task->SetCentralityMethod(cent)) { Short_t bins[] = { 0, 5, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100 }; task->SetCentralityAxis(11, bins); } } // Set satellite vertex flag task->SetSatelliteVertices(satOnly); // Set-up task using a script task->Configure(config); // Connect to manager task->Connect(0,0); return task; } //________________________________________________________________________ // // EOF //