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
b4ccf840
Commit
b4ccf840
authored
8 years ago
by
moukaddam
Browse files
Options
Downloads
Patches
Plain Diff
updating T40 Analysis
parent
3b41afe3
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Projects/T40/Analysis.cxx
+85
-28
85 additions, 28 deletions
Projects/T40/Analysis.cxx
Projects/T40/Analysis.h
+17
-6
17 additions, 6 deletions
Projects/T40/Analysis.h
Projects/T40/T40.detector
+32
-3
32 additions, 3 deletions
Projects/T40/T40.detector
with
134 additions
and
37 deletions
Projects/T40/Analysis.cxx
+
85
−
28
View file @
b4ccf840
...
...
@@ -9,7 +9,7 @@
* Original Author: Adrien MATTA contact address: a.matta@surrey.ac.uk *
* *
* Creation Date : march 2015 *
* Last update :
*
* Last update :
December 2016 [m.moukaddam@surrey.ac.uk]
*
*---------------------------------------------------------------------------*
* Decription: *
* Class describing the property of an Analysis object *
...
...
@@ -21,13 +21,13 @@
*****************************************************************************/
#include
<iostream>
using
namespace
std
;
#include
"Analysis.h"
#include
"NPAnalysisFactory.h"
#include
"NPDetectorManager.h"
#include
"NPOptionManager.h"
#include
"NPFunction.h"
#include
"RootOutput.h"
#include
"RootInput.h"
#include
"Analysis.h"
#include
"NPAnalysisFactory.h"
#include
"NPDetectorManager.h"
#include
"NPOptionManager.h"
#include
"NPFunction.h"
#include
"RootOutput.h"
#include
"RootInput.h"
////////////////////////////////////////////////////////////////////////////////
Analysis
::
Analysis
(){
}
...
...
@@ -39,11 +39,13 @@ Analysis::~Analysis(){
void
Analysis
::
Init
(){
TH
=
(
TTiaraHyballPhysics
*
)
m_DetectorManager
->
GetDetector
(
"TiaraHyballWedge"
);
TB
=
(
TTiaraBarrelPhysics
*
)
m_DetectorManager
->
GetDetector
(
"TiaraInnerBarrel="
);
TF
=
(
TFPDTamuPhysics
*
)
m_DetectorManager
->
GetDetector
(
"FPDTamu"
);
// get reaction information
myReaction
=
new
NPL
::
Reaction
();
myReaction
->
ReadConfigurationFile
(
NPOptionManager
::
getInstance
()
->
GetReactionFile
());
OriginalBeamEnergy
=
myReaction
->
GetBeamEnergy
();
cout
<<
"Original Beam energy (entrance of target): "
<<
OriginalBeamEnergy
<<
endl
;
// target thickness
TargetThickness
=
m_DetectorManager
->
GetTargetThickness
()
*
micrometer
;
...
...
@@ -58,6 +60,7 @@ void Analysis::Init(){
LightSi
=
NPL
::
EnergyLoss
(
light
+
"_Si.G4table"
,
"G4Table"
,
10
);
BeamTarget
=
NPL
::
EnergyLoss
(
beam
+
"_"
+
TargetMaterial
+
".G4table"
,
"G4Table"
,
10
);
FinalBeamEnergy
=
BeamTarget
.
Slow
(
OriginalBeamEnergy
,
TargetThickness
*
0.5
,
0
);
cout
<<
"Final Beam energy (middle of target): "
<<
FinalBeamEnergy
<<
endl
;
myReaction
->
SetBeamEnergy
(
FinalBeamEnergy
);
...
...
@@ -73,34 +76,40 @@ void Analysis::Init(){
Si_E_OuterTB
=
0
;
Si_E_TB
=
0
;
Energy
=
0
;
//Original_ELab=0;
//Original_ThetaLab=0;
Original_ELab
=
0
;
Original_ThetaLab
=
0
;
XTarget
=
0
;
XTarget
=
0
;
YTarget
=
0
;
BeamDirection
=
TVector3
(
0
,
0
,
1
);
InitOutputBranch
();
InitInputBranch
();
//FPD
Delta_E
=
0
;
// Energy ionisation chamber
Micro_E
=
0
;
// Energy from micromega total
Micro_E_row1
=
0
;
// Energy from micromega row 1
Micro_E_col4
=
0
;
// energy from micromega col 1
Plast_E
=
0
;
// Energy Plastic
XPlastic_aw
=
0
;
// X on plastic from avalanche wire
Theta_aw
=
0
;
// ion direction in the FPD
XPlastic
=
0
;
// X on plastic from plastic PMTs
}
////////////////////////////////////////////////////////////////////////////////
void
Analysis
::
TreatEvent
(){
// Reinitiate calculated variable
ReInitValue
();
Original_ELab
=
Initial
->
GetKineticEnergy
(
0
);
Original_ThetaLab
=
Initial
->
GetParticleDirection
(
0
).
Angle
(
Initial
->
GetBeamDirection
())
/
deg
;
//Original_ELab = Initial->GetKineticEnergy(0);
//Original_ThetaLab = Initial->GetParticleDirection(0).Angle(Initial->GetBeamDirection())/deg;
////////////////////////////////////////// LOOP on TiaraHyball + SSSD Hit //////////////////////////////////////////
for
(
unsigned
int
countTiaraHyball
=
0
;
countTiaraHyball
<
TH
->
Strip_E
.
size
()
;
countTiaraHyball
++
){
/************************************************/
// TiaraHyball
/************************************************/
// Part 1 : Impact Angle
ThetaTHSurface
=
0
;
ThetaNormalTarget
=
0
;
...
...
@@ -119,14 +128,13 @@ void Analysis::TreatEvent(){
}
/************************************************/
// Part 2 : Impact Energy
Energy
=
ELab
=
0
;
Si_E_TH
=
TH
->
Strip_E
[
countTiaraHyball
];
Energy
=
Si_E_TH
;
// Evaluate energy using the thickness
// ELab = LightAl.EvaluateInitialEnergy( Energy ,0.4*micrometer , ThetaTHSurface);
// ELab = LightAl.EvaluateInitialEnergy( Energy ,0.4*micrometer , ThetaTHSurface);
ELab
=
Energy
;
// Target Correction
ELab
=
LightTarget
.
EvaluateInitialEnergy
(
ELab
,
TargetThickness
/
2.
,
ThetaNormalTarget
);
...
...
@@ -164,6 +172,7 @@ void Analysis::TreatEvent(){
/////////////////////////// LOOP on TiaraBarrel /////////////////////////////
for
(
unsigned
int
countTiaraBarrel
=
0
;
countTiaraBarrel
<
TB
->
Strip_E
.
size
()
;
countTiaraBarrel
++
){
/************************************************/
// Part 1 : Impact Angle
ThetaTBSurface
=
0
;
...
...
@@ -228,7 +237,38 @@ void Analysis::TreatEvent(){
/************************************************/
}
// end loop TiaraBarrel
/////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////// LOOP on FPD //////////////////////////////////////////
//for(unsigned int countFPD = 0 ; countFPD < TF->Delta.size() ; countFPD++) // multiplicity treated for now is zero
{
//TF->Dump();
if
(
0
){
// hit on target or another condition
// Part 1 : Collect the energis from the different sub-detectors
Delta_E
=
TF
->
DeltaEnergy
[
0
];
Micro_E_row1
=
TF
->
GetMicroGroupEnergy
(
1
,
1
,
1
,
7
);
// energy sum from the row 1
Micro_E_col4
=
TF
->
GetMicroGroupEnergy
(
1
,
4
,
4
,
4
);
// energy sum from the col 4
Micro_E
=
TF
->
GetMicroGroupEnergy
(
1
,
4
,
1
,
7
);
// energy sum from all the pads
Plast_E
=
TF
->
PlastCharge
[
0
];
// Part 2 : Reconstruct ion direction from Avalanche Wire
Theta_aw
=
TF
->
IonDirection
.
Theta
()
/
deg
;
// calculate Theta from AWire
XPlastic_aw
=
TF
->
PlastPositionX_AW
;
// calculate position on plastic, provided the Ion Direction, and Z plastic
XPlastic
=
TF
->
PlastPositionX
[
0
];
// calculate position on plastic from Right and Left PMT signals
}
else
{
Delta_E
=
-
1000
;
Micro_E_row1
=
-
1000
;
Micro_E_col4
=
-
1000
;
Micro_E
=
-
1000
;
Plast_E
=
-
1000
;
Theta_aw
=
-
1000
;
XPlastic_aw
=
-
1000
;
XPlastic
=
-
1000
;
}
}
// end loop on FPD
}
////////////////////////////////////////////////////////////////////////////////
...
...
@@ -241,8 +281,17 @@ void Analysis::ReInitValue(){
ELab
=
-
1000
;
ThetaLab
=
-
1000
;
ThetaCM
=
-
1000
;
Original_ELab
=
-
1000
;
Original_ThetaLab
=
-
1000
;
//Original_ELab = -1000;
//Original_ThetaLab = -1000;
//FPD
Delta_E
=
-
1000
;
Micro_E_row1
=
-
1000
;
Micro_E_col4
=
-
1000
;
Micro_E
=
-
1000
;
Plast_E
=
-
1000
;
Theta_aw
=
-
1000
;
XPlastic_aw
=
-
1000
;
XPlastic
=
-
1000
;
}
/////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
...
...
@@ -254,14 +303,22 @@ void Analysis::InitOutputBranch() {
RootOutput
::
getInstance
()
->
GetTree
()
->
Branch
(
"TiaraImpactMatrixX"
,
&
TiaraIMX
,
"TiaraImpactMatrixX/D"
);
RootOutput
::
getInstance
()
->
GetTree
()
->
Branch
(
"TiaraImpactMatrixY"
,
&
TiaraIMY
,
"TiaraImpactMatrixY/D"
);
RootOutput
::
getInstance
()
->
GetTree
()
->
Branch
(
"TiaraImpactMatrixZ"
,
&
TiaraIMZ
,
"TiaraImpactMatrixZ/D"
);
RootOutput
::
getInstance
()
->
GetTree
()
->
Branch
(
"Original_ELab"
,
&
Original_ELab
,
"Original_ELab/D"
);
RootOutput
::
getInstance
()
->
GetTree
()
->
Branch
(
"Original_ThetaLab"
,
&
Original_ThetaLab
,
"Original_ThetaLab/D"
);
//RootOutput::getInstance()->GetTree()->Branch("Original_ELab",&Original_ELab,"Original_ELab/D");
//RootOutput::getInstance()->GetTree()->Branch("Original_ThetaLab",&Original_ThetaLab,"Original_ThetaLab/D");
RootOutput
::
getInstance
()
->
GetTree
()
->
Branch
(
"Delta_E"
,
&
Delta_E
,
"Delta_E/D"
);
RootOutput
::
getInstance
()
->
GetTree
()
->
Branch
(
"Micro_E_row1"
,
&
Micro_E_row1
,
"Micro_E_row1/D"
);
RootOutput
::
getInstance
()
->
GetTree
()
->
Branch
(
"Micro_E_col4"
,
&
Micro_E_col4
,
"Micro_E_col4/D"
);
RootOutput
::
getInstance
()
->
GetTree
()
->
Branch
(
"Micro_E"
,
&
Micro_E
,
"Micro_E/D"
);
RootOutput
::
getInstance
()
->
GetTree
()
->
Branch
(
"Plast_E"
,
&
Plast_E
,
"Plast_E/D"
);
RootOutput
::
getInstance
()
->
GetTree
()
->
Branch
(
"Theta_aw"
,
&
Theta_aw
,
"Theta_aw/D"
);
RootOutput
::
getInstance
()
->
GetTree
()
->
Branch
(
"XPlastic_aw"
,
&
XPlastic_aw
,
"XPlastic_aw/D"
);
RootOutput
::
getInstance
()
->
GetTree
()
->
Branch
(
"XPlastic"
,
&
XPlastic
,
"XPlastic/D"
);
}
/////////////////////////////////////////////////////////////////////////////
void
Analysis
::
InitInputBranch
(){
RootInput
::
getInstance
()
->
GetChain
()
->
SetBranch
Addres
s
(
"InitialConditions"
,
&
Initial
);
RootInput
::
getInstance
()
->
GetChain
()
->
SetBranch
Statu
s
(
"InitialConditions"
,
true
);
RootInput
::
getInstance
()
->
GetChain
()
->
SetBranchStatus
(
"fIC_*"
,
true
);
//
RootInput:: getInstance()->GetChain()->SetBranch
Statu
s("InitialConditions",
true
);
//
RootInput:: getInstance()->GetChain()->SetBranch
Addres
s("InitialConditions",
&Initial
);
//
RootInput:: getInstance()->GetChain()->SetBranchStatus("fIC_*",true );
}
////////////////////////////////////////////////////////////////////////////////
...
...
This diff is collapsed.
Click to expand it.
Projects/T40/Analysis.h
+
17
−
6
View file @
b4ccf840
...
...
@@ -10,9 +10,9 @@
/*****************************************************************************
* Original Author: Adrien MATTA contact address: a.matta@surrey.ac.uk *
* *
* Creation Date : march 20
2
5 *
* Last update :
*
*---------------------------------------------------------------------------*
* Creation Date : march 20
1
5 *
* Last update :
December 2016 [m.moukaddam@surrey.ac.uk]
*
*---------------------------------------------------------------------------*
* Decription: *
* Class describing the property of an Analysis object *
* *
...
...
@@ -21,9 +21,10 @@
* *
* *
*****************************************************************************/
#include
"NPVAnalysis.h"
#include
"NPVAnalysis.h"
#include
"TTiaraHyballPhysics.h"
#include
"TTiaraBarrelPhysics.h"
#include
"TFPDTamuPhysics.h"
#include
"TInitialConditions.h"
#include
"NPEnergyLoss.h"
#include
"NPReaction.h"
...
...
@@ -71,7 +72,8 @@ class Analysis: public NPL::VAnalysis{
double
FinalBeamEnergy
;
TTiaraHyballPhysics
*
TH
;
TTiaraBarrelPhysics
*
TB
;
TTiaraBarrelPhysics
*
TB
;
TFPDTamuPhysics
*
TF
;
TRandom
*
Rand
;
double
ThetaNormalTarget
;
...
...
@@ -90,7 +92,16 @@ class Analysis: public NPL::VAnalysis{
double
XTarget
;
double
YTarget
;
TVector3
BeamDirection
;
//FPD
double
Delta_E
;
double
Micro_E_row1
;
double
Micro_E_col4
;
double
Micro_E
;
double
Plast_E
;
double
Theta_aw
;
double
XPlastic_aw
;
double
XPlastic
;
};
#endif
This diff is collapsed.
Click to expand it.
Projects/T40/T40.detector
+
32
−
3
View file @
b4ccf840
...
...
@@ -41,6 +41,35 @@ Tiara
Z= -147
R= 0
Phi= 300
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FPDTamu
%%%%%%%%
% All DELTA detectors
DELTA
UPSTREAM-LEFT= +150 +00 +20
UPSTREAM-RIGHT= -150 +00 +20
%%%%%%%%%%%%%%%%%%%%%
% All MICRO detectors
MICRO
UPSTREAM-LEFT= +154 +00 +340
UPSTREAM-RIGHT= -154 +00 +340
%%%%%%%%%%%%%%%%%%%%%
% All AWIRE detectors
AWIRE
LEFT= +200 +00 +20
RIGHT= -200 +00 +20
AWIRE
LEFT= +200 +00 +171
RIGHT= -200 +00 +171
AWIRE
LEFT= +200 +00 +334
RIGHT= -200 +00 +334
AWIRE
LEFT= +200 +00 +497
RIGHT= -200 +00 +497
%%%%%%%%%%%%%%%%%%%%%
% All Plastic detectors
PLAST
UPSTREAM-LEFT= +198 +00 +547
UPSTREAM-RIGHT= -198 +00 +547
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
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