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
Admin message
Gitlab has been updated. More info
here
and
there
.
Show more breadcrumbs
np
nptool
Commits
efec815a
Commit
efec815a
authored
3 months ago
by
Theodore Efremov
Browse files
Options
Downloads
Patches
Plain Diff
Started working on toff
parent
985389c3
No related branches found
Branches containing commit
No related tags found
1 merge request
!27
Draft: [Epic] Preparation of the environement for the new GaseousDetectorScorers...
Pipeline
#370642
passed
3 months ago
Stage: build-NPLib
Stage: build-NPSimulation
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Projects/AlPhaPha/2024/macro/mwpc/Toff/ToffGenerator.cxx
+70
-0
70 additions, 0 deletions
Projects/AlPhaPha/2024/macro/mwpc/Toff/ToffGenerator.cxx
with
70 additions
and
0 deletions
Projects/AlPhaPha/2024/macro/mwpc/Toff/ToffGenerator.cxx
0 → 100644
+
70
−
0
View file @
efec815a
#include
"TTimeData.h"
#include
<TChain.h>
#include
<TH2.h>
using
namespace
std
;
void
ToffGenerator
(
){
//===========================================================================================================
// Setters
//===========================================================================================================
TChain
*
chain
=
new
TChain
(
"PhysicsTree"
);
chain
->
Add
(
"../../../root/analysis/VamosCalib247.root"
);
Int_t
FPMW_Section
,
M13
,
M14
,
M23
,
M24
;
// we will fetch multiplicity during
// the getentry
TTimeData
*
Time
;
chain
->
SetBranchStatus
(
"FPMW_Section"
,
true
);
chain
->
SetBranchAddress
(
"FPMW_Section"
,
&
FPMW_Section
);
chain
->
SetBranchStatus
(
"Time"
,
true
);
chain
->
SetBranchAddress
(
"Time"
,
&
Time
);
//===========================================================================================================
// Histograms
//===========================================================================================================
TH2F
*
hToff13
=
new
TH2F
(
"Toff13"
,
"Toff13"
,
20
,
0
,
20
,
100
,
-
50
,
50
);
TH2F
*
hToff14
=
new
TH2F
(
"Toff14"
,
"Toff14"
,
20
,
0
,
20
,
100
,
-
50
,
50
);
TH2F
*
hToff23
=
new
TH2F
(
"Toff23"
,
"Toff23"
,
20
,
0
,
20
,
100
,
-
50
,
50
);
TH2F
*
hToff24
=
new
TH2F
(
"Toff24"
,
"Toff24"
,
20
,
0
,
20
,
100
,
-
50
,
50
);
//===========================================================================================================
// Loop on entries
//===========================================================================================================
int
Nentries
=
chain
->
GetEntries
();
//int Nentries = 10000000;
auto
start
=
std
::
chrono
::
high_resolution_clock
::
now
();
for
(
int
e
=
0
;
e
<
Nentries
;
e
++
)
{
if
(
e
%
100000
==
0
&&
e
>
0
)
{
auto
now
=
std
::
chrono
::
high_resolution_clock
::
now
();
std
::
chrono
::
duration
<
double
>
elapsed
=
now
-
start
;
double
avgTimePerIteration
=
elapsed
.
count
()
/
e
;
double
timeLeft
=
avgTimePerIteration
*
(
Nentries
-
e
);
std
::
cout
<<
"********** Estimated time left: "
<<
int
(
timeLeft
)
<<
" seconds **********"
<<
"
\r
"
<<
flush
;
}
M13
=
Time
->
GetMWPC13Mult
();
M14
=
Time
->
GetMWPC14Mult
();
M23
=
Time
->
GetMWPC23Mult
();
M24
=
Time
->
GetMWPC24Mult
();
if
(
M13
==
2
&&
(
FPMW_Section
)){
//hToff13->Fill()
}
}
}
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