Skip to content

Commit

Permalink
TRestPatternMask. Solving drawing issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jgalan committed Jun 14, 2024
1 parent f7fc581 commit c497a81
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions source/framework/masks/src/TRestPatternMask.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ TCanvas* TRestPatternMask::DrawMonteCarlo(Int_t nSamples) {
TRandom3* rnd = new TRandom3(0);

for (int n = 0; n < nSamples; n++) {
Double_t xO = 2.5 * (rnd->Rndm() - 0.5) * fMaskRadius + fOffset.X();
Double_t yO = 2.5 * (rnd->Rndm() - 0.5) * fMaskRadius + fOffset.Y();
Double_t xO = 2.5 * (rnd->Rndm() - 0.5) * fMaskRadius;
Double_t yO = 2.5 * (rnd->Rndm() - 0.5) * fMaskRadius;
Double_t x = xO;
Double_t y = yO;

Expand Down Expand Up @@ -227,9 +227,9 @@ TCanvas* TRestPatternMask::DrawMonteCarlo(Int_t nSamples) {
nGraphs++;
}

gridGraphs[0]->GetXaxis()->SetLimits(-1.25 * fMaskRadius + fOffset.X(), 1.25 * fMaskRadius + fOffset.X());
gridGraphs[0]->GetHistogram()->SetMaximum(1.25 * fMaskRadius + fOffset.Y());
gridGraphs[0]->GetHistogram()->SetMinimum(-1.25 * fMaskRadius + fOffset.Y());
gridGraphs[0]->GetXaxis()->SetLimits(-1.25 * fMaskRadius, 1.25 * fMaskRadius);
gridGraphs[0]->GetHistogram()->SetMaximum(1.25 * fMaskRadius );
gridGraphs[0]->GetHistogram()->SetMinimum(-1.25 * fMaskRadius );

gridGraphs[0]->GetXaxis()->SetTitle("X [mm]");
gridGraphs[0]->GetXaxis()->SetTitleSize(0.04);
Expand Down

0 comments on commit c497a81

Please sign in to comment.