2 Make default plotsfrom AliTPCdataQA components:
4 aliroot -b -q $ALICE_ROOT/TPC/CalibMacros/CalibQA.C\(121694\);
6 .L $ALICE_ROOT/TPC/CalibMacros/CalibQA.C
11 TCut cutNoise="PadNoise.fElements<1.5&&abs(PadNoise.fElements/PadNoise_Median-1)<0.5";
12 TCut cutTime="abs(TimePosition.fElements-TimePosition_Median)<100";
13 TCut cutOccu="abs(NoThreshold.fElements/NoThreshold_Median-1)<0.9";
14 TCut cutAmp="abs(MaxCharge.fElements/MaxCharge_Median-1)<0.99";
15 TCut cutIROC="sector<36";
16 TCut cutOROC="sector>=36";
19 void CalibQA(Int_t run){
24 TPostScript *ps = new TPostScript("rawQA.ps", 112);
26 canvas=DrawOccupancy();
34 void InitOCDB(Int_t run){
35 gSystem->Load("libANALYSIS");
36 gSystem->Load("libTPCcalib");
37 gROOT->LoadMacro("$ALICE_ROOT/TPC/scripts/OCDBscan/ConfigOCDBLustre.C");
38 //gROOT->LoadMacro("$ALICE_ROOT/TPC/scripts/OCDBscan/ConfigOCDB.C");
39 gROOT->Macro("$ALICE_ROOT/TPC/scripts/OCDBscan/NimStyle.C");
47 AliTPCcalibDB::Instance()->UpdateNonRec();
48 AliTPCdataQA* dataQA = AliTPCcalibDB::Instance()->GetDataQA();
49 AliTPCCalPad* gain = AliTPCcalibDB::Instance()->GetDedxGainFactor();
50 AliTPCCalPad * padNoise = AliTPCcalibDB::Instance()->GetPadNoise();
51 AliTPCPreprocessorOnline preprocesor;
52 gain->SetName("krGain");
53 preprocesor.AddComponent(gain);
54 preprocesor.AddComponent(dataQA->GetNPads());
55 preprocesor.AddComponent(dataQA->GetNTimeBins());
56 preprocesor.AddComponent(dataQA->GetMaxCharge());
57 preprocesor.AddComponent(dataQA->GetNoThreshold());
58 preprocesor.AddComponent(dataQA->GetNLocalMaxima());
59 preprocesor.AddComponent(dataQA->GetTimePosition());
60 preprocesor.AddComponent(padNoise);
61 preprocesor.DumpToFile("QA.root");
65 TCanvas * DrawOccupancy(){
67 gStyle->SetOptStat(0);
69 TTree * tree = (TTree*)f.Get("calPads");
71 TProfile * phoccGainIROC=0;
72 TProfile * phoccGainOROC=0;
74 TCanvas * canvas = new TCanvas("occupancy","occupancy",700,700);
77 tree->Draw("NoThreshold.fElements:gy.fElements:gx.fElements>>hisOccuA(250,-250,250,250,-250,250)",cutNoise+cutTime+cutOccu+"sector%36<18","profcolz");
79 tree->Draw("NoThreshold.fElements:gy.fElements:gx.fElements>>hisOccuC(250,-250,250,250,-250,250)",cutNoise+cutTime+cutOccu+"sector%36>=18","profcolz");
82 tree->Draw("NoThreshold.fElements:krGain.fElements>>hoccGainIROC(20,0.7,1.2)",cutNoise+cutTime+cutOccu+cutIROC,"prof");
83 legend = new TLegend(0.45,0.15,0.85,0.35, "Raw cluster occupancy");
84 phoccGainIROC = (TProfile*)(gROOT->FindObject("hoccGainIROC")->Clone());
85 phoccGainIROC->Draw();
86 phoccGainIROC->SetTitle("IROC");
87 phoccGainIROC->SetName("IROC");
88 phoccGainIROC->GetXaxis()->SetTitle("Krypton Amp (a.u.)");
89 legend->AddEntry(phoccGainIROC);
93 tree->Draw("NoThreshold.fElements:krGain.fElements>>hoccGainOROC(20,0.8,1.2)",cutNoise+cutTime+cutOccu+cutOROC+"lx.fElements<200","prof");
94 phoccGainOROC = (TProfile*)(gROOT->FindObject("hoccGainOROC")->Clone());
95 phoccGainOROC->Draw();
96 phoccGainOROC->SetTitle("OROC");
97 phoccGainOROC->SetName("OROC");
98 phoccGainOROC->GetXaxis()->SetTitle("Krypton Amp (a.u.)");
99 legend = new TLegend(0.45,0.15,0.85,0.35, "Raw cluster occupancy");
100 legend->AddEntry(phoccGainOROC);
105 TCanvas * DrawGain(){
107 // Compare the amplitude with krypton gain amplitude
108 // Similar filtering as in occupancy plot