Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
GanilDetectors
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
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
GANILAnalysis
GanilDetectors
Commits
c25c0900
Commit
c25c0900
authored
10 months ago
by
Antoine Lemasson
Browse files
Options
Downloads
Patches
Plain Diff
Definition of TargetSi detector
parent
370597d5
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#316104
passed
10 months ago
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libVAMOS/inc/TargetSi.hh
+37
-0
37 additions, 0 deletions
libVAMOS/inc/TargetSi.hh
libVAMOS/src/TargetSi.cc
+256
-0
256 additions, 0 deletions
libVAMOS/src/TargetSi.cc
with
293 additions
and
0 deletions
libVAMOS/inc/TargetSi.hh
0 → 100644
+
37
−
0
View file @
c25c0900
#ifndef TARGETSI_H
#define TARGETSI_H
#include
"BaseDetector.hh"
#include
"MesytecParameters.hh"
class
TargetSi
:
public
BaseDetector
{
public:
//! Constructor
TargetSi
(
const
Char_t
*
Name
,
UShort_t
NDetectors
,
Bool_t
RawData
,
Bool_t
CalData
,
Bool_t
DefaultCalibration
);
~
TargetSi
(
void
);
//!< Destructor
void
AllocateComponents
(
void
);
//! Treat the data
Bool_t
Treat
(
void
);
//! SetParameters
void
SetParameters
(
Parameters
*
Par
,
Map
*
Map
);
#ifdef WITH_ROOT
void
SetOpt
(
TTree
*
OutTTree
,
TTree
*
InTTree
);
#endif
private:
BaseDetector
*
Si_front
;
BaseDetector
*
Si_back
;
};
#endif // TARGETSI_H
This diff is collapsed.
Click to expand it.
libVAMOS/src/TargetSi.cc
0 → 100644
+
256
−
0
View file @
c25c0900
#include
"TargetSi.hh"
TargetSi
::
TargetSi
(
const
Char_t
*
Name
,
UShort_t
NDetectors
,
Bool_t
RawData
,
Bool_t
CalData
,
Bool_t
DefaultCalibration
)
:
BaseDetector
(
Name
,
0
,
false
,
CalData
,
true
,
false
,
""
)
{
START
;
NumberOfSubDetectors
=
NDetectors
;
fRawDataSubDetectors
=
RawData
;
AllocateComponents
();
Si_front
=
nullptr
;
Si_back
=
nullptr
;
if
(
CalData
)
{
//
}
END
;
}
TargetSi
::~
TargetSi
()
{
START
;
END
;
}
void
TargetSi
::
AllocateComponents
()
{
START
;
Char_t
Name
[
200
];
Bool_t
RawData
=
fRawDataSubDetectors
;
Bool_t
CalData
=
fCalData
;
Bool_t
DefCal
=
true
;
Bool_t
PosInfo
=
false
;
// Front E strips
sprintf
(
Name
,
"%s_Front_E"
,
DetectorName
);
Si_front
=
new
BaseDetector
(
Name
,
NumberOfSubDetectors
,
RawData
,
CalData
,
DefCal
,
PosInfo
,
""
,
false
,
true
);
if
(
RawData
)
{
for
(
int
i
=
0
;
i
<
NumberOfSubDetectors
;
i
++
)
{
sprintf
(
Name
,
"%s_Front_%02d_E"
,
DetectorName
,
i
);
Si_front
->
SetParameterName
(
Name
,
i
);
}
Si_front
->
SetGateRaw
(
0
,
65534
);
Si_front
->
SetRawHistogramsParams
(
16384
,
0
,
65533
,
""
);
}
if
(
CalData
)
{
Si_front
->
HasCalCharges
(
false
);
Si_front
->
SetCalHistogramsParams
(
1000
,
0
,
1000
,
"MeV"
);
}
AddComponent
(
Si_front
);
// Back E strips
sprintf
(
Name
,
"%s_Back_E"
,
DetectorName
);
Si_back
=
new
BaseDetector
(
Name
,
1
,
RawData
,
CalData
,
DefCal
,
PosInfo
,
""
,
false
,
true
);
if
(
RawData
)
{
Si_back
->
SetParameterName
(
Name
,
0
);
Si_back
->
SetGateRaw
(
0
,
65534
);
Si_back
->
SetRawHistogramsParams
(
16384
,
0
,
65533
,
""
);
}
if
(
CalData
)
{
Si_back
->
HasCalCharges
(
false
);
Si_back
->
SetCalHistogramsParams
(
1000
,
0
,
1000
,
"MeV"
);
}
AddComponent
(
Si_back
);
END
;
}
void
TargetSi
::
SetParameters
(
Parameters
*
Par
,
Map
*
Map
)
{
START
;
MesytecParameters
*
MP
=
MesytecParameters
::
getInstance
();
if
(
isComposite
)
{
for
(
UShort_t
i
=
0
;
i
<
DetList
->
size
();
i
++
)
{
DetList
->
at
(
i
)
->
SetParametersMesytec
(
MP
,
Map
);
}
}
END
;
}
Bool_t
TargetSi
::
Treat
()
{
START
;
Ctr
->
at
(
0
)
++
;
if
(
isComposite
)
{
for
(
UShort_t
i
=
0
;
i
<
DetList
->
size
();
i
++
)
{
DetList
->
at
(
i
)
->
Treat
();
}
}
return
IsPresent
();
END
;
}
#ifdef WITH_ROOT
void
TargetSi
::
SetOpt
(
TTree
*
OutTTree
,
TTree
*
InTTree
)
{
START
;
// Set histogram Hierarchy
SetMainHistogramFolder
(
"TargetSi"
);
SetHistogramsCal1DFolder
(
""
);
SetHistogramsCal2DFolder
(
""
);
for
(
UShort_t
i
=
0
;
i
<
DetList
->
size
();
i
++
)
{
DetList
->
at
(
i
)
->
SetMainHistogramFolder
(
""
);
DetList
->
at
(
i
)
->
SetHistogramsRaw1DFolder
(
"TargetSi_R"
);
DetList
->
at
(
i
)
->
SetHistogramsRaw2DFolder
(
"TargetSi_R"
);
DetList
->
at
(
i
)
->
SetHistogramsCal1DFolder
(
"TargetSi_C"
);
DetList
->
at
(
i
)
->
SetHistogramsCal2DFolder
(
"TargetSi_C"
);
}
if
(
fMode
==
MODE_WATCHER
)
{
if
(
fRawData
)
{
SetHistogramsRaw
(
true
);
}
if
(
fCalData
)
{
SetHistogramsCal
(
true
);
}
for
(
UShort_t
i
=
0
;
i
<
DetList
->
size
();
i
++
)
{
if
(
DetList
->
at
(
i
)
->
HasRawData
())
{
DetList
->
at
(
i
)
->
SetHistogramsRaw1D
(
true
);
DetList
->
at
(
i
)
->
SetHistogramsRaw2D
(
true
);
DetList
->
at
(
i
)
->
SetHistogramsRawSummary
(
true
);
DetList
->
at
(
i
)
->
SetOutAttachRawV
(
false
);
DetList
->
at
(
i
)
->
SetOutAttachRawI
(
false
);
}
if
(
DetList
->
at
(
i
)
->
HasCalData
())
{
DetList
->
at
(
i
)
->
SetHistogramsCal1D
(
true
);
DetList
->
at
(
i
)
->
SetHistogramsCal2D
(
true
);
DetList
->
at
(
i
)
->
SetHistogramsCalSummary
(
true
);
}
}
}
else
if
(
fMode
==
MODE_D2R
)
{
for
(
UShort_t
i
=
0
;
i
<
DetList
->
size
();
i
++
)
{
if
(
DetList
->
at
(
i
)
->
HasRawData
())
{
DetList
->
at
(
i
)
->
SetHistogramsRaw1D
(
false
);
DetList
->
at
(
i
)
->
SetHistogramsRaw2D
(
true
);
DetList
->
at
(
i
)
->
SetHistogramsRawSummary
(
true
);
DetList
->
at
(
i
)
->
SetOutAttachRawV
(
true
);
DetList
->
at
(
i
)
->
SetOutAttachRawF
(
false
);
DetList
->
at
(
i
)
->
SetOutAttachRawI
(
false
);
DetList
->
at
(
i
)
->
SetOutAttachTS
(
true
);
}
DetList
->
at
(
i
)
->
OutAttach
(
OutTTree
);
}
OutAttach
(
OutTTree
);
}
else
if
(
fMode
==
MODE_D2A
)
{
if
(
fRawData
)
{
SetHistogramsRaw
(
false
);
SetOutAttachRawI
(
false
);
SetOutAttachRawV
(
false
);
}
if
(
fCalData
)
{
SetHistogramsCal
(
true
);
SetOutAttachCalI
(
false
);
SetOutAttachCalV
(
false
);
}
for
(
UShort_t
i
=
0
;
i
<
DetList
->
size
();
i
++
)
{
if
(
DetList
->
at
(
i
)
->
HasRawData
())
{
DetList
->
at
(
i
)
->
SetHistogramsRaw1D
(
false
);
DetList
->
at
(
i
)
->
SetHistogramsRaw2D
(
true
);
DetList
->
at
(
i
)
->
SetHistogramsRawSummary
(
true
);
DetList
->
at
(
i
)
->
SetOutAttachRawV
(
true
);
DetList
->
at
(
i
)
->
SetOutAttachRawI
(
false
);
DetList
->
at
(
i
)
->
SetOutAttachTS
(
true
);
}
if
(
DetList
->
at
(
i
)
->
HasCalData
())
{
DetList
->
at
(
i
)
->
SetHistogramsCal1D
(
false
);
DetList
->
at
(
i
)
->
SetHistogramsCal2D
(
true
);
DetList
->
at
(
i
)
->
SetHistogramsCalSummary
(
true
);
DetList
->
at
(
i
)
->
SetOutAttachCalV
(
true
);
DetList
->
at
(
i
)
->
SetOutAttachCalI
(
false
);
}
DetList
->
at
(
i
)
->
OutAttach
(
OutTTree
);
}
OutAttach
(
OutTTree
);
}
else
if
(
fMode
==
MODE_R2A
)
{
SetNoOutput
();
}
else
if
(
fMode
==
MODE_RECAL
)
{
SetNoOutput
();
}
else
if
(
fMode
==
MODE_CALC
)
{
SetNoOutput
();
}
else
{
Char_t
Message
[
500
];
sprintf
(
Message
,
"In <%s><%s> Trying to set the detector unknown Mode (%d) !"
,
GetName
(),
GetName
(),
fMode
);
MErr
*
Er
=
new
MErr
(
WhoamI
,
0
,
0
,
Message
);
throw
Er
;
}
END
;
}
#endif
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