Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
JZCaPA
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Riccardo Longo
JZCaPA
Commits
2e3d6482
Commit
2e3d6482
authored
6 years ago
by
clantz
Browse files
Options
Downloads
Patches
Plain Diff
Changed floats to doubles. Changed sRMS to _line in OverlayHistos.
parent
257576a7
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Analysis/src/Visualizer.cpp
+8
-8
8 additions, 8 deletions
Analysis/src/Visualizer.cpp
with
8 additions
and
8 deletions
Analysis/src/Visualizer.cpp
+
8
−
8
View file @
2e3d6482
...
...
@@ -125,14 +125,14 @@ void Visualizer::SetAtlasStyle(){
*
* Plots two input histograms on the same, specified pad with
* separate axis. Draws two horizontal lines at +_line and -_line
* if f _line is non-zero.
*
on h2's axis
if f _line is non-zero.
*
* @param h1 - Base histogram (left y-axis)
* @param h2 - Overlayed histogram (right y-axis)
* @param pad - Address of a pad to be drawn on
* @param _line - y value for which a horizontal line will be drawn
*/
void
Visualizer
::
OverlayHistos
(
TH1
*
h1
,
TH1
*
h2
,
TVirtualPad
*
pad
,
float
_line
){
void
Visualizer
::
OverlayHistos
(
TH1
*
h1
,
TH1
*
h2
,
TVirtualPad
*
pad
,
double
_line
){
// If there is no pad or no data in the histograms, return
if
(
pad
==
nullptr
)
{
std
::
cerr
<<
"WARNING: No pad to overlay histos onto"
<<
std
::
endl
;
return
;}
...
...
@@ -159,8 +159,8 @@ void Visualizer::OverlayHistos( TH1 *h1, TH1 *h2 , TVirtualPad* pad, float _line
//Draw two horizontal lines
if
(
_line
!=
0
){
TLine
lineLow
(
0
,
-
sRMS
*
scale
,
h1
->
GetNbinsX
(),
-
sRMS
*
scale
);
TLine
lineHigh
(
0
,
sRMS
*
scale
,
h1
->
GetNbinsX
(),
sRMS
*
scale
);
TLine
lineLow
(
0
,
-
_line
*
scale
,
h1
->
GetNbinsX
(),
-
_line
*
scale
);
TLine
lineHigh
(
0
,
_line
*
scale
,
h1
->
GetNbinsX
(),
_line
*
scale
);
lineLow
.
SetLineColor
(
kGreen
);
lineHigh
.
SetLineColor
(
kGreen
);
lineLow
.
DrawClone
(
);
...
...
@@ -226,7 +226,7 @@ void Visualizer::ManyPadsPlot( std::vector< TH1* > _first_form, std::vector< TH1
* @param _treatment - treatment of the plots (scatter, overlay, overlay with lines)
* @param _line - y value for which a horizontal line will be drawn
*/
void
Visualizer
::
SinglePlot
(
std
::
vector
<
float
>
_v1
,
std
::
vector
<
float
>
_v2
,
std
::
string
_out_name
,
std
::
string
_treatment
,
float
_line
){
void
Visualizer
::
SinglePlot
(
std
::
vector
<
double
>
_v1
,
std
::
vector
<
double
>
_v2
,
std
::
string
_out_name
,
std
::
string
_treatment
,
double
_line
){
if
(
_v1
.
size
()
!=
_v2
.
size
())
std
::
cerr
<<
"WARNING!!! The two vectors have different size. "
...
...
@@ -278,10 +278,10 @@ void Visualizer::SinglePlot( std::vector< float > _v1, std::vector< float > _v2,
* @param _vy - Vector of y values
* @param pad - Address of a pad to be drawn on
*/
void
Visualizer
::
ScatterPlot
(
std
::
vector
<
float
>
_vx
,
std
::
vector
<
float
>
_vy
,
TVirtualPad
*
pad
){
void
Visualizer
::
ScatterPlot
(
std
::
vector
<
double
>
_vx
,
std
::
vector
<
double
>
_vy
,
TVirtualPad
*
pad
){
//Declare TVectors using the input std::vectors
TVector
<
float
>
_TVx
(
_vx
.
size
(),
&
_vx
[
0
]);
TVector
<
float
>
_TVy
(
_vy
.
size
(),
&
_vy
[
0
]);
TVector
<
double
>
_TVx
(
_vx
.
size
(),
&
_vx
[
0
]);
TVector
<
double
>
_TVy
(
_vy
.
size
(),
&
_vy
[
0
]);
TGraph
g
(
_TVx
,
_TVy
);
g
.
DrawCopy
(
"ap"
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment