Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9689 from venturia/dpganalysis_sistriptools-75x
Fix for orbit number = 3564, update of the documentation and other improvements
- Loading branch information
Showing
29 changed files
with
671 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#include "DPGAnalysis/SiStripTools/bin/BSvsBPIX.h" | ||
#include "TFile.h" | ||
#include "TH1F.h" | ||
#include "TProfile.h" | ||
#include "TGraphErrors.h" | ||
#include "TCanvas.h" | ||
#include "TDirectory.h" | ||
#include <iostream> | ||
|
||
void BSvsBPIXPlot(TFile* ff, const char* bsmodule, const char* occumodule, const int run) { | ||
|
||
TGraphErrors* bspos = new TGraphErrors(); | ||
TGraphErrors* bpixpos = new TGraphErrors(); | ||
|
||
if(ff) { | ||
|
||
char bsfolder[200]; | ||
sprintf(bsfolder,"%s/run_%d",bsmodule,run); | ||
if(ff->cd(bsfolder)) { | ||
TH1F* bsx = (TH1F*)gDirectory->Get("bsxrun"); | ||
TH1F* bsy = (TH1F*)gDirectory->Get("bsyrun"); | ||
if(bsx && bsy) { | ||
std::cout << "beam spot position (" | ||
<< bsx->GetMean() << "+/-" << bsx->GetMeanError() << "," | ||
<< bsy->GetMean() << "+/-" << bsy->GetMeanError() << ")" << std::endl; | ||
bspos->SetPoint(0,bsx->GetMean(),bsy->GetMean()); | ||
bspos->SetPointError(0,bsx->GetMeanError(),bsy->GetMeanError()); | ||
} | ||
} | ||
char occufolder[200]; | ||
sprintf(occufolder,"%s/run_%d",occumodule,run); | ||
if(ff->cd(occufolder)) { | ||
TProfile* xmean = (TProfile*)gDirectory->Get("avex"); | ||
TProfile* ymean = (TProfile*)gDirectory->Get("avey"); | ||
if(xmean && ymean) { | ||
for(int i=1;i<=xmean->GetNbinsX();++i) { | ||
if(xmean->GetBinEntries(i) >0) { | ||
std::cout << "ladder position " << i << " : (" | ||
<< xmean->GetBinContent(i) << "+/-" << xmean->GetBinError(i) << "," | ||
<< ymean->GetBinContent(i) << "+/-" << ymean->GetBinError(i) << ")" << std::endl; | ||
int point = bpixpos->GetN(); | ||
bpixpos->SetPoint(point,xmean->GetBinContent(i),ymean->GetBinContent(i)); | ||
bpixpos->SetPointError(point,xmean->GetBinError(i),ymean->GetBinError(i)); | ||
} | ||
} | ||
} | ||
|
||
} | ||
} | ||
new TCanvas("bsbpix","bsbpix",500,500); | ||
bpixpos->Draw("ap"); | ||
bspos->Draw("p"); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#ifndef DPGAnalysis_SiStripTools_BSvsBPIX_h | ||
#define DPGAnalysis_SiStripTools_BSvsBPIX_h | ||
|
||
class TFile; | ||
|
||
void BSvsBPIXPlot(TFile* ff, const char* bsmodule, const char* occumodule, const int run); | ||
|
||
#endif // DPGAnalysis_SiStripTools_BSvsBPIX_h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.