Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cbmroot
Manage
Activity
Members
Labels
Plan
Wiki
Redmine
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
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
Computing
cbmroot
Commits
3d2ed66c
Commit
3d2ed66c
authored
4 years ago
by
Norbert Herrmann
Committed by
Florian Uhlig
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
add single pad plot option
parent
26ec770d
No related branches found
No related tags found
1 merge request
!138
Final merge
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
macro/beamtime/mcbm2020/pl_all_DigiDTFD.C
+61
-9
61 additions, 9 deletions
macro/beamtime/mcbm2020/pl_all_DigiDTFD.C
with
61 additions
and
9 deletions
macro/beamtime/mcbm2020/pl_all_DigiDTFD.C
+
61
−
9
View file @
3d2ed66c
void
pl_all_DigiDTFD
(
Int_t
iOpt
=
0
,
Int_t
iNDet
=
2
,
Double_t
dDTthr
=
2
.)
{
void
pl_all_DigiDTFD
(
Int_t
iOpt
=
0
,
Double_t
dYmax
=
0
.,
Int_t
iNDet
=
2
)
{
Int_t
iOpt1
=
iOpt
%
10
;
Int_t
iOpt2
=
(
iOpt
-
iOpt1
)
/
10
%
10
;
Int_t
iOpt3
=
(
iOpt
-
iOpt2
*
10
-
iOpt1
)
/
100
%
10
;
Int_t
iOpt4
=
(
iOpt
-
iOpt3
*
100
-
iOpt2
*
10
-
iOpt1
)
/
1000
%
10
;
// TCanvas *can = new TCanvas("can22","can22");
// can->Divide(2,2);
TCanvas
*
can
=
new
TCanvas
(
"can"
,
"can"
,
48
,
55
,
900
,
900
);
...
...
@@ -6,7 +11,21 @@ void pl_all_DigiDTFD( Int_t iOpt = 0, Int_t iNDet = 2, Double_t dDTthr = 2.) {
//can->Divide(4,4,0.01,0.01);
// can->Divide(2,3,0.01,0.01);
//can->Divide(5, 7, 0.01, 0.01);
can
->
Divide
(
5
,
4
,
0
.
01
,
0
.
01
);
switch
(
iOpt3
)
{
case
0
:
can
->
Divide
(
5
,
7
,
0
.
01
,
0
.
01
);
break
;
case
1
:
can
->
Divide
(
5
,
4
,
0
.
01
,
0
.
01
);
break
;
case
3
:
can
->
Divide
(
1
,
4
,
0
.
01
,
0
.
01
);
break
;
case
4
:
can
->
Divide
(
1
,
1
,
0
.
01
,
0
.
01
);
break
;
}
Float_t
lsize
=
0
.
07
;
gPad
->
SetFillColor
(
0
);
...
...
@@ -23,7 +42,7 @@ void pl_all_DigiDTFD( Int_t iOpt = 0, Int_t iNDet = 2, Double_t dDTthr = 2.) {
TString
hnameT
;
const
Int_t
iType
[
6
]
=
{
0
,
5
,
9
,
7
,
6
,
8
};
const
Int_t
iSmNum
[
6
]
=
{
3
,
1
,
1
,
1
,
1
,
1
};
const
Int_t
iSmNum
[
6
]
=
{
5
,
1
,
1
,
1
,
1
,
1
};
const
Int_t
iRpcNum
[
6
]
=
{
5
,
1
,
2
,
1
,
2
,
8
};
Double_t
dTime
=
0
.;
...
...
@@ -34,15 +53,31 @@ void pl_all_DigiDTFD( Int_t iOpt = 0, Int_t iNDet = 2, Double_t dDTthr = 2.) {
Int_t
jRp
=
0
;
// if (h!=NULL) h->Delete();
Int_t
iCol
=
1
;
for
(
Int_t
iCh
=
0
;
iCh
<
iNDet
;
iCh
++
)
{
for
(
Int_t
iSm
=
0
;
iSm
<
iSmNum
[
iCh
];
iSm
++
)
{
for
(
Int_t
iRpc
=
0
;
iRpc
<
iRpcNum
[
iCh
];
iRpc
++
)
{
if
(
iOpt3
==
1
)
{
can
->
cd
(
iCanv
+
1
);
iCanv
++
;
gROOT
->
cd
();
iCol
=
1
;
}
else
{
if
(
iOpt3
==
4
){
iCol
=
1
;
if
(
iCh
!=
iOpt4
)
continue
;
}
}
for
(
Int_t
iRpc
=
0
;
iRpc
<
iRpcNum
[
iCh
];
iRpc
++
)
{
if
(
iOpt3
==
0
)
{
can
->
cd
(
iCanv
+
1
);
iCanv
++
;
gROOT
->
cd
();
iCol
=
4
;
}
TString
hname
=
""
;
switch
(
iOpt
%
10
)
{
switch
(
iOpt
1
)
{
case
0
:
hname
=
Form
(
"cl_SmT%01d_sm%03d_rpc%03d_DigiDTFD"
,
iType
[
iCh
],
iSm
,
iRpc
);
break
;
...
...
@@ -53,24 +88,41 @@ void pl_all_DigiDTFD( Int_t iOpt = 0, Int_t iNDet = 2, Double_t dDTthr = 2.) {
default:
;
}
iCol
++
;
if
(
iCol
==
5
)
iCol
++
;
h2
=
(
TH2
*
)
gROOT
->
FindObjectAny
(
hname
);
TH1D
*
hx
;
TH1D
*
hy
;
TH1
*
hp
;
if
(
h2
!=
NULL
)
{
Int_t
iOpt2
=
(
iOpt
-
iOpt
%
10
)
/
10
;
switch
(
iOpt2
)
{
case
0
:
h2
->
Draw
(
"colz"
);
gPad
->
SetLogz
();
break
;
case
1
:
h2
->
ProjectionY
()
->
Draw
();
hp
=
(
TH1
*
)
h2
->
ProjectionY
();
hp
->
SetLineColor
(
iCol
);
switch
(
iOpt3
)
{
case
0
:
hp
->
Draw
();
break
;
case
1
:
case
4
:
if
(
iRpc
==
0
)
{
if
(
dYmax
>
0
.)
hp
->
SetMaximum
(
dYmax
);
hp
->
Draw
();
}
else
hp
->
Draw
(
"same"
);
}
cout
<<
"plot "
<<
hp
->
GetName
()
<<
" into canv "
<<
iCanv
<<
" with col "
<<
iCol
<<
endl
;
//gPad->SetLogy();
break
;
case
2
:
h2
->
ProfileX
(
"_pfx"
,
1
,
20
)
->
Draw
();
h2
->
SetMarkerSize
(
5
);
h2
->
ProfileX
()
->
Draw
();
//gPad->SetLogz();
break
;
...
...
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