![]() |
AliPhysics
3aa38c9 (3aa38c9)
|
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) |
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 74 of file AliMTRChEffAnalysis.cxx.
AliMTRChEffAnalysis::AliMTRChEffAnalysis | ( | const char * | localFileList, |
const char * | outputName = "testMTRChamberEff" |
||
) |
Ctor.
Definition at line 84 of file AliMTRChEffAnalysis.cxx.
|
virtual |
Destructor
Definition at line 94 of file AliMTRChEffAnalysis.cxx.
|
private |
Dummy.
Bool_t AliMTRChEffAnalysis::AdditionalSystematics | ( | const char * | additionalSystematics, |
const char * | affectedBoards | ||
) | const |
Add systematic uncertainties
Definition at line 1968 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 106 of file AliMTRChEffAnalysis.cxx.
|
private |
Add to output list
Definition at line 113 of file AliMTRChEffAnalysis.cxx.
Referenced by InitFromLocal(), and SetCondition().
Return boards contained in the specified RPC
Definition at line 149 of file AliMTRChEffAnalysis.cxx.
Referenced by DrawEffTrend(), DrawStatContribution(), and GetHomogeneousRanges().
Bool_t AliMTRChEffAnalysis::BuildSystematicMap | ( | ) |
Get systematic envelop for merged efficiencies
Definition at line 239 of file AliMTRChEffAnalysis.cxx.
|
private |
Check initialization. Return 0 if everything is ok
Definition at line 345 of file AliMTRChEffAnalysis.cxx.
Referenced by DrawEffTrend(), and GetTrendEff().
Clone efficinecy histo list
Definition at line 225 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 356 of file AliMTRChEffAnalysis.cxx.
Referenced by CompareEfficiencyMethods(), CompareMergedEfficiencies(), ComputeAndCompareEfficiencies(), and DrawSystematicEnvelope().
|
private |
Compare efficiency objects
Definition at line 380 of file AliMTRChEffAnalysis.cxx.
Int_t AliMTRChEffAnalysis::CompareEfficiencyMethods | ( | const char * | source, |
const char * | opt, | ||
const char * | canvasNameSuffix = "" |
||
) | const |
Compare efficiency methods
Definition at line 504 of file AliMTRChEffAnalysis.cxx.
void AliMTRChEffAnalysis::CompareMergedEfficiencies | ( | const char * | opt | ) | const |
Definition at line 535 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 561 of file AliMTRChEffAnalysis.cxx.
|
private |
copy all objects and subdirs of directory source as a subdir of the current directory
Definition at line 630 of file AliMTRChEffAnalysis.cxx.
Referenced by CopyLocally().
|
private |
Copy files from QA repository or from grid
Definition at line 668 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 780 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 868 of file AliMTRChEffAnalysis.cxx.
Get systematic envelop for merged efficiencies
Definition at line 951 of file AliMTRChEffAnalysis.cxx.
Execute command
Definition at line 1129 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 1152 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 1180 of file AliMTRChEffAnalysis.cxx.
Referenced by MergeRangesForStat().
|
private |
Get the list of objects for the efficiency calculation
Definition at line 1229 of file AliMTRChEffAnalysis.cxx.
Referenced by AddToList(), CompareEfficiencyMethods(), ComputeAndCompareEfficiencies(), and MergeOutput().
Get error from the asymmetric error on efficiency
Definition at line 1240 of file AliMTRChEffAnalysis.cxx.
Referenced by CompareEfficiencies(), and DrawSystematicEnvelope().
|
private |
Get histogram
Definition at line 1247 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 1255 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 1404 of file AliMTRChEffAnalysis.cxx.
|
private |
Get identifier for object in internal map
Definition at line 1522 of file AliMTRChEffAnalysis.cxx.
Get index from run number
Definition at line 1530 of file AliMTRChEffAnalysis.cxx.
Referenced by AddToList(), and GetHomogeneousRanges().
TGraphAsymmErrors * AliMTRChEffAnalysis::GetOutliers | ( | TGraphAsymmErrors * | graph, |
Double_t | maxNsigmas = 3. |
||
) | const |
Get outliers
Definition at line 1543 of file AliMTRChEffAnalysis.cxx.
Referenced by DrawEffTrend(), and DrawStatContribution().
|
private |
Get run number in string
Definition at line 1576 of file AliMTRChEffAnalysis.cxx.
Referenced by CopyLocally(), and RecoverEfficiency().
Get run number from graph
Definition at line 1568 of file AliMTRChEffAnalysis.cxx.
Referenced by GetHomogeneousRanges(), and MergeOutput().
|
private |
Get short condition title
Definition at line 1607 of file AliMTRChEffAnalysis.cxx.
Referenced by CompareEfficiencyMethods(), and DrawSystematicEnvelope().
|
private |
Get sum histogram
Definition at line 1635 of file AliMTRChEffAnalysis.cxx.
|
private |
Get probability of firing 3 chambers out of 4
Definition at line 1709 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 1646 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 1682 of file AliMTRChEffAnalysis.cxx.
Referenced by DrawEffTrend(), and GetHomogeneousRanges().
|
private |
Check if merged results are present
Definition at line 1731 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 1781 of file AliMTRChEffAnalysis.cxx.
Bool_t AliMTRChEffAnalysis::InitFromLocal | ( | const char * | localFileList, |
const char * | outputName = "testMTRChamberEff" |
||
) |
Initialize output list
Definition at line 1742 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 1789 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 1797 of file AliMTRChEffAnalysis.cxx.
|
private |
Definition at line 1860 of file AliMTRChEffAnalysis.cxx.
Referenced by MergeOutput().
|
private |
Get histo namer
Definition at line 1908 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 1994 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 1920 of file AliMTRChEffAnalysis.cxx.
Referenced by AdditionalSystematics(), and PatchEfficiency().
|
private |
Read efficiency map from OCDB or from file
Definition at line 2015 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 2061 of file AliMTRChEffAnalysis.cxx.
|
private |
Select the conditions for the efficiency estimation
Definition at line 2199 of file AliMTRChEffAnalysis.cxx.
Referenced by AddSystematicCondition(), and SetEffConditions().
Bool_t AliMTRChEffAnalysis::SetDefaultEffConditions | ( | ) |
Set default conditions for efficiency estimation
Definition at line 2261 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 2269 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 2276 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 2324 of file AliMTRChEffAnalysis.cxx.
Referenced by WriteMergedToOCDB().
|
private |
Write the efficiency to the OCDB
Definition at line 2333 of file AliMTRChEffAnalysis.cxx.
|
static |
Definition at line 2390 of file AliMTRChEffAnalysis.cxx.
|
private |
! List of conditions for trigger efficiency
Definition at line 120 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 148 of file AliMTRChEffAnalysis.h.
Referenced by AdditionalSystematics(), BuildSystematicMap(), CompareMergedEfficiencies(), DrawSystematicEnvelope(), HasMergedResults(), MergeOutput(), RecoverEfficiency(), WriteMergedToOCDB(), and ~AliMTRChEffAnalysis().
|
mutableprivate |
! Namer for histograms
Definition at line 122 of file AliMTRChEffAnalysis.h.
Referenced by Namer(), and ~AliMTRChEffAnalysis().
|
private |
! Map of internal objects per run
Definition at line 147 of file AliMTRChEffAnalysis.h.
Referenced by AddToList(), Check(), GetAverageStat(), GetHomogeneousRanges(), GetIndexFromRun(), GetRunNumber(), GetTrend(), MergeOutput(), SetCondition(), and ~AliMTRChEffAnalysis().