Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Keerthi Nakkalil
gain_measurement
Commits
b88e9eec
Commit
b88e9eec
authored
Nov 24, 2020
by
Keerthi Nakkalil
Browse files
all the histograms are globally defined.
parent
621efaf1
Changes
1
Show whitespace changes
Inline
Side-by-side
gain_measurement.cpp
View file @
b88e9eec
...
@@ -4,9 +4,18 @@ const int namplitudes = 3;
...
@@ -4,9 +4,18 @@ const int namplitudes = 3;
int
nbins
=
450
;
int
nbins
=
450
;
double
xmin
=
850.0
,
xmax
=
1750.0
;
double
xmin
=
850.0
,
xmax
=
1750.0
;
TH1D
*
hist_255
[
namplitudes
];
TH1D
*
hist_255
[
namplitudes
];
hist_255
[
0
]
=
new
TH1D
(
"hist_255_amp03"
,
"Threshold gain measurement"
,
nbins
,
xmin
,
xmax
);
hist_255
[
1
]
=
new
TH1D
(
"hist_255_amp02"
,
"Threshold gain measurement"
,
nbins
,
xmin
,
xmax
);
hist_255
[
2
]
=
new
TH1D
(
"hist_255_amp01"
,
"Threshold gain measurement"
,
nbins
,
xmin
,
xmax
);
int
colors
[
namplitudes
]
=
{
kAzure
,
kRed
,
kViolet
};
int
colors
[
namplitudes
]
=
{
kAzure
,
kRed
,
kViolet
};
int
markers
[
namplitudes
]
=
{
2
,
3
,
5
};
int
markers
[
namplitudes
]
=
{
2
,
3
,
5
};
...
@@ -20,9 +29,9 @@ double fitmax[namplitudes]={1700.,1420.,1240.};
...
@@ -20,9 +29,9 @@ double fitmax[namplitudes]={1700.,1420.,1240.};
/////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////
// The function fit_1d sets the cosmetics for the histograms/
// The function fit_1d sets the cosmetics for the histograms/
// and fits the histogram with modified erf function. /
// and fits the histogram with modified erf function. /
/////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////
//TH1D *fit_1d(TH1D *hist_255, int i,int j, double low_limit, double up_limit)
//TH1D *fit_1d(TH1D *hist_255, int i,int j, double low_limit, double up_limit)
...
@@ -70,18 +79,6 @@ TH1D *fit_1d(TH1D *hist_255[namplitudes],int colors[namplitudes],int markers[nam
...
@@ -70,18 +79,6 @@ TH1D *fit_1d(TH1D *hist_255[namplitudes],int colors[namplitudes],int markers[nam
void
gain_measurement
()
void
gain_measurement
()
{
{
//Initialising the histograms.
hist_255
[
0
]
=
new
TH1D
(
"hist_255_amp03"
,
"Threshold gain measurement"
,
nbins
,
xmin
,
xmax
);
hist_255
[
1
]
=
new
TH1D
(
"hist_255_amp02"
,
"Threshold gain measurement"
,
nbins
,
xmin
,
xmax
);
hist_255
[
2
]
=
new
TH1D
(
"hist_255_amp01"
,
"Threshold gain measurement"
,
nbins
,
xmin
,
xmax
);
cout
<<
"THe histograms initialised..."
<<
std
::
endl
;
/*TH1D *hist_255_amp03 = new TH1D("hist_255_amp03"," Threshold gain measurement",500,850,1750);
TH1D *hist_255_amp02 = new TH1D("hist_255_amp02"," Threshold gain measurement",500,850,1750);
TH1D *hist_255_amp01 = new TH1D("hist_255_amp01"," Threshold gain measurement",500,850,1750);*/
//Initialising the trees.
//Initialising the trees.
TTree
*
tree1
=
new
TTree
(
"tree1"
,
"tree1"
);
TTree
*
tree1
=
new
TTree
(
"tree1"
,
"tree1"
);
...
@@ -104,12 +101,9 @@ void gain_measurement()
...
@@ -104,12 +101,9 @@ void gain_measurement()
{
{
fit_1d
(
&
hist_255
[
iamp
],
&
colors
[
iamp
],
&
markers
[
iamp
],
iamp
,
&
fitmin
[
iamp
],
&
fitmax
[
iamp
]);
fit_1d
(
&
hist_255
[
iamp
],
&
colors
[
iamp
],
&
markers
[
iamp
],
iamp
,
&
fitmin
[
iamp
],
&
fitmax
[
iamp
]);
}
}
cout
<<
"The fiiting function is called three times..."
<<
std
::
endl
;
cout
<<
"The fiiting function is called three times..."
<<
std
::
endl
;
/* fit_1d(hist_255_amp03,1,3,1220.0,1700.0);
fit_1d(hist_255_amp02,2,2,1200.0,1420.0);
fit_1d(hist_255_amp01,3,1,1150.0,1240.0);*/
//Drawing the legend
//Drawing the legend
...
@@ -132,3 +126,12 @@ void gain_measurement()
...
@@ -132,3 +126,12 @@ void gain_measurement()
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment