Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:14:50

0001 /**
0002  * This macro can run on the output root file from SyncO2O and produce
0003  * a histogram showing the digis, digis with masking and number of
0004  * detIds with HV off. <br>
0005  * The digis with masking should remain always at a stable level during
0006  * a run and go to zero when the tracker HV is off. <br>
0007  * In contrast the digis will go up when the HV is being turned off. <br>
0008  * The increase in modules with HV off (provided a sufficient reduction
0009  * is used) will be a straigth line going up and will begin when the
0010  * off command is given to the modules from DCS.
0011  */
0012 
0013 {
0014   TFile * inputFile = new TFile("digisAndHVvsTime.root", "read");
0015   TH1F * HVoff = (TH1F*)inputFile->Get("HVoff");
0016   TH1F * digisWithMasking = (TH1F*)inputFile->Get("digisWithMasking");
0017   TH1F * digis = (TH1F*)inputFile->Get("digis");
0018 
0019   TCanvas * canvas = new TCanvas("digiHVcomp", "digis vs HV off comparison", 1000, 800);
0020   canvas->Draw();
0021 
0022   digis->Draw();
0023   digisWithMasking->Draw("same");
0024   digisWithMasking->SetLineColor(kBlue);
0025   HVoff->Draw("same");
0026   HVoff->Scale(100);
0027   HVoff->SetLineColor(kRed);
0028 
0029   TLegend * legend = new TLegend(0.1, 0.7, 0.48, 0.9);
0030   legend->SetHeader("digis vs HV off comparison");
0031   legend->AddEntry(digis, "all digis");
0032   legend->AddEntry(digisWithMasking, "digis with HV off masking");
0033   legend->AddEntry(HVoff, "number of detId with HV off");
0034   legend->Draw("same");
0035 }