From 35d7bb7f661ce0559c98d04cd3df762e2bb6b756 Mon Sep 17 00:00:00 2001
From: adrien-matta <a.matta@surrey.ac.uk>
Date: Tue, 21 Oct 2014 14:59:55 +0100
Subject: [PATCH] * Adding Example1 intput file * adding Dictionnary for
 VDetector class to avoid error message in root

---
 .../DetectorConfiguration/Example1.detector   | 155 ++++++++++++++++++
 Inputs/EventGenerator/Example1.reaction       |  38 +++++
 NPLib/VDetector/Makefile                      |   7 +-
 NPLib/VDetector/VDetector.cxx                 |   2 +
 NPLib/VDetector/VDetector.h                   |   2 +-
 NPLib/VDetector/linkdef.h                     |   3 +
 6 files changed, 204 insertions(+), 3 deletions(-)
 create mode 100755 Inputs/DetectorConfiguration/Example1.detector
 create mode 100644 Inputs/EventGenerator/Example1.reaction
 create mode 100644 NPLib/VDetector/linkdef.h

diff --git a/Inputs/DetectorConfiguration/Example1.detector b/Inputs/DetectorConfiguration/Example1.detector
new file mode 100755
index 000000000..bd08d12a9
--- /dev/null
+++ b/Inputs/DetectorConfiguration/Example1.detector
@@ -0,0 +1,155 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+GeneralTarget
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+Target
+	THICKNESS= 18
+	RADIUS=	30
+	MATERIAL= CD2
+	ANGLE= 0
+	X= 0
+	Y= 0
+	Z= 0
+	
+%%%%%%%%%%%%%%%%%%%%%			
+MUST2Array
+%%%%%%% Telescope 1 %%%%%%%			
+M2Telescope 			
+X1_Y1=	13.00	102.79	145.98
+X1_Y128=	24.88	10.58	175.20
+X128_Y1=	103.08	102.90	110.06
+X128_Y128=	115.23	10.76	139.14
+SI=	1.00		
+SILI=	0.00		
+CSI=	1.00		
+VIS=	all		
+			
+%%%%%%% Telescope 2 %%%%%%%			
+M2Telescope 			
+X1_Y1=	-114.05	10.98	138.48
+X1_Y128=	-23.81	10.92	174.84
+X128_Y1=	-102.23	102.22	109.39
+X128_Y128=	-11.95	102.90	145.48
+SI=	1.00		
+SILI=	0.00		
+CSI=	1.00		
+VIS=	all		
+			
+%%%%%%% Telescope 3 %%%%%%%			
+M2Telescope 			
+X1_Y1=	-11.91	-103.68	146.50
+X1_Y128=	-24.30	-10.94	175.00
+X128_Y1=	-102.03	-103.39	110.36
+X128_Y128=	-114.58	-10.71	138.76
+SI=	1.00		
+SILI=	0.00		
+CSI=	1.00		
+VIS=	all		
+			
+%%%%%%% Telescope 4 %%%%%%%			
+M2Telescope 			
+X1_Y1=	115.12	-11.35	138.94
+X1_Y128=	24.33	-11.60	174.81
+X128_Y1=	103.64	-103.42	110.51
+X128_Y128=	12.89	-103.90	146.29
+SI=	1.00		
+SILI=	0.00		
+CSI=	1.00		
+VIS=	all		
+%%%%%%% Telescope 5 %%%%%%%			
+M2Telescope
+X1_Y1=	27.07	50.23	-154.49
+X1_Y128=	116.58	50.23	-108.88
+X128_Y1=	27.07	-50.23	-154.49
+X128_Y128=	116.58	-50.23	-108.88
+SI=	1		
+SILI=	1		
+CSI=	0		
+VIS=	all		
+%%%%%%% Telescope 6 %%%%%%%	
+M2Telescope
+X1_Y1= -50.23	50.23	365 
+X1_Y128=	-50.23	-50.23	365
+X128_Y128=	50.23	-50.23	365
+X128_Y1=	50.23	50.23	365
+SI=	1		
+SILI=	0		
+CSI=	1		
+VIS=	all					
+	
+%%%%%%% Telescope 7 %%%%%%%			
+M2Telescope
+X1_Y1=	157.409	48.006	2.036
+X1_Y128=	126.458	48.227	94.002
+X128_Y1=	157.682	-48.007	1.617
+X128_Y128=	126.757	-49.052	93.510
+SI=	1		
+SILI=	0		
+CSI=	1		
+VIS=	all	
+
+%%%%%%% Telescope 8 %%%%%%%
+M2Telescope
+X1_Y1=	-147.190	50.230	-57.940
+X1_Y128=	-82.620	50.230	-134.900
+X128_Y1=	-147.190	-50.230	-57.940
+X128_Y128=	-82.620	-50.230	-134.900
+SI=     1
+SILI=   1
+CSI=    0
+VIS=    all
+
+%%%%%%%%%%%%%%%%%%%%%			
+SSSDArray
+%%%%%%%%%% Det 1 %%%%%%%%			
+SSSD
+A=	17.61	9.85	104.11
+B=	64.48	9.85	85.31
+C=	58.66	56.29	70.79
+D=	11.79	56.29	89.69
+%			
+%%%%%%%%%% Det 2 %%%%%%%%			
+SSSD
+A=	-11.79	56.29	89.59
+B=	-58.66	56.29	70.79
+C=	-64.48	9.85	85.31
+D=	-17.61	9.85	104.11
+%			
+%%%%%%%%%% Det 3 %%%%%%%%			
+SSSD
+A=	-17.61	-9.85	104.11
+B=	-64.48	-9.85	85.31
+C=	-58.66	-56.29	70.79
+D=	-11.79	-56.29	89.59
+%			
+%%%%%%%%%% Det 4 %%%%%%%%			
+SSSD
+A=	11.79	-56.29	89.59
+B=	58.66	-56.29	70.79
+C=	64.48	-9.85	85.31
+D=	17.61	-9.85	104.11
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ScintillatorPlastic
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+Plastic
+	X= 0
+	Y= -15
+	Z= 318
+	Shape= Square
+	Height= 70
+	Width= 40
+	Thickness= 20
+	Scintillator= BC400
+	LeadThickness= 0
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+Plastic
+	X= 0
+	Y= -15
+	Z= 343
+	Thickness= 30
+	Shape= Square
+	Height= 70
+	Width= 40
+	Scintillator= BC400
+	LeadThickness= 0
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
diff --git a/Inputs/EventGenerator/Example1.reaction b/Inputs/EventGenerator/Example1.reaction
new file mode 100644
index 000000000..7e635ca2e
--- /dev/null
+++ b/Inputs/EventGenerator/Example1.reaction
@@ -0,0 +1,38 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%% Reaction file for 11Li(d,3He)10He reaction %%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+Beam
+  Particle= 11Li
+  Energy= 553
+	SigmaEnergy= 20
+	SigmaThetaX= 0.6138
+	SigmaPhiY= 0.3812
+	SigmaX= 6.216
+	SigmaY= 6.109
+  MeanThetaX= 0
+  MeanPhiY= 0
+  MeanX= 1.773
+  MeanY= -0.1375
+  %EnergyProfilePath=
+  %XThetaXProfilePath=
+  %YPhiYProfilePath=
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+TwoBodyReaction
+	Beam= 11Li
+	Target= 2H
+	Light= 3He
+	Heavy= 10He
+	ExcitationEnergyLight= 0.0
+	ExcitationEnergyHeavy= 1.4
+  CrossSectionPath= 11Li(d,3He)10He.txt	CS10He
+	ShootLight= 1
+	ShootHeavy= 1
+  
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ParticleDecay 10He
+  Daughter= 8He n n
+  ExcitationEnergy= 0 0 0
+  shoot= 1 1 1
+    
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/NPLib/VDetector/Makefile b/NPLib/VDetector/Makefile
index 0bd21743d..7b57b15bd 100644
--- a/NPLib/VDetector/Makefile
+++ b/NPLib/VDetector/Makefile
@@ -8,9 +8,12 @@ all:            $(SHARELIB)
 ############### Detector ##############
 
 ## VDetector ##
-libVDetector.so: VDetector.o DetectorManager.o VSpectra.o
+libVDetector.so: VDetector.o DetectorManager.o VSpectra.o VDetectorDict.o
 		$(LD) $(SOFLAGS) $^ $(OutPutOpt) $@	
-			
+	
+VDetectorDict.cxx:	VDetector.h
+			rootcint -f $@ -c $^ linkdef.h
+		
 # dependances
 VDetector.o: VDetector.cxx	VDetector.h
 VSpectra.o: VSpectra.cxx VSpectra.h
diff --git a/NPLib/VDetector/VDetector.cxx b/NPLib/VDetector/VDetector.cxx
index 32b269bd1..c7bc0a0c5 100644
--- a/NPLib/VDetector/VDetector.cxx
+++ b/NPLib/VDetector/VDetector.cxx
@@ -26,6 +26,8 @@
 
 using namespace NPA ;
 
+ClassImp(VDetector);
+
 // Constructor
 VDetector::VDetector()
 {
diff --git a/NPLib/VDetector/VDetector.h b/NPLib/VDetector/VDetector.h
index befda3c90..5eccc3b7c 100644
--- a/NPLib/VDetector/VDetector.h
+++ b/NPLib/VDetector/VDetector.h
@@ -108,7 +108,7 @@ namespace NPA {
       nothing   noCalibration   ;
 
 */
-
+  ClassDef(VDetector,1)  // Must2Data structure
   };
 
 }
diff --git a/NPLib/VDetector/linkdef.h b/NPLib/VDetector/linkdef.h
new file mode 100644
index 000000000..c6a92ae1d
--- /dev/null
+++ b/NPLib/VDetector/linkdef.h
@@ -0,0 +1,3 @@
+#ifdef __CINT__
+#pragma link C++ defined_in "./VDetector.h";
+#endif
-- 
GitLab