diff --git a/NPLib/Tigress/Makefile b/NPLib/Tigress/Makefile index d9e46c480afc8e014cbaba427b125e24b2698395..85ebf496d75e6143d284b381408024c8a0326a3a 100644 --- a/NPLib/Tigress/Makefile +++ b/NPLib/Tigress/Makefile @@ -8,7 +8,7 @@ all: $(SHARELIB) ############### Detector ############## ## Tigress ## -libTigress.so: TTigressData.o TTigressDataDict.o TTigressPhysics.o TTigressPhysicsDict.o TTigressClover.o TTigressCrystal.o +libTigress.so: TTigressData.o TTigressDataDict.o TTigressPhysics.o TTigressPhysicsDict.o $(LD) $(SOFLAGS) $^ $(OutPutOpt) $@ TTigressDataDict.cxx: TTigressData.h @@ -20,8 +20,6 @@ TTigressPhysicsDict.cxx: TTigressPhysics.h # dependances TTigressData.o: TTigressData.cxx TTigressData.h TTigressPhysics.o: TTigressPhysics.cxx TTigressPhysics.h -TTigressClover.o: TTigressClover.cxx TTigressClover.h -TTigressCrystal.o: TTigressCrystal.cxx TTigressCrystal.h ####################################### ############# Clean and More ########## diff --git a/NPLib/Tigress/TTigressClover.cxx b/NPLib/Tigress/TTigressClover.cxx deleted file mode 100644 index e9dab8e9cb5207c77d80eca6146af9a61b21f19b..0000000000000000000000000000000000000000 --- a/NPLib/Tigress/TTigressClover.cxx +++ /dev/null @@ -1,89 +0,0 @@ -/***************************************************************************** - * Copyright (C) 2009-2013 this file is part of the NPTool Project * - * * - * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * - * For the list of contributors see $NPTOOL/Licence/Contributors * - *****************************************************************************/ - -/***************************************************************************** - * Original Author: Adrien MATTA contact address: a.matta@surrey.ac.uk * - * Peter Bender contact address: bender@triumf.ca * - * Creation Date : November 2012 * - * Last update : * - *---------------------------------------------------------------------------* - * Decription: * - * This class hold Tigress treated data * - * * - *---------------------------------------------------------------------------* - * Comment: * - * * - *****************************************************************************/ - -#include "TTigressClover.h" - - -TTigressClover::TTigressClover(int CloverId, double R, double Theta, double Phi) { - Theta*=M_PI/180.; - Phi*=M_PI/180.; - - m_CloverId = CloverId; - m_Position = TVector3(0,0,1); - R = R + 7; //7mm for detector wall thickness - m_Position.SetMag(R); - m_Position.SetTheta(Theta); - m_Position.SetPhi(Phi); - - TVector3 CrystalPosition; - for(int i = 1 ; i<5 ; i++){ - switch(i){ - case 1: - CrystalPosition=TVector3(-27.5,27.5,0); - break; - case 2: - CrystalPosition=TVector3(27.5,27.5,0); - break; - case 3: - CrystalPosition=TVector3(27.5,-27.5,0); - break; - case 4: - CrystalPosition=TVector3(-27.5,-27.5,0); - break; - default: - CrystalPosition = TVector3(0,0,0); - }; - - CrystalPosition+=TVector3(0,0,m_Position.Mag()); - - if(m_Position.X()<0) CrystalPosition.RotateZ(M_PI); - if(m_Position.Y()<0) CrystalPosition.RotateZ(M_PI/2.); - - CrystalPosition.RotateY(Theta); - CrystalPosition.RotateZ(Phi); - AddCrystals(CrystalPosition,m_Position); - } - -} - -void TTigressClover::AddCrystals(TVector3 CrystalPosition,TVector3 CrystalNormal) { - m_Crystal.push_back(TTigressCrystal(m_Crystal.size()+1,CrystalPosition,CrystalNormal)); -} - -void TTigressClover::Clear() { - for(unsigned int i = 0 ; i < m_Crystal.size() ; i++) - m_Crystal[i].Clear(); -} - - - - - - - - - - - - - - - diff --git a/NPLib/Tigress/TTigressClover.h b/NPLib/Tigress/TTigressClover.h deleted file mode 100644 index 3cae10f378f62a3ed9cf407116e7c819540dab60..0000000000000000000000000000000000000000 --- a/NPLib/Tigress/TTigressClover.h +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef TTIGRESSCLOVER_H -#define TTIGRESSCLOVER_H -/***************************************************************************** - * Copyright (C) 2009-2014 this file is part of the NPTool Project * - * * - * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * - * For the list of contributors see $NPTOOL/Licence/Contributors * - *****************************************************************************/ - -/***************************************************************************** - * Original Author: Adrien MATTA contact address: a.matta@surrey.ac.uk * - * Peter Bender contact address: bender@triumf.ca * - * Creation Date : November 2012 * - * Last update : * - *---------------------------------------------------------------------------* - * Decription: * - * This class hold Tigress treated data * - * * - *---------------------------------------------------------------------------* - * Comment: * - * * - *****************************************************************************/ -#include <vector> -#include <string> -#include <cmath> -using namespace std; - -// NPL -#include "TTigressCrystal.h" - -// ROOT -#include "TVector3.h" - -class TTigressClover { - - public: - TTigressClover(int CloverId=0, double R=0, double Theta=0, double Phi=0); - ~TTigressClover() { }; - - void Clear(); - TTigressCrystal GetCrystal(int i){return m_Crystal[i-1];}; - - public: - void AddCrystals(TVector3 CrystalPosition, TVector3 CrystalNormal); - - void RotateToPosition(double theta, double phi); - - vector<TTigressCrystal> m_Crystal; - - private: - int m_CloverId; //clover number. - TVector3 m_Position; - -}; - -#endif diff --git a/NPLib/Tigress/TTigressCrystal.cxx b/NPLib/Tigress/TTigressCrystal.cxx deleted file mode 100644 index 58330c69a3c19c77e0a2efcd80c4c90ee31be59b..0000000000000000000000000000000000000000 --- a/NPLib/Tigress/TTigressCrystal.cxx +++ /dev/null @@ -1,64 +0,0 @@ -/***************************************************************************** - * Copyright (C) 2009-2012 this file is part of the NPTool Project * - * * - * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * - * For the list of contributors see $NPTOOL/Licence/Contributors * - *****************************************************************************/ - -/***************************************************************************** - * Original Author: Adrien MATTA contact address: a.matta@surrey.ac.uk * - * Peter Bender contact address: bender@triumf.ca * - * Creation Date : November 2012 * - * Last update : * - *---------------------------------------------------------------------------* - * Decription: * - * This class hold Tigress treated data * - * * - *---------------------------------------------------------------------------* - * Comment: * - * * - *****************************************************************************/ -#include "TTigressCrystal.h" - - -TTigressCrystal::TTigressCrystal(int CrystalNbr, TVector3 CrystalPosition,TVector3 CrystalNormal) { - SetCrystalPosition(CrystalPosition); - SetCrystalNormal(CrystalNormal); - SetCrystalId(CrystalNbr); - Clear(); -} - -void TTigressCrystal::Clear() { - m_Core_Energy=-1000; - m_Segment_Energy.clear(); - m_Segment_Time.clear(); - m_Segment_Number.clear(); -} - -void TTigressCrystal::SetCrystalId(int x) { - m_CrystalId = x; - switch(x) { - case 1: - m_CrystalName = "Blue"; - break; - case 2: - m_CrystalName = "Green"; - break; - case 3: - m_CrystalName = "Red"; - break; - case 4: - m_CrystalName = "White"; - break; - default: - m_CrystalName = "Bacon"; - break; - }; - } - - - - - - - diff --git a/NPLib/Tigress/TTigressCrystal.h b/NPLib/Tigress/TTigressCrystal.h deleted file mode 100644 index 233fbe54268dc0ec47a5b2e7b20338350b3a0dc9..0000000000000000000000000000000000000000 --- a/NPLib/Tigress/TTigressCrystal.h +++ /dev/null @@ -1,72 +0,0 @@ -#ifndef TTIGRESSCRYSTAL_H -#define TTIGRESSCRYSTAL_H -/***************************************************************************** - * Copyright (C) 2009-2014 this file is part of the NPTool Project * - * * - * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * - * For the list of contributors see $NPTOOL/Licence/Contributors * - *****************************************************************************/ - -/***************************************************************************** - * Original Author: contact address: * - * * - * Creation Date : * - * Last update : * - *---------------------------------------------------------------------------* - * Decription: * - * * - * * - *---------------------------------------------------------------------------* - * Comment: * - * * - *****************************************************************************/ -#include <vector> -#include <string> -#include <math.h> -using namespace std; -// ROOT -#include"TVector3.h" -#include "TRotation.h" - -// NPL -#include"TTigressData.h" - -class TTigressCrystal { - - public: - TTigressCrystal(){Clear();}; - TTigressCrystal(int CrystalNbr, TVector3 CrystalPosition,TVector3 CrystalNormal); - ~TTigressCrystal() { }; - - void Clear(); - TVector3 GetPosition(); - void SetPosition(TVector3 position); - TVector3 GetCrystalNormal() {return m_Normal;}; - TVector3 GetCrystalPosition() {return m_Position;}; - - private: - - int m_CloverId; - int m_CrystalId; - std::string m_CrystalName; - TVector3 m_Position; - TVector3 m_Normal; - - void SetCloverId(int); - void SetCrystalId(int); - void SetCrystalPosition(TVector3 Position) {m_Position=Position;}; - void SetCrystalNormal(TVector3 Normal) {m_Normal=Normal.Unit();}; - - public: - double m_Core_Energy; - vector<double> m_Segment_Energy; - vector<double> m_Segment_Time; - vector<int> m_Segment_Number; -}; - - - - - -#endif - diff --git a/NPLib/Tigress/TTigressPhysics.cxx b/NPLib/Tigress/TTigressPhysics.cxx index 7ca8e3485808516c023f16509f3de2d4e7aa75dc..7bed45f0c1c5eb02caf56ee8251efd1a53238690 100644 --- a/NPLib/Tigress/TTigressPhysics.cxx +++ b/NPLib/Tigress/TTigressPhysics.cxx @@ -74,8 +74,6 @@ void TTigressPhysics::BuildPhysicalEvent(){ } ///////////////////////////////////////////////// TVector3 TTigressPhysics::GetPositionOfInteraction(int i){ - - return m_Clover[Clover_Number[i]]->GetCrystal(Crystal_Number[i]).GetCrystalPosition(); } ///////////////////////////////////////////////// void TTigressPhysics::PreTreat(){ @@ -85,16 +83,8 @@ void TTigressPhysics::PreTreat(){ ///////////////////////////////////////////////// void TTigressPhysics::Clear() { - std::map<int,TTigressClover*>::iterator it; - for ( it=m_Clover.begin() ; it != m_Clover.end(); it++ ) { (*it).second->Clear(); } }; -///////////////////////////////////////////////// -void TTigressPhysics::AddClover(int DetNbr,double r, double theta, double phi) { - - m_Clover[DetNbr]=new TTigressClover(DetNbr,r,theta,phi); - -}; ///////////////////////////////////////////////// void TTigressPhysics::ReadConfiguration(string Path) { @@ -179,7 +169,6 @@ void TTigressPhysics::ReadConfiguration(string Path) { ///////////////////////////////////////////////// // If All necessary information there, toggle out if ( check_Theta && check_Phi && check_R && check_CloverId) { - AddClover(CloverId,R,Theta,Phi); ReadingStatus = false; check_CloverId= false; check_R= false; diff --git a/NPLib/Tigress/TTigressPhysics.h b/NPLib/Tigress/TTigressPhysics.h index ff93c8cdfc7488efc07c3b25158d9ac5952f7fc7..4241da10ca9e0eac6dae5489696dfe62e32b3af9 100644 --- a/NPLib/Tigress/TTigressPhysics.h +++ b/NPLib/Tigress/TTigressPhysics.h @@ -27,8 +27,6 @@ using namespace std; // NPL #include "TTigressData.h" -#include "TTigressClover.h" -#include "TTigressCrystal.h" #include "../include/CalibrationManager.h" #include "../include/VDetector.h" @@ -78,12 +76,6 @@ class TTigressPhysics : public TObject, public NPA::VDetector{ public: void PreTreat(); - private: - - std::map<int,TTigressClover*> m_Clover; - void AddClover(int,double,double,double); - - private: // Root Input and Output tree classes TTigressData* m_EventData;//!