AliPhysics  45476af (45476af)
AliMTRChEffAnalysis Class Reference

Output for Trig chamber effieincy. More...

#include <AliMTRChEffAnalysis.h>

Inheritance diagram for AliMTRChEffAnalysis:

Classes

class  AliMTRChEffInnerObj
 

Public Member Functions

 AliMTRChEffAnalysis ()
 
 AliMTRChEffAnalysis (const char *localFileList, const char *outputName="testMTRChamberEff")
 
TArrayI GetHomogeneousRanges (Double_t chi2Cut=3, Int_t maxNRanges=4, Double_t minEffVariation=0.005, Bool_t perRPC=kTRUE, TArrayI *forcedChanges=0x0, Double_t minEff=0.85, Double_t maxEff=1.01)
 
TArrayI GetHomogeneousRanges (TGraphAsymmErrors *trendGraph, Double_t chi2Cut=3, Int_t maxNRanges=4, Double_t minEffVariation=0.005, TArrayI *forcedChanges=0x0, Bool_t returnIndex=kFALSE)
 
void DrawEffTrend (Int_t itype, Int_t irpc, Double_t maxNsigmasOutliers=-1., Double_t minEff=0.8, Double_t maxEff=1.01) const
 
void DrawStatContribution (Int_t itype, Int_t irpc, Double_t maxNsigmaOutliers=-1., Double_t minY=0., Double_t maxY=0.15) const
 
Double_t GetAverageStat (Int_t firstRun, Int_t lastRun, Int_t itype=AliTrigChEffOutput::kHboardEff, Bool_t excludePeriphericBoards=kTRUE) const
 
TGraphAsymmErrorsGetOutliers (TGraphAsymmErrors *graph, Double_t maxNsigmas=3.) const
 
TH1GetTrend (Int_t itype, Int_t icount, Int_t ichamber, Int_t idetelem) const
 
TGraphAsymmErrorsGetTrendEff (Int_t itype, Int_t icount, Int_t ichamber, Int_t idetelem) const
 
Int_t CompareEfficiencies (const char *sources, const char *titles, const char *opt, const char *canvasNameSuffix="") const
 
Int_t CompareEfficiencyMethods (const char *source, const char *opt, const char *canvasNameSuffix="") const
 
void CompareMergedEfficiencies (const char *opt) const
 
Int_t ComputeAndCompareEfficiencies (const char *sources, const char *titles, const char *opt, const char *canvasNameSuffix="") const
 
Bool_t AddSystematicCondition (const char *physSel, const char *trigClassName, const char *centrality, Int_t itrackSel, Int_t imatch, Int_t imethod)
 
Bool_t SetDefaultEffConditions ()
 
Bool_t SetEffConditions (const char *physSel, const char *trigClassName, const char *centrality, Int_t itrackSel, Int_t imatch, Int_t imethod)
 
Bool_t MergeOutput (TArrayI runRanges, Double_t averageStatError=0.01, Bool_t isIndex=kFALSE)
 
Bool_t InitFromGrid (const char *runList, const char *path, const char *pattern, const char *localFileList="localFileList.txt", const char *outDir="", const char *directory="MTR_ChamberEffMap", const char *outputName="testMTRChamberEff")
 
Bool_t InitFromLocal (const char *localFileList, const char *outputName="testMTRChamberEff")
 
Bool_t InitFromWeb (const char *runList, const char *path, const char *localFileList="localFileList.txt", const char *outDir="", const char *directory="MTR_ChamberEffMap", const char *outputName="testMTRChamberEff")
 
Bool_t WriteMergedToOCDB (const char *outputCDB="CDB", Bool_t writeSystematics=kFALSE) const
 
Bool_t DrawSystematicEnvelope (Bool_t perRPC=kFALSE) const
 
Bool_t BuildSystematicMap ()
 
Bool_t RecoverEfficiency (const char *runList, const char *ocdb, const char *systOcdb, Int_t referenceRun=-1)
 
virtual ~AliMTRChEffAnalysis ()
 

Static Public Member Functions

static void ZoomPad ()
 

Private Member Functions

Bool_t AddToList (const char *filename, const char *outputName)
 
TArrayI BoardsInRPC (Int_t irpc) const
 
void CopyDir (TDirectory *source) const
 
Bool_t CopyLocally (const char *runList, const char *path, const char *pattern, const char *localFileList, const char *outDir, const char *directory) const
 
Int_t Check () const
 
Int_t CompareEfficiencies (TObjArray *effHistoLists, const char *titles, const char *opt, const char *canvasNameSuffix) const
 
TListCloneEffHistoList (TList *effHistos) const
 
Bool_t ExecCommand (TString command, Bool_t prompt) const
 
Double_t FitRangesFunc (Double_t *x, Double_t *par)
 
Double_t GetError (Double_t errLow, Double_t errHigh) const
 
TListGetEffHistoList (AliTrigChEffOutput *trigOut, TObjArray *condition) const
 
TH1GetHisto (TList *effHistoList, Int_t itype, Int_t icount, Int_t ichamber) const
 
Int_t GetIndexFromRun (Int_t runNumber) const
 
Int_t GetRunNumber (Int_t ipt) const
 
TListGetRunList (const char *runList) const
 
TString GetId (const char *condition, Int_t minRun, Int_t maxRun=-1) const
 
TString GetShortConditionTitle (const char *conditionName) const
 
AliTrigChEffOutputNamer () const
 
TH1GetSum (AliTrigChEffOutput *trigOut, TObjArray *condition, Int_t itype, Int_t icount, Int_t ichamber) const
 
Double_t GetThreeOfFour (TArrayD eff, TArrayD effErr, Double_t &probErr) const
 
Bool_t HasMergedResults () const
 
TArrayI MergeRangesForStat (TArrayI runRanges, Double_t averageStatError, Bool_t excludePeriphericBoards=kTRUE) const
 
TListReadEffHistoList (const char *src) const
 
Bool_t SetCondition (const char *physSel, const char *trigClassName, const char *centrality, Int_t itrackSel, Int_t imatch, Int_t imethod, Bool_t isBasic)
 
 AliMTRChEffAnalysis (const AliMTRChEffAnalysis &)
 Dummy. More...
 
AliMTRChEffAnalysisoperator= (const AliMTRChEffAnalysis &)
 Dummy. More...
 

Private Attributes

TObjArrayfConditions
 ! List of conditions for trigger efficiency More...
 
AliTrigChEffOutputfNamer
 ! Namer for histograms More...
 
std::vector< AliMTRChEffAnalysis::AliMTRChEffInnerObj * > fRunMap
 ! Map of internal objects per run More...
 
std::vector< AliMTRChEffAnalysis::AliMTRChEffInnerObj * > fMergedMap
 ! Map of merged internal objects More...
 

Detailed Description

Output for Trig chamber effieincy.

The class manipulates the output of AliAnalysisTaskTrigChEff in order to build the trigger chamber efficiency object to be plugged in the OCDB for simulations

Author
Diego Stocco dstoc.nosp@m.co@c.nosp@m.ern.c.nosp@m.h, Subatech
Date
Nov 8, 2015

Definition at line 29 of file AliMTRChEffAnalysis.h.

Constructor & Destructor Documentation

AliMTRChEffAnalysis::AliMTRChEffAnalysis ( )

Default Ctor.

Definition at line 72 of file AliMTRChEffAnalysis.cxx.

AliMTRChEffAnalysis::AliMTRChEffAnalysis ( const char *  localFileList,
const char *  outputName = "testMTRChamberEff" 
)

Ctor.

Definition at line 82 of file AliMTRChEffAnalysis.cxx.

AliMTRChEffAnalysis::~AliMTRChEffAnalysis ( )
virtual

Destructor

Definition at line 92 of file AliMTRChEffAnalysis.cxx.

AliMTRChEffAnalysis::AliMTRChEffAnalysis ( const AliMTRChEffAnalysis )
private

Dummy.

Member Function Documentation

Bool_t AliMTRChEffAnalysis::AddSystematicCondition ( const char *  physSel,
const char *  trigClassName,
const char *  centrality,
Int_t  itrackSel,
Int_t  imatch,
Int_t  imethod 
)

Add conditions for the systematic uncertainty estimation

Definition at line 104 of file AliMTRChEffAnalysis.cxx.

Bool_t AliMTRChEffAnalysis::AddToList ( const char *  filename,
const char *  outputName 
)
private

Add to output list

Definition at line 111 of file AliMTRChEffAnalysis.cxx.

Referenced by InitFromLocal(), and SetCondition().

TArrayI AliMTRChEffAnalysis::BoardsInRPC ( Int_t  irpc) const
private

Return boards contained in the specified RPC

Definition at line 147 of file AliMTRChEffAnalysis.cxx.

Referenced by DrawEffTrend(), DrawStatContribution(), and GetHomogeneousRanges().

Bool_t AliMTRChEffAnalysis::BuildSystematicMap ( )

Get systematic envelop for merged efficiencies

Definition at line 237 of file AliMTRChEffAnalysis.cxx.

Int_t AliMTRChEffAnalysis::Check ( ) const
private

Check initialization. Return 0 if everything is ok

Definition at line 343 of file AliMTRChEffAnalysis.cxx.

Referenced by DrawEffTrend(), and GetTrendEff().

TList * AliMTRChEffAnalysis::CloneEffHistoList ( TList effHistos) const
private

Clone efficinecy histo list

Definition at line 223 of file AliMTRChEffAnalysis.cxx.

Referenced by BuildSystematicMap(), ReadEffHistoList(), RecoverEfficiency(), and WriteMergedToOCDB().

Int_t AliMTRChEffAnalysis::CompareEfficiencies ( const char *  sources,
const char *  titles,
const char *  opt,
const char *  canvasNameSuffix = "" 
) const
Int_t AliMTRChEffAnalysis::CompareEfficiencies ( TObjArray effHistoLists,
const char *  titles,
const char *  opt,
const char *  canvasNameSuffix 
) const
private

Compare efficiency objects

Definition at line 378 of file AliMTRChEffAnalysis.cxx.

Int_t AliMTRChEffAnalysis::CompareEfficiencyMethods ( const char *  source,
const char *  opt,
const char *  canvasNameSuffix = "" 
) const

Compare efficiency methods

Definition at line 502 of file AliMTRChEffAnalysis.cxx.

void AliMTRChEffAnalysis::CompareMergedEfficiencies ( const char *  opt) const

Definition at line 533 of file AliMTRChEffAnalysis.cxx.

Int_t AliMTRChEffAnalysis::ComputeAndCompareEfficiencies ( const char *  sources,
const char *  titles,
const char *  opt,
const char *  canvasNameSuffix = "" 
) const

Copute the efficiency for the selected condition and compare them

Definition at line 559 of file AliMTRChEffAnalysis.cxx.

void AliMTRChEffAnalysis::CopyDir ( TDirectory *  source) const
private

copy all objects and subdirs of directory source as a subdir of the current directory

Definition at line 628 of file AliMTRChEffAnalysis.cxx.

Referenced by CopyLocally().

Bool_t AliMTRChEffAnalysis::CopyLocally ( const char *  runList,
const char *  path,
const char *  pattern,
const char *  localFileList,
const char *  outDir,
const char *  directory 
) const
private

Copy files from QA repository or from grid

Definition at line 666 of file AliMTRChEffAnalysis.cxx.

Referenced by InitFromGrid(), and InitFromWeb().

void AliMTRChEffAnalysis::DrawEffTrend ( Int_t  itype,
Int_t  irpc,
Double_t  maxNsigmasOutliers = -1.,
Double_t  minEff = 0.8,
Double_t  maxEff = 1.01 
) const

Draw trenidng

Definition at line 778 of file AliMTRChEffAnalysis.cxx.

Referenced by TrigEffTrending().

void AliMTRChEffAnalysis::DrawStatContribution ( Int_t  itype,
Int_t  irpc,
Double_t  maxNsigmaOutliers = -1.,
Double_t  minY = 0.,
Double_t  maxY = 0.15 
) const

Draw statistical contribution of the element efficiency

Definition at line 866 of file AliMTRChEffAnalysis.cxx.

Bool_t AliMTRChEffAnalysis::DrawSystematicEnvelope ( Bool_t  perRPC = kFALSE) const

Get systematic envelop for merged efficiencies

Definition at line 949 of file AliMTRChEffAnalysis.cxx.

Bool_t AliMTRChEffAnalysis::ExecCommand ( TString  command,
Bool_t  prompt 
) const
private

Execute command

Definition at line 1127 of file AliMTRChEffAnalysis.cxx.

Referenced by CopyLocally(), and WriteMergedToOCDB().

Double_t AliMTRChEffAnalysis::FitRangesFunc ( Double_t x,
Double_t par 
)
private

Function with multiple constant fixes Parameters are: [0] = number of break points dividing 2 sub ranges [1] = value of efficiency in the first (or only) subrange [2*ipar] (for ipar>=1) = position in x where efficiency value can change [2*ipar+1] = value of efficiency in the subrange above [2*ipar]

Definition at line 1150 of file AliMTRChEffAnalysis.cxx.

Referenced by GetHomogeneousRanges().

Double_t AliMTRChEffAnalysis::GetAverageStat ( Int_t  firstRun,
Int_t  lastRun,
Int_t  itype = AliTrigChEffOutput::kHboardEff,
Bool_t  excludePeriphericBoards = kTRUE 
) const

Get the average statistics per local board in the specified run range

Definition at line 1178 of file AliMTRChEffAnalysis.cxx.

Referenced by MergeRangesForStat().

TList * AliMTRChEffAnalysis::GetEffHistoList ( AliTrigChEffOutput trigOut,
TObjArray condition 
) const
private

Get the list of objects for the efficiency calculation

Definition at line 1227 of file AliMTRChEffAnalysis.cxx.

Referenced by AddToList(), CompareEfficiencyMethods(), ComputeAndCompareEfficiencies(), and MergeOutput().

Double_t AliMTRChEffAnalysis::GetError ( Double_t  errLow,
Double_t  errHigh 
) const
private

Get error from the asymmetric error on efficiency

Definition at line 1238 of file AliMTRChEffAnalysis.cxx.

Referenced by CompareEfficiencies(), and DrawSystematicEnvelope().

TH1 * AliMTRChEffAnalysis::GetHisto ( TList effHistoList,
Int_t  itype,
Int_t  icount,
Int_t  ichamber 
) const
private

Get histogram

Definition at line 1245 of file AliMTRChEffAnalysis.cxx.

Referenced by GetAverageStat(), and GetTrend().

TArrayI AliMTRChEffAnalysis::GetHomogeneousRanges ( Double_t  chi2Cut = 3,
Int_t  maxNRanges = 4,
Double_t  minEffVariation = 0.005,
Bool_t  perRPC = kTRUE,
TArrayI forcedChanges = 0x0,
Double_t  minEff = 0.85,
Double_t  maxEff = 1.01 
)

Get run ranges with an efficiency compatible with constant

Definition at line 1253 of file AliMTRChEffAnalysis.cxx.

TArrayI AliMTRChEffAnalysis::GetHomogeneousRanges ( TGraphAsymmErrors trendGraph,
Double_t  chi2Cut = 3,
Int_t  maxNRanges = 4,
Double_t  minEffVariation = 0.005,
TArrayI forcedChanges = 0x0,
Bool_t  returnIndex = kFALSE 
)

Get run ranges with an efficiency compatible with constant

Definition at line 1400 of file AliMTRChEffAnalysis.cxx.

TString AliMTRChEffAnalysis::GetId ( const char *  condition,
Int_t  minRun,
Int_t  maxRun = -1 
) const
private

Get identifier for object in internal map

Definition at line 1518 of file AliMTRChEffAnalysis.cxx.

Int_t AliMTRChEffAnalysis::GetIndexFromRun ( Int_t  runNumber) const
private

Get index from run number

Definition at line 1526 of file AliMTRChEffAnalysis.cxx.

Referenced by AddToList(), and GetHomogeneousRanges().

TGraphAsymmErrors * AliMTRChEffAnalysis::GetOutliers ( TGraphAsymmErrors graph,
Double_t  maxNsigmas = 3. 
) const

Get outliers

Definition at line 1539 of file AliMTRChEffAnalysis.cxx.

Referenced by DrawEffTrend(), and DrawStatContribution().

TList * AliMTRChEffAnalysis::GetRunList ( const char *  runList) const
private

Get run number in string

Definition at line 1572 of file AliMTRChEffAnalysis.cxx.

Referenced by CopyLocally(), and RecoverEfficiency().

Int_t AliMTRChEffAnalysis::GetRunNumber ( Int_t  ipt) const
private

Get run number from graph

Definition at line 1564 of file AliMTRChEffAnalysis.cxx.

Referenced by GetHomogeneousRanges(), and MergeOutput().

TString AliMTRChEffAnalysis::GetShortConditionTitle ( const char *  conditionName) const
private

Get short condition title

Definition at line 1603 of file AliMTRChEffAnalysis.cxx.

Referenced by CompareEfficiencyMethods(), and DrawSystematicEnvelope().

TH1 * AliMTRChEffAnalysis::GetSum ( AliTrigChEffOutput trigOut,
TObjArray condition,
Int_t  itype,
Int_t  icount,
Int_t  ichamber 
) const
private

Get sum histogram

Definition at line 1631 of file AliMTRChEffAnalysis.cxx.

Double_t AliMTRChEffAnalysis::GetThreeOfFour ( TArrayD  eff,
TArrayD  effErr,
Double_t probErr 
) const
private

Get probability of firing 3 chambers out of 4

Definition at line 1704 of file AliMTRChEffAnalysis.cxx.

Referenced by DrawSystematicEnvelope().

TH1 * AliMTRChEffAnalysis::GetTrend ( Int_t  itype,
Int_t  icount,
Int_t  ichamber,
Int_t  idetelem 
) const

Get trending histogram

Definition at line 1642 of file AliMTRChEffAnalysis.cxx.

Referenced by DrawStatContribution(), and GetTrendEff().

TGraphAsymmErrors * AliMTRChEffAnalysis::GetTrendEff ( Int_t  itype,
Int_t  icount,
Int_t  ichamber,
Int_t  idetelem 
) const

Get trending histogram

Definition at line 1677 of file AliMTRChEffAnalysis.cxx.

Referenced by DrawEffTrend(), and GetHomogeneousRanges().

Bool_t AliMTRChEffAnalysis::HasMergedResults ( ) const
private

Check if merged results are present

Definition at line 1726 of file AliMTRChEffAnalysis.cxx.

Referenced by BuildSystematicMap(), CompareMergedEfficiencies(), DrawSystematicEnvelope(), RecoverEfficiency(), and WriteMergedToOCDB().

Bool_t AliMTRChEffAnalysis::InitFromGrid ( const char *  runList,
const char *  path,
const char *  pattern,
const char *  localFileList = "localFileList.txt",
const char *  outDir = "",
const char *  directory = "MTR_ChamberEffMap",
const char *  outputName = "testMTRChamberEff" 
)

Search for results on grid

Definition at line 1776 of file AliMTRChEffAnalysis.cxx.

Bool_t AliMTRChEffAnalysis::InitFromLocal ( const char *  localFileList,
const char *  outputName = "testMTRChamberEff" 
)

Initialize output list

Definition at line 1737 of file AliMTRChEffAnalysis.cxx.

Referenced by AliMTRChEffAnalysis(), InitFromGrid(), InitFromWeb(), and TrigEffTrending().

Bool_t AliMTRChEffAnalysis::InitFromWeb ( const char *  runList,
const char *  path,
const char *  localFileList = "localFileList.txt",
const char *  outDir = "",
const char *  directory = "MTR_ChamberEffMap",
const char *  outputName = "testMTRChamberEff" 
)

Search for results on grid

Definition at line 1784 of file AliMTRChEffAnalysis.cxx.

Bool_t AliMTRChEffAnalysis::MergeOutput ( TArrayI  runRanges,
Double_t  averageStatError = 0.01,
Bool_t  isIndex = kFALSE 
)

Merge efficiency output

Definition at line 1792 of file AliMTRChEffAnalysis.cxx.

TArrayI AliMTRChEffAnalysis::MergeRangesForStat ( TArrayI  runRanges,
Double_t  averageStatError,
Bool_t  excludePeriphericBoards = kTRUE 
) const
private

Definition at line 1855 of file AliMTRChEffAnalysis.cxx.

Referenced by MergeOutput().

AliTrigChEffOutput * AliMTRChEffAnalysis::Namer ( ) const
private
AliMTRChEffAnalysis& AliMTRChEffAnalysis::operator= ( const AliMTRChEffAnalysis )
private

Dummy.

TList * AliMTRChEffAnalysis::ReadEffHistoList ( const char *  src) const
private

Read efficiency map from OCDB or from file

Definition at line 1916 of file AliMTRChEffAnalysis.cxx.

Referenced by CompareEfficiencies(), and RecoverEfficiency().

Bool_t AliMTRChEffAnalysis::RecoverEfficiency ( const char *  runList,
const char *  ocdb,
const char *  systOcdb,
Int_t  referenceRun = -1 
)

Search for chambers with unknown efficiencies (this happens when one local board is dead) and attribute the efficiency measured in the past In particular, the efficiency of the run referenceRun will be used. If this vaue is negative, then the last run in the runList will be used for the new efficiency Include the fluctuation of efficiency over the specified run list as an additional systematic uncertainty

Definition at line 1962 of file AliMTRChEffAnalysis.cxx.

Bool_t AliMTRChEffAnalysis::SetCondition ( const char *  physSel,
const char *  trigClassName,
const char *  centrality,
Int_t  itrackSel,
Int_t  imatch,
Int_t  imethod,
Bool_t  isBasic 
)
private

Select the conditions for the efficiency estimation

Definition at line 2080 of file AliMTRChEffAnalysis.cxx.

Referenced by AddSystematicCondition(), and SetEffConditions().

Bool_t AliMTRChEffAnalysis::SetDefaultEffConditions ( )

Set default conditions for efficiency estimation

Definition at line 2142 of file AliMTRChEffAnalysis.cxx.

Referenced by InitFromLocal().

Bool_t AliMTRChEffAnalysis::SetEffConditions ( const char *  physSel,
const char *  trigClassName,
const char *  centrality,
Int_t  itrackSel,
Int_t  imatch,
Int_t  imethod 
)

Select the conditions for the efficiency estimation

Definition at line 2150 of file AliMTRChEffAnalysis.cxx.

Referenced by SetDefaultEffConditions(), and TrigEffTrending().

Bool_t AliMTRChEffAnalysis::WriteMergedToOCDB ( const char *  outputCDB = "CDB",
Bool_t  writeSystematics = kFALSE 
) const

Create the OCDB objects

Definition at line 2157 of file AliMTRChEffAnalysis.cxx.

void AliMTRChEffAnalysis::ZoomPad ( )
static

Definition at line 2230 of file AliMTRChEffAnalysis.cxx.

Member Data Documentation

std::vector<AliMTRChEffAnalysis::AliMTRChEffInnerObj*> AliMTRChEffAnalysis::fMergedMap
private
AliTrigChEffOutput* AliMTRChEffAnalysis::fNamer
mutableprivate

! Namer for histograms

Definition at line 114 of file AliMTRChEffAnalysis.h.

Referenced by Namer(), and ~AliMTRChEffAnalysis().

std::vector<AliMTRChEffAnalysis::AliMTRChEffInnerObj*> AliMTRChEffAnalysis::fRunMap
private

The documentation for this class was generated from the following files: