AliPhysics  b555aef (b555aef)
runAnalysisBC.C
Go to the documentation of this file.
1 
20 
21 // --- ROOT system ---
22 #include <TStopwatch.h>
23 #include <TROOT.h>
24 
25 // --- ANALYSIS system ---
26 #include "BadChannelAna.h" //include when compile
27 
30 void runAnalysisBC(Int_t nversion = -1, TString period = "LHC15n", TString train = "Train_603", TString trigger= "INT7", Int_t runNum= 245683, TString externalFile= "",TString listName="runList.txt",TString workDir=".")
31 {
32  gROOT->ProcessLine("gErrorIgnoreLevel = kWarning;"); //..to supress a lot of standard output
33  std::vector<Int_t> badcellsManual;
34 
35  //..15o block 1
36  //badcellsManual.insert(badcellsManual.end(),{14655,14622,14640,14728,14726,14593,14599,14600,14645,14646,14759,14776});
37 
38  //..If nversion=-1
39  //..this is detected as a run-by-run analysis
40  if(nversion == -1)nversion=runNum; //..If you do the analysis run by run - this might be helpful
41 
42  TStopwatch* watch = new TStopwatch();
43  watch->Start();
44 
46  Analysis=new BadChannelAna(period,train,trigger,runNum,nversion,workDir,listName);
47 
48  //. . . . . . . . . . . . . . . . . . . . . . . .
49  //. . Settings
50  //. . . . . . . . . . . . . . . . . . . . . . . .
51  Analysis->SetExternalMergedFile(externalFile);
52  Analysis->AddManualMasking(badcellsManual);
53  //Analysis->AddMaskSM(7); //..switch off entire SMs
54  //Analysis->AddMaskSM(9); //..switch off entire SMs
55  //Analysis->AddMaskSM(11); //..switch off entire SMs
56  Analysis->SetLowerBound(0.5); //..If the Emin of the energy range (Emin-Emax) is higher than X GeV then dont apply a lower cut on the distribution
57  //Analysis->SetStartEndCell(0,12288); //..only EMCal
58  //Analysis->SetStartEndCell(12288,17664); //..only DCal
59  //Analysis->SetQAChecks(1); //..1= Perform QA checks - takes a long time! Saves all good cells for cross check to pdf
60  //Analysis->SetPrintOutput(1); //..1= prints more information about excluded cells
61  //Analysis->SetExternalBadMap("Version1OADB/LHC16s_INT7_Histograms_V1.root");
62 
63  //. . . . . . . . . . . . . . . . . . . . . . . .
64  //. . Add different period analyses
65  //. . . . . . . . . . . . . . . . . . . . . . . .
66  //..the range of sigmas should be selected such
67  //..that one does not cut into the natural fluctuation over the modules
68  Analysis->AddPeriodAnalysis(2, 5.5,0.1,0.3); // hits in cell in range Emin Emax
69  Analysis->AddPeriodAnalysis(1, 4.0,0.1,0.3); // energy/hit in range Emin Emax
70  Analysis->AddPeriodAnalysis(2, 5.5,0.2,0.5); // hits in cell range Emin Emax
71  Analysis->AddPeriodAnalysis(1, 4.5,0.2,0.5); // energy/hit in range Emin Emax
72  Analysis->AddPeriodAnalysis(2, 5.5,0.5,1.0); // hits in cell range Emin Emax
73  Analysis->AddPeriodAnalysis(1, 4.5,0.5,1.0); // energy/hit in range Emin Emax
74  Analysis->AddPeriodAnalysis(2, 5.5,1.0,4.0); // hits in cell range Emin Emax
75  Analysis->AddPeriodAnalysis(1, 4.5,1.0,4.0); // mean energy in range Emin Emax
76  Analysis->AddPeriodAnalysis(2, 5.5,1.0,10.0); // hits in cell in range Emin Emax
77  Analysis->AddPeriodAnalysis(1, 4.5,1.0,10.0); // energy/hit in range Emin Emax
78  Analysis->AddPeriodAnalysis(2, 5.5,0.11,0.29); // hits in cell in range Emin Emax
79 
80 
81  //..special test for extra high energy fluctuations
82  Analysis->AddPeriodAnalysis(1, 4.0,3.0,40.0); // energy/hit in cell in range Emin Emax
83 // Analysis->AddPeriodAnalysis(2, 4.0,3.0,40.0); // hits in cell range Emin Emax
84  //Analysis->AddPeriodAnalysis(1, 4.5,3.0,5.0); // mean energy in range Emin Emax - cliff
85  //Analysis->AddPeriodAnalysis(2, 5.5,3.0,5.0); // hits in cell range Emin Emax - cliff
86  //Analysis->AddPeriodAnalysis(1, 4.5,5,20); // energy/hit in range Emin Emax
87  //Analysis->AddPeriodAnalysis(2, 5.5,5,20); // hits in range Emin Emax
88 
89  //*test time stuff*/ Analysis->AddPeriodAnalysis(3, 6,-20,+20);// energy/hit in range Emin Emax
90 
91  //. . . . . . . . . . . . . . . . . . . . . . . .
92  //. . Start the bad channel analysis
93  //. . . . . . . . . . . . . . . . . . . . . . . .
94  Bool_t mergeOnly=0;//.. =1 do only merge and filter
95  Analysis->Run(mergeOnly);
96 
97  watch->Stop();
98  cout<<"Finished BC analysis "<<watch->RealTime()/60<<" min"<<endl;
99  watch->Continue();
100 }
void Run(Bool_t mergeOnly=0)
void SetExternalMergedFile(TString inputName)
Definition: BadChannelAna.h:58
void AddPeriodAnalysis(Int_t criteria, Double_t nsigma, Double_t emin, Double_t emax)
void AddManualMasking(std::vector< Int_t > cellVector)
Definition: BadChannelAna.h:64
int Int_t
Definition: External.C:63
Analyses cell properties and identifies bad cells.
Definition: BadChannelAna.h:48
void runAnalysisBC(Int_t nversion=-1, TString period="LHC15n", TString train="Train_603", TString trigger="INT7", Int_t runNum=245683, TString externalFile="", TString listName="runList.txt", TString workDir=".")
Definition: runAnalysisBC.C:30
bool Bool_t
Definition: External.C:53
void SetLowerBound(Double_t input)
Definition: BadChannelAna.h:63