AliPhysics  v5-07-15-01 (b3d7633)
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros
AliMTRChEffAnalysis.h
Go to the documentation of this file.
1 #ifndef ALIMTRCHEFFANALYSIS_h
2 #define ALIMTRCHEFFANALYSIS_h
3 
13 
14 #include "TObject.h"
15 #include "TString.h"
16 #include "AliTrigChEffOutput.h"
17 
18 class TObjArray;
19 class TDirectory;
20 class TH1;
21 class TGraphAsymmErrors;
22 class TArrayI;
23 class TArrayD;
24 
25 class AliMTRChEffAnalysis : public TObject {
26  public:
28  AliMTRChEffAnalysis ( const char *localFileList, const char *outputName = "testMTRChamberEff" );
29 
30  TArrayI GetHomogeneusRanges ( Double_t chi2Cut = 3, Int_t maxNRanges = 4, Double_t minEffVariation = 0.005, Double_t minEff = 0.85, Double_t maxEff = 1.01 );
31  TArrayI GetHomogeneusRanges ( TGraphAsymmErrors* trendGraph, Double_t chi2Cut = 3, Int_t maxNRanges = 4, Double_t minEffVariation = 0.005, Bool_t returnIndex = kFALSE );
32 
33  void DrawEffTrend ( Int_t itype, Int_t irpc, Double_t maxNsigmasOutliers = -1., Double_t minEff = 0.8, Double_t maxEff = 1.01 ) const;
34 
35  Double_t GetAverageStat ( Int_t firstRun, Int_t lastRun, Int_t itype = AliTrigChEffOutput::kHboardEff, Bool_t excludePeriphericBoards = kTRUE ) const;
36 
37  TGraphAsymmErrors* GetOutliers ( TGraphAsymmErrors* graph, Double_t maxNsigmas = 3. ) const;
38 
39  TH1* GetTrend ( Int_t itype, Int_t icount, Int_t ichamber, Int_t idetelem ) const;
40  TGraphAsymmErrors* GetTrendEff ( Int_t itype, Int_t icount, Int_t ichamber, Int_t idetelem ) const;
41 
42  void CompareEfficiencies ( const char* sources, const char* titles, const char* opt ) const;
43  void CompareMergedEfficiencies ( const char* opt ) const;
44 
45  Bool_t AddSystematicCondition ( const char* physSel, const char* trigClassName, const char* centrality, Int_t itrackSel, Int_t imatch, Int_t imethod );
46  Bool_t SetDefaultEffConditions ();
47  Bool_t SetEffConditions ( const char* physSel, const char* trigClassName, const char* centrality, Int_t itrackSel, Int_t imatch, Int_t imethod );
48 
49  Bool_t MergeOutput ( TArrayI runRanges, Double_t averageStatError = 0.01, Bool_t isIndex = kFALSE );
50 
51  Bool_t SetResultsFromGrid ( 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" );
52  Bool_t SetResultsFromWeb ( const char *runList, const char *path, const char* localFileList = "localFileList.txt", const char* outDir = "", const char *directory = "MTR_ChamberEffMap", const char *outputName = "testMTRChamberEff" );
53 
54  Bool_t WriteMergedToOCDB ( const char* outputCDB = "CDB" ) const;
55  Bool_t DrawSystematicEnvelope ( Bool_t perRPC = kFALSE, Double_t miny = -0.03, Double_t maxy = 0.03 ) const;
56 
57  virtual ~AliMTRChEffAnalysis();
58 
59  private:
60 
61  Bool_t AddToList ( const char *filename, const char *outputName );
62  TArrayI BoardsInRPC ( Int_t irpc ) const;
63  void CopyDir ( TDirectory *source ) const;
64  Bool_t CopyLocally ( const char* runList, const char* path, const char* pattern, const char* localFileList, const char* outDir, const char* directory ) const;
65  void CompareEfficiencies ( TObjArray* effMapList, const char* titles, const char* opt ) const;
66  Bool_t ExecCommand ( TString command, Bool_t prompt ) const;
67  Double_t FitRangesFunc ( Double_t* x, Double_t* par );
68  Double_t GetError ( Double_t errLow, Double_t errHigh ) const;
69  TList* GetEffHistoList ( AliTrigChEffOutput* trigOut, TObjArray* condition ) const;
70  TString GetIdentifier ( AliTrigChEffOutput* trigOut, TObjArray* condition, Int_t itype, Int_t icount, Int_t ichamber ) const;
71  Int_t GetRunNumber ( Int_t ipt ) const;
72  TList* GetRunList ( const char* runList ) const;
73 
74  TH1* GetSum ( AliTrigChEffOutput* trigOut, TObjArray* condition, Int_t itype, Int_t icount, Int_t ichamber ) const;
75 
76  Double_t GetThreeOfFour ( TArrayD eff, TArrayD effErr, Double_t &probErr ) const;
77 
78  Bool_t HasMergedResults () const;
79 
80  TArrayI MergeRangesForStat ( TArrayI runRanges, Double_t averageStatError, Bool_t excludePeriphericBoards = kTRUE ) const;
81 
82  Bool_t SetCondition ( const char* physSel, const char* trigClassName, const char* centrality, Int_t itrackSel, Int_t imatch, Int_t imethod, Bool_t isBasic );
83 
84  Bool_t SetOutList ( const char *localFileList, const char *outputName );
85 
90 
91  TObjArray* fOutputs;
92  TObjArray* fConditions;
93  TObjArray* fMergedOutputs;
94 
96  ClassDef(AliMTRChEffAnalysis, 0); // Trigger chamber efficiencies
98 };
99 
100 #endif
void CompareEfficiencies(const char *sources, const char *titles, const char *opt) const
void CompareMergedEfficiencies(const char *opt) const
void CopyDir(TDirectory *source) const
Double_t GetError(Double_t errLow, Double_t errHigh) const
Bool_t DrawSystematicEnvelope(Bool_t perRPC=kFALSE, Double_t miny=-0.03, Double_t maxy=0.03) const
Bool_t CopyLocally(const char *runList, const char *path, const char *pattern, const char *localFileList, const char *outDir, const char *directory) const
Double_t GetThreeOfFour(TArrayD eff, TArrayD effErr, Double_t &probErr) const
TGraphAsymmErrors * GetTrendEff(Int_t itype, Int_t icount, Int_t ichamber, Int_t idetelem) const
centrality
TArrayI MergeRangesForStat(TArrayI runRanges, Double_t averageStatError, Bool_t excludePeriphericBoards=kTRUE) const
Bool_t SetResultsFromGrid(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")
TList * GetEffHistoList(AliTrigChEffOutput *trigOut, TObjArray *condition) const
AliMTRChEffAnalysis & operator=(const AliMTRChEffAnalysis &)
Dummy.
Bool_t AddToList(const char *filename, const char *outputName)
TObjArray * fMergedOutputs
!<! List of conditions for trigger efficiency
Output for Trig chamber effieincy.
Bool_t SetEffConditions(const char *physSel, const char *trigClassName, const char *centrality, Int_t itrackSel, Int_t imatch, Int_t imethod)
Output for Trig chamber effieincy.
Double_t GetAverageStat(Int_t firstRun, Int_t lastRun, Int_t itype=AliTrigChEffOutput::kHboardEff, Bool_t excludePeriphericBoards=kTRUE) const
Bool_t SetOutList(const char *localFileList, const char *outputName)
TArrayI GetHomogeneusRanges(Double_t chi2Cut=3, Int_t maxNRanges=4, Double_t minEffVariation=0.005, Double_t minEff=0.85, Double_t maxEff=1.01)
TString GetIdentifier(AliTrigChEffOutput *trigOut, TObjArray *condition, Int_t itype, Int_t icount, Int_t ichamber) 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 WriteMergedToOCDB(const char *outputCDB="CDB") const
TList * GetRunList(const char *runList) const
Int_t GetRunNumber(Int_t ipt) const
Bool_t HasMergedResults() const
Bool_t ExecCommand(TString command, Bool_t prompt) const
TArrayI BoardsInRPC(Int_t irpc) const
Double_t FitRangesFunc(Double_t *x, Double_t *par)
Counts per board histogram index.
void DrawEffTrend(Int_t itype, Int_t irpc, Double_t maxNsigmasOutliers=-1., Double_t minEff=0.8, Double_t maxEff=1.01) const
TObjArray * fConditions
!<! List of outputs
TGraphAsymmErrors * GetOutliers(TGraphAsymmErrors *graph, Double_t maxNsigmas=3.) const
Bool_t AddSystematicCondition(const char *physSel, const char *trigClassName, const char *centrality, Int_t itrackSel, Int_t imatch, Int_t imethod)
Bool_t SetResultsFromWeb(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 MergeOutput(TArrayI runRanges, Double_t averageStatError=0.01, Bool_t isIndex=kFALSE)
TH1 * GetSum(AliTrigChEffOutput *trigOut, TObjArray *condition, Int_t itype, Int_t icount, Int_t ichamber) const
TH1 * GetTrend(Int_t itype, Int_t icount, Int_t ichamber, Int_t idetelem) const