Skip to content
Snippets Groups Projects
Commit 3ce5b14b authored by adrien-matta's avatar adrien-matta
Browse files

* Removing legacy file for tigress

parent 9ef1aa45
No related branches found
No related tags found
No related merge requests found
......@@ -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 ##########
......
/*****************************************************************************
* 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();
}
#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
/*****************************************************************************
* 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;
};
}
#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
......@@ -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;
......
......@@ -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;//!
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment