]>
Commit | Line | Data |
---|---|---|
c0d2a42f | 1 | #ifndef __CINT__ |
2 | #include "TTree.h" | |
3 | #include "TFile.h" | |
4 | #include "TMath.h" | |
5 | #endif | |
6 | #include "triggerInfo.C" | |
7 | ||
8 | // TODO read number of bits from AliVEvent? | |
9 | #define NBITS 29 | |
063775bb | 10 | #define NMAXCLASSES 100 |
5cbc06d4 | 11 | TString bitNames[NBITS] = { |
12 | "kMB", | |
13 | "kINT7", | |
14 | "kMUON", | |
15 | "kHighMult", | |
16 | "kEMC1", | |
17 | "kCINT5", | |
18 | "kCMUS5", | |
19 | "kMUSH7", | |
20 | "kMUL7", | |
21 | "kMUU7", | |
22 | "kEMC7", | |
23 | "kMUS7", | |
24 | "kPHI1", | |
063775bb | 25 | "kPHI78", |
5cbc06d4 | 26 | "kEMCEJE", |
27 | "kEMCEGA", | |
28 | "kCentral", | |
29 | "kSemiCentral", | |
30 | "kDG5", | |
31 | "kZED", | |
063775bb | 32 | "kSPI78", |
5cbc06d4 | 33 | "kINT8", |
34 | "kMuonSingleLowPt8", | |
35 | "kMuonSingleHighPt8", | |
36 | "kMuonLikeLowPt8", | |
37 | "kMuonUnlikeLowPt8", | |
38 | "kMuonUnlikeLowPt0", | |
39 | "kUserDefined", | |
40 | "kTRD" | |
41 | }; | |
42 | ||
c0d2a42f | 43 | |
063775bb | 44 | //Int_t runLevelEventStatQA(TString qafilename="/data/alice/2013/LHC13f/000197348/pass2/QA_merge_archive.zip#event_stat.root", Int_t run=197348, TString ocdbStorage = "local:///data/alice/OCDB"){ |
45 | //Int_t runLevelEventStatQA(TString qafilename="/data/alice/2011/LHC11a/000146805/pass4_with_SDD/QA_merge_archive.zip#event_stat.root", Int_t run=146805, TString ocdbStorage = "local:///data/alice/OCDB"){ | |
46 | //Int_t runLevelEventStatQA(TString qafilename="/data/alice/2013/LHC13g/000197584/pass1/QA_merge_archive.zip#event_stat.root", Int_t run=114783, TString ocdbStorage = "raw://"){ | |
47 | //Int_t runLevelEventStatQA(TString qafilename="/data/alice/2012/LHC12b/000177789/pass1/QA_merge_archive.zip#event_stat.root", Int_t run=177789, TString ocdbStorage = "local:///data/alice/OCDB"){ | |
48 | //Int_t runLevelEventStatQA(TString qafilename="/data/alice/2010/LHC10b/000114751/pass4/QA_merge_archive.zip#event_stat.root", Int_t run=114751, TString ocdbStorage = "local:///data/alice/OCDB"){ | |
49 | //Int_t runLevelEventStatQA(TString qafilename="/data/alice/2012/LHC12d/000184719/pass1/QA_merge_archive.zip#event_stat.root", Int_t run=184719, TString ocdbStorage = "local:///data/alice/OCDB"){ | |
50 | //Int_t runLevelEventStatQA(TString qafilename="/data/alice/2012/LHC12h/000189694/pass1/QA_merge_archive.zip#event_stat.root", Int_t run=189694, TString ocdbStorage = "local:///data/alice/OCDB"){ | |
51 | //Int_t runLevelEventStatQA(TString qafilename="/data/alice/sim/2014/LHC14j5/138192/QA_merge_archive.zip#event_stat.root", Int_t run=138192, TString ocdbStorage = "local:///data/alice/OCDB"){ | |
52 | // Int_t runLevelEventStatQA(TString qafilename="/alice/data/2010/LHC10d/000124360/pass4/QA_merge_archive.zip#event_stat.root", Int_t run=124360, TString ocdbStorage = "local:///alice/data/OCDB"){ | |
53 | Int_t runLevelEventStatQA(TString qafilename="/alice/data/2010/LHC10f/000133007/pass4/QA_merge_archive.zip#event_stat.root", Int_t run=133007, TString ocdbStorage = "local:///alice/data/OCDB"){ | |
c0d2a42f | 54 | printf("runLevelEventStatQA %s %i\n",qafilename.Data(),run); |
5cbc06d4 | 55 | gStyle->SetOptStat(0); |
56 | gStyle->SetLineScalePS(1.5); | |
57 | gStyle->SetPadBottomMargin(0.08); | |
58 | gStyle->SetPadRightMargin(0.02); | |
59 | gStyle->SetPadTopMargin(0.07); | |
60 | gStyle->SetPadLeftMargin(0.07); | |
61 | ||
c0d2a42f | 62 | TFile* fin = new TFile(qafilename); |
c0d2a42f | 63 | TH2D* h = (TH2D*) fin->Get("fHistStatistics"); |
73af8989 | 64 | if (!h) { printf("fHistStatistics not found\n"); return 1; } |
65 | ||
66 | // tree variables | |
063775bb | 67 | TObjArray classes = TObjArray(); |
68 | TObjString activeDetectors = TObjString(); | |
69 | Int_t fill = 0; | |
70 | Double_t run_duration = 0; | |
71 | Int_t nBCsPerOrbit = 0; | |
72 | Double_t refl0b = 0; | |
73 | Double_t mu = 0; | |
74 | Double_t lumi_seen = 0; | |
75 | Double_t interactionRate = 0; | |
76 | ULong64_t class_l0b[NMAXCLASSES] = {0}; | |
77 | ULong64_t class_l0a[NMAXCLASSES] = {0}; | |
78 | ULong64_t class_l1b[NMAXCLASSES] = {0}; | |
79 | ULong64_t class_l1a[NMAXCLASSES] = {0}; | |
80 | ULong64_t class_l2b[NMAXCLASSES] = {0}; | |
81 | ULong64_t class_l2a[NMAXCLASSES] = {0}; | |
82 | Double_t class_lifetime[NMAXCLASSES] = {0}; | |
83 | Double_t class_lumi[NMAXCLASSES] = {0}; | |
84 | ULong64_t alias_recorded[NBITS] = {0}; | |
85 | ULong64_t alias_reconstructed[NBITS] = {0}; | |
86 | ULong64_t alias_accepted[NBITS] = {0}; | |
87 | Double_t alias_l0b_rate[NBITS] = {0}; | |
88 | Double_t alias_lifetime[NBITS] = {0}; | |
89 | Double_t alias_lumi_recorded[NBITS] = {0}; | |
90 | Double_t alias_lumi_reconstructed[NBITS] = {0}; | |
91 | Double_t alias_lumi_accepted[NBITS] = {0}; | |
c0d2a42f | 92 | |
93 | TString refClass=""; | |
73af8989 | 94 | Double_t refSigma=-1; |
063775bb | 95 | Double_t refEff = 1.; |
96 | if ( run<=118501) { refSigma= 62.; refEff = 1.00; refClass = "CINT1B-ABCE-NOPF-ALL"; } // pp_7.00: 62mb=54.3mb*1.15=sigma(VBAND)*R(INT1/VBAND) (Martino,2012-03-12,RunCond) | |
97 | else if (run>=118502 && run<=118561) { refSigma= 47.; refEff = 1.00; refClass = "CINT1B-ABCE-NOPF-ALL"; } // pp_0.90: 47mb=52 mb *0.91=sigma(INEL)*R(INT1/INEL) (arxiv: 1208.4968, fig.10 + table 3) | |
98 | else if (run>=118903 && run<=120829) { refSigma= 62.; refEff = 1.00; refClass = "CINT1B-ABCE-NOPF-ALL"; } // pp_7.00: 62mb=54.3mb*1.15=sigma(VBAND)*R(INT1/VBAND) (Martino,2012-03-12,RunCond) | |
99 | else if (run>=121039 && run<=121040) { refSigma= 47.; refEff = 1.00; refClass = "CINT1B-ABCE-NOPF-ALL"; } // pp_0.90: 47mb=52 mb *0.91=sigma(INEL)*R(INT1/INEL) (arxiv: 1208.4968, fig.10 + table 3) | |
100 | else if (run>=121041 && run<=126437) { refSigma= 62.; refEff = 1.00; refClass = "CINT1B-ABCE-NOPF-ALL"; } // pp_7.00: 62mb=54.3mb*1.15=sigma(VBAND)*R(INT1/VBAND) (Martino,2012-03-12,RunCond) | |
101 | else if (run>=126438 && run<=127718) { refSigma= 62.; refEff = 1.00; refClass = "CINT1-B-NOPF-ALLNOTRD"; } // pp_7.00: 62mb=54.3mb*1.15=sigma(VBAND)*R(INT1/VBAND) (Martino,2012-03-12,RunCond) | |
102 | else if (run>=127719 && run<=127730) { refSigma= 62.; refEff = 1.00; refClass = "CINT1B-ABCE-NOPF-ALL"; } // pp_7.00: 62mb=54.3mb*1.15=sigma(VBAND)*R(INT1/VBAND) (Martino,2012-03-12,RunCond) | |
103 | else if (run>=127731 && run<=136848) { refSigma= 62.; refEff = 1.00; refClass = "CINT1-B-NOPF-ALLNOTRD"; } // pp_7.00: 62mb=54.3mb*1.15=sigma(VBAND)*R(INT1/VBAND) (Martino,2012-03-12,RunCond) | |
104 | else if (run>=136849 && run<=139316) { refSigma=5970.; refEff = 0.78; refClass = "C0SMH-B-NOPF-ALL"; } // PbPb_2.76: (Oyama,2011-05-20,RunCond), sigma_hardronic = 7.64 b | |
105 | else if (run>=139328 && run<=139517) { refSigma=5970.; refEff = 0.78; refClass = "C0SMH-B-NOPF-ALLNOTRD"; } // PbPb_2.76: (Oyama,2011-05-20,RunCond), sigma_hardronic = 7.64 b | |
106 | else if (run>=145289 && run<=146860) { refSigma= 57.; refEff = 1.00; refClass = "CINT1-B-NOPF-ALLNOTRD"; } // pp_2.76: 57mb=47.7mb*1.20=sigma(VBAND)*R(INT1/VBAND) (Martino,2012-03-12,RunCond) | |
107 | else if (run>=146808 && run<=146814) { refSigma= 57.; refEff = 1.00; refClass = "CINT1-B-NOPF-ALL"; } // pp_2.76: 57mb=47.7mb*1.20=sigma(VBAND)*R(INT1/VBAND) (Martino,2012-03-12,RunCond) | |
108 | else if (run>=145815 && run<=146856) { refSigma= 57.; refEff = 1.00; refClass = "CINT1-B-NOPF-ALLNOTRD"; } // pp_2.76: 57mb=47.7mb*1.20=sigma(VBAND)*R(INT1/VBAND) (Martino,2012-03-12,RunCond) | |
109 | else if (run>=146857 && run<=146857) { refSigma= 57.; refEff = 1.00; refClass = "CINT1-B-NOPF-ALL"; } // pp_2.76: 57mb=47.7mb*1.20=sigma(VBAND)*R(INT1/VBAND) (Martino,2012-03-12,RunCond) | |
110 | else if (run>=146858 && run<=146860) { refSigma= 57.; refEff = 1.00; refClass = "CINT1-B-NOPF-ALLNOTRD"; } // pp_2.76: 57mb=47.7mb*1.20=sigma(VBAND)*R(INT1/VBAND) (Martino,2012-03-12,RunCond) | |
111 | else if (run>=148370 && run<=157078) { refSigma= 54.; refEff = 1.00; refClass = "CVBAND-B-NOPF-ALLNOTRD"; } // pp_7.00: 54.3mb (Martino,2012-03-12,RunCond) | |
112 | else if (run>=157079 && run<=165746) { refSigma= 24.; refEff = 0.44; refClass = "C0TVX-B-NOPF-ALLNOTRD"; } // pp_7.00: 24mb=54.3mb*0.44=sigma(VBAND)*R(0TVX/VBAND) (Martino,2012-03-12,RunCond) | |
113 | else if (run>=166477 && run<=170593) { refSigma=4100.; refEff = 0.54; refClass = "CVLN-B-NOPF-ALLNOTRD"; } // PbPb_2.76: (Martino,2013-03-15,RunCond) | |
114 | else if (run>=176658 && run<=177143) { refSigma= 25.; refEff = 0.45; refClass = "C0TVX-B-NOPF-ALLNOTRD"; } // pp_8.00: (Artem, 2013-10-04,RunCond) | |
115 | else if (run>=177146 && run<=177147) { refSigma= 25.; refEff = 0.45; refClass = "C0TVX-B-NOPF-CENTNOTRD"; } // pp_8.00: (Artem, 2013-10-04,RunCond) | |
116 | else if (run>=177148 && run<=177149) { refSigma= 25.; refEff = 0.45; refClass = "C0TVX-B-NOPF-ALLNOTRD"; } // pp_8.00: (Artem, 2013-10-04,RunCond) | |
117 | else if (run>=177150 && run<=177506) { refSigma= 25.; refEff = 0.45; refClass = "C0TVX-B-NOPF-CENTNOTRD"; } // pp_8.00: (Artem, 2013-10-04,RunCond) | |
118 | else if (run>=177580 && run<=178220) { refSigma= 25.; refEff = 0.45; refClass = "C0TVX-B-NOPF-ALLNOTRD"; } // pp_8.00: (Artem, 2013-10-04,RunCond) | |
119 | else if (run>=179444 && run<=188229) { refSigma= 25.; refEff = 0.45; refClass = "C0TVX-S-NOPF-ALLNOTRD"; } // pp_8.00: (Artem, 2013-10-04,RunCond) | |
120 | else if (run>=188230 && run<=188366) { refSigma=1590.; refEff = 0.76; refClass = "C0TVX-B-NOPF-ALLNOTRD"; } // pPb_5.02: pilot. arxiv:1405.1849 | |
121 | else if (run>=188367 && run<=193692) { refSigma= 25.; refEff = 0.45; refClass = "C0TVX-S-NOPF-ALLNOTRD"; } // pp_8.00: (Artem, 2013-10-04,RunCond) | |
122 | else if (run>=193693 && run<=193766) { refSigma= 25.; refEff = 0.45; refClass = "C0TVX-B-NOPF-ALLNOTRD"; } // pp_8.00: (Artem, 2013-10-04,RunCond) | |
123 | else if (run>=195344 && run<=197388) { refSigma=1590.; refEff = 0.76; refClass = "C0TVX-B-NOPF-ALLNOTRD"; } // pPb_5.02: arxiv:1405.1849 | |
124 | else if (run>=197470 && run<=197692) { refSigma= 18.; refEff = 0.39; refClass = "C0TVX-B-NOPF-ALLNOTRD"; } // pp_2.76: 18mb=47.7mb*0.39=sigma(VBAND)*R(0TVX/VBAND) (Martino,2012-03-12,RunCond) | |
125 | ||
5cbc06d4 | 126 | Double_t par[5] = {0}; |
063775bb | 127 | TString det; |
128 | triggerInfo(run,refClass,ocdbStorage,det,par); | |
129 | fill = TMath::Nint(par[0]); | |
130 | run_duration = par[1]; | |
131 | refl0b = par[2]; | |
132 | nBCsPerOrbit = TMath::Nint(par[3]); | |
133 | mu = par[4]; | |
134 | activeDetectors.SetString(det.Data()); | |
135 | ||
136 | interactionRate = (run_duration>1e-10) ? refl0b/run_duration/refEff : 0; | |
137 | if (refSigma>1.e-10) lumi_seen = refl0b/refSigma/1000; //[ub-1] | |
138 | if (mu>1.e-10) lumi_seen*=mu/(1-TMath::Exp(-mu)); // pile-up correction | |
5cbc06d4 | 139 | |
063775bb | 140 | classes = GetClasses(run,ocdbStorage,class_l0b,class_l0a,class_l1b,class_l1a,class_l2b,class_l2a); |
141 | for (Int_t i=0;i<classes.GetEntriesFast();i++){ | |
142 | // printf("%30s %12lli %10lli %10lli %10lli %10lli %10lli\n",classes.At(i)->GetName(),class_l0b[i],class_l0a[i],class_l1b[i],class_l1a[i],class_l2b[i],class_l2a[i]); | |
143 | class_lifetime[i] = class_l0b[i]>0 ? Double_t(class_l0a[i])/class_l0b[i]: 0; | |
144 | class_lifetime[i]*= class_l1b[i]>0 ? Double_t(class_l1a[i])/class_l1b[i]: 0; | |
145 | class_lifetime[i]*= class_l2b[i]>0 ? Double_t(class_l2a[i])/class_l2b[i]: 0; | |
146 | class_lumi[i] = lumi_seen*class_lifetime[i]; | |
147 | } | |
148 | ||
149 | ||
150 | TFile* fout = new TFile("trending.root","recreate"); | |
5cbc06d4 | 151 | TTree* t = new TTree("trending","tree of trending variables"); |
152 | t->Branch("run",&run); | |
153 | t->Branch("fill",&fill); | |
154 | t->Branch("bcs",&nBCsPerOrbit); | |
063775bb | 155 | t->Branch("run_duration",&run_duration); |
5cbc06d4 | 156 | t->Branch("mu",&mu); |
063775bb | 157 | t->Branch("interactionRate",&interactionRate); |
158 | t->Branch("refl0b",&refl0b); | |
5cbc06d4 | 159 | t->Branch("lumi_seen",&lumi_seen); |
063775bb | 160 | t->Branch("classes",&classes); |
161 | t->Branch("class_l0b",&class_l0b,Form("class_l0b[%i]/l",NMAXCLASSES)); | |
162 | t->Branch("class_l0a",&class_l0a,Form("class_l0a[%i]/l",NMAXCLASSES)); | |
163 | t->Branch("class_l1b",&class_l1b,Form("class_l1b[%i]/l",NMAXCLASSES)); | |
164 | t->Branch("class_l1a",&class_l1a,Form("class_l1a[%i]/l",NMAXCLASSES)); | |
165 | t->Branch("class_l2b",&class_l2b,Form("class_l2b[%i]/l",NMAXCLASSES)); | |
166 | t->Branch("class_l2a",&class_l2a,Form("class_l2a[%i]/l",NMAXCLASSES)); | |
167 | t->Branch("class_lifetime",&class_lifetime,Form("class_lifetime[%i]/D",NMAXCLASSES)); | |
168 | t->Branch("class_lumi",&class_lumi,Form("class_lumi[%i]/D",NMAXCLASSES)); | |
169 | t->Branch("alias_recorded",&alias_recorded,Form("alias_recorded[%i]/l",NBITS)); | |
170 | t->Branch("alias_reconstructed",&alias_reconstructed,Form("alias_reconstructed[%i]/l",NBITS)); | |
171 | t->Branch("alias_accepted",&alias_accepted,Form("alias_accepted[%i]/l",NBITS)); | |
172 | t->Branch("alias_l0b_rate",&alias_lifetime,Form("alias_l0b_rate[%i]/D",NBITS)); | |
173 | t->Branch("alias_lifetime",&alias_lifetime,Form("alias_lifetime[%i]/D",NBITS)); | |
174 | t->Branch("alias_lumi_recorded",&alias_lumi_recorded,Form("alias_lumi_recorded[%i]/D",NBITS)); | |
175 | t->Branch("alias_lumi_reconstructed",&alias_lumi_reconstructed,Form("alias_lumi_reconstructed[%i]/D",NBITS)); | |
176 | t->Branch("alias_lumi_accepted",&alias_lumi_accepted,Form("alias_lumi_accepted[%i]/D",NBITS)); | |
177 | t->Branch("activeDetectors",&activeDetectors); | |
178 | ||
c0d2a42f | 179 | for (Int_t j=1;j<=h->GetNbinsY();j++){ |
180 | TString label = h->GetYaxis()->GetBinLabel(j); | |
c0d2a42f | 181 | // skip background triggers |
182 | // TODO introduce identifier to filter-out background triggers | |
063775bb | 183 | if (label.Contains("-A-")) continue; |
184 | else if (label.Contains("-C-")) continue; | |
185 | else if (label.Contains("-E-")) continue; | |
186 | else if (label.Contains("-AC-")) continue; | |
187 | else if (label.Contains("-ACE-")) continue; | |
188 | else if (label.Contains("-GA-")) continue; | |
189 | else if (label.Contains("-GC-")) continue; | |
190 | else if (label.Contains("1A-ABCE-")) continue; | |
191 | else if (label.Contains("1C-ABCE-")) continue; | |
192 | else if (label.Contains("C0LSR-ABCE-")) continue; | |
c0d2a42f | 193 | |
194 | // Read mask | |
195 | // TODO think how to propagate mask with TBit aliases | |
196 | UInt_t mask = 0; | |
063775bb | 197 | TString classList = ""; // list of classes for given PS bit |
c0d2a42f | 198 | TObjArray* array = label.Tokenize(" "); |
199 | for (Int_t itoken=0;itoken<array->GetEntries();itoken++){ | |
200 | TString token = array->At(itoken)->GetName(); | |
063775bb | 201 | if (itoken==0) classList = token; |
c0d2a42f | 202 | if (token[0]!='&') continue; |
203 | token.Remove(0,1); | |
204 | mask = token.Atoi(); | |
205 | break; | |
206 | } | |
207 | array->Delete(); | |
208 | delete array; | |
063775bb | 209 | printf("%s\n",label.Data()); |
210 | printf("%i\n",mask); | |
c0d2a42f | 211 | if (!mask) continue; |
063775bb | 212 | // Fill all and accepted counters for the most significant bit |
213 | Int_t ibit = TMath::Nint(TMath::Log2(mask)); | |
214 | if (ibit>=NBITS) continue; | |
215 | if (alias_recorded[ibit]) break; | |
216 | ||
217 | alias_reconstructed[ibit] = Int_t(h->GetBinContent(1 ,j)); | |
218 | alias_accepted[ibit] = Int_t(h->GetBinContent(h->GetNbinsX(),j)); | |
219 | ||
220 | // printf("%4i %8i %8i\n",ibit,alias_reconstructed[ibit],alias_accepted[ibit]); | |
221 | ||
222 | classList.Remove(0,1); // remove + | |
223 | array = classList.Tokenize(","); | |
224 | // if trigger bit corresponds to several active classes, just take the last one | |
225 | // example: kTRD | |
226 | // TODO think about more elegant solution | |
227 | for (Int_t i=0;i<array->GetEntriesFast();i++){ | |
228 | TString token = array->At(i)->GetName(); | |
229 | AliTriggerClass* cl = (AliTriggerClass*) classes.FindObject(token.Data()); | |
230 | if (!cl) continue; | |
231 | Int_t iclass = classes.IndexOf(cl); | |
232 | printf(" %30s",token.Data()); | |
233 | printf(" %12lli",class_l0b[iclass]); | |
234 | printf(" %12lli",class_l0a[iclass]); | |
235 | printf(" %12lli",class_l1b[iclass]); | |
236 | printf(" %12lli",class_l1a[iclass]); | |
237 | printf(" %12lli",class_l2b[iclass]); | |
238 | printf(" %12lli",class_l2a[iclass]); | |
239 | printf("\n"); | |
240 | alias_recorded[ibit] = class_l2a[iclass]; | |
241 | alias_lifetime[ibit] = class_lifetime[iclass]; | |
242 | alias_lumi_recorded[ibit] = class_lumi[iclass]; | |
243 | if (!alias_recorded[ibit]) continue; | |
244 | alias_lumi_reconstructed[ibit] = alias_lumi_recorded[ibit]/alias_recorded[ibit]*alias_reconstructed[ibit]; | |
245 | alias_lumi_accepted[ibit] = alias_lumi_recorded[ibit]/alias_recorded[ibit]*alias_accepted[ibit]; | |
c0d2a42f | 246 | } |
063775bb | 247 | array->Delete(); |
248 | delete array; | |
249 | ||
250 | // Fill run QA histograms | |
251 | const char* bitName = bitNames[ibit].Data(); | |
252 | TH1F* hV0A = (TH1F*) fin->Get(Form("trigger_histograms_%s/fHistV0A" ,label.Data())); | |
253 | TH1F* hV0C = (TH1F*) fin->Get(Form("trigger_histograms_%s/fHistV0C" ,label.Data())); | |
254 | TH1F* hFiredBitsSPD = (TH1F*) fin->Get(Form("trigger_histograms_%s/fHistFiredBitsSPD",label.Data())); | |
255 | TH2F* hBitsSPD = (TH2F*) fin->Get(Form("trigger_histograms_%s/fHistBitsSPD" ,label.Data())); | |
256 | TH1F* hTDCZDC = (TH1F*) fin->Get(Form("trigger_histograms_%s/fHistTDCZDC" ,label.Data())); | |
257 | TH2F* hTimeZDC = (TH2F*) fin->Get(Form("trigger_histograms_%s/fHistTimeZDC" ,label.Data())); | |
258 | TH2F* hTimeCorrZDC = (TH2F*) fin->Get(Form("trigger_histograms_%s/fHistTimeCorrZDC" ,label.Data())); | |
259 | if (!hV0A) { printf("QA histogram not found\n"); return 1; } | |
260 | if (!hV0C) { printf("QA histogram not found\n"); return 1; } | |
261 | if (!hFiredBitsSPD) { printf("QA histogram not found\n"); return 1; } | |
262 | if (!hBitsSPD) { printf("QA histogram not found\n"); return 1; } | |
263 | if (!hTDCZDC) { printf("QA histogram not found\n"); return 1; } | |
264 | if (!hTimeZDC) { printf("QA histogram not found\n"); return 1; } | |
265 | if (!hTimeCorrZDC) { printf("QA histogram not found\n"); return 1; } | |
266 | ||
267 | TCanvas* cV0A = new TCanvas(Form("cV0A_%s",bitName),Form("cV0A_%s",bitName),1000,800); | |
5cbc06d4 | 268 | gPad->SetLogy(); |
063775bb | 269 | hV0A->SetTitle(Form("%s: V0A",bitName)); |
270 | hV0A->SetLineWidth(2); | |
271 | hV0A->SetLineColor(kBlue); | |
272 | hV0A->Draw(); | |
273 | gPad->Print(Form("%s_V0A.pdf",bitName)); | |
274 | hV0A->Write(Form("%s_V0A",bitName)); | |
275 | ||
276 | TCanvas* cV0C = new TCanvas(Form("cV0C_%s",bitName),Form("cV0C_%s",bitName),1000,800); | |
5cbc06d4 | 277 | gPad->SetLogy(); |
063775bb | 278 | hV0C->SetTitle(Form("%s: V0C",bitName)); |
279 | hV0C->SetLineWidth(2); | |
280 | hV0C->SetLineColor(kBlue); | |
281 | hV0C->Draw(); | |
282 | gPad->Print(Form("%s_V0C.pdf",bitName)); | |
283 | hV0C->Write(Form("%s_V0C",bitName)); | |
284 | ||
285 | TCanvas* cFiredBitsSPD = new TCanvas(Form("cFiredBitsSPD_%s",bitName),Form("cFiredBitsSPD_%s",bitName),1800,500); | |
5cbc06d4 | 286 | gPad->SetLogy(); |
287 | gPad->SetMargin(0.05,0.01,0.12,0.06); | |
063775bb | 288 | hFiredBitsSPD->SetTitle(Form("%s: hardware FO",bitName)); |
289 | hFiredBitsSPD->SetTitleFont(43); | |
290 | hFiredBitsSPD->SetTitleSize(25); | |
291 | hFiredBitsSPD->GetYaxis()->SetTitleFont(43); | |
292 | hFiredBitsSPD->GetXaxis()->SetLabelFont(43); | |
293 | hFiredBitsSPD->GetYaxis()->SetLabelFont(43); | |
294 | hFiredBitsSPD->GetYaxis()->SetTitleSize(25); | |
295 | hFiredBitsSPD->GetXaxis()->SetLabelSize(25); | |
296 | hFiredBitsSPD->GetYaxis()->SetLabelSize(25); | |
297 | hFiredBitsSPD->GetYaxis()->SetTickLength(0.01); | |
298 | hFiredBitsSPD->GetYaxis()->SetTitleOffset(0.5); | |
299 | hFiredBitsSPD->GetYaxis()->SetDecimals(1); | |
300 | hFiredBitsSPD->SetLineWidth(2); | |
301 | hFiredBitsSPD->SetLineColor(kBlue); | |
302 | hFiredBitsSPD->Draw(); | |
303 | gPad->Print(Form("%s_FiredBitsSPD.pdf",bitName)); | |
304 | hFiredBitsSPD->Write(Form("%s_FiredBitsSPD",bitName)); | |
305 | ||
306 | TCanvas* cBitsSPD = new TCanvas(Form("cBitsSPD_%s",bitName),Form("cBitsSPD_%s",bitName),800,800); | |
5cbc06d4 | 307 | gPad->SetLogz(); |
308 | gPad->SetMargin(0.12,0.12,0.10,0.06); | |
063775bb | 309 | hBitsSPD->SetTitle(Form("%s: hardware FO vs offline FO",bitName)); |
310 | hBitsSPD->GetXaxis()->SetTitleOffset(1.3); | |
311 | hBitsSPD->GetYaxis()->SetTitleOffset(1.6); | |
312 | hBitsSPD->Draw("colz"); | |
313 | gPad->Print(Form("%s_BitsSPD.pdf",bitName)); | |
314 | hBitsSPD->Write(Form("%s_BitsSPD",bitName)); | |
315 | ||
316 | TCanvas* cTimeZDC = new TCanvas(Form("cTimeZDC_%s",bitName),Form("cTimeZDC_%s",bitName),800,800); | |
5cbc06d4 | 317 | gPad->SetLogz(); |
318 | gPad->SetMargin(0.12,0.12,0.10,0.06); | |
063775bb | 319 | hTimeZDC->SetTitle(Form("%s: ZDC timing;TDC timing C-A;TDC timing C+A",bitName)); |
320 | hTimeZDC->GetXaxis()->SetTitleOffset(1.3); | |
321 | hTimeZDC->GetYaxis()->SetTitleOffset(1.6); | |
322 | hTimeZDC->Draw("colz"); | |
323 | gPad->Print(Form("%s_TimeZDC.pdf",bitName)); | |
324 | hTimeZDC->Write(Form("%s_TimeZDC",bitName)); | |
325 | ||
326 | TCanvas* cTimeCorrZDC = new TCanvas(Form("cTimeCorrZDC_%s",bitName),Form("cTimeCorrZDC_%s",bitName),800,800); | |
5cbc06d4 | 327 | gPad->SetLogz(); |
328 | gPad->SetMargin(0.12,0.12,0.10,0.06); | |
063775bb | 329 | hTimeCorrZDC->SetTitle(Form("%s: corrected ZDC timing;TDC timing C-A;TDC timing C+A",bitName)); |
330 | hTimeCorrZDC->GetXaxis()->SetTitleOffset(1.3); | |
331 | hTimeCorrZDC->GetYaxis()->SetTitleOffset(1.6); | |
332 | hTimeCorrZDC->Draw("colz"); | |
333 | gPad->Print(Form("%s_TimeCorrZDC.pdf",bitName)); | |
334 | hTimeCorrZDC->Write(Form("%s_TimeCorrZDC",bitName)); | |
c0d2a42f | 335 | } |
336 | ||
c0d2a42f | 337 | t->Fill(); |
c0d2a42f | 338 | t->Write(); |
339 | fout->Close(); | |
73af8989 | 340 | return 0; |
c0d2a42f | 341 | } |
063775bb | 342 | |
343 |