/**
- * @section Forward/Backward Correlations
+ * A task to do a comparison between tracklets and clusers in the SPD
*
- * A script containing a class ForwardBackwardTask and a
- * function to run the analysis.
- *
- * The class ForwardBackwardTask is an AliAnalysisTaskSE. That means
- * that it have facilities for analysing ESD, AOD, and MC input. The
- * process of running the code is handled by an AliAnalysisManager
- * (created in the function). It uses a TSelector to loop over a
- * TChain of data.
- *
- * The flow of the code is
- * @verbatim
- * +-----------------------+
- * | Create Analysis Train |-> ForwardBackwardTask constructor
- * +-----------------------+
- * |
- * V
- * +-----------------------+
- * | Intialise all tasks |-> ForwardBackwardTask::Init (not implemented)
- * +-----------------------+
- * |
- * V
- * +-----------------------+
- * | Split job on workers |
- * +-----------------------+
- * |
- * V
- * +-----------------------+
- * | Create output objects |-> ForwardBackwardTask::CreateOutputObjects
- * | on each worker |
- * +-----------------------+
- * |
- * V
- * +-----------------------+
- * | More events on this |<-----+
- * | worker node? |--+ |
- * +-----------------------+ | |
- * | no | |
- * | V |
- * | +-------------------+
- * | | Process one event |->ForwardBackwardTask::UserExec
- * | +-------------------+
- * |
- * V
- * +-----------------------+
- * | Merge output of each |
- * | worker node |
- * +-----------------------+
- * |
- * V
- * +-----------------------+
- * | End of job processing |-> ForwardBackwardTask::Terminate
- * +-----------------------+
- * @endverbatim
- *
- * Since the class ForwardBackwardTask derives from a compiled class
+ * Since the class SPDComparisonTask derives from a compiled class
* (AliAnalysisTaskSE) we need to compile that code. The script will,
* when executed in the AliROOT prompt load it self again and byte
* compile it with the preprocessor flag BUILD defined. \
* script is loaded using
*
* @verbatim
- * Root> .x ForwardBackward.C
+ * Root> .x SPDComparison.C
* @endverbatim
*
- * which means that CINT will only see the function ForwardBackward.
+ * which means that CINT will only see the function SPDComparison.
* In that function, we define the BUILD preprocessor symbol
*
* @code
* @f$\eta@f$ range. One can add (possibly overlapping) @f$\eta@f$
* ranges by calling the member function AddBin
*
+ * @ingroup pwg2_forward_analysis_scripts
*/
class SPDComparisonTask : public AliAnalysisTaskSE
{
+/**
+ * Draw the before/after merging image for a single ring
+ *
+ * @param p
+ * @param d
+ * @param r
+ *
+ * @ingroup pwg2_forward_analysis_scripts_qa
+ */
void
DrawRingBeforeAfter(TList* p, UShort_t d, Char_t r)
{
}
+/**
+ * Draw the before/after sharing image for all rings
+ *
+ * @param filename
+ *
+ * @ingroup pwg2_forward_analysis_scripts_qa
+ */
void
DrawBeforeAfter(const char* filename="forward.root")
{
+//
+// EOF
+//
+/**
+ * Draw cuts used in analysis
+ *
+ * @param filename
+ *
+ * @ingroup pwg2_forward_analysis_scripts_qa
+ */
void
DrawCuts(const char* filename="forward.root")
{
*
* @brief A script to draw the Poisson vs Energy Loss correlation
*
+ *
+ * @ingroup pwg2_forward_analysis_scripts_qa
*
*/
* @param xmax Maximum
*
* @return The regression coefficient
+ *
+ * @ingroup pwg2_forward_analysis_scripts_qa
*/
Double_t
DrawRingELossPoisson(TList* p, UShort_t d, Char_t r,
* @param filename File to read
* @param xmax Minimum X
* @param xmin Maximum X
+ *
+ * @ingroup pwg2_forward_analysis_scripts_qa
*/
void
DrawELossPoisson(const char* filename="forward.root",
+/**
+ * @file DrawMCResult.C
+ * @author Christian Holm Christensen <cholm@dalsgaard.hehi.nbi.dk>
+ * @date Thu Jul 7 10:57:01 2011
+ *
+ * @brief Script to draw steps (deprecated version - use DrawSteps.C)
+ *
+ *
+ * @ingroup pwg2_forward_analysis_scripts_qa
+ */
+/**
+ *
+ *
+ * @param forward
+ * @param sub
+ * @param name
+ *
+ * @return
+ *
+ * @ingroup pwg2_forward_analysis_scripts_qa
+ */
THStack*
GetStack(const TList& forward, const char* sub, const char* name)
{
return ret;
}
+/**
+ *
+ *
+ * @param h
+ * @param rebin
+ *
+ * @return
+ *
+ * @ingroup pwg2_forward_analysis_scripts_qa
+ */
TH1*
Rebin(TH1* h, Int_t rebin)
{
return h;
}
+/**
+ *
+ *
+ * @param h1
+ * @param h2
+ *
+ * @return
+ *
+ * @ingroup pwg2_forward_analysis_scripts_qa
+ */
TH1*
Ratio(const TH1* h1, const TH1* h2)
{
return copy;
}
-
+/**
+ *
+ *
+ * @param r
+ * @param h1
+ * @param h2
+ *
+ * @return
+ *
+ * @ingroup pwg2_forward_analysis_scripts_qa
+ */
Int_t
Ratio(THStack* r, const THStack* h1, const THStack* h2)
{
}
return nH;
}
-
+/**
+ *
+ *
+ * @param filename
+ * @param rebin
+ * @param ratios
+ *
+ * @ingroup pwg2_forward_analysis_scripts_qa
+ */
void
DrawMCResult(const char* filename="forward.root", Int_t rebin=1,
Bool_t ratios=true)
+//
+// EOF
+//
+/**
+ * Draw the correlation of neighboring strips before/after merging
+ *
+ * @param p List
+ * @param d Detector
+ * @param r Ring
+ *
+ * @ingroup pwg2_forward_analysis_scripts_qa
+ */
void
DrawRingNeighbors(TList* p, UShort_t d, Char_t r)
{
gPad->cd();
}
-
+/**
+ * Draw the correlation of neighboring strips before/after merging
+ *
+ * @param filename
+ *
+ * @ingroup pwg2_forward_analysis_scripts_qa
+ */
void
DrawNeighbors(const char* filename="forward.root")
{
+//
+// EOF
+//
+/**
+ * @file DrawRecAnaEloss.C
+ * @author Christian Holm Christensen <cholm@dalsgaard.hehi.nbi.dk>
+ * @date Thu Jul 7 10:58:50 2011
+ *
+ * @brief Draw energ-loss before/after merging and used in the
+ * density calculations
+ *
+ * @ingroup pwg2_forward_analysis_scripts_qa
+ */
+
#ifndef __CINT__
#include <TList.h>
#include <TH1.h>
class TLatex;
#endif
+/**
+ * Draw some text
+ *
+ * @param l
+ * @param x
+ * @param y
+ * @param c1
+ * @param c2
+ *
+ * @ingroup pwg2_forward_analysis_scripts_qa
+ */
void
DrawText(TLatex* l, Double_t x, Double_t& y, const char* c1, const char* c2)
{
l->DrawLatex(x, y, c1);
l->DrawLatex(x+.4, y, c2);
}
-
+/**
+ * Draw the energy loss before/after mergin for a single ring
+ *
+ * @param p List 1
+ * @param p2 List 2
+ * @param lowCut Low cut
+ * @param d Detector
+ * @param r Ring
+ *
+ * @ingroup pwg2_forward_analysis_scripts_qa
+ */
void
DrawRingRecAnaEloss(TList* p, TList* p2, Double_t lowCut, UShort_t d, Char_t r)
{
gPad->cd();
}
-
+/**
+ * Draw energy loss before/after merging
+ *
+ * @param filename
+ *
+ * @ingroup pwg2_forward_analysis_scripts_qa
+ */
void
DrawRecAnaEloss(const char* filename="forward.root")
{
+//
+// EOF
+//
+/**
+ *
+ * @defgroup pwg2_forward_analysis_scripts_qa Quality Assurance scripts
+ *
+ *
+ * @ingroup pwg2_forward_analysis_scripts
+ *
+ */
+
+/**
+ * Get a stack
+ *
+ * @param forward Input list
+ * @param sub Sub-list
+ * @param name Name of stack
+ *
+ * @return A stack or null
+ *
+ * @ingroup pwg2_forward_analysis_scripts_qa
+ */
THStack*
GetStack(const TList& forward, const char* sub, const char* name)
{
return ret;
}
+/**
+ * Rebin a histogram
+ *
+ * @param h Histogram
+ * @param rebin Rebinning factor
+ *
+ * @return Histogram
+ *
+ * @ingroup pwg2_forward_analysis_scripts_qa
+ */
TH1*
Rebin(TH1* h, Int_t rebin)
{
return h;
}
+/**
+ * Ratio of two histograms
+ *
+ * @param h1 numerator
+ * @param h2 denominator
+ *
+ * @return Ratio
+ *
+ * @ingroup pwg2_forward_analysis_scripts_qa
+ */
TH1*
Ratio(const TH1* h1, const TH1* h2)
{
return copy;
}
+/**
+ * Ratio all histograms in stacks
+ *
+ * @param r Result
+ * @param h1 Numerators
+ * @param h2 Denominators
+ *
+ * @return Number of histograms
+ *
+ * @ingroup pwg2_forward_analysis_scripts_qa
+*/
Int_t
Ratio(THStack* r, const THStack* h1, const THStack* h2)
{
return nH;
}
+/**
+ * Add a histogram to the all stack
+ *
+ * @param all Stack
+ * @param h Histogram
+ * @param singleStep Showing individual steps?
+ *
+ * @ingroup pwg2_forward_analysis_scripts_qa
+*/
void
AddToAll(THStack* all, const TH1* h, Bool_t singleStep)
{
all->Add(copy);
}
+/**
+ * Dim an entry
+ *
+ * @param thisId This step
+ * @param step Current step
+ * @param e Entry in legend
+ *
+ * @ingroup pwg2_forward_analysis_scripts_qa
+ */
void
DimEntry(Int_t thisId, Int_t step, TLegendEntry* e)
{
e->SetTextColor(col);
}
+/**
+ * Draw a step
+ *
+ * @param deltas From energy loss
+ * @param nchs After 2nd correction
+ * @param prims Primaries
+ * @param dndeta Result
+ * @param step Step number
+ *
+ * @ingroup pwg2_forward_analysis_scripts_qa
+ */
void
DrawStep(THStack* deltas, THStack* nchs, THStack* prims,
TH1* dndeta, Int_t step)
ltx->Draw();
}
-
+/**
+ * Draw steps
+ *
+ * @param filename Input file
+ * @param single Whether to show individial steps
+ *
+ * @ingroup pwg2_forward_analysis_scripts_qa
+ */
void DrawSteps(const char* filename="forward.root", Bool_t single=true)
{
gStyle->SetPalette(1);
#include <TLegend.h>
#include <TMath.h>
#include <TLatex.h>
-
+/**
+ * @defgroup pwg2_forward_analysis_scripts_flow Flow scripts
+ * @ingroup pwg2_forward_analysis_scripts
+ *
+ */
// Data members
const char* pdfName = "Flow.pdf";
+
+/**
+ * @todo Document me
+ *
+ * @param name
+ *
+ * @return
+ *
+ * @ingroup pwg2_forward_analysis_scripts_flow
+ */
TCanvas* SetupCanvas(TString name)
{
TCanvas* c = new TCanvas("c","c",640,960);
return c;
}
+/**
+ * @todo Document me
+ *
+ * @param f
+ *
+ * @ingroup pwg2_forward_analysis_scripts_flow
+ */
void MakeFmdAndSpdPlots(TFile* f)
{
TList* qList = static_cast<TList*>(f->Get("FlowResults/QCumulants"));
} // end of c
}
+/**
+ * @todo Document me
+ *
+ * @param f
+ *
+ * @ingroup pwg2_forward_analysis_scripts_flow
+ */
void Make2ParticlePlots(TFile* f)
{
TList* qList = static_cast<TList*>(f->Get("FlowResults/QCumulants"));
} // end of c
}
+/**
+ * @todo Document me
+ *
+ * @param f
+ *
+ * @ingroup pwg2_forward_analysis_scripts_flow
+ */
void Make4ParticlePlots(TFile* f)
{
TList* qList = static_cast<TList*>(f->Get("FlowResults/QCumulants"));
} // end of c
}
+/**
+ * @todo Document me
+ *
+ * @param f
+ *
+ * @ingroup pwg2_forward_analysis_scripts_flow
+ */
void MakeMonitoringPlots(TFile* f)
{
TList* qList = static_cast<TList*>(f->Get("FlowResults/QCumulants"));
}
+/**
+ * Document me
+ *
+ * @param file
+ *
+ * @ingroup pwg2_forward_analysis_scripts_flow
+ */
void DrawFlowPDF(char* file = "AnalysisResults.root")
{
gStyle->SetOptStat(0);
MakeMonitoringPlots(f);
c0->Print(Form("%s]", pdfName));
}
+//
+// EOF
+//
+/**
+ * Draw Rubens corrections
+ *
+ * @param fname
+ * @param hname
+ *
+ * @ingroup pwg2_forward_analysis_scripts
+ */
void
DrawRubensCorr(const char* fname="rubensRatio.root",
const char* hname = "dNdEtaCor1D_cls")
c->SaveAs("rubens_corr.png");
}
+//
+// EOF
+//
* @param name Name of object to retrieve
*
* @return Object, or null
+ *
+ * @ingroup pwg2_forward_analysis_scripts
*/
TObject*
GetObject(const TObject* l, const char* name)
* @param hname Name of histogram
*
* @return Pointer to histogram or null
+ *
+ * @ingroup pwg2_forward_analysis_scripts
*/
TH1D*
GetHist(TDirectory* dir,
* @param sub Sub-list name
*
* @return Histogram pointer or null
+ *
+ * @ingroup pwg2_forward_analysis_scripts
*/
TH1D*
GetHist(TDirectory* dir,
* @param xhigh On return, upper eta bound
*
* @return Newly allocated histogram or null
+ *
+ * @ingroup pwg2_forward_analysis_scripts
*/
TH1*
Merge(const TH1* cen, const TH1* fwd, Double_t& xlow, Double_t& xhigh)
* @param pp Pointer to parameter array
*
* @return @f$g(x;A_1,A_2,\sigma_1,\sigma_2)@f$
+ *
+ * @ingroup pwg2_forward_analysis_scripts
*/
Double_t myFunc(Double_t* xp, Double_t* pp)
{
* @param pp Pointer to parameter array (8 entries)
*
* @return @f$r(x)@f$
+ *
+ * @ingroup pwg2_forward_analysis_scripts
*/
Double_t myRatio(Double_t* xp, Double_t* pp)
{
* @param xhigh Upper x bound
*
* @return Fitted function
+ *
+ * @ingroup pwg2_forward_analysis_scripts
*/
TF1*
FitMerged(TH1* tmp, Double_t xlow, Double_t xhigh)
*
* @param tmp Histogram
* @param fit Fit
+ *
+ * @ingroup pwg2_forward_analysis_scripts
*/
void
MakeSysError(TH1* tmp, TF1* fit)
* @param g
*
* @return
- */
+ *
+ * @ingroup pwg2_forward_analysis_scripts
+ */
TH1*
Graph2Hist(const TGraphAsymmErrors* g)
{
* @param title (Optional) title
*
* @return Ratio in a histogram
+ *
+ * @ingroup pwg2_forward_analysis_scripts
*/
TH1*
Ratio(TH1* h, TF1* f, const char* title)
* @param xhigh On return, upper X bound
*
* @return Merged histogram or null
+ *
+ * @ingroup pwg2_forward_analysis_scripts
*/
TH1D*
GetUA5Data(UShort_t type, TH1*& p, TH1*& n,
//____________________________________________________________________
/**
+ * Draw ratios to UA5 data
*
- *
+ *
+ * @ingroup pwg2_forward_analysis_scripts
*/
void
DrawUA5Ratios(const char* fname="forward_dndeta.root", UShort_t rebin=5)
gROOT->LoadClass("AliAnalysisManager", "libANALYSIS");
gROOT->LoadClass("AliAnalysisTaskSE", "libANALYSISalice");
gROOT->LoadClass("AliAODForwardMult", "libPWG2forward2");
-
-#if 0
- const char* test = gSystem->GetLibraries("PWG2forward2","D",false);
- if (test && test[0] != '\0') {
- // TInterpreter* inter = gROOT->GetInterpreter();
- // inter->ClearFileBusy();
- // inter->UnloadFile(inter->GetCurrentMacroName());
- return;
- }
- gSystem->Load("libVMC");
- // gSystem->Load("libTree");
- gSystem->Load("libSTEERBase");
- gSystem->Load("libESD");
- gSystem->Load("libANALYSIS");
- gSystem->Load("libANALYSISalice");
- gSystem->Load("libPWG0base");
- gSystem->Load("libPWG2forward2");
-#endif
}
//
// EOF
/**
* Set-up for a PROOF analysis job. Make TProof object and load pars.
*
+ * @ingroup pwg2_forward_analysis_scripts
*/
Bool_t
LoadPars(Int_t nWorkers=4)
* @param chain Chain to add data to
* @param pattern Pattern that the file name must contain
* @param recursive Whether to scan recursively
+ *
+ * @ingroup pwg2_forward_analysis_scripts
*/
-
void
ScanDirectory(TSystemDirectory* dir, TChain* chain,
const char* pattern, bool recursive)
* @param recursive Whether to recurse into sub-directories
*
* @return Pointer to newly create chain, or null
+ *
+ * @ingroup pwg2_forward_analysis_scripts
*/
TChain*
MakeChain(const char* what, const char* datadir, bool recursive=false)
return chain;
}
+//
+// EOF
+//
+++ /dev/null
-class AliAnalysisAlien;
-
-//____________________________________________________________________
-// Forward declarations
-AliAnalysisAlien*
-CreateAlienHandler(const TString& runMode,
- const TString& dataDir,
- const TArrayI& runs,
- const TString& anaSource,
- const TString& addLibs,
- const TString& anaName,
- Bool_t uPar,
- const TString& aliceTag,
- const TString& rootTag,
- const TString& apiTag);
-
-//____________________________________________________________________
-/**
- *
- *
- * @param runMode
- * @param dataDir
- * @param what
- * @param nEvents
- * @param mc
- */
-void
-RunViaPlugin(const Char_t* runMode="",
- const Char_t* dataDir=".",
- const Char_t* what="aod",
- Long64_t nEvents=-1,
- Bool_t mc=false)
-{
- gSystem->Load("libANALYSIS");
- gSystem->Load("libANALYSISalice");
-
- TString mode(runMode);
- mode.ToLower();
- Bool_t proof = mode.Contains("proof");
- if (proof) {
- gROOT->LoadMacro("$ALICE_ROOT/PWG2/FORWARD/analysis2/scripts/LoadPars.C");
- LoadPars(0);
- }
-
-
- // --- Creating the manager and handlers ---------------------------
- AliAnalysisManager *mgr = new AliAnalysisManager("Analysis Train",
- "FMD analysis train");
-
- // --- ESD input handler -------------------------------------------
- AliESDInputHandler *esdHandler = new AliESDInputHandler();
- esdHandler->SetInactiveBranches("AliESDACORDE "
- "AliRawDataErrorLogs "
- "CaloClusters "
- "Cascades "
- "EMCALCells "
- "EMCALTrigger "
- "Kinks "
- "Cascades "
- "MuonTracks "
- "TrdTracks "
- "HLTGlobalTrigger");
- mgr->SetInputEventHandler(esdHandler);
-
- // --- Monte Carlo handler -----------------------------------------
- if (mc) {
- AliMCEventHandler* mcHandler = new AliMCEventHandler();
- mgr->SetMCtruthEventHandler(mcHandler);
- mcHandler->SetReadTR(true);
- }
-
- // --- AOD output handler ------------------------------------------
- AliAODHandler* aodHandler = new AliAODHandler();
- mgr->SetOutputEventHandler(aodHandler);
- aodHandler->SetOutputFileName("AliAODs.root");
-
- // --- What to do --------------------------------------------------
- TString anaName("FMD");
- TString swhat(what);
- swhat.ToLower();
- if (swhat.Contains("aod")) {
- // --- Add tasks ---------------------------------------------------
- // Physics selection
- gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskPhysicsSelection.C");
- AddTaskPhysicsSelection(mc, kTRUE, kTRUE);
-
-
- // FMD
- gROOT->LoadMacro("$ALICE_ROOT/PWG2/FORWARD/analysis2/AddTaskForwardMult.C");
- AddTaskForwardMult(mc);
- anaName = "FMD_AOD";
- }
- else if (swhat.Contains("eloss")) {
- // FMD Eloss fitter
- gROOT->LoadMacro("$ALICE_ROOT/PWG2/FORWARD/analysis2/AddTaskFMDELoss.C");
- AddTaskFMDELoss(mc);
-
- anaName = "FMD_ELoss";
- }
- else if (swhat.Contains("corr")) {
- gROOT->LoadMacro("$ALICE_ROOT/PWG2/FORWARD/analysis2/AddTaskFMDCorr.C");
- AddTaskFMDCorr();
-
- anaName = "FMD_Corr";
- }
-
-
- // --- Create the plug-in object -----------------------------------
- TString mode(runMode); mode.ToLower();
- TString dir(dataDir);
- TString anaSource("");
- TString addLibs("");
- TString aliceTag("v4-21-04-AN");
- TString rootTag("v5-27-06b");
- TString apiTag("V1.1x");
- TArrayI runs; // <-- Add run numbers to this array
- /* For example
- *
- * runs.Resize(118560-118506+1);
- * for (Int_t r = 118506; r <= 118560; r++)
- * runs.AddAt(r-118506,r);
- */
- AliAnalysisAlien* alienHandler = CreateAlienHandler(mode,
- dir,
- runs,
- anaSource,
- addLibs,
- anaName,
- proof,
- aliceTag,
- rootTag,
- apiTag);
- if (!alienHandler) {
- Error("RunViaPlugin.C", "Failed to make plugin");
- return;
- }
- mgr->SetGridHandler(alienHandler);
-
- // --- final job setup and execution -------------------------------
- // Enable debug printouts
- // mgr->SetDebugLevel(2);
- if (!mgr->InitAnalysis()) {
- Error("RunViaPlugin.C", "Failed to initialise the train");
- return;
- }
- if (nEvents <= 0) nEvents = 1234567890;
- TString amode("grid");
- mode.ToLower();
- if (mode.Contains("test")) amode = local;
-
- mgr->PrintStatus();
- mgr->StartAnalysis(amode.Data(), nEvents);
-}
-
-//____________________________________________________________________
-/**
- * Create an AliAnalysisGrid parameter object
- *
- * @param runMode Running mode (full, test, terminate, submit, offline)
- * @param dataDir Input data directory
- * @param anaSource Possible source to compile on worker node
- * (must also be compiled and addet to train on
- * submitter machine)
- * @param addLibs Extra libraries to add
- * @param anaName Analysis name (i.e., script created)
- * @param aliceTag Tag on AliROOT
- * @param rootTag Tag on ROOT
- * @param apiTag AliEN tag
- *
- * @return Valid object or null
- */
-AliAnalysisAlien*
-CreateAlienHandler(const TString& runMode,
- const TString& dataDir,
- const TArrayI& runs,
- const TString& anaSource,
- const TString& addLibs,
- const TString& anaName,
- Bool_t usePars,
- const TString& aliceTag,
- const TString& rootTag,
- const TString& apiTag)
-{
- AliAnalysisAlien *plugin = new AliAnalysisAlien();
-
- // Overwrite all generated files, datasets and output
- // results from a previous session
- plugin->SetOverwriteMode();
-
- // Set tag on job
- TString tag(anaName);
- tag.Append(" job");
- plugin->SetJobTag(tag);
-
- // Set the running mode
- plugin->SetRunMode(runMode.Data());
-
- // Add path to our headers
- plugin->AddIncludePath("-I$ALICE_ROOT/PWG2/FORWARD/analysis2");
-
- // Set versions of used packages
- plugin->SetAPIVersion(apiTag);
- plugin->SetROOTVersion(rootTag);
- plugin->SetAliROOTVersion(aliceTag);
-
- // Define production directory LFN
- plugin->SetGridDataDir(dataDir.Data());
-
- // Set data search pattern
- plugin->SetDataPattern("*ESDs*.root");
-
- // Use ESD tags (same applies for AOD's)
- //plugin->SetDataPattern("*tag.root");
-
- // File used in test mode
- plugin->SetFileForTestMode("testFiles");
-
- // ...then add run numbers to be considered
- // If not set all runs proccessed
- for (Int_t i = 0; i < runs.fN; i++)
- plugin->AddRunNumber(runs.fArray[i]);
-
- // Set events to run over for each file !!!
- //plugin->SetRunRange(0, 10);
-
- // Define alien work directory where all files will be copied.
- // Relative to alien $HOME.
- TString work(anaName);
- work.Append("_work");
- plugin->SetGridWorkingDir(work.Data());
-
- // Declare alien output directory. Relative to working directory.
- TString outputDir(anaName);
- outputDir.Append("_out");
- plugin->SetGridOutputDir(outputDir.Data());
-
- // Write to a single folder
- plugin->SetOutputSingleFolder(outputDir.Data());
- plugin->SetOutputToRunNo();
-
- // Declare the analysis source files names separated by blancs.
- // To be compiled runtime using ACLiC on the worker nodes.
- if (!anaSource.IsNull())
- plugin->SetAnalysisSource(anaSource.Data());
-
- // Declare all libraries (other than the default ones for the framework.
- // These will be loaded by the generated analysis macro.
- // Add all extra files (task .cxx/.h) here.
- if (!addLibs.IsNull())
- plugin->SetAdditionalLibs(addLibs.Data());
-
- // Load PAR files
- if (usePars) {
- plugin->EnablePackage("STEERBase");
- plugin->EnablePackage("ESD");
- plugin->EnablePackage("AOD");
- plugin->EnablePackage("ANALYSIS");
- plugin->EnablePackage("ANALYSISalice");
- plugin->EnablePackage("PWG2forward2");
- }
-
- // No need for output file names. Procedure is automatic.
- // It's works better this way
- plugin->SetDefaultOutputs(kTRUE);
-
- // Set a name for the generated analysis macro (default MyAnalysis.C).
- // Make this unique !!!
- TString macroName(anaName);
- macroName += "Task.C";
- plugin->SetAnalysisMacro(macroName.Data());
-
- // Optionally set maximum number of input files/subjob (default 100,
- // put 0 to ignore)
- plugin->SetSplitMaxInputFileNumber(100);
-
- // Optionally set number of failed jobs that will trigger killing
- // waiting sub-jobs.
- plugin->SetMaxInitFailed(5);
-
- // Optionally resubmit threshold.
- plugin->SetMasterResubmitThreshold(90);
-
- // Optionally set time to live (default 30000 sec)
- plugin->SetTTL(20000);
-
- // Optionally set input format (default xml-single)
- plugin->SetInputFormat("xml-single");
-
- // Optionally modify the name of the generated JDL (default analysis.jdl)
- TString jdlName(anaName);
- jdlName.Append(".jdl");
- plugin->SetJDLName(jdlName.Data());
-
- // Optionally modify job price (default 1)
- plugin->SetPrice(1);
-
- // Optionally modify split mode (default 'se')
- plugin->SetSplitMode("se");
-
- // connect to manager
- // AliAnalysisManager* mgr = AliAnalysisManager::Instance();
- // mgr->SetGridHandler(plugin);
-
- return plugin;
-}
-
-//____________________________________________________________________
-//
-// EOF
-//
/**
* A simple script to draw results from MakedNdeta.C (or similar)
*
+ * @ingroup pwg2_forward_analysis_scripts
*/
/**
* Get a stack from the passed list
* @param rebin Optional rebinning - must exists in list
*
* @return Stack or null
+ *
+ * @ingroup pwg2_forward_analysis_scripts
*/
THStack*
GetStack(const TList* list, const char* name, Int_t rebin)
return static_cast<THStack*>(o);
}
+/**
+ * Get a histogram from a list
+ *
+ * @param list List
+ * @param name Name of histogram
+ * @param rebin Rebinning factor
+ *
+ * @return Histogram or null
+ *
+ * @ingroup pwg2_forward_analysis_scripts
+ */
TH1*
GetHist(const TList* list, const char* name, Int_t rebin)
{
* @param rebin Optional rebinning - must exists in list
*
* @return Added stack or null
+ *
+ * @ingroup pwg2_forward_analysis_scripts
*/
THStack*
AddStack(THStack* p, const TList* list, const char* name, Int_t rebin)
* Build up a centrality legend
*
* @param c Centrality axis
+ *
+ * @ingroup pwg2_forward_analysis_scripts
*/
void
BuildCentLegend(const TAxis* c)
*
* @param stack Stack of histograms
* @param c Centrality axis. If present, markers are black
+ *
+ * @ingroup pwg2_forward_analysis_scripts
*/
void
BuildLegend(const THStack* stack, const TAxis* c)
l2->Draw();
}
+/**
+ * Add additional information
+ *
+ * @param forward List of info
+ * @param prelim Preliminary mark
+ */
void
AddInformation(TList* forward, bool prelim=true)
{
ltx->DrawLatex(x, y, sch->GetTitle());
}
+/**
+ * A function (double Gaussian)
+ *
+ * @param xp Independent variables
+ * @param pp Parameters
+ *
+ * @return Value of function
+ *
+ * @ingroup pwg2_forward_analysis_scripts
+ */
Double_t myFunc(Double_t* xp, Double_t* pp)
{
Double_t x = xp[0];
return a1*(TMath::Gaus(x, 0, s1) - a2 * TMath::Gaus(x, 0, s2));
}
+/**
+ * Make systematic error band
+ *
+ * @param cen Central result
+ * @param fwd Forward result
+ * @param sysErr Systematic error (fractional)
+ *
+ * @return
+ *
+ * @ingroup pwg2_forward_analysis_scripts
+ */
TH1*
MakeSysError(const TH1* cen, const TH1* fwd, Double_t sysErr=0.7)
{
*
* @param rebin Rebinnig. Note, the data must be present in the file
* @param filename File to open and draw stuff from >
+ *
+ * @ingroup pwg2_forward_analysis_scripts
*/
void
SimpledNdeta(Int_t what=0x5,
+/**
+ * Draw final plot for QM2011
+ *
+ * @param max
+ *
+ * @ingroup pwg2_forward_analysis_scripts
+ */
void
dndeta_final(Double_t max=6)
{
}
+//
+// EOF
+//
#include <TCanvas.h>
#include <TH2F.h>
#include <THStack.h>
+/**
+ * @defgroup pwg2_forward_analysis_scripts_tests Test scripts
+ *
+ *
+ *
+ * @ingroup pwg2_forward_analysis_scripts
+ */
+
+/**
+ *
+ *
+ * @param r
+ * @param t
+ * @param oldm
+ * @param newm
+ *
+ * @ingroup pwg2_forward_analysis_scripts_tests
+ */
//_____________________________________________________________________
void AcceptanceCorrection(Char_t r, UShort_t t, Float_t& oldm, Float_t& newm)
{
oldm = area/basearea;
}
+/**
+ *
+ *
+ * @param r
+ * @param dt
+ * @param offT
+ * @ingroup pwg2_forward_analysis_scripts_tests
+ */
void DrawSolution(Char_t r, UShort_t dt=16, UShort_t offT=128)
{
TCanvas* c = new TCanvas(Form("c%c", r), r == 'I' ?
c->cd();
}
-
+/**
+ *
+ *
+ * @ingroup pwg2_forward_analysis_scripts_tests
+ */
void TestAcc()
{
TCanvas* c = new TCanvas("c", "C");
c2->cd();
}
+//
+// EOF
+//
static Double_t landauGausI(Double_t* xp, Double_t* pp);
//====================================================================
+/**
+ *
+ *
+ * @ingroup pwg2_forward_analysis_scripts_tests
+ */
struct Function
{
/**
#endif
//====================================================================
+/**
+ *
+ *
+ *
+ * @ingroup pwg2_forward_analysis_scripts_tests
+ */
struct Fitter
{
// --- Object code ------------------------------------------------
* @param pp Pointer to parameters
*
* @return Function evaluated at xp[0]
+ *
+ * @ingroup pwg2_forward_analysis_scripts_tests
*/
static Double_t landauGaus1(Double_t* xp, Double_t* pp)
{
* @param pp Pointer to parameters
*
* @return Function evaluated at xp[0]
+ *
+ * @ingroup pwg2_forward_analysis_scripts_tests
*/
static Double_t landauGausN(Double_t* xp, Double_t* pp)
{
* @param pp Pointer to parameters
*
* @return Function evaluated at xp[0]
+ *
+ * @ingroup pwg2_forward_analysis_scripts_tests
*/
static Double_t landauGausI(Double_t* xp, Double_t* pp)
{
/**
*
*
+ *
+ * @ingroup pwg2_forward_analysis_scripts_tests
*/
struct Generator
{
}
};
-
+/**
+ * Test the energy loss fits
+ *
+ * @param type Output graphics type
+ *
+ * @ingroup pwg2_forward_analysis_scripts_tests
+ */
void
TestELossDist(const char* type="png")
{
* @deprecated
* This is a simple test script
*
- * @ingroup pwg2_forward_analysis_scripts
+ * @ingroup pwg2_forward_analysis_scripts_tests
*/
#ifndef __CINT__
# include "AliForwardUtil.h"
* @deprecated
* This is a simple test script
*
- * @ingroup pwg2_forward_analysis_scripts
+ * @ingroup pwg2_forward_analysis_scripts_tests
*/
TH1* GetEDist(TList* ef, UShort_t d, Char_t r, UShort_t etabin)
{
* @deprecated
* This is a simple test script
*
- * @ingroup pwg2_forward_analysis_scripts
+ * @ingroup pwg2_forward_analysis_scripts_tests
*/
TH1* GetEDist(TList* ef, UShort_t d, Char_t r, Float_t eta)
{
* @deprecated
* This is a simple test script
*
- * @ingroup pwg2_forward_analysis_scripts
+ * @ingroup pwg2_forward_analysis_scripts_tests
*/
TList* GetEF(TFile* file)
{
* @deprecated
* This is a simple test script
*
- * @ingroup pwg2_forward_analysis_scripts
+ * @ingroup pwg2_forward_analysis_scripts_tests
*/
TList* CheckEF()
{
* @deprecated
* This is a simple test script
*
- * @ingroup pwg2_forward_analysis_scripts
+ * @ingroup pwg2_forward_analysis_scripts_tests
*/
TCanvas* CheckC()
{
* @deprecated
* This is a simple test script
*
- * @ingroup pwg2_forward_analysis_scripts
+ * @ingroup pwg2_forward_analysis_scripts_tests
*/
void PrintFit(TF1* f)
{
* @deprecated
* This is a simple test script
*
- * @ingroup pwg2_forward_analysis_scripts
+ * @ingroup pwg2_forward_analysis_scripts_tests
*/
void TestFitELoss(Int_t n, UShort_t d, Char_t r, Float_t eta)
{
* The class AliFMDELossFitter automatically generates the
* AliFMDCorrELossFit object.
*
- * @ingroup pwg2_forward_analysis_scripts
+ * @ingroup pwg2_forward_analysis_scripts_tests
*/
class MakeELossFit
+/**
+ *
+ *
+ * @ingroup pwg2_forward_analysis_scripts_tests
+ */
namespace {
enum {
kSolid = 0x000,
kCross = 0x00c,
kStar = 0x00e
};
+ /**
+ *
+ *
+ * @param bits
+ *
+ * @return
+ * @ingroup pwg2_forward_analysis_scripts_tests
+ */
Int_t MarkerStyle(UInt_t bits)
{
Int_t base = bits & (0xFE);
}
return 1;
}
+ /**
+ *
+ *
+ * @param style
+ *
+ * @return
+ * @ingroup pwg2_forward_analysis_scripts_tests
+ */
UShort_t MarkerBits(Int_t style)
{
UShort_t bits = 0;
}
return bits;
}
+ /**
+ *
+ *
+ * @param style
+ *
+ * @return
+ * @ingroup pwg2_forward_analysis_scripts_tests
+ */
Int_t FlipHollow(Int_t style)
{
UShort_t bits = MarkerBits(style);
}
}
+/**
+ *
+ *
+ * @param what
+ * @param base
+ * @param y
+ * @ingroup pwg2_forward_analysis_scripts_tests
+ */
void DrawOne(const char* what, UShort_t base, Double_t y)
{
TLatex* l = new TLatex(.07, y, what);
}
+//
+// EOF
+//
+/**
+ *
+ *
+ * @param nBins
+ * @param min
+ * @param max
+ *
+ * @ingroup pwg2_forward_analysis_scripts_tests
+ */
void
MakeIntegerAxis(Int_t& nBins, Double_t& min, Double_t& max)
{
nBins = nBins + 1;
}
+/**
+ *
+ *
+ * @param o
+ * @param useWeights
+ *
+ * @ingroup pwg2_forward_analysis_scripts_tests
+ */
void
TestPoisson(Double_t o=.3, bool useWeights=false)
{
* @param mc Whether this is for Monte-Carlo data
* @param filename Input file name
*
- * @ingroup pwg2_forward_analysis_scripts
+ * @ingroup pwg2_forward_analysis_scripts_tests
*
* @depcrecated
* The class AliFMDELossFitter automatically generates the
+/**
+ * Build (compile) a train script
+ *
+ * @param script Script to compile
+ * @param extra Extra stuff for AcLic ("", "+", or "+g")
+ * @param useTmp Use a temporary file
+ *
+ * @return
+ *
+ * @ingroup pwg2_forward_trains
+ */
Bool_t
BuildTrain(const char* script, const char* extra="", Bool_t useTmp=false)
{
* t.Run("LOCAL", "FULL", -1, false, false);
* @endcode
*
- * @ingroup pwg2_forward_scripts_makers
* @ingroup pwg2_forward_aod
+ * @ingroup pwg2_forward_trains
*/
class MakeAODTrain : public TrainSetup
{
/**
* Analysis train to do energy loss fits
*
- * @ingroup pwg2_forward_scripts_makers
+ * @ingroup pwg2_forward_trains
*/
class MakeFMDELossTrain : public TrainSetup
{
* t.Run("LOCAL", "FULL", -1, false, false);
* @endcode
*
- * @ingroup pwg2_forward_scripts_makers
* @ingroup pwg2_forward_mc
+ * @ingroup pwg2_forward_trains
*/
class MakeMCCorrTrain : public TrainSetup
{
* t.Run("LOCAL", "FULL", -1, false, false);
* @endcode
*
- * @ingroup pwg2_forward_scripts_makers
* @ingroup pwg2_forward_dndeta
+ * @ingroup pwg2_forward_trains
*/
class MakedNdetaTrain : public TrainSetup
{
+/**
+ * @ingroup pwg2_forward_trains Trains
+ *
+ * @ingroup pwg2_forward
+ */
/**
* @file TrainSetup.C
* @author Christian Holm Christensen <cholm@dalsgaard.hehi.nbi.dk>
*
* @brief
*
- * @ingroup pwg2_forward_scripts_makers
+ * @ingroup pwg2_forward_trains
*
*/
* Root> gROOT->LoadMacro("TrainSetup.C+");
* @endverbatim
*
- * @ingroup pwg2_forward_scripts_makers
+ *
+ * @ingroup pwg2_forward_trains
*
*/
struct TrainSetup