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
3599e269
Commit
3599e269
authored
14 years ago
by
deserevi
Browse files
Options
Downloads
Patches
Plain Diff
* Cosmetic in NPAnalysis for W1 detector
+ remove obsolete code
parent
5235bedb
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Inputs/DetectorConfiguration/W1.detector
+1
-1
1 addition, 1 deletion
Inputs/DetectorConfiguration/W1.detector
NPAnalysis/W1/src/Analysis.cc
+2
-83
2 additions, 83 deletions
NPAnalysis/W1/src/Analysis.cc
with
3 additions
and
84 deletions
Inputs/DetectorConfiguration/W1.detector
+
1
−
1
View file @
3599e269
...
...
@@ -10,7 +10,7 @@ Target
Z= 0
%%%%%%% Detector 1 %%%%%%%
W1
THETA= 0
THETA=
15
0
PHI= 0
R= 150
BETA= 0 0 0
...
...
This diff is collapsed.
Click to expand it.
NPAnalysis/W1/src/Analysis.cc
+
2
−
83
View file @
3599e269
...
...
@@ -24,7 +24,6 @@ int main(int argc,char** argv)
myReaction
->
ReadConfigurationFile
(
reactionfileName
);
// Initialize the detector
// cout << endl << "/////////// Detector geometry ///////////" << endl;
NPA
::
DetectorManager
*
myDetector
=
new
DetectorManager
;
myDetector
->
ReadConfigurationFile
(
detectorfileName
);
...
...
@@ -160,92 +159,12 @@ int main(int argc,char** argv)
Ex
=
-
200
;
ExNoStrips
=
-
200
;
}
// Fill output tree
RootOutput
::
getInstance
()
->
GetTree
()
->
Fill
();
}
// end loop on multiplicity event
}
// end loop on number of events to treat
/*
// Get total energy
double E = W1->GetEnergy(0);
// if there is a hit in the detector array, treat it.
double Theta, ThetaStrip, angle, ThetaCM;
double DetecX, DetecY, DetecZ;
double r;
TVector3 A;
if (E > -1000) {
// Get c.m. angle
ThetaCM = initCond->GetICEmittedAngleThetaCM(0) * deg;
// Get exact scattering angle from TInteractionCoordinates object
// interCoord->Dump();
// cout << i << " mult: " << interCoord->GetDetectedMultiplicity() << endl;
DetecX = interCoord->GetDetectedPositionX(0);
DetecY = interCoord->GetDetectedPositionY(0);
DetecZ = interCoord->GetDetectedPositionZ(0);
TVector3 Detec(DetecX, DetecY, DetecZ);
// Get interaction position in detector
// This takes into account the strips
A = W1->GetPositionOfInteraction(0);
// Hit direction taking into account beam position on target
TVector3 HitDirection = A - TVector3(XTarget, YTarget, 0);
// cout << "A: " << A.X() << " " << A.Y() << " " << A.Z() << endl;
// cout << "HitDirection: " << HitDirection.X() << " " << HitDirection.Y() << " " << HitDirection.Z() << endl;
// Calculate scattering angle w.r.t. optical beam axis (do not take into account beam position on target)
ThetaStrip = ThetaCalculation(A, TVector3(0,0,1));
Theta = ThetaCalculation(Detec, TVector3(0, 0, 1));
// Calculate scattering angle w.r.t. beam (ideal case)
// ThetaStrip = ThetaCalculation(HitDirection, BeamDirection);
// Theta = ThetaCalculation(Detec - TVector3(XTarget, YTarget, 0), BeamDirection);
// Calculate scattering angle w.r.t. beam (finite spatial resolution)
// double resol = 800; // in micrometer
// angle = gene->Rndm() * 2*3.14;
// r = fabs(gene->Gaus(0, resol)) * micrometer;
// ThetaStrip = ThetaCalculation(A - TVector3(XTarget + r*cos(angle), YTarget + r*sin(angle), 0), BeamDirection);
// Theta = ThetaCalculation(Detec - TVector3(XTarget + r*cos(angle), YTarget + r*sin(angle), 0), BeamDirection);
//
// Correct for energy loss in the target
E = LightTarget.EvaluateInitialEnergy(E, myDetector->GetTargetThickness()/2 * micrometer, ThetaStrip);
// Calculate excitation energy
// if (Theta/deg > 150 && Theta/deg < 180) {
// if (Theta/deg < 60 && ThetaCM/deg < 90) {
// if (Theta/deg > 35 && Theta/deg < 45 && E/MeV < 17) {
// if (Theta/deg < 45) {
// if (E/MeV < 38) { // for (p,t) reaction
if (Theta/deg > 30) { // for (d,p) reaction
ExNoStrips = myReaction->ReconstructRelativistic(E, Theta / rad);
Ex = myReaction->ReconstructRelativistic(E, ThetaStrip);
}
else {
Ex = -200;
ExNoStrips = -200;
}
}
else {
Ex = -100;
ExNoStrips = -100;
}
EE = E ; TT = ThetaStrip/deg;
if (E>-1000) {
X = A . X();
Y = A . Y();
}
else {
X = -1000 ; Y = -1000;
}
// Fill output tree
RootOutput
::
getInstance
()
->
GetTree
()
->
Fill
();
}
*/
}
// end loop on number of events to treat
// delete singleton classes
RootOutput
::
getInstance
()
->
Destroy
();
RootInput
::
getInstance
()
->
Destroy
();
...
...
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