11.05.2013 Views

Sistema multicanal para aquisiç˜ao de dados em um ... - CBPFIndex

Sistema multicanal para aquisiç˜ao de dados em um ... - CBPFIndex

Sistema multicanal para aquisiç˜ao de dados em um ... - CBPFIndex

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

94 Double t chi2 = f i t g −>GetChisquare ( ) ;<br />

95 Double t constant = f i t g −>GetParameter ( 0 ) ;<br />

96 Double t mean = f i t g −>GetParameter ( 1 ) ;<br />

97 Double t sigma = f i t g −>GetParameter ( 2 ) ;<br />

98 Double t eMean = f i t g −>GetParError ( 1 ) ;<br />

99 Double t eSigma = f i t g −>GetParError ( 2 ) ;<br />

100 TF1 ∗ f i t d r a w = new TF1( "f2" , "gaus(0)" ,0 ,300) ;<br />

101 fitdraw −>SetParameter ( 0 , constant ) ;<br />

102 fitdraw −>SetParameter ( 1 , mean) ;<br />

103 fitdraw −>SetParameter ( 2 , sigma ) ;<br />

104 fitdraw −>Draw( "same" ) ;<br />

105 // Colocando os <strong>dados</strong> do f i t no g r a f i c o<br />

106 TPaveStats ∗ p t s t a t s = new TPaveStats ( 0 . 6 , 0 . 6 , 0 . 8 9 , 0 . 8 , "brNDC" ) ;<br />

107 p t s t a t s −>SetName ( "stats" ) ;<br />

108 p t s t a t s −>SetBor<strong>de</strong>rSize ( 1 ) ;<br />

109 p t s t a t s −>S e t F i l l C o l o r ( 0 ) ;<br />

110 p t s t a t s −>SetTextAlign (12) ;<br />

111 p t s t a t s −>SetTextFont (42) ;<br />

112 p t s t a t s −>SetOptStat (10) ;<br />

113 p t s t a t s −>SetOptFit (111) ;<br />

114 p t s t a t s −>Draw( "SAME" ) ;<br />

115 h i s t [ i ]−>GetListOfFunctions ( )−>Add( p t s t a t s ) ;<br />

116 c1−>Update ( ) ;<br />

117 // Criando caixa <strong>de</strong> t e x t o e l i n h a v e r t i c a l e x i b i n d o o ganho da MAPMT<br />

118 Double t ganho = ( ( mean−b [ mpd−1][ i ] ) /a [ mpd−1][ i ] ) / 0 . 1 6 ; // ganho<br />

(10ˆ6)<br />

119 TPaveText ∗pave = new TPaveText ( 0 . 6 , 0 . 5 , 0 . 8 9 , 0 . 5 5 , "brNDC" ) ;<br />

120 pave−>S e t F i l l C o l o r (40) ;<br />

121 s p r i n t f (nome , "Ganho: %1.3f x 10^6" , ganho ) ;<br />

122 pave−>AddText (nome) ;<br />

123 pave−>Draw( "same" ) ;<br />

124 TLine ∗ mean line = new TLine (mean , c1−>GetUymin ( ) ,mean , c1−>GetUymax<br />

( ) ) ;<br />

125 mean line−>SetLineColor ( 8 ) ;<br />

126 mean line−>SetLineWidth ( 2 ) ;<br />

127 mean line−>Draw( "same" ) ;<br />

128 // Criando e i x o e x i b i n d o Ganho da MAPMT<br />

129 Double t q min = ( c1−>GetUxmin ( )−b [ mpd−1][ i ] ) /a [ mpd−1][ i ] ; // carga<br />

(pC)<br />

130 Double t q max = ( c1−>GetUxmax ( )−b [ mpd−1][ i ] ) /a [ mpd−1][ i ] ; // carga<br />

(pC)<br />

131 Double t g min = q min / 0 . 1 6 ; // ganho (10ˆ6)<br />

132 Double t g max = q max / 0 . 1 6 ; // ganho (10ˆ6)<br />

103

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!