if(sys>0 && sNN > 0)
task->GetManager().Init(sys, sNN, field);
mgr->AddTask(task);
+ // --- Set options on task -----------------------------------------
+ // Whether to do correction for secondaries
+ task->SetUseSecondary(true);
+ // Whether to do correction for acceptance
+ task->SetUseAcceptance(true);
// --- Make the output container and connect it --------------------
TString outputfile = AliAnalysisManager::GetCommonFileName();
* @ingroup pwg2_forward_eloss
*/
AliAnalysisTask*
-AddTaskFMDELoss(Bool_t mc, Float_t blow=0, Float_t bhigh=100)
+AddTaskFMDELoss(Bool_t mc, Bool_t useCent)
{
gSystem->Load("libPWG2forward2");
// --- Make the task and add it to the manager ---------------------
AliFMDEnergyFitterTask* task = new AliFMDEnergyFitterTask("fmdEnergyFitter");
- task->SetBLow(blow);
- task->SetBLow(bhigh);
+ // task->SetBLow(blow);
+ // task->SetBLow(bhigh);
mgr->AddTask(task);
// --- Set parameters on the algorithms ----------------------------
// Set maximum energy loss to consider
task->GetEnergyFitter().SetMaxE(15);
// Set number of energy loss bins
- task->GetEnergyFitter().SetNEbins(450);
+ task->GetEnergyFitter().SetNEbins(100);
// Set whether to use increasing bin sizes
task->GetEnergyFitter().SetUseIncreasingBins(true);
// Set whether to do fit the energy distributions
// Set the minimum number of entries in the distribution before
// trying to fit to the data
task->GetEnergyFitter().SetMinEntries(1000);
- task->GetEnergyFitter().SetMaxRelativeParameterError(0.12);
- task->GetEnergyFitter().SetMaxChi2PerNDF(10);
- task->GetEnergyFitter().SetMinWeight(1e-5);
// --- Set limits on fits the energy -------------------------------
// Maximum relative error on parameters
AliFMDCorrELossFit::ELossFit::fgMaxRelError = .12;
// Least weight to use
AliFMDCorrELossFit::ELossFit::fgLeastWeight = 1e-5;
// Maximum value of reduced chi^2
- AliFMDCorrELossFit::ELossFit::fgMaxChi2nu = 5;
+ AliFMDCorrELossFit::ELossFit::fgMaxChi2nu = 10;
// --- Make the output container and connect it --------------------
TString outputfile = AliAnalysisManager::GetCommonFileName();
#include <iostream>
#include <TMath.h>
#include <TObjString.h>
-
+#include <TObjArray.h>
+#include "AliLog.h"
ClassImp(AliAODForwardMult)
#ifdef DOXY_INPUT
; // For Emacs
return ret;
}
+//____________________________________________________________________
+UInt_t
+AliAODForwardMult::MakeTriggerMask(const char* what)
+{
+ UShort_t trgMask = 0;
+ TString trgs(what);
+ trgs.ToUpper();
+ TObjString* trg;
+ TIter next(trgs.Tokenize(" ,|"));
+ while ((trg = static_cast<TObjString*>(next()))) {
+ TString s(trg->GetString());
+ if (s.IsNull()) continue;
+ if (s.CompareTo("INEL") == 0) trgMask |= AliAODForwardMult::kInel;
+ else if (s.CompareTo("INEL>0")== 0) trgMask |= AliAODForwardMult::kInelGt0;
+ else if (s.CompareTo("NSD") == 0) trgMask |= AliAODForwardMult::kNSD;
+ else
+ AliWarningGeneral("MakeTriggerMask",
+ Form("Unknown trigger %s", s.Data()));
+ }
+ return trgMask;
+}
//____________________________________________________________________
Bool_t
*/
TH2D& GetHistogram() { return fHist; } // Get histogram
/**
- * Get the trigger mask
+ * Get the trigger bits
*
- * @return Trigger mask
+ * @return Trigger bits
*/
- UInt_t GetTriggerMask() const { return fTriggers; } // Get triggers
+ UInt_t GetTriggerBits() const { return fTriggers; } // Get triggers
/**
* Set the trigger mask
*
* @return Newly allocated histogram
*/
static TH1I* MakeTriggerHistogram(const char* name="triggers");
+ /**
+ * Utility function to make a trigger mask from the passed string.
+ *
+ * The string is a comma or space seperated list of case-insensitive
+ * strings
+ *
+ * - INEL
+ * - INEL>0
+ * - NSD
+ *
+ * @param what Which triggers to put in the mask.
+ *
+ * @return The generated trigger mask.
+ */
+ static UInt_t MakeTriggerMask(const char* what);
protected:
Bool_t fIsMC; // Whether this is from MC
TH2D fHist; // Histogram of d^2N_{ch}/(deta dphi) for this event
// Parameters:
// mask Trigger mask
//
- UShort_t trgMask = 0;
- TString trgs(mask);
- trgs.ToUpper();
- TObjString* trg;
- TIter next(trgs.Tokenize(" ,|"));
- while ((trg = static_cast<TObjString*>(next()))) {
- TString s(trg->GetString());
- if (s.IsNull()) continue;
- if (s.CompareTo("INEL") == 0) trgMask = AliAODForwardMult::kInel;
- else if (s.CompareTo("INEL>0")== 0) trgMask = AliAODForwardMult::kInelGt0;
- else if (s.CompareTo("NSD") == 0) trgMask = AliAODForwardMult::kNSD;
- else
- Warning("SetTriggerMask", "Unknown trigger %s", s.Data());
- }
- if (trgMask == 0) trgMask = 1;
- SetTriggerMask(trgMask);
+ SetTriggerMask(AliAODForwardMult::MakeTriggerMask(mask));
}
//________________________________________________________________________
void
fAODCentral(kFALSE),
fManager(),
fUseSecondary(true),
+ fUseAcceptance(true),
fFirstEventSeen(false)
{
//
fAODCentral(),
fManager(),
fUseSecondary(true),
+ fUseAcceptance(true),
fFirstEventSeen(false)
{
//
fAODCentral(o.fAODCentral),
fManager(o.fManager),
fUseSecondary(o.fUseSecondary),
+ fUseAcceptance(o.fUseAcceptance),
fFirstEventSeen(o.fFirstEventSeen)
{
//
//
// Assignment operator
//
- fData = o.fData;
- fList = o.fList;
- fAODCentral = o.fAODCentral;
- fManager = o.fManager;
- fUseSecondary = o.fUseSecondary;
+ fData = o.fData;
+ fList = o.fList;
+ fAODCentral = o.fAODCentral;
+ fManager = o.fManager;
+ fUseSecondary = o.fUseSecondary;
+ fUseAcceptance = o.fUseAcceptance;
fFirstEventSeen = o.fFirstEventSeen;
return *this;
}
inspector.GetEnergy(),
inspector.GetField());
- //std::cout<<inspector.GetCollisionSystem()<<" "<<inspector.GetEnergy()<<" "<<inspector.GetField()<<std::endl;
AliInfo("Manager of corrections in AliCentralMultiplicityTask init");
fFirstEventSeen = kTRUE;
}
// Corrections
- TH2D* hSecMap = 0;
TH1D* hAcceptance = fManager.GetAcceptanceCorrection(vtxbin);
- //if (fUseSecondary)
- hSecMap = fManager.GetSecMapCorrection(vtxbin);
+ TH2D* hSecMap = fManager.GetSecMapCorrection(vtxbin);
- //if (fUseSecondary && !hSecMap)
- if (!hSecMap) AliFatal("No secondary map!");
- if (!hAcceptance) AliFatal("No acceptance!");
+ if (!hSecMap) AliFatal("No secondary map!");
+ if (!hAcceptance) AliFatal("No acceptance!");
- if (hSecMap) aodHist->Divide(hSecMap);
+ if (fUseSecondary && hSecMap) aodHist->Divide(hSecMap);
for(Int_t nx = 1; nx <= aodHist->GetNbinsX(); nx++) {
Float_t accCor = hAcceptance->GetBinContent(nx);
+ Float_t accErr = hAcceptance->GetBinError(nx);
Bool_t etabinSeen = kFALSE;
for(Int_t ny = 1; ny <= aodHist->GetNbinsY(); ny++) {
+ // Get currrent value
Float_t aodValue = aodHist->GetBinContent(nx,ny);
+ Float_t aodErr = aodHist->GetBinError(nx,ny);
+
+ // Set underflow bin
Float_t secCor = 0;
if(hSecMap) secCor = hSecMap->GetBinContent(nx,ny);
if (secCor > 0.5) etabinSeen = kTRUE;
if (aodValue < 0.000001) { aodHist->SetBinContent(nx,ny, 0); continue; }
+
+ if (!fUseAcceptance) continue;
+
+ // Acceptance correction
if (accCor < 0.000001) accCor = 1;
Float_t aodNew = aodValue / accCor ;
- aodHist->SetBinContent(nx,ny, aodNew);
- Float_t aodErr = aodHist->GetBinError(nx,ny);
- Float_t accErr = hAcceptance->GetBinError(nx);
-
Float_t error = aodNew*TMath::Sqrt(TMath::Power(aodErr/aodValue,2) +
TMath::Power(accErr/accCor,2) );
+ aodHist->SetBinContent(nx,ny, aodNew);
//test
aodHist->SetBinError(nx,ny,error);
aodHist->SetBinError(nx,ny,aodErr);
* @param use Whether to use secondary corrections
*/
virtual void SetUseSecondary(Bool_t use) { fUseSecondary = use; }
+ /**
+ * Set whether to use the acceptance corrections
+ *
+ * @param use Whether to use acceptance corrections
+ */
+ virtual void SetUseAcceptance(Bool_t use) { fUseAcceptance = use; }
//__________________________________________________________________
/**
AliAODCentralMult fAODCentral; // Output object
Manager fManager; //Manager object for corrections
Bool_t fUseSecondary; // Whether to secondary map
+ Bool_t fUseAcceptance; // Whether to use acceptance corr.
Bool_t fFirstEventSeen; // Have we seen first event
ClassDef(AliCentralMultiplicityTask,1) // Forward multiplicity class
};
DefineOutput(1, TList::Class());
}
//_____________________________________________________________________
-void AliForwardFlowTaskQC::CreateOutputObjects()
+void AliForwardFlowTaskQC::UserCreateOutputObjects()
{
//
// Create output objects
*
* @todo Check if this shouldn't be UserCreateOutputObjects!
*/
- virtual void CreateOutputObjects();
+ virtual void UserCreateOutputObjects();
/**
* Initialize the task
*
// Parameters:
// AliAODForwardMult: forward mult object with trigger and vertex info
//
- if (!aodfm->IsTriggerBits(AliAODForwardMult::kInel)) return kFALSE;
- if (!aodfm->HasIpZ()) return kFALSE;
- if (!aodfm->InRange(-fZvertex,fZvertex)) return kFALSE;
-
- return kTRUE;
+ return aodfm->CheckEvent(AliAODForwardMult::kInel, -fZvertex, fZvertex,
+ 0, 0);
}
//_____________________________________________________________________
Bool_t AliForwardFlowUtil::LoopAODFMD(const AliAODEvent* aodevent) const
gROOT->GetMacroPath()));
// --- Creating the manager and handlers ---------------------------
- AliAnalysisManager *mgr = new AliAnalysisManager(name, "Forward multiplicity");
+ AliAnalysisManager *mgr = new AliAnalysisManager(name,
+ "Forward multiplicity");
AliAnalysisManager::SetCommonFileName("forward.root");
// --- ESD input handler -------------------------------------------
* @ingroup pwg2_forward_eloss
*/
void MakeELossFits(const char* esddir,
- Int_t nEvents=1000,
- Int_t proof=0,
- Bool_t mc=false,
- Bool_t cent=false)
+ Int_t nEvents = 1000,
+ Int_t proof = 0,
+ Bool_t mc = false,
+ Bool_t cent = false,
+ const char* name = 0)
{
+ // --- Possibly use plug-in for this -------------------------------
+ if ((name && name[0] != '\0') && gSystem->Load("libRAliEn") >= 0) {
+ gROOT->SetMacroPath(Form("%s:$(ALICE_ROOT)/PWG2/FORWARD/analysis2:"
+ "$ALICE_ROOT/ANALYSIS/macros",
+ gROOT->GetMacroPath()));
+ gSystem->AddIncludePath("-I${ALICE_ROOT}/include");
+ gSystem->Load("libANALYSIS");
+ gSystem->Load("libANALYSISalice");
+ gROOT->LoadMacro("TrainSetup.C+");
+ FMDELossTrain t(name, cent, false);
+ t.SetDataDir(esddir);
+ t.SetDataSet("");
+ t.SetProofServer(Form("workers=%d",proof));
+ t.Run(proof > 0 ? "PROOF" : "LOCAL", "FULL", nEvents, mc, proof > 0);
+ return;
+ }
+
// --- Libraries to load -------------------------------------------
gROOT->Macro("$ALICE_ROOT/PWG2/FORWARD/analysis2/scripts/LoadLibs.C");
"Forward energy loss");
AliAnalysisManager::SetCommonFileName("forward_eloss.root");
+ // --- ESD input handler -------------------------------------------
AliESDInputHandler *esdHandler = new AliESDInputHandler();
- esdHandler->SetInactiveBranches("AliESDACORDE "
- "AliRawDataErrorLogs "
- "CaloClusters "
- "Cascades "
- "EMCALCells "
- "EMCALTrigger "
- "Kinks "
- "Cascades "
- "MuonTracks "
- "TrdTracks "
- "CaloClusters "
- "HLTGlobalTrigger");
mgr->SetInputEventHandler(esdHandler);
-
- // AOD output handler
- AliAODHandler* aodHandler = new AliAODHandler();
- mgr->SetOutputEventHandler(aodHandler);
- aodHandler->SetOutputFileName("AliAODs.root");
+
+ // --- Monte Carlo handler -----------------------------------------
+ if (mc) {
+ AliMCEventHandler* mcHandler = new AliMCEventHandler();
+ mgr->SetMCtruthEventHandler(mcHandler);
+ mcHandler->SetReadTR(true);
+ }
// --- Add tasks ---------------------------------------------------
gROOT->LoadMacro("AddTaskPhysicsSelection.C");
AddTaskPhysicsSelection(mc, kTRUE, kFALSE);
- gROOT->LoadMacro("AddTaskCentrality.C");
- AddTaskCentrality();
-
- AliFMDEnergyFitterTask* task = new AliFMDEnergyFitterTask("fmdEnergyFitter");
- mgr->AddTask(task);
+ // Centrality
+ if(cent) {
+ gROOT->LoadMacro("AddTaskCentrality.C");
+ AddTaskCentrality();
+ }
- // --- Make the output container and connect it --------------------
- TString outputfile = AliAnalysisManager::GetCommonFileName();
- AliAnalysisDataContainer* histOut =
- mgr->CreateContainer("Forward", TList::Class(),
- AliAnalysisManager::kOutputContainer,outputfile);
- mgr->ConnectInput(task, 0, mgr->GetCommonInputContainer());
- mgr->ConnectOutput(task, 1, histOut);
+ // FMD ELoss fitter
+ gROOT->LoadMacro("AddTaskFMDELoss.C");
+ AddTaskFMDELoss(mc, cent);
- // --- Set parameters on the algorithms ----------------------------
- // Set the number of SPD tracklets for which we consider the event a
- // low flux event
- task->GetEventInspector().SetLowFluxCut(1000);
- // Set the maximum error on v_z [cm]
- task->GetEventInspector().SetMaxVzErr(0.2);
- // Set the eta axis to use - note, this overrides whatever is used
- // by the rest of the algorithms - but only for the energy fitter
- // algorithm.
- task->GetEnergyFitter().SetEtaAxis(200, -4, 6);
- // Set maximum energy loss to consider
- task->GetEnergyFitter().SetMaxE(15);
- // Set number of energy loss bins
- task->GetEnergyFitter().SetNEbins(100);
- // Set whether to use increasing bin sizes
- task->GetEnergyFitter().SetUseIncreasingBins(true);
- // Set whether to do fit the energy distributions
- task->GetEnergyFitter().SetDoFits(kTRUE);
- // Set whether to make the correction object
- task->GetEnergyFitter().SetDoMakeObject(kTRUE);
- // Set the low cut used for energy
- task->GetEnergyFitter().SetLowCut(0.4);
- // Set the number of bins to subtract from maximum of distributions
- // to get the lower bound of the fit range
- task->GetEnergyFitter().SetFitRangeBinWidth(4);
- // Set the maximum number of landaus to try to fit (max 5)
- task->GetEnergyFitter().SetNParticles(5);
- // Set the minimum number of entries in the distribution before
- // trying to fit to the data
- task->GetEnergyFitter().SetMinEntries(1000);
- // --- Set limits on fits the energy -------------------------------
- // Maximum relative error on parameters
- AliFMDCorrELossFit::ELossFit::fgMaxRelError = .12;
- // Least weight to use
- AliFMDCorrELossFit::ELossFit::fgLeastWeight = 1e-5;
- // Maximum value of reduced chi^2
- AliFMDCorrELossFit::ELossFit::fgMaxChi2nu = 10;
-
// --- Run the analysis --------------------------------------------
TStopwatch t;
if (!mgr->InitAnalysis()) {
// Some informative output
mgr->PrintStatus();
// mgr->SetDebugLevel(3);
- if (mgr->GetDebugLevel() < 1 && proof <= 0) mgr->SetUseProgressBar(kTRUE);
+ if (mgr->GetDebugLevel() < 1 && proof <= 0)
+ mgr->SetUseProgressBar(kTRUE,100);
// Run the train
t.Start();
- Printf("=== RUNNING ANALYSIS ==================================");
+ Printf("=== RUNNING ANALYSIS on %9 events ========================",nEvents);
mgr->StartAnalysis(proof > 0 ? "proof" : "local", chain, nEvents);
t.Stop();
t.Print();
Int_t zVertex = 2,
TString addFlow = "",
Int_t addFType = 0,
- Int_t addFOrder = 0)
+ Int_t addFOrder = 0,
+ Bool_t proof = false)
{
Bool_t proof = kFALSE;
}
}
+ // --- Set the macro path ------------------------------------------
+ gROOT->SetMacroPath(Form("%s:$(ALICE_ROOT)/PWG2/FORWARD/analysis2:"
+ "$ALICE_ROOT/ANALYSIS/macros",
+ gROOT->GetMacroPath()));
+
// --- Add to chain either AOD ------------------------------------
- if (data.Length() <= 1) {
+ if (data.IsNull()) {
AliError("You didn't add a data file");
return;
}
TChain* chain = new TChain("aodTree");
- if (data.Contains(".txt"))
- MakeChain(data, chain);
+ if (data.Contains(".txt")) MakeChain(data, chain);
if (data.Contains(".root")) {
- if (!TFile::Open(data.Data())) {
+ TFile* test = TFile::Open(data.Data())
+ if (!test) {
AliError(Form("AOD file %s not found", data.Data()));
return;
}
+ test->Close(); // Remember to close!
chain->Add(data.Data());
}
// --- Initiate the event handlers --------------------------------
AliAnalysisManager *mgr = new AliAnalysisManager("Forward Flow",
"Flow in the forward region");
- mgr->SetUseProgressBar(kTRUE, 10);
// --- AOD input handler -------------------------------------------
AliAODInputHandler *aodInputHandler = new AliAODInputHandler();
aodOut->SetOutputFileName("AliAODs.Flow.root");
// --- Add the tasks ---------------------------------------------
- gROOT->LoadMacro("$ALICE_ROOT/PWG2/FORWARD/analysis2/AddTaskForwardFlow.C");
+ gROOT->LoadMacro("AddTaskForwardFlow.C");
AddTaskForwardFlow(type, etabins, zVertex, addFlow, addFType, addFOrder);
// --- Run the analysis --------------------------------------------
return;
}
mgr->PrintStatus();
+ //
+ if (proof) mgr->SetDebugLevel(3);
+ if (mgr->GetDebugLevel() < 1 && !proof)
+ mgr->SetUseProgressBar(kTRUE,nEvents < 10000 ? 10 : 100);
t.Start();
if (nevents == 0) mgr->StartAnalysis("local", chain);
#ifndef __CINT__
#include <fstream>
+#include <iostream>
#include <TAlienCollection.h>
#include <TArrayI.h>
/**
* Set ROOT version to use
*
- * @param v
+ * @param v Version string of ROOT
*/
void SetROOTVersion(const char* v) { fRootVersion = v; }
//__________________________________________________________________
/**
* Set AliROOT version to use
*
- * @param v
+ * @param v Version string of AliROOT
*/
void SetAliROOTVersion(const char* v) { fAliRootVersion = v; }
//__________________________________________________________________
/**
- * Set the proof server URL
+ * Set the PROOF server URL
*
- * @param s
+ * @param s PROOF server URL
*/
void SetProofServer(const char* s) { fProofServer = s; }
//__________________________________________________________________
/**
* Set the GRID/Local data dir
*
- * @param d
+ * @param d Directory with data
*/
- void SetDataDir(const char* d) { fDataDir = d; }
+ void SetDataDir(const char* d) { fDataDir = d; }
//__________________________________________________________________
/**
* Set the PROOF data set
*
- * @param d
+ * @param d PROOF registered data set
*/
- void SetDataSet(const char* d) { fDataSet = d; }
+ void SetDataSet(const char* d) { fDataSet = d; }
//__________________________________________________________________
/**
* Set the XML file to use
*
- * @param x
+ * @param x XML file
*/
- void SetXML(const char* x) { fXML = x; }
+ void SetXML(const char* x) { fXML = x; }
//__________________________________________________________________
/**
* Set how many replicas of the output we want
*
- * @param n
+ * @param n Number of replicas requested
*/
- void SetNReplica(Int_t n) { fNReplica = n; }
+ void SetNReplica(Int_t n) { fNReplica = n; }
+ /**
+ * Set the ESD pass to use
+ *
+ * @param pass Pass number
+ */
+ void SetESDPass(Int_t pass) { fESDPass = pass; }
//__________________________________________________________________
/**
* Add a source file to be copied and byte compiled on slaves
gROOT->SetMacroPath(Form("%s:$ALICE_ROOT/ANALYSIS/macros",
gROOT->GetMacroPath()));
- // --- Physics selction ------------------------------------------
- CreatePhysicsSelection(mc, mgr);
+ // --- Physics selction - only for ESD ---------------------------
+ if (type == kESD) CreatePhysicsSelection(mc, mgr);
// --- Create tasks ----------------------------------------------
CreateTasks(mode, usePar, mgr);
*
* @return Grid handler
*/
- virtual AliAnalysisAlien* CreateGridHandler(EType type, EMode mode, EOper oper)
+ virtual AliAnalysisAlien*
+ CreateGridHandler(EType type, EMode mode, EOper oper)
{
if (mode != kGrid) return 0;
*/
virtual AliVEventHandler* CreateOutputHandler(EType type)
{
+ AliAODHandler* ret = new AliAODHandler();
switch (type) {
- case kESD: // Fall through
- case kAOD: {
- AliAODHandler* ret = new AliAODHandler();
+ case kESD:
ret->SetOutputFileName("AliAOD.root");
- return ret;
- }
+ break;
+ case kAOD:
+ ret->SetOutputFileName("AliAOD.pass2.root");
+ break;
}
return 0;
}
*
* @ingroup pwg2_forward_scripts_makers
*/
-class ForwardELoss : public TrainSetup
+class FMDELossTrain : public TrainSetup
{
public:
/**
* Constructor. Date and time must be specified when running this
* in Termiante mode on Grid
*
- * @param dateTime Append date and time to name
+ * @param name Name of train
+ * @param useCent Whether to use centrality or not
+ * @param dateTime Append date and time to name
* @param year Year
* @param month Month
* @param day Day
* @param hour Hour
* @param min Minutes
*/
- ForwardELoss(Bool_t dateTime,
- UShort_t year = 0,
- UShort_t month = 0,
- UShort_t day = 0,
- UShort_t hour = 0,
- UShort_t min = 0)
- : TrainSetup("Forward energy loss", dateTime,
- year, month, day, hour, min)
+ FMDELossTrain(const char* name = "FMD Energy Loss",
+ Bool_t useCent = false,
+ Bool_t dateTime = false,
+ UShort_t year = 0,
+ UShort_t month = 0,
+ UShort_t day = 0,
+ UShort_t hour = 0,
+ UShort_t min = 0)
+ : TrainSetup(name, dateTime, year, month, day, hour, min),
+ fUseCent(useCent)
{}
+ //__________________________________________________________________
/**
* Run this analysis
*
void Run(const char* mode, const char* oper,
Int_t nEvents=-1, Bool_t mc=false)
{
- EMode eMode = ParseMode(mode);
- EOper eOper = ParseOperation(oper);
-
- Run(eMode, eOper, nEvents, mc);
+ Exec("ESD", mode, oper, nEvents, mc);
}
+ //__________________________________________________________________
/**
* Run this analysis
*
{
Exec(kESD, mode, oper, nEvents, mc, true);
}
+protected:
+ //__________________________________________________________________
/**
* Create the tasks
*
// --- Add the task ----------------------------------------------
gROOT->Macro(Form("AddTaskForwardMultEloss.C(%d)", mc));
}
+ /**
+ * Crete output handler - we don't want one here.
+ *
+ * @return 0
+ */
+ AliVEventHandler* CreateOutputHandler(EType) { return 0; }
};
//====================================================================
/**
* Analysis train to make Forward and Central multiplicity
*
+ * To run, do
+ * @code
+ * gROOT->LoadMacro("TrainSetup.C");
+ * // Make train
+ * MakeAODTrain t("My Analysis");
+ * // Set variaous parameters on the train
+ * t.SetDataDir("/home/of/data");
+ * t.AddRun(118506)
+ * // Run it
+ * t.Run("LOCAL", "FULL", -1, false, false);
+ * @endcode
+ *
* @ingroup pwg2_forward_scripts_makers
* @ingroup pwg2_forward_aod
*/
/**
* Run this analysis
*
- * @param mode Mode
- * @param oper Operation
+ * @param mode Mode - see TrainSetup::EMode
+ * @param oper Operation - see TrainSetup::EOperation
* @param nEvents Number of events (negative means all)
* @param mc If true, assume simulated events
* @param usePar If true, use PARs
/**
* Run this analysis
*
- * @param mode Mode
- * @param oper Operation
+ * @param mode Mode - see TrainSetup::EMode
+ * @param oper Operation - see TrainSetup::EOperation
* @param nEvents Number of events (negative means all)
* @param mc If true, assume simulated events
* @param usePar If true, use PARs
void CreatePhysicsSelection(Bool_t mc,
AliAnalysisManager* mgr)
{
- gROOT->Macro(Form("AddTaskPhysicsSelection.C(%d)", mc));
- mgr->RegisterExtraFile("event_stat.root");
+ TrainSetup::CreatePhysicsSelection(mc, mgr);
// --- Get input event handler -----------------------------------
AliInputEventHandler* ih =
- static_cast<AliInputEventHandler*>(mgr->GetInputEventHandler());
+ dynamic_cast<AliInputEventHandler*>(mgr->GetInputEventHandler());
+ if (!ih)
+ Fatal("CreatePhysicsSelection", "Couldn't get input handler (%p)", ih);
// --- Get Physics selection -------------------------------------
AliPhysicsSelection* ps =
- static_cast<AliPhysicsSelection*>(ih->GetEventSelection());
+ dynamic_cast<AliPhysicsSelection*>(ih->GetEventSelection());
+ if (!ps)
+ Fatal("CreatePhysicsSelection", "Couldn't get PhysicsSelection (%p)", ps);
// --- Ignore trigger class when selecting events. This means ---
// --- that we get offline+(A,C,E) events too --------------------
/**
* Analysis train to make @f$ dN/d\eta@f$
*
+ * To run, do
+ * @code
+ * gROOT->LoadMacro("TrainSetup.C");
+ * // Make train
+ * MakedNdetaTrain t("My Analysis");
+ * // Set variaous parameters on the train
+ * t.SetDataDir("/home/of/data");
+ * t.AddRun(118506)
+ * // Run it
+ * t.Run("LOCAL", "FULL", -1, false, false);
+ * @endcode
+ *
* @ingroup pwg2_forward_scripts_makers
* @ingroup pwg2_forward_dndeta
*/
/**
* Run this analysis
*
- * @param mode Mode
- * @param oper Operation
+ * @param mode Mode - see TrainSetup::EMode
+ * @param oper Operation - see TrainSetup::EOperation
* @param nEvents Number of events (negative means all)
* @param usePar If true, use PARs
*/
/**
* Run this analysis
*
- * @param mode Mode
- * @param oper Operation
+ * @param mode Mode - see TrainSetup::EMode
+ * @param oper Operation - see TrainSetup::EOperation
* @param nEvents Number of events (negative means all)
* @param usePar If true, use PARs
*/
gROOT->Macro(Form("AddTaskCentraldNdeta.C(\"%s\",%f,%f,%d,\"%s\")",
fTrig.Data(), fVzMin, fVzMax, fUseCent, fScheme.Data()));
}
- //__________________________________________________________________
- /**
- * Do nothing
- *
- */
- void CreatePhysicsSelection(Bool_t,AliAnalysisManager*) {}
/**
* Crete output handler - we don't want one here.
*