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
f3209b73
Commit
f3209b73
authored
15 years ago
by
deserevi
Browse files
Options
Downloads
Patches
Plain Diff
* Update in Gaspard analysis
parent
56065d34
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
NPAnalysis/Gaspard/Makefile
+4
-0
4 additions, 0 deletions
NPAnalysis/Gaspard/Makefile
NPLib/GASPARD/TGaspardTrackerPhysics.cxx
+25
-120
25 additions, 120 deletions
NPLib/GASPARD/TGaspardTrackerPhysics.cxx
with
29 additions
and
120 deletions
NPAnalysis/Gaspard/Makefile
+
4
−
0
View file @
f3209b73
...
...
@@ -4,3 +4,7 @@ Analyse:
clean
:
make clean
-C
./src
distclean
:
make clean
-C
./src
rm
Analysis
This diff is collapsed.
Click to expand it.
NPLib/GASPARD/TGaspardTrackerPhysics.cxx
+
25
−
120
View file @
f3209b73
...
...
@@ -50,7 +50,16 @@ void TGaspardTrackerPhysics::BuildSimplePhysicalEvent(TGaspardTrackerData* Data)
void
TGaspardTrackerPhysics
::
BuildPhysicalEvent
(
TGaspardTrackerData
*
Data
)
{
{
// indexes for each kind of detector
// this should follow the indexes given in NPSimulation
// 0: Square
// 100: Trapezoid
// 200: Annular
// 1000: DummyShape
const
int
dim
=
4
;
int
index
[
dim
]
=
{
0
,
100
,
200
,
1000
};
// Check
bool
Check_FirstStage
=
false
;
bool
Check_SecondStage
=
false
;
bool
Check_ThirdStage
=
false
;
...
...
@@ -79,7 +88,20 @@ void TGaspardTrackerPhysics::BuildPhysicalEvent(TGaspardTrackerData* Data)
int
detecXT
=
Data
->
GetGPDTrkFirstStageFrontTDetectorNbr
(
0
)
/
det_ref
;
int
detecYE
=
Data
->
GetGPDTrkFirstStageBackEDetectorNbr
(
0
)
/
det_ref
;
int
detecYT
=
Data
->
GetGPDTrkFirstStageBackTDetectorNbr
(
0
)
/
det_ref
;
det_ref
-=
1000
;
// only for GaspardDummyShape
// convert detector number in order to it begins at 0
// this is needed to access the strip position information
// WARNING: this method may not work for an heteregneous detector
// configuration, e.g. Trapezoid + Annular
int
good_index
=
-
100
;
int
diff_ref
=
10000
;
for
(
int
i
=
0
;
i
<
dim
;
i
++
)
{
int
diff
=
abs
(
det_ref
-
index
[
i
]);
if
(
diff
<
diff_ref
)
{
diff_ref
=
diff
;
good_index
=
i
;
}
}
det_ref
-=
index
[
good_index
];
// case of same detector
if
(
detecXE
*
detecXT
*
detecYE
*
detecYT
==
1
)
{
...
...
@@ -154,127 +176,10 @@ void TGaspardTrackerPhysics::BuildPhysicalEvent(TGaspardTrackerData* Data)
cout << "\tmultYE: " << multYE << endl;
cout << "\tmultYT: " << multYT << endl;*/
}
/*
// Multiplicity 2
if( Data->GetMMStripXEMult()==2 && Data->GetMMStripYEMult()==2 && Data->GetMMStripXTMult()==2 && Data->GetMMStripXTMult()==2 )
{
// Different telescope case
if ( Data->GetMMStripXEDetectorNbr(0) != Data->GetMMStripXEDetectorNbr(1)
&& Data->GetMMStripYEDetectorNbr(0) != Data->GetMMStripYEDetectorNbr(1) )
{
double EY, EX, TX, TY = 0;
// loop on both event
for (int jj = 0 ; jj < 2 ; jj++)
{
Check_FirstStage = false ;Check_SecondStage = false ;Check_ThirdStage = false ;
ModuleNumber.push_back( Data->GetMMStripXEDetectorNbr(jj) ) ;
EX = Data->GetMMStripXEEnergy(jj) ;
FirstStage_X.push_back( Data->GetMMStripXEStripNbr(jj)) ;
// Get Corresponding time
for(int i = 0 ; i < 2 ; i++)
{
if( Data->GetMMStripXTDetectorNbr(i) == Data->GetMMStripXEDetectorNbr(jj)
&& Data->GetMMStripXTStripNbr(i) == Data->GetMMStripXEStripNbr(jj) )
{ TX = Data->GetMMStripXTTime(jj) ; }
}
// Get Corresponding Y strip
for(int i = 0 ; i < 2 ; i++)
{
if( Data->GetMMStripYEDetectorNbr(i) == Data->GetMMStripXEDetectorNbr(jj) )
{
FirstStage_Y.push_back( Data->GetMMStripYEStripNbr(i)) ;
EY = Data->GetMMStripXEEnergy(i) ;
TY = Data->GetMMStripXTTime(i) ;
// if (EX>EY) FirstStage_E.push_back(EX) ;
// else FirstStage_E.push_back(EY) ;
FirstStage_E.push_back(EX);
if (TX>TY) FirstStage_T.push_back(TY) ;
else FirstStage_T.push_back(TX) ;
Check_FirstStage = true ;
}
}
if (Check_FirstStage)
{
// Si(Li)
for (int i = 0 ; i < Data->GetMMSiLiEMult() ; i++)
{
if ( Data->GetMMSiLiEDetectorNbr(i) == Data->GetMMStripXEDetectorNbr(jj)
&& Data->GetMMSiLiEEnergy(i) > SecondStage_E_Threshold )
{
SecondStage_E.push_back(Data->GetMMSiLiEEnergy(i)) ;
SecondStage_N.push_back(Data->GetMMSiLiEPadNbr(i)) ;
if ( Data->GetMMSiLiTDetectorNbr(i) == Data->GetMMStripXEDetectorNbr(jj)
&& Data->GetMMSiLiTPadNbr(i) == Data->GetMMSiLiEPadNbr(i) )
{
SecondStage_T.push_back(Data->GetMMSiLiTTime(i)) ;
Check_SecondStage = true ;
}
}
else
{
SecondStage_E.push_back(-1) ;
SecondStage_T.push_back(-1) ;
SecondStage_N.push_back(-1) ;
}
}
// CsI
for (int i = 0 ; i < Data->GetMMCsIEMult() ; i++)
{
if ( Data->GetMMCsIEDetectorNbr(i) == Data->GetMMStripXEDetectorNbr(jj)
&& Data->GetMMCsIEEnergy(i) > ThirdStage_E_Threshold )
{
ThirdStage_E.push_back(Data->GetMMCsIEEnergy(i)) ;
ThirdStage_N.push_back(Data->GetMMCsIECristalNbr(i)) ;
if ( Data->GetMMCsITDetectorNbr(i) == Data->GetMMStripXEDetectorNbr(jj)
&& Data->GetMMCsITCristalNbr(i) == Data->GetMMCsIECristalNbr(i) )
{
ThirdStage_T.push_back(Data->GetMMCsITTime(i)) ;
Check_ThirdStage = true ;
}
}
else
{
ThirdStage_E.push_back(-1) ;
ThirdStage_T.push_back(-1) ;
ThirdStage_N.push_back(-1) ;
}
}
TotalEnergy.push_back(FirstStage_E.at(jj)) ;
if (Check_SecondStage) TotalEnergy.at(jj) += SecondStage_E.at(jj) ;
if (Check_ThirdStage) TotalEnergy.at(jj) += ThirdStage_E.at(jj) ;
}
}
return;
}
// Same detector case :
if( Data->GetMMStripXEDetectorNbr(0) == Data->GetMMStripXEDetectorNbr(1)
&& Data->GetMMStripYEDetectorNbr(0) == Data->GetMMStripYEDetectorNbr(1))
{
return;
}
}
*/
}
void
TGaspardTrackerPhysics
::
Clear
()
{
EventMultiplicity
=
0
;
...
...
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