Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
nptool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
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
np
nptool
Commits
72b1d7f9
Commit
72b1d7f9
authored
4 years ago
by
Adrien Matta
Browse files
Options
Downloads
Patches
Plain Diff
* progress on shift macro
parent
74dd664f
No related branches found
No related tags found
No related merge requests found
Pipeline
#77546
passed
4 years ago
Stage: build-NPLib
Stage: build-NPSimulation
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Projects/Strasse/Analysis.cxx
+8
-3
8 additions, 3 deletions
Projects/Strasse/Analysis.cxx
Projects/Strasse/Analysis.h
+2
-0
2 additions, 0 deletions
Projects/Strasse/Analysis.h
Projects/Strasse/macro/Shift.cxx
+11
-1
11 additions, 1 deletion
Projects/Strasse/macro/Shift.cxx
with
21 additions
and
4 deletions
Projects/Strasse/Analysis.cxx
+
8
−
3
View file @
72b1d7f9
...
...
@@ -8,7 +8,7 @@
/*****************************************************************************
* Original Author: Adrien MATTA contact address: a.matta@surrey.ac.uk *
* *
* Creation Date :
march
20
1
2 *
* Creation Date :
july
202
0
*
* Last update : *
*---------------------------------------------------------------------------*
* Decription: *
...
...
@@ -75,8 +75,8 @@ void Analysis::TreatEvent(){
TVector3
OuterPos2
=
Strasse
->
GetOuterPositionOfInteraction
(
1
);
TVector3
Proton2
=
OuterPos2
-
InnerPos2
;
double
deltaPhi
=
abs
(
Proton1
.
Phi
()
/
deg
-
Proton2
.
Phi
()
/
deg
);
double
sumTheta
=
Proton1
.
Theta
()
/
deg
+
Proton2
.
Theta
()
/
deg
;
deltaPhi
=
abs
(
Proton1
.
Phi
()
/
deg
-
Proton2
.
Phi
()
/
deg
);
sumTheta
=
Proton1
.
Theta
()
/
deg
+
Proton2
.
Theta
()
/
deg
;
Theta12
=
Proton1
.
Angle
(
Proton2
)
/
deg
;
// reject event that make no physical sense
...
...
@@ -136,6 +136,9 @@ void Analysis::InitOutputBranch() {
RootOutput
::
getInstance
()
->
GetTree
()
->
Branch
(
"deltaX"
,
&
deltaX
,
"deltaX/D"
);
RootOutput
::
getInstance
()
->
GetTree
()
->
Branch
(
"deltaY"
,
&
deltaY
,
"deltaY/D"
);
RootOutput
::
getInstance
()
->
GetTree
()
->
Branch
(
"deltaZ"
,
&
deltaZ
,
"deltaZ/D"
);
RootOutput
::
getInstance
()
->
GetTree
()
->
Branch
(
"deltaPhi"
,
&
deltaPhi
,
"deltaPhi/D"
);
RootOutput
::
getInstance
()
->
GetTree
()
->
Branch
(
"sumTheta"
,
&
sumTheta
,
"sumTheta/D"
);
RootOutput
::
getInstance
()
->
GetTree
()
->
Branch
(
"Distance"
,
&
Distance
,
"Distance/D"
);
RootOutput
::
getInstance
()
->
GetTree
()
->
Branch
(
"InteractionCoordinates"
,
"TInteractionCoordinates"
,
&
DC
);
...
...
@@ -160,6 +163,8 @@ void Analysis::ReInitValue(){
deltaY
=-
1000
;
deltaZ
=-
1000
;
Distance
=-
1000
;
sumTheta
=-
1000
;
deltaPhi
=-
1000
;
}
...
...
This diff is collapsed.
Click to expand it.
Projects/Strasse/Analysis.h
+
2
−
0
View file @
72b1d7f9
...
...
@@ -62,6 +62,8 @@ class Analysis: public NPL::VAnalysis{
double
deltaY
;
double
deltaZ
;
double
Distance
;
double
deltaPhi
;
double
sumTheta
;
TLorentzVector
LV_A
;
TLorentzVector
LV_T
;
TLorentzVector
LV_B
;
...
...
This diff is collapsed.
Click to expand it.
Projects/Strasse/macro/Shift.cxx
+
11
−
1
View file @
72b1d7f9
...
...
@@ -3,12 +3,22 @@ void Shift(){
TFile
*
file_shifted
=
TFile
::
Open
(
"../../Outputs/Analysis/strasse_shifted.root"
);
TTree
*
ok
=
(
TTree
*
)
file_ok
->
FindObjectAny
(
"PhysicsTree"
);
TTree
*
shifted
=
(
TTree
*
)
file_shifted
->
FindObjectAny
(
"PhysicsTree"
);
TCanvas
*
ctheta
=
new
TCanvas
(
"ControlTheta"
,
"ControlTheta"
,
1000
,
1000
);
TCanvas
*
ctheta
=
new
TCanvas
(
"ControlTheta"
,
"ControlTheta"
,
2000
,
1000
);
ctheta
->
Divide
(
2
,
1
);
ctheta
->
cd
(
1
);
string
cond
=
"Theta12!=-1000"
;
ok
->
Draw
(
"Theta12>>ht(5000)"
,
cond
.
c_str
(),
""
)
;
shifted
->
Draw
(
"Theta12>>hts(5000)"
,
cond
.
c_str
(),
"same"
)
;
TH1
*
hts
=
(
TH1
*
)
gDirectory
->
FindObjectAny
(
"hts"
);
hts
->
SetFillColor
(
kOrange
-
3
);
hts
->
SetLineColor
(
kOrange
-
3
);
ctheta
->
cd
(
2
);
cond
=
"deltaPhi!=-1000"
;
ok
->
Draw
(
"deltaPhi>>hp(5000)"
,
cond
.
c_str
(),
""
)
;
shifted
->
Draw
(
"deltaPhi>>hps(5000)"
,
cond
.
c_str
(),
"same"
)
;
TH1
*
hps
=
(
TH1
*
)
gDirectory
->
FindObjectAny
(
"hps"
);
hps
->
SetFillColor
(
kOrange
-
3
);
hps
->
SetLineColor
(
kOrange
-
3
);
}
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