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
681a4d05
Commit
681a4d05
authored
11 years ago
by
adrien-matta
Browse files
Options
Downloads
Patches
Plain Diff
* Add Pos to Tiara Barrel
* Add E-Theta Spectra to Tiara Barrel
parent
3e95b960
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
NPLib/Tiara/TTiaraBarrelPhysics.cxx
+21
-62
21 additions, 62 deletions
NPLib/Tiara/TTiaraBarrelPhysics.cxx
NPLib/Tiara/TTiaraBarrelSpectra.cxx
+17
-1
17 additions, 1 deletion
NPLib/Tiara/TTiaraBarrelSpectra.cxx
with
38 additions
and
63 deletions
NPLib/Tiara/TTiaraBarrelPhysics.cxx
+
21
−
62
View file @
681a4d05
...
...
@@ -49,11 +49,11 @@ ClassImp(TTiaraBarrelPhysics)
m_EventData
=
new
TTiaraBarrelData
;
m_PreTreatedData
=
new
TTiaraBarrelData
;
m_EventPhysics
=
this
;
m_NumberOfDetector
=
0
;
m_NumberOfDetector
=
0
;
m_Take_E_Strip
=
true
;
m_Take_T_Back
=
true
;
m_Strip_E_
RAW_
Threshold
=
0
;
m_Strip_E_Threshold
=
0
.4
;
m_Back_E_Threshold
=
0
;
m_OuterStrip_E_RAW_Threshold
=
0
;
m_OuterBack_E_Threshold
=
0
;
...
...
@@ -69,65 +69,12 @@ void TTiaraBarrelPhysics::BuildPhysicalEvent(){
PreTreat
();
/*
if( CheckEvent() == 1 ){
vector< TVector2 > couple = Match_Ring_Sector() ;
EventMultiplicity = couple.size();
unsigned int size = couple.size();
for(unsigned int i = 0 ; i < size ; ++i){
int N = m_PreTreatedData->GetRingEDetectorNbr(couple[i].X()) ;
int Ring = m_PreTreatedData->GetRingEStripNbr(couple[i].X()) ;
int Sector = m_PreTreatedData->GetSectorEStripNbr(couple[i].Y()) ;
double Ring_E = m_PreTreatedData->GetRingEEnergy( couple[i].X() ) ;
double Sector_E = m_PreTreatedData->GetSectorEEnergy( couple[i].Y() ) ;
// Search for associate Time:
double Ring_T = -1000 ;
unsigned int StripRingTMult = m_PreTreatedData->GetRingTMult();
for(unsigned int t = 0 ; t < StripRingTMult ; ++t ){
if( m_PreTreatedData->GetRingEStripNbr( couple[i].X() ) == m_PreTreatedData->GetRingTStripNbr(t)
&&m_PreTreatedData->GetRingEDetectorNbr( couple[i].X() ) == m_PreTreatedData->GetRingTDetectorNbr(t))
Ring_T = m_PreTreatedData->GetRingTTime(t);
}
// Search for associate Time:
double Sector_T = -1000 ;
unsigned int StripSectorTMult = m_PreTreatedData->GetSectorTMult();
for(unsigned int t = 0 ; t < StripSectorTMult ; ++t ){
if( m_PreTreatedData->GetSectorEStripNbr( couple[i].X() ) == m_PreTreatedData->GetSectorTStripNbr(t)
&&m_PreTreatedData->GetSectorEDetectorNbr( couple[i].X() ) == m_PreTreatedData->GetSectorTDetectorNbr(t))
Sector_T = m_PreTreatedData->GetSectorTTime(t);
}
DetectorNumber.push_back(N);
StripRing_E.push_back(Ring_E);
StripRing_T.push_back(Ring_T) ;
StripSector_E.push_back(Sector_E) ;
StripSector_T.push_back(Sector_T) ;
if(m_Take_E_Ring)
Strip_E.push_back(Ring_E) ;
else
Strip_E.push_back(Sector_E) ;
if(m_Take_T_Sector)
Strip_T.push_back(Sector_T) ;
else
Strip_T.push_back(Ring_T) ;
Strip_Ring.push_back(Ring) ;
Strip_Sector.push_back(Sector) ;
}
}*/
}
///////////////////////////////////////////////////////////////////////////
void
TTiaraBarrelPhysics
::
PreTreat
(){
ClearPreTreatedData
();
// Gain Calibration
// The cal function first call the MatchStick one
unsigned
int
sizeU
=
m_EventData
->
GetFrontUpstreamEMult
();
...
...
@@ -144,13 +91,13 @@ void TTiaraBarrelPhysics::PreTreat(){
m_PreTreatedData
->
SetFrontDownstreamE
(
m_EventData
->
GetFrontDownstreamEDetectorNbr
(
i
),
m_EventData
->
GetFrontDownstreamEStripNbr
(
i
),
ED
);
if
(
EU
>
0
&&
ED
>
0
){
if
(
EU
>
0
&&
ED
>
0
&&
EU
+
ED
>
m_Strip_E_Threshold
){
if
(
m_EventData
->
GetFrontUpstreamEDetectorNbr
(
i
)
==
m_EventData
->
GetFrontDownstreamEDetectorNbr
(
j
)
&&
m_EventData
->
GetFrontUpstreamEStripNbr
(
i
)
==
m_EventData
->
GetFrontDownstreamEStripNbr
(
j
)){
//
double
POS
=
CalibrationManager
::
getInstance
()
->
ApplyResistivePositionCalibration
(
"TIARABARREL/B"
+
itoa
(
m_EventData
->
GetFrontUpstreamEDetectorNbr
(
i
))
+
"_STRIP"
+
itoa
(
m_EventData
->
GetFrontUpstreamEStripNbr
(
i
))
+
"_POS"
,(
ED
-
EU
)
/
(
EU
+
ED
));
Strip_Pos
.
push_back
(
POS
);
...
...
@@ -163,6 +110,10 @@ void TTiaraBarrelPhysics::PreTreat(){
+
itoa
(
m_EventData
->
GetFrontDownstreamEStripNbr
(
i
)),
POS
);
DetectorNumber
.
push_back
(
m_EventData
->
GetFrontDownstreamEDetectorNbr
(
i
));
Strip_N
.
push_back
(
m_EventData
->
GetFrontDownstreamEStripNbr
(
i
));
Strip_Pos
.
push_back
(
POS
);
Strip_E
.
push_back
(
E
);
}
}
...
...
@@ -601,11 +552,19 @@ TVector3 TTiaraBarrelPhysics::GetDetectorNormal( const int i) const{
}
///////////////////////////////////////////////////////////////////////////////
TVector3
TTiaraBarrelPhysics
::
GetPositionOfInteraction
(
const
int
i
)
const
{
/* TVector3 Position = TVector3 ( GetStripPositionX(DetectorNumber[i],Strip_Ring[i],Strip_Sector[i] ) ,
GetStripPositionY( DetectorNumber[i],Strip_Ring[i],Strip_Sector[i] ) ,
GetStripPositionZ( DetectorNumber[i],Strip_Ring[i],Strip_Sector[i] ) ) ;
*/
return
(
TVector3
(
0
,
0
,
0
))
;
// All in mm
double
INNERBARREL_PCB_Width
=
27.76
;
double
INNERBARREL_ActiveWafer_Length
=
94.80
;
double
INNERBARREL_ActiveWafer_Width
=
24.0
;
double
StripPitch
=
INNERBARREL_ActiveWafer_Width
/
4.
;
double
X
=
Strip_N
[
i
]
*
StripPitch
-
0.5
*
INNERBARREL_ActiveWafer_Width
;
double
Y
=
INNERBARREL_PCB_Width
*
(
0.5
+
sin
(
45
*
deg
))
;
double
Z
=
(
Strip_Pos
[
i
]
-
0.5
)
*
INNERBARREL_ActiveWafer_Length
;
TVector3
POS
(
X
,
Y
,
Z
);
POS
.
RotateZ
((
DetectorNumber
[
i
]
-
1
)
*
45
*
deg
);
return
(
POS
)
;
}
///////////////////////////////////////////////////////////////////////////////
...
...
This diff is collapsed.
Click to expand it.
NPLib/Tiara/TTiaraBarrelSpectra.cxx
+
17
−
1
View file @
681a4d05
...
...
@@ -140,6 +140,16 @@ string name ;
AddHisto2D
(
name
,
name
,
1000
,
-
0.5
,
1.5
,
1000
,
0
,
30
,
BaseFamily
);
}
}
//// E Theta ////
// Inner Barrel
for
(
unsigned
int
i
=
0
;
i
<
fNumberOfDetector
;
i
++
){
for
(
unsigned
int
j
=
0
;
j
<
fInnerBarrelStrip
;
j
++
){
name
=
Form
(
"IB%d_ETHETA%d_CAL"
,
i
+
1
,
j
+
1
);
AddHisto2D
(
name
,
name
,
360
,
0
,
180
,
1000
,
0
,
30
,
BaseFamily
);
}
}
}
////////////////////////////////////////////////////////////////////////////////
...
...
@@ -258,8 +268,14 @@ string name ;
unsigned
int
size
=
Physics
->
Strip_E
.
size
();
for
(
unsigned
int
i
=
0
;
i
<
Physics
->
Strip_E
.
size
()
;
i
++
){
name
=
Form
(
"IB%d_EPOS%d_CAL"
,
Physics
->
DetectorNumber
[
i
],
Physics
->
Strip_N
[
i
]);
GetHisto
(
family
,
name
)
GetHisto
(
family
,
name
)
->
Fill
(
Physics
->
Strip_Pos
[
i
],
Physics
->
Strip_E
[
i
]);
name
=
Form
(
"IB%d_ETHETA%d_CAL"
,
Physics
->
DetectorNumber
[
i
],
Physics
->
Strip_N
[
i
]);
double
Theta
=
Physics
->
GetPositionOfInteraction
(
i
).
Angle
(
TVector3
(
0
,
0
,
1
));
GetHisto
(
family
,
name
)
->
Fill
(
Theta
*
rad
/
deg
,
Physics
->
Strip_E
[
i
]);
}
}
...
...
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