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.

52 for ( int i = 0 ; i < 4 ; i ++){<br />

53 s p r i n t f (nome , "h: %d" , i ) ;<br />

54 s p r i n t f ( t i t u l o , "Histograma <strong>para</strong> SPE: Pixel %d, %s" , p i x e l s [ mpd−1][ i<br />

] , p i x e l s p a t h ) ;<br />

55 h i s t [ i ] = new TH1F(nome , t i t u l o , 2100 , −2100, 2100) ;<br />

56 }<br />

57 // Buscando os a r q u i v o s no d i r e t ó r i o e preenchendo os histogramas<br />

58 for ( int j = 0 ; j id >> b a s e l i n e >> amplitu<strong>de</strong> ;<br />

63 h i s t [ j ]−> F i l l ( amplitu<strong>de</strong> ) ;<br />

64 }<br />

65 in . c l o s e ( ) ;<br />

66 }<br />

67 // Canvas <strong>para</strong> os g r á f i c o s<br />

68 s p r i n t f ( t i t u l o , "Single Photon Electron: MPD %d, %s" ,mpd, p i x e l s p a t h ) ;<br />

69 TCanvas ∗ c1 = new TCanvas ( "c1" , t i t u l o , 1 0 , 1 0 , 8 0 0 , 6 0 0 ) ;<br />

70 c1−>Divi<strong>de</strong> ( 1 , 1 ) ;<br />

71 c1−>S e t F i l l C o l o r ( 0 ) ;<br />

72 c1−>SetGridx ( ) ;<br />

73 c1−>SetGridy ( ) ;<br />

74 c1−>GetFrame ( )−>S e t F i l l C o l o r (21) ;<br />

75 c1−>GetFrame ( )−>SetBor<strong>de</strong>rSize ( 6 ) ;<br />

76 c1−>GetFrame ( )−>SetBor<strong>de</strong>rMo<strong>de</strong> (−1) ;<br />

77 c1−>cd ( ) ;<br />

78 // Configurando e plotando todos histogramas no mesmo g r á f i c o ,<br />

79 // fazendo a j u s t e <strong>de</strong> g a u ssianas nos histogramas e alimentando o<br />

80 // g r á f i c o <strong>de</strong> c a l i b r a ç ã o com a média e o d e s v i o padrão dos a j u s t e s<br />

81 for ( int i = 0 ; i < 4 ; i ++){<br />

82 h i s t [ i ]−>GetXaxis ( )−>S e t T i t l e ( "Valor <strong>de</strong> ADC (LSB)" ) ;<br />

83 h i s t [ i ]−>GetXaxis ( )−>C e n t e r T i t l e ( true ) ;<br />

84 h i s t [ i ]−>GetXaxis ( )−>S e t T i t l e O f f s e t ( 1 . 5 ) ;<br />

85 h i s t [ i ]−>GetYaxis ( )−>S e t T i t l e ( "Contagens (#)" ) ;<br />

86 h i s t [ i ]−>GetYaxis ( )−>C e n t e r T i t l e ( true ) ;<br />

87 h i s t [ i ]−>GetYaxis ( )−>S e t T i t l e O f f s e t ( 1 . 5 ) ;<br />

88 h i s t [ i ]−> S e t F i l l C o l o r ( 4 ) ;<br />

89 h i s t [ i ]−>GetXaxis ( )−>SetRangeUser ( 0 , 3 0 0 ) ;<br />

90 h i s t [ i ]−>GetYaxis ( )−>SetRangeUser ( 0 , 3 0 0 ) ;<br />

91 h i s t [ i ]−>Draw ( ) ;<br />

92 TF1 ∗ f i t g = new TF1( "f1" , "gaus" ,60 ,300) ;<br />

93 h i s t [ i ]−>Fit ( "f1" , "R0" ) ;<br />

102

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

Saved successfully!

Ooh no, something went wrong!