![]() |
AliPhysics
eae49ab (eae49ab)
|
Output for Trig chamber effieincy. More...
#include <AliMTRChEffAnalysis.h>
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) |
Bool_t | CheckRanges (TArrayI runRanges) const |
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 |
TGraphAsymmErrors * | GetOutliers (TGraphAsymmErrors *graph, Double_t maxNsigmas=3.) const |
TH1 * | GetTrend (Int_t itype, Int_t icount, Int_t ichamber, Int_t idetelem) const |
TGraphAsymmErrors * | GetTrendEff (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 | PatchEfficiency (const char *effToModify, const char *fromEff, const char *boardsToPatch, const char *outFilename) const |
Bool_t | AdditionalSystematics (const char *additionalSystematics, const char *affectedBoards) 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 | WriteToOCDB (const char *inFilename, const char *outputCDB, Int_t firstRun, Int_t lastRun, const char *defaultOCDB="local://$ALIROOT_OCDB_ROOT/OCDB") 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 |
TList * | CloneEffHistoList (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 |
TList * | GetEffHistoList (AliTrigChEffOutput *trigOut, TObjArray *condition) const |
TH1 * | GetHisto (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 |
TList * | GetRunList (const char *runList) const |
TString | GetId (const char *condition, Int_t minRun, Int_t maxRun=-1) const |
TString | GetShortConditionTitle (const char *conditionName) const |
AliTrigChEffOutput * | Namer () const |
TH1 * | GetSum (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 |
Bool_t | PatchEffLists (TList *listToModify, TList *fromList, const char *boardsToPatch) const |
TList * | ReadEffHistoList (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) |
Bool_t | WriteToOCDB (TList *effHistos, const char *outputCDB, Int_t firstRun, Int_t lastRun, const char *defaultOCDB="local://$ALIROOT_OCDB_ROOT/OCDB") const |
AliMTRChEffAnalysis (const AliMTRChEffAnalysis &) | |
Dummy. More... | |
AliMTRChEffAnalysis & | operator= (const AliMTRChEffAnalysis &) |
Dummy. More... | |
Private Attributes | |
TObjArray * | fConditions |
! List of conditions for trigger efficiency More... | |
AliTrigChEffOutput * | fNamer |
! 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... | |
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
Definition at line 29 of file AliMTRChEffAnalysis.h.
AliMTRChEffAnalysis::AliMTRChEffAnalysis | ( | ) |
Default Ctor.
Definition at line 75 of file AliMTRChEffAnalysis.cxx.
AliMTRChEffAnalysis::AliMTRChEffAnalysis | ( | const char * | localFileList, |
const char * | outputName = "testMTRChamberEff" |
||
) |
Ctor.
Definition at line 85 of file AliMTRChEffAnalysis.cxx.
|
virtual |
Destructor
Definition at line 95 of file AliMTRChEffAnalysis.cxx.
|
private |
Dummy.
Bool_t AliMTRChEffAnalysis::AdditionalSystematics | ( | const char * | additionalSystematics, |
const char * | affectedBoards | ||
) | const |
Add systematic uncertainties
Definition at line 2014 of file AliMTRChEffAnalysis.cxx.
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 107 of file AliMTRChEffAnalysis.cxx.
|
private |
Add to output list
Definition at line 114 of file AliMTRChEffAnalysis.cxx.
Referenced by InitFromLocal(), and SetCondition().
Return boards contained in the specified RPC
Definition at line 150 of file AliMTRChEffAnalysis.cxx.
Referenced by DrawEffTrend(), DrawStatContribution(), and GetHomogeneousRanges().
Bool_t AliMTRChEffAnalysis::BuildSystematicMap | ( | ) |
Get systematic envelop for merged efficiencies
Definition at line 240 of file AliMTRChEffAnalysis.cxx.
|
private |
Check initialization. Return 0 if everything is ok
Definition at line 346 of file AliMTRChEffAnalysis.cxx.
Referenced by DrawEffTrend(), and GetTrendEff().
Check that all runs are in the specified ranges
Definition at line 1861 of file AliMTRChEffAnalysis.cxx.
Clone efficinecy histo list
Definition at line 226 of file AliMTRChEffAnalysis.cxx.
Referenced by AdditionalSystematics(), BuildSystematicMap(), ReadEffHistoList(), RecoverEfficiency(), and WriteToOCDB().
Int_t AliMTRChEffAnalysis::CompareEfficiencies | ( | const char * | sources, |
const char * | titles, | ||
const char * | opt, | ||
const char * | canvasNameSuffix = "" |
||
) | const |
Compare efficiency objects
Definition at line 357 of file AliMTRChEffAnalysis.cxx.
Referenced by CompareEfficiencyMethods(), CompareMergedEfficiencies(), ComputeAndCompareEfficiencies(), and DrawSystematicEnvelope().
|
private |
Compare efficiency objects
Definition at line 381 of file AliMTRChEffAnalysis.cxx.
Int_t AliMTRChEffAnalysis::CompareEfficiencyMethods | ( | const char * | source, |
const char * | opt, | ||
const char * | canvasNameSuffix = "" |
||
) | const |
Compare efficiency methods
Definition at line 505 of file AliMTRChEffAnalysis.cxx.
void AliMTRChEffAnalysis::CompareMergedEfficiencies | ( | const char * | opt | ) | const |
Definition at line 536 of file AliMTRChEffAnalysis.cxx.
Int_t AliMTRChEffAnalysis::ComputeAndCompareEfficiencies | ( | const char * | sources, |
const char * | titles, | ||
const char * | opt, | ||
const char * | canvasNameSuffix = "" |
||
) | const |
Compute the efficiency for the selected condition and compare them
Definition at line 562 of file AliMTRChEffAnalysis.cxx.
|
private |
copy all objects and subdirs of directory source as a subdir of the current directory
Definition at line 631 of file AliMTRChEffAnalysis.cxx.
Referenced by CopyLocally().
|
private |
Copy files from QA repository or from grid
Definition at line 669 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 781 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 869 of file AliMTRChEffAnalysis.cxx.
Get systematic envelop for merged efficiencies
Definition at line 952 of file AliMTRChEffAnalysis.cxx.
Execute command
Definition at line 1130 of file AliMTRChEffAnalysis.cxx.
Referenced by CopyLocally(), and WriteToOCDB().
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 1153 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 1181 of file AliMTRChEffAnalysis.cxx.
Referenced by MergeRangesForStat().
|
private |
Get the list of objects for the efficiency calculation
Definition at line 1230 of file AliMTRChEffAnalysis.cxx.
Referenced by AddToList(), CompareEfficiencyMethods(), ComputeAndCompareEfficiencies(), and MergeOutput().
Get error from the asymmetric error on efficiency
Definition at line 1241 of file AliMTRChEffAnalysis.cxx.
Referenced by CompareEfficiencies(), and DrawSystematicEnvelope().
|
private |
Get histogram
Definition at line 1248 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 1256 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 1405 of file AliMTRChEffAnalysis.cxx.
|
private |
Get identifier for object in internal map
Definition at line 1523 of file AliMTRChEffAnalysis.cxx.
Get index from run number
Definition at line 1531 of file AliMTRChEffAnalysis.cxx.
Referenced by AddToList(), and GetHomogeneousRanges().
TGraphAsymmErrors * AliMTRChEffAnalysis::GetOutliers | ( | TGraphAsymmErrors * | graph, |
Double_t | maxNsigmas = 3. |
||
) | const |
Get outliers
Definition at line 1544 of file AliMTRChEffAnalysis.cxx.
Referenced by DrawEffTrend(), and DrawStatContribution().
|
private |
Get run number in string
Definition at line 1577 of file AliMTRChEffAnalysis.cxx.
Referenced by CopyLocally(), and RecoverEfficiency().
Get run number from graph
Definition at line 1569 of file AliMTRChEffAnalysis.cxx.
Referenced by GetHomogeneousRanges(), and MergeOutput().
|
private |
Get short condition title
Definition at line 1608 of file AliMTRChEffAnalysis.cxx.
Referenced by CompareEfficiencyMethods(), and DrawSystematicEnvelope().
|
private |
Get sum histogram
Definition at line 1636 of file AliMTRChEffAnalysis.cxx.
|
private |
Get probability of firing 3 chambers out of 4
Definition at line 1710 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 1647 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 1683 of file AliMTRChEffAnalysis.cxx.
Referenced by DrawEffTrend(), and GetHomogeneousRanges().
|
private |
Check if merged results are present
Definition at line 1732 of file AliMTRChEffAnalysis.cxx.
Referenced by AdditionalSystematics(), 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 1782 of file AliMTRChEffAnalysis.cxx.
Bool_t AliMTRChEffAnalysis::InitFromLocal | ( | const char * | localFileList, |
const char * | outputName = "testMTRChamberEff" |
||
) |
Initialize output list
Definition at line 1743 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 1790 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 1798 of file AliMTRChEffAnalysis.cxx.
|
private |
Definition at line 1906 of file AliMTRChEffAnalysis.cxx.
Referenced by MergeOutput().
|
private |
Get histo namer
Definition at line 1954 of file AliMTRChEffAnalysis.cxx.
Referenced by BuildSystematicMap(), CompareEfficiencies(), DrawSystematicEnvelope(), PatchEffLists(), RecoverEfficiency(), and SetCondition().
|
private |
Dummy.
Bool_t AliMTRChEffAnalysis::PatchEfficiency | ( | const char * | effToModify, |
const char * | fromEff, | ||
const char * | boardsToPatch, | ||
const char * | outFilename | ||
) | const |
Replace the efficiency in inputEff using the efficiency in patchEff for the specified local boards. See PatchEffLisrs for further details
Definition at line 2040 of file AliMTRChEffAnalysis.cxx.
|
private |
Replace the efficiency in inEffList using the efficiency in patchEffList for the specified local boards. boardsToPatch is the name of a txt file with one or two columns: boardId chamberId with 1 <= boardId <= 234 and optionally 11 <= chamberId <= 14
Definition at line 1966 of file AliMTRChEffAnalysis.cxx.
Referenced by AdditionalSystematics(), and PatchEfficiency().
|
private |
Read efficiency map from OCDB or from file
Definition at line 2061 of file AliMTRChEffAnalysis.cxx.
Referenced by AdditionalSystematics(), CompareEfficiencies(), PatchEfficiency(), RecoverEfficiency(), and WriteToOCDB().
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 value 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 2107 of file AliMTRChEffAnalysis.cxx.
|
private |
Select the conditions for the efficiency estimation
Definition at line 2245 of file AliMTRChEffAnalysis.cxx.
Referenced by AddSystematicCondition(), and SetEffConditions().
Bool_t AliMTRChEffAnalysis::SetDefaultEffConditions | ( | ) |
Set default conditions for efficiency estimation
Definition at line 2307 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 2315 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 2322 of file AliMTRChEffAnalysis.cxx.
Bool_t AliMTRChEffAnalysis::WriteToOCDB | ( | const char * | inFilename, |
const char * | outputCDB, | ||
Int_t | firstRun, | ||
Int_t | lastRun, | ||
const char * | defaultOCDB = "local://$ALIROOT_OCDB_ROOT/OCDB" |
||
) | const |
Write the efficiency object in the file to the OCDB
Definition at line 2370 of file AliMTRChEffAnalysis.cxx.
Referenced by WriteMergedToOCDB().
|
private |
Write the efficiency to the OCDB
Definition at line 2379 of file AliMTRChEffAnalysis.cxx.
|
static |
Definition at line 2437 of file AliMTRChEffAnalysis.cxx.
|
private |
! List of conditions for trigger efficiency
Definition at line 121 of file AliMTRChEffAnalysis.h.
Referenced by AdditionalSystematics(), AddToList(), BuildSystematicMap(), CompareEfficiencyMethods(), CompareMergedEfficiencies(), ComputeAndCompareEfficiencies(), GetAverageStat(), GetShortConditionTitle(), GetTrend(), InitFromLocal(), MergeOutput(), RecoverEfficiency(), SetCondition(), WriteMergedToOCDB(), and ~AliMTRChEffAnalysis().
|
private |
! Map of merged internal objects
Definition at line 149 of file AliMTRChEffAnalysis.h.
Referenced by AdditionalSystematics(), BuildSystematicMap(), CompareMergedEfficiencies(), DrawSystematicEnvelope(), HasMergedResults(), MergeOutput(), RecoverEfficiency(), WriteMergedToOCDB(), and ~AliMTRChEffAnalysis().
|
mutableprivate |
! Namer for histograms
Definition at line 123 of file AliMTRChEffAnalysis.h.
Referenced by Namer(), and ~AliMTRChEffAnalysis().
|
private |
! Map of internal objects per run
Definition at line 148 of file AliMTRChEffAnalysis.h.
Referenced by AddToList(), Check(), CheckRanges(), GetAverageStat(), GetHomogeneousRanges(), GetIndexFromRun(), GetRunNumber(), GetTrend(), MergeOutput(), SetCondition(), and ~AliMTRChEffAnalysis().