Add plotting feature for beam spot and rotation angle.
This commit is contained in:
parent
a8bbb6f44e
commit
45209156fa
@ -1,6 +1,6 @@
|
||||
# Form implementation generated from reading ui file 'QmuSRSim.ui'
|
||||
#
|
||||
# Created: Fri Apr 27 10:09:39 2012
|
||||
# Created: Fri Apr 27 23:28:06 2012
|
||||
# by: The PerlQt User Interface Compiler (puic)
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
@ -32,20 +32,15 @@ use Qt::slots
|
||||
CreateAllInput => [],
|
||||
StartCalc => [],
|
||||
GetPATH => [],
|
||||
CheckSim => [];
|
||||
CheckSim => [],
|
||||
plotBeamSpot => [];
|
||||
use Qt::attributes qw(
|
||||
Tabs
|
||||
tab
|
||||
SpinRotator
|
||||
frame5
|
||||
textLabel2_3_2_2_2
|
||||
ENERGY
|
||||
textLabel2_3_2_2_2_2
|
||||
textLabel2_2_2_2_3_2_2
|
||||
textLabel2_2_2_2_3_2
|
||||
textLabel2_2_2_2_3
|
||||
SR_B
|
||||
textLabel2_2_2_2_2_3
|
||||
SR_E
|
||||
textLabel2_2_3
|
||||
BFIELD
|
||||
textLabel2_2_2_2_3_2_3
|
||||
@ -70,7 +65,13 @@ use Qt::attributes qw(
|
||||
textLabel2_2_2_2_3_2_2_3_2_2
|
||||
RA_B
|
||||
RA_L
|
||||
tab_2
|
||||
textLabel2_2_2_2_3_2_2
|
||||
textLabel2_2_2_2_3_2
|
||||
textLabel2_2_2_2_3
|
||||
SR_B
|
||||
textLabel2_2_2_2_2_3
|
||||
SR_E
|
||||
Old
|
||||
frame5_2
|
||||
textLabel2_3_2_3_2
|
||||
textLabel2_3_2_3
|
||||
@ -91,19 +92,16 @@ use Qt::attributes qw(
|
||||
L2_2
|
||||
L3_2
|
||||
BFIELD_2
|
||||
TabPage
|
||||
SaveData
|
||||
textLabel2_2_5
|
||||
tab150778240
|
||||
ROOTSYS
|
||||
Geant4Button
|
||||
SaveDataButton
|
||||
musrSimButton
|
||||
musrSim
|
||||
textLabel2_2_4
|
||||
Geant4
|
||||
musrSimButton
|
||||
textLabel2_2_6
|
||||
textLabel2_2
|
||||
ROOTSYSButton
|
||||
ROOTSYS
|
||||
musrSim
|
||||
textLabel1
|
||||
MAC
|
||||
textLabel1_2
|
||||
@ -111,7 +109,6 @@ use Qt::attributes qw(
|
||||
Start
|
||||
MenuBar
|
||||
fileMenu
|
||||
editMenu
|
||||
Plot
|
||||
helpMenu
|
||||
fileNewAction
|
||||
@ -130,7 +127,7 @@ use Qt::attributes qw(
|
||||
helpIndexAction
|
||||
helpAboutAction
|
||||
plotEnvelopesAction
|
||||
plotBeam_SliceAction
|
||||
plotBeamSpot_Action
|
||||
);
|
||||
|
||||
|
||||
@ -17894,9 +17891,9 @@ sub NEW
|
||||
Tabs->setEnabled( 1 );
|
||||
Tabs->setBackgroundOrigin( &Qt::TabWidget::WidgetOrigin() );
|
||||
|
||||
tab = Qt::Widget(Tabs, "tab");
|
||||
SpinRotator = Qt::Widget(Tabs, "SpinRotator");
|
||||
|
||||
frame5 = Qt::Frame(tab, "frame5");
|
||||
frame5 = Qt::Frame(SpinRotator, "frame5");
|
||||
frame5->setGeometry( Qt::Rect(0, 0, 811, 271) );
|
||||
frame5->setPaletteBackgroundPixmap( $image0 );
|
||||
frame5->setFrameShape( &Qt::Frame::StyledPanel() );
|
||||
@ -17923,201 +17920,201 @@ sub NEW
|
||||
$layout10->addWidget(textLabel2_3_2_2_2_2);
|
||||
|
||||
my $LayoutWidget_2 = Qt::Widget(frame5, '$LayoutWidget_2');
|
||||
$LayoutWidget_2->setGeometry( Qt::Rect(160, 210, 140, 50) );
|
||||
my $layout11 = Qt::GridLayout($LayoutWidget_2, 1, 1, 0, 0, '$layout11');
|
||||
$LayoutWidget_2->setGeometry( Qt::Rect(604, 230, 130, 26) );
|
||||
my $layout13 = Qt::HBoxLayout($LayoutWidget_2, 0, 0, '$layout13');
|
||||
|
||||
textLabel2_2_2_2_3_2_2 = Qt::Label($LayoutWidget_2, "textLabel2_2_2_2_3_2_2");
|
||||
textLabel2_2_2_2_3_2_2->setBackgroundMode( &Qt::Label::PaletteBackground() );
|
||||
textLabel2_2_2_2_3_2_2->setPaletteForegroundColor( Qt::Color(0, 0, 0) );
|
||||
textLabel2_2_2_2_3_2_2->setPaletteBackgroundColor( Qt::Color(255, 255, 255) );
|
||||
|
||||
$layout11->addWidget(textLabel2_2_2_2_3_2_2, 1, 2);
|
||||
|
||||
textLabel2_2_2_2_3_2 = Qt::Label($LayoutWidget_2, "textLabel2_2_2_2_3_2");
|
||||
textLabel2_2_2_2_3_2->setBackgroundMode( &Qt::Label::PaletteBackground() );
|
||||
textLabel2_2_2_2_3_2->setPaletteForegroundColor( Qt::Color(0, 0, 0) );
|
||||
textLabel2_2_2_2_3_2->setPaletteBackgroundColor( Qt::Color(255, 255, 255) );
|
||||
|
||||
$layout11->addWidget(textLabel2_2_2_2_3_2, 0, 2);
|
||||
|
||||
textLabel2_2_2_2_3 = Qt::Label($LayoutWidget_2, "textLabel2_2_2_2_3");
|
||||
textLabel2_2_2_2_3->setBackgroundMode( &Qt::Label::PaletteBackground() );
|
||||
textLabel2_2_2_2_3->setPaletteForegroundColor( Qt::Color(0, 0, 0) );
|
||||
textLabel2_2_2_2_3->setPaletteBackgroundColor( Qt::Color(255, 255, 255) );
|
||||
|
||||
$layout11->addWidget(textLabel2_2_2_2_3, 0, 0);
|
||||
|
||||
SR_B = Qt::LineEdit($LayoutWidget_2, "SR_B");
|
||||
|
||||
$layout11->addWidget(SR_B, 0, 1);
|
||||
|
||||
textLabel2_2_2_2_2_3 = Qt::Label($LayoutWidget_2, "textLabel2_2_2_2_2_3");
|
||||
textLabel2_2_2_2_2_3->setBackgroundMode( &Qt::Label::PaletteBackground() );
|
||||
textLabel2_2_2_2_2_3->setPaletteForegroundColor( Qt::Color(0, 0, 0) );
|
||||
textLabel2_2_2_2_2_3->setPaletteBackgroundColor( Qt::Color(255, 255, 255) );
|
||||
|
||||
$layout11->addWidget(textLabel2_2_2_2_2_3, 1, 0);
|
||||
|
||||
SR_E = Qt::LineEdit($LayoutWidget_2, "SR_E");
|
||||
|
||||
$layout11->addWidget(SR_E, 1, 1);
|
||||
|
||||
my $LayoutWidget_3 = Qt::Widget(frame5, '$LayoutWidget_3');
|
||||
$LayoutWidget_3->setGeometry( Qt::Rect(604, 230, 130, 26) );
|
||||
my $layout13 = Qt::HBoxLayout($LayoutWidget_3, 0, 0, '$layout13');
|
||||
|
||||
textLabel2_2_3 = Qt::Label($LayoutWidget_3, "textLabel2_2_3");
|
||||
textLabel2_2_3 = Qt::Label($LayoutWidget_2, "textLabel2_2_3");
|
||||
textLabel2_2_3->setBackgroundMode( &Qt::Label::PaletteBackground() );
|
||||
textLabel2_2_3->setPaletteForegroundColor( Qt::Color(0, 0, 0) );
|
||||
textLabel2_2_3->setPaletteBackgroundColor( Qt::Color(255, 255, 255) );
|
||||
$layout13->addWidget(textLabel2_2_3);
|
||||
|
||||
BFIELD = Qt::LineEdit($LayoutWidget_3, "BFIELD");
|
||||
BFIELD = Qt::LineEdit($LayoutWidget_2, "BFIELD");
|
||||
$layout13->addWidget(BFIELD);
|
||||
|
||||
textLabel2_2_2_2_3_2_3 = Qt::Label($LayoutWidget_3, "textLabel2_2_2_2_3_2_3");
|
||||
textLabel2_2_2_2_3_2_3 = Qt::Label($LayoutWidget_2, "textLabel2_2_2_2_3_2_3");
|
||||
textLabel2_2_2_2_3_2_3->setBackgroundMode( &Qt::Label::PaletteBackground() );
|
||||
textLabel2_2_2_2_3_2_3->setPaletteForegroundColor( Qt::Color(0, 0, 0) );
|
||||
textLabel2_2_2_2_3_2_3->setPaletteBackgroundColor( Qt::Color(255, 255, 255) );
|
||||
$layout13->addWidget(textLabel2_2_2_2_3_2_3);
|
||||
|
||||
my $LayoutWidget_4 = Qt::Widget(frame5, '$LayoutWidget_4');
|
||||
$LayoutWidget_4->setGeometry( Qt::Rect(453, 230, 90, 26) );
|
||||
my $layout14 = Qt::HBoxLayout($LayoutWidget_4, 0, 0, '$layout14');
|
||||
my $LayoutWidget_3 = Qt::Widget(frame5, '$LayoutWidget_3');
|
||||
$LayoutWidget_3->setGeometry( Qt::Rect(453, 230, 90, 26) );
|
||||
my $layout14 = Qt::HBoxLayout($LayoutWidget_3, 0, 0, '$layout14');
|
||||
|
||||
textLabel2_2_2 = Qt::Label($LayoutWidget_4, "textLabel2_2_2");
|
||||
textLabel2_2_2 = Qt::Label($LayoutWidget_3, "textLabel2_2_2");
|
||||
textLabel2_2_2->setBackgroundMode( &Qt::Label::PaletteBackground() );
|
||||
textLabel2_2_2->setPaletteForegroundColor( Qt::Color(0, 0, 0) );
|
||||
textLabel2_2_2->setPaletteBackgroundColor( Qt::Color(255, 255, 255) );
|
||||
$layout14->addWidget(textLabel2_2_2);
|
||||
|
||||
TL = Qt::LineEdit($LayoutWidget_4, "TL");
|
||||
TL = Qt::LineEdit($LayoutWidget_3, "TL");
|
||||
$layout14->addWidget(TL);
|
||||
|
||||
textLabel2_2_2_2_3_2_2_2_2 = Qt::Label($LayoutWidget_4, "textLabel2_2_2_2_3_2_2_2_2");
|
||||
textLabel2_2_2_2_3_2_2_2_2 = Qt::Label($LayoutWidget_3, "textLabel2_2_2_2_3_2_2_2_2");
|
||||
textLabel2_2_2_2_3_2_2_2_2->setBackgroundMode( &Qt::Label::PaletteBackground() );
|
||||
textLabel2_2_2_2_3_2_2_2_2->setPaletteForegroundColor( Qt::Color(0, 0, 0) );
|
||||
textLabel2_2_2_2_3_2_2_2_2->setPaletteBackgroundColor( Qt::Color(255, 255, 255) );
|
||||
$layout14->addWidget(textLabel2_2_2_2_3_2_2_2_2);
|
||||
|
||||
my $LayoutWidget_5 = Qt::Widget(frame5, '$LayoutWidget_5');
|
||||
$LayoutWidget_5->setGeometry( Qt::Rect(313, 230, 110, 26) );
|
||||
my $layout15 = Qt::HBoxLayout($LayoutWidget_5, 0, 0, '$layout15');
|
||||
my $LayoutWidget_4 = Qt::Widget(frame5, '$LayoutWidget_4');
|
||||
$LayoutWidget_4->setGeometry( Qt::Rect(313, 230, 110, 26) );
|
||||
my $layout15 = Qt::HBoxLayout($LayoutWidget_4, 0, 0, '$layout15');
|
||||
|
||||
textLabel2_3_2_2 = Qt::Label($LayoutWidget_5, "textLabel2_3_2_2");
|
||||
textLabel2_3_2_2 = Qt::Label($LayoutWidget_4, "textLabel2_3_2_2");
|
||||
textLabel2_3_2_2->setBackgroundMode( &Qt::Label::PaletteBackground() );
|
||||
textLabel2_3_2_2->setPaletteForegroundColor( Qt::Color(0, 0, 0) );
|
||||
textLabel2_3_2_2->setPaletteBackgroundColor( Qt::Color(255, 255, 255) );
|
||||
$layout15->addWidget(textLabel2_3_2_2);
|
||||
|
||||
L3 = Qt::LineEdit($LayoutWidget_5, "L3");
|
||||
L3 = Qt::LineEdit($LayoutWidget_4, "L3");
|
||||
$layout15->addWidget(L3);
|
||||
|
||||
textLabel2_2_2_2_3_2_2_2 = Qt::Label($LayoutWidget_5, "textLabel2_2_2_2_3_2_2_2");
|
||||
textLabel2_2_2_2_3_2_2_2 = Qt::Label($LayoutWidget_4, "textLabel2_2_2_2_3_2_2_2");
|
||||
textLabel2_2_2_2_3_2_2_2->setBackgroundMode( &Qt::Label::PaletteBackground() );
|
||||
textLabel2_2_2_2_3_2_2_2->setPaletteForegroundColor( Qt::Color(0, 0, 0) );
|
||||
textLabel2_2_2_2_3_2_2_2->setPaletteBackgroundColor( Qt::Color(255, 255, 255) );
|
||||
$layout15->addWidget(textLabel2_2_2_2_3_2_2_2);
|
||||
|
||||
my $LayoutWidget_6 = Qt::Widget(frame5, '$LayoutWidget_6');
|
||||
$LayoutWidget_6->setGeometry( Qt::Rect(40, 100, 100, 26) );
|
||||
my $layout16 = Qt::HBoxLayout($LayoutWidget_6, 0, 0, '$layout16');
|
||||
my $LayoutWidget_5 = Qt::Widget(frame5, '$LayoutWidget_5');
|
||||
$LayoutWidget_5->setGeometry( Qt::Rect(40, 100, 100, 26) );
|
||||
my $layout16 = Qt::HBoxLayout($LayoutWidget_5, 0, 0, '$layout16');
|
||||
|
||||
textLabel2 = Qt::Label($LayoutWidget_6, "textLabel2");
|
||||
textLabel2 = Qt::Label($LayoutWidget_5, "textLabel2");
|
||||
textLabel2->setBackgroundMode( &Qt::Label::PaletteBackground() );
|
||||
textLabel2->setPaletteForegroundColor( Qt::Color(0, 0, 0) );
|
||||
textLabel2->setPaletteBackgroundColor( Qt::Color(255, 255, 255) );
|
||||
$layout16->addWidget(textLabel2);
|
||||
|
||||
L1 = Qt::LineEdit($LayoutWidget_6, "L1");
|
||||
L1 = Qt::LineEdit($LayoutWidget_5, "L1");
|
||||
$layout16->addWidget(L1);
|
||||
|
||||
textLabel2_2_2_2_3_2_2_3 = Qt::Label($LayoutWidget_6, "textLabel2_2_2_2_3_2_2_3");
|
||||
textLabel2_2_2_2_3_2_2_3 = Qt::Label($LayoutWidget_5, "textLabel2_2_2_2_3_2_2_3");
|
||||
textLabel2_2_2_2_3_2_2_3->setBackgroundMode( &Qt::Label::PaletteBackground() );
|
||||
textLabel2_2_2_2_3_2_2_3->setPaletteForegroundColor( Qt::Color(0, 0, 0) );
|
||||
textLabel2_2_2_2_3_2_2_3->setPaletteBackgroundColor( Qt::Color(255, 255, 255) );
|
||||
$layout16->addWidget(textLabel2_2_2_2_3_2_2_3);
|
||||
|
||||
my $LayoutWidget_7 = Qt::Widget(frame5, '$LayoutWidget_7');
|
||||
$LayoutWidget_7->setGeometry( Qt::Rect(640, 40, 110, 98) );
|
||||
my $layout33 = Qt::GridLayout($LayoutWidget_7, 1, 1, 0, 0, '$layout33');
|
||||
my $LayoutWidget_6 = Qt::Widget(frame5, '$LayoutWidget_6');
|
||||
$LayoutWidget_6->setGeometry( Qt::Rect(640, 40, 110, 98) );
|
||||
my $layout33 = Qt::GridLayout($LayoutWidget_6, 1, 1, 0, 0, '$layout33');
|
||||
|
||||
textLabel2_2_2_2_2 = Qt::Label($LayoutWidget_7, "textLabel2_2_2_2_2");
|
||||
textLabel2_2_2_2_2 = Qt::Label($LayoutWidget_6, "textLabel2_2_2_2_2");
|
||||
textLabel2_2_2_2_2->setBackgroundMode( &Qt::Label::PaletteBackground() );
|
||||
textLabel2_2_2_2_2->setPaletteForegroundColor( Qt::Color(0, 0, 0) );
|
||||
textLabel2_2_2_2_2->setPaletteBackgroundColor( Qt::Color(255, 255, 255) );
|
||||
|
||||
$layout33->addWidget(textLabel2_2_2_2_2, 1, 0);
|
||||
|
||||
RA_R = Qt::LineEdit($LayoutWidget_7, "RA_R");
|
||||
RA_R = Qt::LineEdit($LayoutWidget_6, "RA_R");
|
||||
|
||||
$layout33->addWidget(RA_R, 2, 1);
|
||||
|
||||
textLabel2_2_2_2_3_2_2_3_2 = Qt::Label($LayoutWidget_7, "textLabel2_2_2_2_3_2_2_3_2");
|
||||
textLabel2_2_2_2_3_2_2_3_2 = Qt::Label($LayoutWidget_6, "textLabel2_2_2_2_3_2_2_3_2");
|
||||
textLabel2_2_2_2_3_2_2_3_2->setBackgroundMode( &Qt::Label::PaletteBackground() );
|
||||
textLabel2_2_2_2_3_2_2_3_2->setPaletteForegroundColor( Qt::Color(0, 0, 0) );
|
||||
textLabel2_2_2_2_3_2_2_3_2->setPaletteBackgroundColor( Qt::Color(255, 255, 255) );
|
||||
|
||||
$layout33->addWidget(textLabel2_2_2_2_3_2_2_3_2, 0, 2);
|
||||
|
||||
textLabel2_2_2_2_2_2 = Qt::Label($LayoutWidget_7, "textLabel2_2_2_2_2_2");
|
||||
textLabel2_2_2_2_2_2 = Qt::Label($LayoutWidget_6, "textLabel2_2_2_2_2_2");
|
||||
textLabel2_2_2_2_2_2->setBackgroundMode( &Qt::Label::PaletteBackground() );
|
||||
textLabel2_2_2_2_2_2->setPaletteForegroundColor( Qt::Color(0, 0, 0) );
|
||||
textLabel2_2_2_2_2_2->setPaletteBackgroundColor( Qt::Color(255, 255, 255) );
|
||||
|
||||
$layout33->addWidget(textLabel2_2_2_2_2_2, 2, 0);
|
||||
|
||||
textLabel2_2_2_2_3_2_2_3_2_2_2 = Qt::Label($LayoutWidget_7, "textLabel2_2_2_2_3_2_2_3_2_2_2");
|
||||
textLabel2_2_2_2_3_2_2_3_2_2_2 = Qt::Label($LayoutWidget_6, "textLabel2_2_2_2_3_2_2_3_2_2_2");
|
||||
textLabel2_2_2_2_3_2_2_3_2_2_2->setBackgroundMode( &Qt::Label::PaletteBackground() );
|
||||
textLabel2_2_2_2_3_2_2_3_2_2_2->setPaletteForegroundColor( Qt::Color(0, 0, 0) );
|
||||
textLabel2_2_2_2_3_2_2_3_2_2_2->setPaletteBackgroundColor( Qt::Color(255, 255, 255) );
|
||||
|
||||
$layout33->addWidget(textLabel2_2_2_2_3_2_2_3_2_2_2, 2, 2);
|
||||
|
||||
RA_T = Qt::LineEdit($LayoutWidget_7, "RA_T");
|
||||
RA_T = Qt::LineEdit($LayoutWidget_6, "RA_T");
|
||||
|
||||
$layout33->addWidget(RA_T, 0, 1);
|
||||
|
||||
textLabel2_2_2_2 = Qt::Label($LayoutWidget_7, "textLabel2_2_2_2");
|
||||
textLabel2_2_2_2 = Qt::Label($LayoutWidget_6, "textLabel2_2_2_2");
|
||||
textLabel2_2_2_2->setBackgroundMode( &Qt::Label::PaletteBackground() );
|
||||
textLabel2_2_2_2->setPaletteForegroundColor( Qt::Color(0, 0, 0) );
|
||||
textLabel2_2_2_2->setPaletteBackgroundColor( Qt::Color(255, 255, 255) );
|
||||
|
||||
$layout33->addWidget(textLabel2_2_2_2, 0, 0);
|
||||
|
||||
textLabel2_2_2_2_3_2_2_3_2_2_2_2 = Qt::Label($LayoutWidget_7, "textLabel2_2_2_2_3_2_2_3_2_2_2_2");
|
||||
textLabel2_2_2_2_3_2_2_3_2_2_2_2 = Qt::Label($LayoutWidget_6, "textLabel2_2_2_2_3_2_2_3_2_2_2_2");
|
||||
textLabel2_2_2_2_3_2_2_3_2_2_2_2->setBackgroundMode( &Qt::Label::PaletteBackground() );
|
||||
textLabel2_2_2_2_3_2_2_3_2_2_2_2->setPaletteForegroundColor( Qt::Color(0, 0, 0) );
|
||||
textLabel2_2_2_2_3_2_2_3_2_2_2_2->setPaletteBackgroundColor( Qt::Color(255, 255, 255) );
|
||||
|
||||
$layout33->addWidget(textLabel2_2_2_2_3_2_2_3_2_2_2_2, 3, 2);
|
||||
|
||||
textLabel2_2_2_2_2_2_2 = Qt::Label($LayoutWidget_7, "textLabel2_2_2_2_2_2_2");
|
||||
textLabel2_2_2_2_2_2_2 = Qt::Label($LayoutWidget_6, "textLabel2_2_2_2_2_2_2");
|
||||
textLabel2_2_2_2_2_2_2->setBackgroundMode( &Qt::Label::PaletteBackground() );
|
||||
textLabel2_2_2_2_2_2_2->setPaletteForegroundColor( Qt::Color(0, 0, 0) );
|
||||
textLabel2_2_2_2_2_2_2->setPaletteBackgroundColor( Qt::Color(255, 255, 255) );
|
||||
|
||||
$layout33->addWidget(textLabel2_2_2_2_2_2_2, 3, 0);
|
||||
|
||||
textLabel2_2_2_2_3_2_2_3_2_2 = Qt::Label($LayoutWidget_7, "textLabel2_2_2_2_3_2_2_3_2_2");
|
||||
textLabel2_2_2_2_3_2_2_3_2_2 = Qt::Label($LayoutWidget_6, "textLabel2_2_2_2_3_2_2_3_2_2");
|
||||
textLabel2_2_2_2_3_2_2_3_2_2->setBackgroundMode( &Qt::Label::PaletteBackground() );
|
||||
textLabel2_2_2_2_3_2_2_3_2_2->setPaletteForegroundColor( Qt::Color(0, 0, 0) );
|
||||
textLabel2_2_2_2_3_2_2_3_2_2->setPaletteBackgroundColor( Qt::Color(255, 255, 255) );
|
||||
|
||||
$layout33->addWidget(textLabel2_2_2_2_3_2_2_3_2_2, 1, 2);
|
||||
|
||||
RA_B = Qt::LineEdit($LayoutWidget_7, "RA_B");
|
||||
RA_B = Qt::LineEdit($LayoutWidget_6, "RA_B");
|
||||
|
||||
$layout33->addWidget(RA_B, 1, 1);
|
||||
|
||||
RA_L = Qt::LineEdit($LayoutWidget_7, "RA_L");
|
||||
RA_L = Qt::LineEdit($LayoutWidget_6, "RA_L");
|
||||
|
||||
$layout33->addWidget(RA_L, 3, 1);
|
||||
Tabs->insertTab( tab, "" );
|
||||
|
||||
tab_2 = Qt::Widget(Tabs, "tab_2");
|
||||
my $LayoutWidget_7 = Qt::Widget(frame5, '$LayoutWidget_7');
|
||||
$LayoutWidget_7->setGeometry( Qt::Rect(160, 210, 140, 50) );
|
||||
my $layout11 = Qt::GridLayout($LayoutWidget_7, 1, 1, 0, 0, '$layout11');
|
||||
|
||||
frame5_2 = Qt::Frame(tab_2, "frame5_2");
|
||||
textLabel2_2_2_2_3_2_2 = Qt::Label($LayoutWidget_7, "textLabel2_2_2_2_3_2_2");
|
||||
textLabel2_2_2_2_3_2_2->setBackgroundMode( &Qt::Label::PaletteBackground() );
|
||||
textLabel2_2_2_2_3_2_2->setPaletteForegroundColor( Qt::Color(0, 0, 0) );
|
||||
textLabel2_2_2_2_3_2_2->setPaletteBackgroundColor( Qt::Color(255, 255, 255) );
|
||||
|
||||
$layout11->addWidget(textLabel2_2_2_2_3_2_2, 1, 2);
|
||||
|
||||
textLabel2_2_2_2_3_2 = Qt::Label($LayoutWidget_7, "textLabel2_2_2_2_3_2");
|
||||
textLabel2_2_2_2_3_2->setBackgroundMode( &Qt::Label::PaletteBackground() );
|
||||
textLabel2_2_2_2_3_2->setPaletteForegroundColor( Qt::Color(0, 0, 0) );
|
||||
textLabel2_2_2_2_3_2->setPaletteBackgroundColor( Qt::Color(255, 255, 255) );
|
||||
|
||||
$layout11->addWidget(textLabel2_2_2_2_3_2, 0, 2);
|
||||
|
||||
textLabel2_2_2_2_3 = Qt::Label($LayoutWidget_7, "textLabel2_2_2_2_3");
|
||||
textLabel2_2_2_2_3->setBackgroundMode( &Qt::Label::PaletteBackground() );
|
||||
textLabel2_2_2_2_3->setPaletteForegroundColor( Qt::Color(0, 0, 0) );
|
||||
textLabel2_2_2_2_3->setPaletteBackgroundColor( Qt::Color(255, 255, 255) );
|
||||
|
||||
$layout11->addWidget(textLabel2_2_2_2_3, 0, 0);
|
||||
|
||||
SR_B = Qt::LineEdit($LayoutWidget_7, "SR_B");
|
||||
|
||||
$layout11->addWidget(SR_B, 0, 1);
|
||||
|
||||
textLabel2_2_2_2_2_3 = Qt::Label($LayoutWidget_7, "textLabel2_2_2_2_2_3");
|
||||
textLabel2_2_2_2_2_3->setBackgroundMode( &Qt::Label::PaletteBackground() );
|
||||
textLabel2_2_2_2_2_3->setPaletteForegroundColor( Qt::Color(0, 0, 0) );
|
||||
textLabel2_2_2_2_2_3->setPaletteBackgroundColor( Qt::Color(255, 255, 255) );
|
||||
|
||||
$layout11->addWidget(textLabel2_2_2_2_2_3, 1, 0);
|
||||
|
||||
SR_E = Qt::LineEdit($LayoutWidget_7, "SR_E");
|
||||
|
||||
$layout11->addWidget(SR_E, 1, 1);
|
||||
Tabs->insertTab( SpinRotator, "" );
|
||||
|
||||
Old = Qt::Widget(Tabs, "Old");
|
||||
|
||||
frame5_2 = Qt::Frame(Old, "frame5_2");
|
||||
frame5_2->setGeometry( Qt::Rect(0, 0, 811, 271) );
|
||||
frame5_2->setPaletteBackgroundPixmap( $image1 );
|
||||
frame5_2->setFrameShape( &Qt::Frame::StyledPanel() );
|
||||
@ -18281,62 +18278,50 @@ sub NEW
|
||||
|
||||
BFIELD_2 = Qt::LineEdit(frame5_2, "BFIELD_2");
|
||||
BFIELD_2->setGeometry( Qt::Rect(680, 230, 55, 24) );
|
||||
Tabs->insertTab( tab_2, "" );
|
||||
Tabs->insertTab( Old, "" );
|
||||
|
||||
TabPage = Qt::Widget(Tabs, "TabPage");
|
||||
tab150778240 = Qt::Widget(Tabs, "tab150778240");
|
||||
|
||||
my $LayoutWidget_10 = Qt::Widget(TabPage, '$LayoutWidget_10');
|
||||
$LayoutWidget_10->setGeometry( Qt::Rect(11, 10, 780, 170) );
|
||||
my $layout13_2 = Qt::GridLayout($LayoutWidget_10, 1, 1, 11, 6, '$layout13_2');
|
||||
|
||||
SaveData = Qt::LineEdit($LayoutWidget_10, "SaveData");
|
||||
|
||||
$layout13_2->addWidget(SaveData, 2, 1);
|
||||
|
||||
textLabel2_2_5 = Qt::Label($LayoutWidget_10, "textLabel2_2_5");
|
||||
|
||||
$layout13_2->addWidget(textLabel2_2_5, 2, 0);
|
||||
|
||||
Geant4Button = Qt::PushButton($LayoutWidget_10, "Geant4Button");
|
||||
|
||||
$layout13_2->addWidget(Geant4Button, 1, 2);
|
||||
|
||||
SaveDataButton = Qt::PushButton($LayoutWidget_10, "SaveDataButton");
|
||||
|
||||
$layout13_2->addWidget(SaveDataButton, 2, 2);
|
||||
|
||||
musrSimButton = Qt::PushButton($LayoutWidget_10, "musrSimButton");
|
||||
|
||||
$layout13_2->addWidget(musrSimButton, 0, 2);
|
||||
|
||||
textLabel2_2_4 = Qt::Label($LayoutWidget_10, "textLabel2_2_4");
|
||||
|
||||
$layout13_2->addWidget(textLabel2_2_4, 3, 0);
|
||||
|
||||
Geant4 = Qt::LineEdit($LayoutWidget_10, "Geant4");
|
||||
|
||||
$layout13_2->addWidget(Geant4, 1, 1);
|
||||
|
||||
textLabel2_2_6 = Qt::Label($LayoutWidget_10, "textLabel2_2_6");
|
||||
|
||||
$layout13_2->addWidget(textLabel2_2_6, 1, 0);
|
||||
|
||||
textLabel2_2 = Qt::Label($LayoutWidget_10, "textLabel2_2");
|
||||
|
||||
$layout13_2->addWidget(textLabel2_2, 0, 0);
|
||||
|
||||
ROOTSYSButton = Qt::PushButton($LayoutWidget_10, "ROOTSYSButton");
|
||||
|
||||
$layout13_2->addWidget(ROOTSYSButton, 3, 2);
|
||||
my $LayoutWidget_10 = Qt::Widget(tab150778240, '$LayoutWidget_10');
|
||||
$LayoutWidget_10->setGeometry( Qt::Rect(12, 11, 770, 140) );
|
||||
my $layout12 = Qt::GridLayout($LayoutWidget_10, 1, 1, 11, 6, '$layout12');
|
||||
|
||||
ROOTSYS = Qt::LineEdit($LayoutWidget_10, "ROOTSYS");
|
||||
|
||||
$layout13_2->addWidget(ROOTSYS, 3, 1);
|
||||
$layout12->addWidget(ROOTSYS, 2, 1);
|
||||
|
||||
Geant4Button = Qt::PushButton($LayoutWidget_10, "Geant4Button");
|
||||
|
||||
$layout12->addWidget(Geant4Button, 1, 2);
|
||||
|
||||
musrSim = Qt::LineEdit($LayoutWidget_10, "musrSim");
|
||||
|
||||
$layout13_2->addWidget(musrSim, 0, 1);
|
||||
Tabs->insertTab( TabPage, "" );
|
||||
$layout12->addWidget(musrSim, 0, 1);
|
||||
|
||||
textLabel2_2_4 = Qt::Label($LayoutWidget_10, "textLabel2_2_4");
|
||||
|
||||
$layout12->addWidget(textLabel2_2_4, 2, 0);
|
||||
|
||||
Geant4 = Qt::LineEdit($LayoutWidget_10, "Geant4");
|
||||
|
||||
$layout12->addWidget(Geant4, 1, 1);
|
||||
|
||||
musrSimButton = Qt::PushButton($LayoutWidget_10, "musrSimButton");
|
||||
|
||||
$layout12->addWidget(musrSimButton, 0, 2);
|
||||
|
||||
textLabel2_2_6 = Qt::Label($LayoutWidget_10, "textLabel2_2_6");
|
||||
|
||||
$layout12->addWidget(textLabel2_2_6, 1, 0);
|
||||
|
||||
textLabel2_2 = Qt::Label($LayoutWidget_10, "textLabel2_2");
|
||||
|
||||
$layout12->addWidget(textLabel2_2, 0, 0);
|
||||
|
||||
ROOTSYSButton = Qt::PushButton($LayoutWidget_10, "ROOTSYSButton");
|
||||
|
||||
$layout12->addWidget(ROOTSYSButton, 2, 2);
|
||||
Tabs->insertTab( tab150778240, "" );
|
||||
|
||||
$QmuSRSimLayout->addWidget(Tabs, 0, 0);
|
||||
|
||||
@ -18389,7 +18374,8 @@ sub NEW
|
||||
helpIndexAction= Qt::Action(this, "helpIndexAction");
|
||||
helpAboutAction= Qt::Action(this, "helpAboutAction");
|
||||
plotEnvelopesAction= Qt::Action(this, "plotEnvelopesAction");
|
||||
plotBeam_SliceAction= Qt::Action(this, "plotBeam_SliceAction");
|
||||
plotEnvelopesAction->setEnabled( 0 );
|
||||
plotBeamSpot_Action= Qt::Action(this, "plotBeamSpot_Action");
|
||||
|
||||
|
||||
|
||||
@ -18398,7 +18384,6 @@ sub NEW
|
||||
|
||||
|
||||
fileMenu = Qt::PopupMenu( this );
|
||||
fileNewAction->addTo( fileMenu );
|
||||
fileOpenAction->addTo( fileMenu );
|
||||
fileSaveAction->addTo( fileMenu );
|
||||
fileSaveAsAction->addTo( fileMenu );
|
||||
@ -18408,28 +18393,17 @@ sub NEW
|
||||
fileExitAction->addTo( fileMenu );
|
||||
MenuBar->insertItem( "", fileMenu, 1 );
|
||||
|
||||
editMenu = Qt::PopupMenu( this );
|
||||
editUndoAction->addTo( editMenu );
|
||||
editRedoAction->addTo( editMenu );
|
||||
editMenu->insertSeparator();
|
||||
editCutAction->addTo( editMenu );
|
||||
editCopyAction->addTo( editMenu );
|
||||
editPasteAction->addTo( editMenu );
|
||||
editMenu->insertSeparator();
|
||||
editFindAction->addTo( editMenu );
|
||||
MenuBar->insertItem( "", editMenu, 2 );
|
||||
|
||||
Plot = Qt::PopupMenu( this );
|
||||
plotEnvelopesAction->addTo( Plot );
|
||||
plotBeam_SliceAction->addTo( Plot );
|
||||
MenuBar->insertItem( "", Plot, 3 );
|
||||
plotBeamSpot_Action->addTo( Plot );
|
||||
MenuBar->insertItem( "", Plot, 2 );
|
||||
|
||||
helpMenu = Qt::PopupMenu( this );
|
||||
helpContentsAction->addTo( helpMenu );
|
||||
helpIndexAction->addTo( helpMenu );
|
||||
helpMenu->insertSeparator();
|
||||
helpAboutAction->addTo( helpMenu );
|
||||
MenuBar->insertItem( "", helpMenu, 4 );
|
||||
MenuBar->insertItem( "", helpMenu, 3 );
|
||||
|
||||
languageChange();
|
||||
my $resize = Qt::Size(822, 408);
|
||||
@ -18455,8 +18429,8 @@ sub NEW
|
||||
Qt::Object::connect(Start, SIGNAL "clicked()", this, SLOT "StartCalc()");
|
||||
Qt::Object::connect(ROOTSYSButton, SIGNAL "clicked()", this, SLOT "GetPATH()");
|
||||
Qt::Object::connect(musrSimButton, SIGNAL "clicked()", this, SLOT "GetPATH()");
|
||||
Qt::Object::connect(SaveDataButton, SIGNAL "clicked()", this, SLOT "GetPATH()");
|
||||
Qt::Object::connect(Geant4Button, SIGNAL "clicked()", this, SLOT "GetPATH()");
|
||||
Qt::Object::connect(plotBeamSpot_Action, SIGNAL "activated()", this, SLOT "plotBeamSpot()");
|
||||
|
||||
setTabOrder(ENERGY, L1);
|
||||
setTabOrder(L1, SR_B);
|
||||
@ -18481,9 +18455,7 @@ sub NEW
|
||||
setTabOrder(RA_L_2, BFIELD_2);
|
||||
setTabOrder(BFIELD_2, musrSim);
|
||||
setTabOrder(musrSim, musrSimButton);
|
||||
setTabOrder(musrSimButton, SaveData);
|
||||
setTabOrder(SaveData, SaveDataButton);
|
||||
setTabOrder(SaveDataButton, ROOTSYS);
|
||||
setTabOrder(musrSimButton, ROOTSYS);
|
||||
setTabOrder(ROOTSYS, ROOTSYSButton);
|
||||
}
|
||||
|
||||
@ -18497,12 +18469,6 @@ sub languageChange
|
||||
textLabel2_3_2_2_2->setText( trUtf8("<b><font size=\"+1\">Energy</font></b>") );
|
||||
ENERGY->setText( trUtf8("15.0") );
|
||||
textLabel2_3_2_2_2_2->setText( trUtf8("keV") );
|
||||
textLabel2_2_2_2_3_2_2->setText( trUtf8("kV") );
|
||||
textLabel2_2_2_2_3_2->setText( trUtf8("T") );
|
||||
textLabel2_2_2_2_3->setText( trUtf8("<b><font size=\"+1\">SR_B</font></b>") );
|
||||
SR_B->setText( trUtf8("-0.0331") );
|
||||
textLabel2_2_2_2_2_3->setText( trUtf8("<b><font size=\"+1\">SR_E</font></b>") );
|
||||
SR_E->setText( trUtf8("12.55") );
|
||||
textLabel2_2_3->setText( trUtf8("<b><font size=\"+1\">Field</font></b>") );
|
||||
BFIELD->setText( trUtf8("0") );
|
||||
textLabel2_2_2_2_3_2_3->setText( trUtf8("T") );
|
||||
@ -18527,7 +18493,13 @@ sub languageChange
|
||||
textLabel2_2_2_2_3_2_2_3_2_2->setText( trUtf8("kV") );
|
||||
RA_B->setText( trUtf8("11") );
|
||||
RA_L->setText( trUtf8("11") );
|
||||
Tabs->changeTab( tab, trUtf8("Spin Rotator") );
|
||||
textLabel2_2_2_2_3_2_2->setText( trUtf8("kV") );
|
||||
textLabel2_2_2_2_3_2->setText( trUtf8("A") );
|
||||
textLabel2_2_2_2_3->setText( trUtf8("<b><font size=\"+1\">SR_B</font></b>") );
|
||||
SR_B->setText( trUtf8("-8.214") );
|
||||
textLabel2_2_2_2_2_3->setText( trUtf8("<b><font size=\"+1\">SR_E</font></b>") );
|
||||
SR_E->setText( trUtf8("6.275") );
|
||||
Tabs->changeTab( SpinRotator, trUtf8("Spin Rotator") );
|
||||
textLabel2_3_2_3_2->setText( trUtf8("<b><font size=\"+1\">L1</font></b>") );
|
||||
textLabel2_3_2_3->setText( trUtf8("<b><font size=\"+1\">L2</font></b>") );
|
||||
textLabel2_3_2->setText( trUtf8("<b><font size=\"+1\">L3</font></b>") );
|
||||
@ -18547,20 +18519,17 @@ sub languageChange
|
||||
L2_2->setText( trUtf8("8.35") );
|
||||
L3_2->setText( trUtf8("8.35") );
|
||||
BFIELD_2->setText( trUtf8("0") );
|
||||
Tabs->changeTab( tab_2, trUtf8("Current") );
|
||||
SaveData->setText( trUtf8(".") );
|
||||
textLabel2_2_5->setText( trUtf8("Save Data Path") );
|
||||
Tabs->changeTab( Old, trUtf8("Old") );
|
||||
ROOTSYS->setText( undef );
|
||||
Geant4Button->setText( trUtf8("Browse") );
|
||||
SaveDataButton->setText( trUtf8("Browse") );
|
||||
musrSimButton->setText( trUtf8("Browse") );
|
||||
musrSim->setText( trUtf8("/home/l_salman/LEM/simulation/geant4/musrSim/") );
|
||||
textLabel2_2_4->setText( trUtf8("ROOTSYS Path") );
|
||||
Geant4->setText( trUtf8("/usr/local/geant4/4.9.3") );
|
||||
musrSimButton->setText( trUtf8("Browse") );
|
||||
textLabel2_2_6->setText( trUtf8("Geant4 Path") );
|
||||
textLabel2_2->setText( trUtf8("musrSim Path") );
|
||||
ROOTSYSButton->setText( trUtf8("Browse") );
|
||||
ROOTSYS->setText( trUtf8("/usr/local") );
|
||||
musrSim->setText( trUtf8("/home/l_salman/LEM/simulation/geant4/musrSim/") );
|
||||
Tabs->changeTab( TabPage, trUtf8("Options") );
|
||||
Tabs->changeTab( tab150778240, trUtf8("Options") );
|
||||
textLabel1->setText( trUtf8("MAC File Number") );
|
||||
MAC->setText( trUtf8("1000") );
|
||||
textLabel1_2->setText( trUtf8("Number of Muons") );
|
||||
@ -18613,12 +18582,11 @@ sub languageChange
|
||||
helpAboutAction->setAccel( Qt::KeySequence( undef ) );
|
||||
plotEnvelopesAction->setText( trUtf8("Envelopes") );
|
||||
plotEnvelopesAction->setMenuText( trUtf8("Envelopes") );
|
||||
plotBeam_SliceAction->setText( trUtf8("Beam Slice") );
|
||||
plotBeam_SliceAction->setMenuText( trUtf8("Beam Slice") );
|
||||
plotBeamSpot_Action->setText( trUtf8("Beam Spot") );
|
||||
plotBeamSpot_Action->setMenuText( trUtf8("Beam Spot") );
|
||||
MenuBar->findItem( 1 )->setText( trUtf8("&File") );
|
||||
MenuBar->findItem( 2 )->setText( trUtf8("&Edit") );
|
||||
MenuBar->findItem( 3 )->setText( trUtf8("Plot") );
|
||||
MenuBar->findItem( 4 )->setText( trUtf8("&Help") );
|
||||
MenuBar->findItem( 2 )->setText( trUtf8("Plot") );
|
||||
MenuBar->findItem( 3 )->setText( trUtf8("&Help") );
|
||||
}
|
||||
|
||||
|
||||
@ -18789,13 +18757,30 @@ sub CreateAllInput
|
||||
my %All=();
|
||||
my @AllParams= ("L1","L3","TL","BFIELD","RA_T","RA_B","RA_R","RA_L","SR_B","SR_E","ENERGY","NMuon",
|
||||
"L1_2","L2_2","L3_2","BFIELD_2","RA_T_2","RA_B_2","RA_R_2","RA_L_2","ENERGY_2",
|
||||
"MAC","musrSim","Geant4","SaveData","ROOTSYS");
|
||||
"MAC","musrSim","Geant4","ROOTSYS");
|
||||
foreach my $Param (@AllParams) {
|
||||
my $Child = child($Param);
|
||||
my $Value = $Child->text;
|
||||
$All{$Param}=$Value;
|
||||
# print "$Param=".$All{$Param}."\n";
|
||||
}
|
||||
|
||||
# Convert SR B field from current to field
|
||||
# SR B Field 8A=0.032238 T
|
||||
$All{"SR_B"}=$All{"SR_B"}*0.032238/8;
|
||||
# SR plate voltage to difference between plates
|
||||
$All{"SR_E"}=$All{"SR_E"}*2;
|
||||
|
||||
# Dont forget mirror, depending on muon energy
|
||||
$All{"MIRRFIELD"}=$All{"ENERGY"}/20;
|
||||
$All{"MIRRFIELD_2"}=$All{"ENERGY_2"}/20;
|
||||
|
||||
# Check if ROOTSYS option is set
|
||||
if ($All{"ROOTSYS"} eq "") {
|
||||
$All{"ROOTSYS"}=$ENV{"ROOTSYS"};
|
||||
ROOTSYS->setText($All{"ROOTSYS"});
|
||||
}
|
||||
|
||||
# Return Hash with all important values
|
||||
return %All;
|
||||
|
||||
@ -18814,7 +18799,8 @@ sub StartCalc
|
||||
my $Page = Tabs->currentPageIndex;
|
||||
my %ToReplace=();
|
||||
my @SpaceHolder=();
|
||||
my $FName="SRBeamLine.mac";
|
||||
# my $FName="SRBeamLine.mac";
|
||||
my $FName="SRBeamLine_Bend.mac";
|
||||
# 0 for spin rotator and 1 for current.
|
||||
if ($Page == 0) {
|
||||
%ToReplace= (
|
||||
@ -18829,10 +18815,11 @@ sub StartCalc
|
||||
"SR_B"=>"SR_BFIELD",
|
||||
"SR_E"=>"SR_EFIELD",
|
||||
"NMuon"=>"NMuon",
|
||||
"ENERGY"=>"ENERGY"
|
||||
"ENERGY"=>"ENERGY",
|
||||
"MIRRFIELD"=>"MIRRFIELD"
|
||||
);
|
||||
# Use the following template
|
||||
$FName="SRBeamLine.mac";
|
||||
$FName="SRBeamLine_Bend.mac";
|
||||
} elsif ($Page == 1) {
|
||||
%ToReplace= (
|
||||
"L1_2"=>"L1VOLTAGE",
|
||||
@ -18844,7 +18831,8 @@ sub StartCalc
|
||||
"RA_R_2"=>"RA_RVOL",
|
||||
"RA_L_2"=>"RA_LVOL",
|
||||
"NMuon"=>"NMuon",
|
||||
"ENERGY_2"=>"ENERGY"
|
||||
"ENERGY_2"=>"ENERGY",
|
||||
"MIRRFIELD_2"=>"MIRRFIELD"
|
||||
);
|
||||
# Use the following template
|
||||
$FName="CBeamLine.mac";
|
||||
@ -18904,7 +18892,6 @@ sub CheckSim
|
||||
|
||||
my $musrSimPATH= musrSim->text();
|
||||
my $Geant4PATH= Geant4->text();
|
||||
my $SaveDataPATH= SaveData->text();
|
||||
my $ROOTSYSPATH=ROOTSYS->text();
|
||||
my $MAC=MAC->text();
|
||||
|
||||
@ -18918,10 +18905,6 @@ sub CheckSim
|
||||
$answtext=$answtext."Geant4 'env.sh' file does not exist!\n";
|
||||
}
|
||||
}
|
||||
unless (-d $SaveDataPATH) {
|
||||
$answ=0;
|
||||
$answtext=$answtext."Save Data Path is wrong!\n";
|
||||
}
|
||||
unless (-d $ROOTSYSPATH) {
|
||||
$answ=0;
|
||||
$answtext=$answtext."ROOTSYS Path is wrong!\n";
|
||||
@ -18939,6 +18922,29 @@ sub CheckSim
|
||||
}
|
||||
return $answ;
|
||||
|
||||
}
|
||||
|
||||
sub plotBeamSpot
|
||||
{
|
||||
|
||||
my $musrSimPATH= musrSim->text();
|
||||
my $file=Qt::FileDialog::getOpenFileName(
|
||||
"$musrSimPATH/run/data",
|
||||
"musrSim root file (*.root)",
|
||||
this,
|
||||
"open root file dialog",
|
||||
"Choose a root data file");
|
||||
|
||||
if ($file ne "" ) {
|
||||
# my $TrimPath = $ENV{'PERLLIB'};
|
||||
# Now that we have the file name send it to root macro for plotting.
|
||||
my $cmd='root -n -l plotBeamSpot.C\(\"'.$file.'\"\)&';
|
||||
print $cmd."\n";
|
||||
my $pid=system($cmd);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
1;
|
||||
|
@ -39,7 +39,7 @@
|
||||
</property>
|
||||
<widget class="QWidget">
|
||||
<property name="name">
|
||||
<cstring>tab</cstring>
|
||||
<cstring>SpinRotator</cstring>
|
||||
</property>
|
||||
<attribute name="title">
|
||||
<string>Spin Rotator</string>
|
||||
@ -150,146 +150,6 @@
|
||||
</widget>
|
||||
</hbox>
|
||||
</widget>
|
||||
<widget class="QLayoutWidget">
|
||||
<property name="name">
|
||||
<cstring>layout11</cstring>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>160</x>
|
||||
<y>210</y>
|
||||
<width>140</width>
|
||||
<height>50</height>
|
||||
</rect>
|
||||
</property>
|
||||
<grid>
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QLabel" row="1" column="2">
|
||||
<property name="name">
|
||||
<cstring>textLabel2_2_2_2_3_2_2</cstring>
|
||||
</property>
|
||||
<property name="backgroundMode">
|
||||
<enum>PaletteBackground</enum>
|
||||
</property>
|
||||
<property name="paletteForegroundColor">
|
||||
<color>
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</property>
|
||||
<property name="paletteBackgroundColor">
|
||||
<color>
|
||||
<red>255</red>
|
||||
<green>255</green>
|
||||
<blue>255</blue>
|
||||
</color>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>kV</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" row="0" column="2">
|
||||
<property name="name">
|
||||
<cstring>textLabel2_2_2_2_3_2</cstring>
|
||||
</property>
|
||||
<property name="backgroundMode">
|
||||
<enum>PaletteBackground</enum>
|
||||
</property>
|
||||
<property name="paletteForegroundColor">
|
||||
<color>
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</property>
|
||||
<property name="paletteBackgroundColor">
|
||||
<color>
|
||||
<red>255</red>
|
||||
<green>255</green>
|
||||
<blue>255</blue>
|
||||
</color>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>T</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" row="0" column="0">
|
||||
<property name="name">
|
||||
<cstring>textLabel2_2_2_2_3</cstring>
|
||||
</property>
|
||||
<property name="backgroundMode">
|
||||
<enum>PaletteBackground</enum>
|
||||
</property>
|
||||
<property name="paletteForegroundColor">
|
||||
<color>
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</property>
|
||||
<property name="paletteBackgroundColor">
|
||||
<color>
|
||||
<red>255</red>
|
||||
<green>255</green>
|
||||
<blue>255</blue>
|
||||
</color>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><b><font size="+1">SR_B</font></b></string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" row="0" column="1">
|
||||
<property name="name">
|
||||
<cstring>SR_B</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>-0.0331</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" row="1" column="0">
|
||||
<property name="name">
|
||||
<cstring>textLabel2_2_2_2_2_3</cstring>
|
||||
</property>
|
||||
<property name="backgroundMode">
|
||||
<enum>PaletteBackground</enum>
|
||||
</property>
|
||||
<property name="paletteForegroundColor">
|
||||
<color>
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</property>
|
||||
<property name="paletteBackgroundColor">
|
||||
<color>
|
||||
<red>255</red>
|
||||
<green>255</green>
|
||||
<blue>255</blue>
|
||||
</color>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><b><font size="+1">SR_E</font></b></string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" row="1" column="1">
|
||||
<property name="name">
|
||||
<cstring>SR_E</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>12.55</string>
|
||||
</property>
|
||||
</widget>
|
||||
</grid>
|
||||
</widget>
|
||||
<widget class="QLayoutWidget">
|
||||
<property name="name">
|
||||
<cstring>layout13</cstring>
|
||||
@ -874,14 +734,154 @@
|
||||
</widget>
|
||||
</grid>
|
||||
</widget>
|
||||
<widget class="QLayoutWidget">
|
||||
<property name="name">
|
||||
<cstring>layout11</cstring>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>160</x>
|
||||
<y>210</y>
|
||||
<width>140</width>
|
||||
<height>50</height>
|
||||
</rect>
|
||||
</property>
|
||||
<grid>
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QLabel" row="1" column="2">
|
||||
<property name="name">
|
||||
<cstring>textLabel2_2_2_2_3_2_2</cstring>
|
||||
</property>
|
||||
<property name="backgroundMode">
|
||||
<enum>PaletteBackground</enum>
|
||||
</property>
|
||||
<property name="paletteForegroundColor">
|
||||
<color>
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</property>
|
||||
<property name="paletteBackgroundColor">
|
||||
<color>
|
||||
<red>255</red>
|
||||
<green>255</green>
|
||||
<blue>255</blue>
|
||||
</color>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>kV</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" row="0" column="2">
|
||||
<property name="name">
|
||||
<cstring>textLabel2_2_2_2_3_2</cstring>
|
||||
</property>
|
||||
<property name="backgroundMode">
|
||||
<enum>PaletteBackground</enum>
|
||||
</property>
|
||||
<property name="paletteForegroundColor">
|
||||
<color>
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</property>
|
||||
<property name="paletteBackgroundColor">
|
||||
<color>
|
||||
<red>255</red>
|
||||
<green>255</green>
|
||||
<blue>255</blue>
|
||||
</color>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>A</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" row="0" column="0">
|
||||
<property name="name">
|
||||
<cstring>textLabel2_2_2_2_3</cstring>
|
||||
</property>
|
||||
<property name="backgroundMode">
|
||||
<enum>PaletteBackground</enum>
|
||||
</property>
|
||||
<property name="paletteForegroundColor">
|
||||
<color>
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</property>
|
||||
<property name="paletteBackgroundColor">
|
||||
<color>
|
||||
<red>255</red>
|
||||
<green>255</green>
|
||||
<blue>255</blue>
|
||||
</color>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><b><font size="+1">SR_B</font></b></string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" row="0" column="1">
|
||||
<property name="name">
|
||||
<cstring>SR_B</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>-8.214</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" row="1" column="0">
|
||||
<property name="name">
|
||||
<cstring>textLabel2_2_2_2_2_3</cstring>
|
||||
</property>
|
||||
<property name="backgroundMode">
|
||||
<enum>PaletteBackground</enum>
|
||||
</property>
|
||||
<property name="paletteForegroundColor">
|
||||
<color>
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</property>
|
||||
<property name="paletteBackgroundColor">
|
||||
<color>
|
||||
<red>255</red>
|
||||
<green>255</green>
|
||||
<blue>255</blue>
|
||||
</color>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><b><font size="+1">SR_E</font></b></string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" row="1" column="1">
|
||||
<property name="name">
|
||||
<cstring>SR_E</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>6.275</string>
|
||||
</property>
|
||||
</widget>
|
||||
</grid>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QWidget">
|
||||
<property name="name">
|
||||
<cstring>tab</cstring>
|
||||
<cstring>Old</cstring>
|
||||
</property>
|
||||
<attribute name="title">
|
||||
<string>Current</string>
|
||||
<string>Old</string>
|
||||
</attribute>
|
||||
<widget class="QFrame">
|
||||
<property name="name">
|
||||
@ -1601,21 +1601,21 @@
|
||||
</widget>
|
||||
<widget class="QWidget">
|
||||
<property name="name">
|
||||
<cstring>TabPage</cstring>
|
||||
<cstring>tab150778240</cstring>
|
||||
</property>
|
||||
<attribute name="title">
|
||||
<string>Options</string>
|
||||
</attribute>
|
||||
<widget class="QLayoutWidget">
|
||||
<property name="name">
|
||||
<cstring>layout13</cstring>
|
||||
<cstring>layout12</cstring>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>11</x>
|
||||
<y>10</y>
|
||||
<width>780</width>
|
||||
<height>170</height>
|
||||
<x>12</x>
|
||||
<y>11</y>
|
||||
<width>770</width>
|
||||
<height>140</height>
|
||||
</rect>
|
||||
</property>
|
||||
<grid>
|
||||
@ -1624,18 +1624,10 @@
|
||||
</property>
|
||||
<widget class="QLineEdit" row="2" column="1">
|
||||
<property name="name">
|
||||
<cstring>SaveData</cstring>
|
||||
<cstring>ROOTSYS</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>.</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" row="2" column="0">
|
||||
<property name="name">
|
||||
<cstring>textLabel2_2_5</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Save Data Path</string>
|
||||
<string></string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" row="1" column="2">
|
||||
@ -1646,23 +1638,15 @@
|
||||
<string>Browse</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" row="2" column="2">
|
||||
<widget class="QLineEdit" row="0" column="1">
|
||||
<property name="name">
|
||||
<cstring>SaveDataButton</cstring>
|
||||
<cstring>musrSim</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Browse</string>
|
||||
<string>/home/l_salman/LEM/simulation/geant4/musrSim/</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" row="0" column="2">
|
||||
<property name="name">
|
||||
<cstring>musrSimButton</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Browse</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" row="3" column="0">
|
||||
<widget class="QLabel" row="2" column="0">
|
||||
<property name="name">
|
||||
<cstring>textLabel2_2_4</cstring>
|
||||
</property>
|
||||
@ -1678,6 +1662,14 @@
|
||||
<string>/usr/local/geant4/4.9.3</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" row="0" column="2">
|
||||
<property name="name">
|
||||
<cstring>musrSimButton</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Browse</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" row="1" column="0">
|
||||
<property name="name">
|
||||
<cstring>textLabel2_2_6</cstring>
|
||||
@ -1694,7 +1686,7 @@
|
||||
<string>musrSim Path</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" row="3" column="2">
|
||||
<widget class="QPushButton" row="2" column="2">
|
||||
<property name="name">
|
||||
<cstring>ROOTSYSButton</cstring>
|
||||
</property>
|
||||
@ -1702,22 +1694,6 @@
|
||||
<string>Browse</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" row="3" column="1">
|
||||
<property name="name">
|
||||
<cstring>ROOTSYS</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>/usr/local</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" row="0" column="1">
|
||||
<property name="name">
|
||||
<cstring>musrSim</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>/home/l_salman/LEM/simulation/geant4/musrSim/</string>
|
||||
</property>
|
||||
</widget>
|
||||
</grid>
|
||||
</widget>
|
||||
</widget>
|
||||
@ -1810,7 +1786,6 @@
|
||||
<cstring>MenuBar</cstring>
|
||||
</property>
|
||||
<item text="&File" name="fileMenu">
|
||||
<action name="fileNewAction"/>
|
||||
<action name="fileOpenAction"/>
|
||||
<action name="fileSaveAction"/>
|
||||
<action name="fileSaveAsAction"/>
|
||||
@ -1819,19 +1794,9 @@
|
||||
<separator/>
|
||||
<action name="fileExitAction"/>
|
||||
</item>
|
||||
<item text="&Edit" name="editMenu">
|
||||
<action name="editUndoAction"/>
|
||||
<action name="editRedoAction"/>
|
||||
<separator/>
|
||||
<action name="editCutAction"/>
|
||||
<action name="editCopyAction"/>
|
||||
<action name="editPasteAction"/>
|
||||
<separator/>
|
||||
<action name="editFindAction"/>
|
||||
</item>
|
||||
<item text="Plot" name="Plot">
|
||||
<action name="plotEnvelopesAction"/>
|
||||
<action name="plotBeam_SliceAction"/>
|
||||
<action name="plotBeamSpot_Action"/>
|
||||
</item>
|
||||
<item text="&Help" name="helpMenu">
|
||||
<action name="helpContentsAction"/>
|
||||
@ -2087,6 +2052,9 @@
|
||||
<property name="name">
|
||||
<cstring>plotEnvelopesAction</cstring>
|
||||
</property>
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Envelopes</string>
|
||||
</property>
|
||||
@ -2096,13 +2064,13 @@
|
||||
</action>
|
||||
<action>
|
||||
<property name="name">
|
||||
<cstring>plotBeam_SliceAction</cstring>
|
||||
<cstring>plotBeamSpot_Action</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Beam Slice</string>
|
||||
<string>Beam Spot</string>
|
||||
</property>
|
||||
<property name="menuText">
|
||||
<string>Beam Slice</string>
|
||||
<string>Beam Spot</string>
|
||||
</property>
|
||||
</action>
|
||||
</actions>
|
||||
@ -2254,16 +2222,16 @@
|
||||
<slot>GetPATH()</slot>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>SaveDataButton</sender>
|
||||
<sender>Geant4Button</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>QmuSRSim</receiver>
|
||||
<slot>GetPATH()</slot>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>Geant4Button</sender>
|
||||
<signal>clicked()</signal>
|
||||
<sender>plotBeamSpot_Action</sender>
|
||||
<signal>activated()</signal>
|
||||
<receiver>QmuSRSim</receiver>
|
||||
<slot>GetPATH()</slot>
|
||||
<slot>plotBeamSpot()</slot>
|
||||
</connection>
|
||||
</connections>
|
||||
<tabstops>
|
||||
@ -2291,8 +2259,6 @@
|
||||
<tabstop>BFIELD_2</tabstop>
|
||||
<tabstop>musrSim</tabstop>
|
||||
<tabstop>musrSimButton</tabstop>
|
||||
<tabstop>SaveData</tabstop>
|
||||
<tabstop>SaveDataButton</tabstop>
|
||||
<tabstop>ROOTSYS</tabstop>
|
||||
<tabstop>ROOTSYSButton</tabstop>
|
||||
</tabstops>
|
||||
@ -2319,6 +2285,7 @@
|
||||
<slot>StartCalc()</slot>
|
||||
<slot>GetPATH()</slot>
|
||||
<slot>CheckSim()</slot>
|
||||
<slot>plotBeamSpot()</slot>
|
||||
</slots>
|
||||
<layoutdefaults spacing="6" margin="11"/>
|
||||
</UI>
|
||||
|
@ -181,13 +181,30 @@ void QmuSRSim::CreateAllInput()
|
||||
my %All=();
|
||||
my @AllParams= ("L1","L3","TL","BFIELD","RA_T","RA_B","RA_R","RA_L","SR_B","SR_E","ENERGY","NMuon",
|
||||
"L1_2","L2_2","L3_2","BFIELD_2","RA_T_2","RA_B_2","RA_R_2","RA_L_2","ENERGY_2",
|
||||
"MAC","musrSim","Geant4","SaveData","ROOTSYS");
|
||||
"MAC","musrSim","Geant4","ROOTSYS");
|
||||
foreach my $Param (@AllParams) {
|
||||
my $Child = child($Param);
|
||||
my $Value = $Child->text;
|
||||
$All{$Param}=$Value;
|
||||
# print "$Param=".$All{$Param}."\n";
|
||||
}
|
||||
|
||||
# Convert SR B field from current to field
|
||||
# SR B Field 8A=0.032238 T
|
||||
$All{"SR_B"}=$All{"SR_B"}*0.032238/8;
|
||||
# SR plate voltage to difference between plates
|
||||
$All{"SR_E"}=$All{"SR_E"}*2;
|
||||
|
||||
# Dont forget mirror, depending on muon energy
|
||||
$All{"MIRRFIELD"}=$All{"ENERGY"}/20;
|
||||
$All{"MIRRFIELD_2"}=$All{"ENERGY_2"}/20;
|
||||
|
||||
# Check if ROOTSYS option is set
|
||||
if ($All{"ROOTSYS"} eq "") {
|
||||
$All{"ROOTSYS"}=$ENV{"ROOTSYS"};
|
||||
ROOTSYS->setText($All{"ROOTSYS"});
|
||||
}
|
||||
|
||||
# Return Hash with all important values
|
||||
return %All;
|
||||
}
|
||||
@ -206,7 +223,8 @@ void QmuSRSim::StartCalc()
|
||||
my $Page = Tabs->currentPageIndex;
|
||||
my %ToReplace=();
|
||||
my @SpaceHolder=();
|
||||
my $FName="SRBeamLine.mac";
|
||||
# my $FName="SRBeamLine.mac";
|
||||
my $FName="SRBeamLine_Bend.mac";
|
||||
# 0 for spin rotator and 1 for current.
|
||||
if ($Page == 0) {
|
||||
%ToReplace= (
|
||||
@ -221,10 +239,11 @@ void QmuSRSim::StartCalc()
|
||||
"SR_B"=>"SR_BFIELD",
|
||||
"SR_E"=>"SR_EFIELD",
|
||||
"NMuon"=>"NMuon",
|
||||
"ENERGY"=>"ENERGY"
|
||||
"ENERGY"=>"ENERGY",
|
||||
"MIRRFIELD"=>"MIRRFIELD"
|
||||
);
|
||||
# Use the following template
|
||||
$FName="SRBeamLine.mac";
|
||||
$FName="SRBeamLine_Bend.mac";
|
||||
} elsif ($Page == 1) {
|
||||
%ToReplace= (
|
||||
"L1_2"=>"L1VOLTAGE",
|
||||
@ -236,7 +255,8 @@ void QmuSRSim::StartCalc()
|
||||
"RA_R_2"=>"RA_RVOL",
|
||||
"RA_L_2"=>"RA_LVOL",
|
||||
"NMuon"=>"NMuon",
|
||||
"ENERGY_2"=>"ENERGY"
|
||||
"ENERGY_2"=>"ENERGY",
|
||||
"MIRRFIELD_2"=>"MIRRFIELD"
|
||||
);
|
||||
# Use the following template
|
||||
$FName="CBeamLine.mac";
|
||||
@ -294,7 +314,6 @@ void QmuSRSim::CheckSim()
|
||||
|
||||
my $musrSimPATH= musrSim->text();
|
||||
my $Geant4PATH= Geant4->text();
|
||||
my $SaveDataPATH= SaveData->text();
|
||||
my $ROOTSYSPATH=ROOTSYS->text();
|
||||
my $MAC=MAC->text();
|
||||
|
||||
@ -308,10 +327,6 @@ void QmuSRSim::CheckSim()
|
||||
$answtext=$answtext."Geant4 'env.sh' file does not exist!\n";
|
||||
}
|
||||
}
|
||||
unless (-d $SaveDataPATH) {
|
||||
$answ=0;
|
||||
$answtext=$answtext."Save Data Path is wrong!\n";
|
||||
}
|
||||
unless (-d $ROOTSYSPATH) {
|
||||
$answ=0;
|
||||
$answtext=$answtext."ROOTSYS Path is wrong!\n";
|
||||
@ -329,3 +344,25 @@ void QmuSRSim::CheckSim()
|
||||
}
|
||||
return $answ;
|
||||
}
|
||||
|
||||
|
||||
void QmuSRSim::plotBeamSpot()
|
||||
{
|
||||
my $musrSimPATH= musrSim->text();
|
||||
my $file=Qt::FileDialog::getOpenFileName(
|
||||
"$musrSimPATH/run/data",
|
||||
"musrSim root file (*.root)",
|
||||
this,
|
||||
"open root file dialog",
|
||||
"Choose a root data file");
|
||||
|
||||
if ($file ne "" ) {
|
||||
# my $TrimPath = $ENV{'PERLLIB'};
|
||||
# Now that we have the file name send it to root macro for plotting.
|
||||
my $cmd='root -n -l plotBeamSpot.C\(\"'.$file.'\"\)&';
|
||||
print $cmd."\n";
|
||||
my $pid=system($cmd);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
88
geant4/PQt_musrSim/plotBeamSpot.C
Normal file
88
geant4/PQt_musrSim/plotBeamSpot.C
Normal file
@ -0,0 +1,88 @@
|
||||
// To run root without logon screen and script use: root -l -n
|
||||
// To run a named macro in root use:
|
||||
//.L sr_tr.C
|
||||
// BeamSpot("data/sr1_1100.root")
|
||||
|
||||
#include <string>
|
||||
void plotBeamSpot(char* fname)
|
||||
{
|
||||
|
||||
TFile* f1 = new TFile(fname);
|
||||
|
||||
gStyle->SetPalette(1,0);
|
||||
TCanvas* c1 = new TCanvas("c1","Polarization and Transmission",60,40,600,800);
|
||||
c1->Divide(2,3);
|
||||
c1->SetGridx();
|
||||
c1->SetGridy();
|
||||
|
||||
// Resulting polarization in the x direction
|
||||
c1->cd(1);
|
||||
t1->Draw("save_polx >> pol_x(128, -0.3, 0.3)","save_detID==900&&save_particleID==-13"); //0, 2
|
||||
pol_x->SetTitle("Polarization X");
|
||||
pol_x->GetXaxis()->SetNdivisions(405);
|
||||
pol_x->GetYaxis()->SetNdivisions(406);
|
||||
pol_x->GetXaxis()->SetTickLength(0.018);
|
||||
pol_x->GetYaxis()->SetTickLength(0.018);
|
||||
pol_x->Draw("F");
|
||||
pol_x->SetFillStyle(1001);
|
||||
pol_x->SetFillColor(kGreen-5);
|
||||
pol_x->Draw();
|
||||
//c1->SaveAs("data/sr_bspot_0.eps");
|
||||
|
||||
// Resulting polarization in the z direction
|
||||
c1->cd(2);
|
||||
t1->Draw("save_polz >> pol_z(128, -1, -0.9)","save_detID==900&&save_particleID==-13"); //-1., 1
|
||||
pol_z->SetTitle("Polarization Z");
|
||||
pol_z->GetXaxis()->SetNdivisions(405);
|
||||
pol_z->GetYaxis()->SetNdivisions(406);
|
||||
pol_z->GetXaxis()->SetTickLength(0.018);
|
||||
pol_z->GetYaxis()->SetTickLength(0.018);
|
||||
pol_z->Draw("F");
|
||||
pol_z->SetFillStyle(1001);
|
||||
pol_z->SetFillColor(38);
|
||||
pol_z->Draw();
|
||||
|
||||
|
||||
// Initial beam spot
|
||||
c1->cd(3)->SetGridx();c1->cd(3)->SetGridy(); // c2->cd(3);
|
||||
t1->Draw("muIniPosZ[0]:muIniPosY[0]>>ini_hist(64,-40,40,64,-1710,-1646)","muIniPolZ > -2");
|
||||
ini_hist->SetTitle("Muon initial beam cross section [mm]");
|
||||
ini_hist->Draw();
|
||||
ini_hist->Draw("cont0 same");
|
||||
ini_hist->ProjectionX("xisect",31,33);
|
||||
ini_hist->ProjectionY("yisect",31,33);
|
||||
|
||||
// Resulting beam spot
|
||||
c1->cd(4)->SetGridx();c1->cd(4)->SetGridy(); // c1->cd(3);
|
||||
t1->Draw("save_y:save_x>>bspot_hist(64,-40,40,64,-40,40)","save_detID==900&&save_particleID==-13");
|
||||
bspot_hist->SetTitle("Muon beam cross section [mm]");
|
||||
bspot_hist->Draw();
|
||||
bspot_hist->Draw("cont0 same");
|
||||
bspot_hist->ProjectionX("xfsect",31,33);
|
||||
bspot_hist->ProjectionY("yfsect",31,33);
|
||||
|
||||
// Initial beam spot cross section
|
||||
c1->cd(5);
|
||||
xisect->SetTitle("x initial cross section [mm]");
|
||||
xisect->SetFillStyle(1001);
|
||||
xisect->SetFillColor(45);
|
||||
xisect->Draw();
|
||||
|
||||
|
||||
// Resulting beam spot cross section
|
||||
c1->cd(6);
|
||||
xfsect->SetTitle("x cross section [mm]");
|
||||
xfsect->SetFillStyle(1001);
|
||||
xfsect->SetFillColor(45);
|
||||
xfsect->Draw();
|
||||
|
||||
// I am not sure what this does, but it waits until canvas is closed
|
||||
c1->WaitPrimitive(" ");
|
||||
cout << endl << "Canvas Closed" << endl ;
|
||||
|
||||
// Then quit root cleanly
|
||||
gApplication->Terminate();
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user