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
35783987
Commit
35783987
authored
5 years ago
by
Cyril Lenain
Browse files
Options
Downloads
Patches
Plain Diff
Fixing errors in TMinosPhysics
parent
f9c35338
No related branches found
No related tags found
No related merge requests found
Pipeline
#45351
passed
5 years ago
Stage: build-NPLib
Stage: build-NPSimulation
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
NPLib/Detectors/Minos/TMinosPhysics.cxx
+39
-39
39 additions, 39 deletions
NPLib/Detectors/Minos/TMinosPhysics.cxx
with
39 additions
and
39 deletions
NPLib/Detectors/Minos/TMinosPhysics.cxx
+
39
−
39
View file @
35783987
...
@@ -72,7 +72,7 @@ void TMinosPhysics::AddDetector(double R, double Theta, double Phi, string shape
...
@@ -72,7 +72,7 @@ void TMinosPhysics::AddDetector(double R, double Theta, double Phi, string shape
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
void
TMinosPhysics
::
BuildSimplePhysicalEvent
()
{
void
TMinosPhysics
::
BuildSimplePhysicalEvent
()
{
BuildPhysicalEvent
();
/*
BuildPhysicalEvent();
*/
}
}
...
@@ -80,50 +80,50 @@ void TMinosPhysics::BuildSimplePhysicalEvent() {
...
@@ -80,50 +80,50 @@ void TMinosPhysics::BuildSimplePhysicalEvent() {
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
void
TMinosPhysics
::
BuildPhysicalEvent
()
{
void
TMinosPhysics
::
BuildPhysicalEvent
()
{
// apply thresholds and calibration
// apply thresholds and calibration
PreTreat
();
/*
PreTreat();
*/
// match energy and time together
// match energy and time together
unsigned
int
mysizeE
=
m_PreTreatedData
->
GetMultEnergy
();
/*
unsigned int mysizeE = m_PreTreatedData->GetMultEnergy();
*/
unsigned
int
mysizeT
=
m_PreTreatedData
->
GetMultTime
();
/*
unsigned int mysizeT = m_PreTreatedData->GetMultTime();
*/
for
(
UShort_t
e
=
0
;
e
<
mysizeE
;
e
++
)
{
/*
for (UShort_t e = 0; e < mysizeE ; e++) {
*/
for
(
UShort_t
t
=
0
;
t
<
mysizeT
;
t
++
)
{
/*
for (UShort_t t = 0; t < mysizeT ; t++) {
*/
if
(
m_PreTreatedData
->
GetE_DetectorNbr
(
e
)
==
m_PreTreatedData
->
GetT_DetectorNbr
(
t
))
{
/*
if (m_PreTreatedData->GetE_DetectorNbr(e) == m_PreTreatedData->GetT_DetectorNbr(t)) {
*/
DetectorNumber
.
push_back
(
m_PreTreatedData
->
GetE_DetectorNbr
(
e
));
/*
DetectorNumber.push_back(m_PreTreatedData->GetE_DetectorNbr(e));
*/
Energy
.
push_back
(
m_PreTreatedData
->
Get_Energy
(
e
));
/*
Energy.push_back(m_PreTreatedData->Get_Energy(e));
*/
Time
.
push_back
(
m_PreTreatedData
->
Get_Time
(
t
));
/*
Time.push_back(m_PreTreatedData->Get_Time(t));
*/
}
/*
}
*/
}
/* } */
}
/* } */
}
}
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
void
TMinosPhysics
::
PreTreat
()
{
void
TMinosPhysics
::
PreTreat
()
{
// This method typically applies thresholds and calibrations
/*
// This method typically applies thresholds and calibrations
*/
// Might test for disabled channels for more complex detector
/*
// Might test for disabled channels for more complex detector
*/
// clear pre-treated object
/*
// clear pre-treated object
*/
ClearPreTreatedData
();
/*
ClearPreTreatedData();
*/
// instantiate CalibrationManager
/*
// instantiate CalibrationManager
*/
static
CalibrationManager
*
Cal
=
CalibrationManager
::
getInstance
();
/*
static CalibrationManager* Cal = CalibrationManager::getInstance();
*/
// Energy
/*
// Energy
*/
unsigned
int
mysize
=
m_EventData
->
GetMultEnergy
();
/*
unsigned int mysize = m_EventData->GetMultEnergy();
*/
for
(
UShort_t
i
=
0
;
i
<
mysize
;
++
i
)
{
/*
for (UShort_t i = 0; i < mysize ; ++i) {
*/
if
(
m_EventData
->
Get_Energy
(
i
)
>
m_E_RAW_Threshold
)
{
/*
if (m_EventData->Get_Energy(i) > m_E_RAW_Threshold) {
*/
Double_t
Energy
=
Cal
->
ApplyCalibration
(
"Minos/ENERGY"
+
NPL
::
itoa
(
m_EventData
->
GetE_DetectorNbr
(
i
)),
m_EventData
->
Get_Energy
(
i
));
/*
Double_t Energy = Cal->ApplyCalibration("Minos/ENERGY"+NPL::itoa(m_EventData->GetE_DetectorNbr(i)),m_EventData->Get_Energy(i));
*/
if
(
Energy
>
m_E_Threshold
)
{
/*
if (Energy > m_E_Threshold) {
*/
m_PreTreatedData
->
SetEnergy
(
m_EventData
->
GetE_DetectorNbr
(
i
),
Energy
);
/*
m_PreTreatedData->SetEnergy(m_EventData->GetE_DetectorNbr(i), Energy);
*/
}
/*
}
*/
}
/* } */
}
/* } */
// Time
/*
// Time
*/
mysize
=
m_EventData
->
GetMultTime
();
/*
mysize = m_EventData->GetMultTime();
*/
for
(
UShort_t
i
=
0
;
i
<
mysize
;
++
i
)
{
/*
for (UShort_t i = 0; i < mysize; ++i) {
*/
Double_t
Time
=
Cal
->
ApplyCalibration
(
"Minos/TIME"
+
NPL
::
itoa
(
m_EventData
->
GetT_DetectorNbr
(
i
)),
m_EventData
->
Get_Time
(
i
));
/*
Double_t Time= Cal->ApplyCalibration("Minos/TIME"+NPL::itoa(m_EventData->GetT_DetectorNbr(i)),m_EventData->Get_Time(i));
*/
m_PreTreatedData
->
SetTime
(
m_EventData
->
GetT_DetectorNbr
(
i
),
Time
);
/*
m_PreTreatedData->SetTime(m_EventData->GetT_DetectorNbr(i), Time);
*/
}
/* } */
}
}
...
...
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