Skip to content
Snippets Groups Projects
Commit b94de91a authored by matta's avatar matta
Browse files

* Updating the Tigress and Sharc classes with recent dev of S1107 exp

parent 6b03462f
No related branches found
No related tags found
No related merge requests found
Showing
with 5159 additions and 179 deletions
include ../Makefile.arch
#------------------------------------------------------------------------------
SHARELIB = libSharcData.so
SHARELIB = libSharcData.so libSharcPhysics.so
#libSharcPhysics.so
all: $(SHARELIB)
......@@ -15,15 +15,15 @@ libSharcData.so: TSharcData.o TSharcDataDict.o
TSharcDataDict.cxx: TSharcData.h
rootcint -f $@ -c $^
#libSharcPhysics.so: TSharcPhysics.o TSharcPhysicsDict.o
# $(LD) $(SOFLAGS) $^ $(OutPutOpt) $@
libSharcPhysics.so: TSharcPhysics.o TSharcPhysicsDict.o
$(LD) $(SOFLAGS) $^ $(OutPutOpt) $@
#TSharcPhysicsDict.cxx: TSharcPhysics.h
# rootcint -f $@ -c $^
TSharcPhysicsDict.cxx: TSharcPhysics.h
rootcint -f $@ -c $^
# dependances
TSharcData.o: TSharcData.cxx TSharcData.h
#TSharcPhysics.o: TSharcPhysics.cxx TSharcPhysics.h
TSharcPhysics.o: TSharcPhysics.cxx TSharcPhysics.h
#######################################
############# Clean and More ##########
......
/*****************************************************************************
* Copyright (C) 2009-2010 this file is part of the NPTool Project *
* 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 *
......@@ -8,7 +8,7 @@
/*****************************************************************************
* Original Author: Adrien MATTA contact address: matta@ipno.in2p3.fr *
* *
* Creation Date : febuary 2009 *
* Creation Date : November 2012 *
* Last update : *
*---------------------------------------------------------------------------*
* Decription: *
......@@ -16,11 +16,11 @@
* *
*---------------------------------------------------------------------------*
* Comment: *
* *
* *
* *
*****************************************************************************/
#include <iostream>
using namespace std;
using namespace std;
#include "TSharcData.h"
......@@ -51,6 +51,10 @@ void TSharcData::Clear()
fSharc_StripBack_StripNbr.clear();
fSharc_StripBack_Energy.clear();
fSharc_StripBack_Time.clear();
fSharc_PAD_DetectorNbr.clear();
fSharc_PAD_Energy.clear();
fSharc_PAD_Time.clear();
}
/////////////////////////
......@@ -63,13 +67,22 @@ void TSharcData::Dump() const
for (UShort_t i = 0; i < fSharc_StripFront_DetectorNbr.size(); i++){
cout << "DetNbr: " << fSharc_StripFront_DetectorNbr[i]
<< " Strip: " << fSharc_StripFront_StripNbr[i]
<< " Energy: " << fSharc_StripFront_Energy[i] << endl;
<< " Energy: " << fSharc_StripFront_Energy[i]
<< " Time: " << fSharc_StripFront_Time[i] << endl;
}
// Back
for (UShort_t i = 0; i < fSharc_StripFront_DetectorNbr.size(); i++){
cout << "DetNbr: " << fSharc_StripFront_DetectorNbr[i]
<< " Strip: " << fSharc_StripFront_StripNbr[i]
<< " Energy: " << fSharc_StripFront_Energy[i] << endl;
<< " Energy: " << fSharc_StripFront_Energy[i]
<< " Time: " << fSharc_StripBack_Time[i] << endl;
}
}
\ No newline at end of file
// PAD
for (UShort_t i = 0; i < fSharc_PAD_DetectorNbr.size(); i++){
cout << "DetNbr: " << fSharc_PAD_DetectorNbr[i]
<< " Energy: " << fSharc_PAD_Energy[i]
<< " Time: " << fSharc_PAD_Time[i] << endl;
}
}
......@@ -39,6 +39,10 @@ private:
vector<Double_t> fSharc_StripBack_Energy;
vector<Double_t> fSharc_StripBack_Time;
vector<UShort_t> fSharc_PAD_DetectorNbr;
vector<Double_t> fSharc_PAD_Energy;
vector<Double_t> fSharc_PAD_Time;
public:
TSharcData();
virtual ~TSharcData();
......@@ -48,26 +52,40 @@ public:
void Dump() const;
///////////////////// SETTERS ////////////////////////
void SetFrontE_DetectorNbr(UShort_t DetNbr){fSharc_StripFront_DetectorNbr.push_back(DetNbr);}
void SetFrontE_StripNbr(UShort_t StripNbr){fSharc_StripFront_StripNbr.push_back(StripNbr);}
void SetFrontE_Energy(Double_t Energy){fSharc_StripFront_Energy.push_back(Energy);}
void SetFrontE_Time(Double_t Time){fSharc_StripFront_Time.push_back(Time);}
void SetFront_DetectorNbr(UShort_t DetNbr){fSharc_StripFront_DetectorNbr.push_back(DetNbr);}
void SetFront_StripNbr(UShort_t StripNbr){fSharc_StripFront_StripNbr.push_back(StripNbr);}
void SetFront_Energy(Double_t Energy){fSharc_StripFront_Energy.push_back(Energy);}
void SetFront_Time(Double_t Time){fSharc_StripFront_Time.push_back(Time);}
void SetBack_DetectorNbr(UShort_t DetNbr){fSharc_StripBack_DetectorNbr.push_back(DetNbr);}
void SetBack_StripNbr(UShort_t StripNbr){fSharc_StripBack_StripNbr.push_back(StripNbr);}
void SetBack_Energy(Double_t Energy){fSharc_StripBack_Energy.push_back(Energy);}
void SetBack_Time(Double_t Time){fSharc_StripBack_Time.push_back(Time);}
void SetPAD_DetectorNbr(UShort_t DetNbr){fSharc_PAD_DetectorNbr.push_back(DetNbr);}
void SetPAD_Energy(Double_t Energy){fSharc_PAD_Energy.push_back(Energy);}
void SetPAD_Time(Double_t Time){fSharc_PAD_Time.push_back(Time);}
void SetBackE_DetectorNbr(UShort_t DetNbr){fSharc_StripBack_DetectorNbr.push_back(DetNbr);}
void SetBackE_StripNbr(UShort_t StripNbr){fSharc_StripBack_StripNbr.push_back(StripNbr);}
void SetBackE_Energy(Double_t Energy){fSharc_StripBack_Energy.push_back(Energy);}
void SetBackE_Time(Double_t Time){fSharc_StripBack_Time.push_back(Time);}
///////////////////// GETTERS ////////////////////////
UShort_t GetFrontE_DetectorNbr(unsigned int i){return fSharc_StripFront_DetectorNbr[i];}
UShort_t GetFrontE_StripNbr(unsigned int i) {return fSharc_StripFront_StripNbr[i];}
Double_t GetFrontE_Energy(unsigned int i) {return fSharc_StripFront_Energy[i];}
Double_t GetFrontE_Time(unsigned int i) {return fSharc_StripFront_Time[i];}
UShort_t GetFront_DetectorNbr(unsigned int i) const {return fSharc_StripFront_DetectorNbr[i];}
UShort_t GetFront_StripNbr(unsigned int i) const {return fSharc_StripFront_StripNbr[i];}
Double_t GetFront_Energy(unsigned int i) const {return fSharc_StripFront_Energy[i];}
Double_t GetFront_Time(unsigned int i) const {return fSharc_StripFront_Time[i];}
UShort_t GetBackE_DetectorNbr(unsigned int i) {return fSharc_StripFront_DetectorNbr[i];}
UShort_t GetBackE_StripNbr(unsigned int i) {return fSharc_StripFront_StripNbr[i];}
Double_t GetBackE_Energy(unsigned int i) {return fSharc_StripFront_Energy[i];}
Double_t GetBackE_Time(unsigned int i) {return fSharc_StripFront_Time[i];}
UShort_t GetBack_DetectorNbr(unsigned int i) const {return fSharc_StripBack_DetectorNbr[i];}
UShort_t GetBack_StripNbr(unsigned int i) const {return fSharc_StripBack_StripNbr[i];}
Double_t GetBack_Energy(unsigned int i) const {return fSharc_StripBack_Energy[i];}
Double_t GetBack_Time(unsigned int i) const {return fSharc_StripBack_Time[i];}
UShort_t GetPAD_DetectorNbr(unsigned int i) const {return fSharc_PAD_DetectorNbr[i];}
Double_t GetPAD_Energy(unsigned int i) const {return fSharc_PAD_Energy[i];}
Double_t GetPAD_Time(unsigned int i) const {return fSharc_PAD_Time[i];}
unsigned int GetMultiplicityFront() const {return fSharc_StripFront_DetectorNbr.size();}
unsigned int GetMultiplicityBack() const {return fSharc_StripBack_DetectorNbr.size();}
unsigned int GetMultiplicityPAD() const {return fSharc_PAD_DetectorNbr.size();}
ClassDef(TSharcData,1) // SharcData structure
};
......
This diff is collapsed.
This diff is collapsed.
#ifndef TSHARCPHYSICS_H
#define TSHARCPHYSICS_H
/*****************************************************************************
* Copyright (C) 2009-2010 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: matta@ipno.in2p3.fr *
* *
* Creation Date : febuary 2009 *
* Last update : *
*---------------------------------------------------------------------------*
* Decription: *
* This class hold Sharc treated data *
* *
*---------------------------------------------------------------------------*
* Comment: *
* *
* *
* *
*****************************************************************************/
// STL
#include <vector>
// NPL
#include "TSharcData.h"
#include "../include/CalibrationManager.h"
#include "../include/VDetector.h"
// ROOT
#include "TVector2.h"
#include "TVector3.h"
#include "TObject.h"
using namespace std ;
class TSharcPhysics : public TObject, public NPA::VDetector
{
public:
TSharcPhysics();
~TSharcPhysics() {};
public:
void Clear();
void Clear(const Option_t*) {};
public:
vector < TVector2 > Match_Front_Back() ;
int CheckEvent();
public:
// Provide Physical Multiplicity
Int_t EventMultiplicity;
// Provide a Classification of Event
vector<int> EventType ;
// Detector
vector<int> DetectorNumber ;
// DSSD
vector<double> Strip_E ;
vector<double> Strip_T ;
vector<double> StripFront_E ;
vector<double> StripFront_T ;
vector<double> StripBack_E ;
vector<double> StripBack_T ;
vector<int> Strip_Front ;
vector<int> Strip_Back ;
vector<double> PAD_E ;
vector<double> PAD_T ;
public: // Innherited from VDetector Class
// Read stream at ConfigFile to pick-up parameters of detector (Position,...) using Token
void ReadConfiguration(string) ;
// Add Parameter to the CalibrationManger
void AddParameterToCalibrationManager() ;
// Activated associated Branches and link it to the private member DetectorData address
// In this method mother Branches (Detector) AND daughter leaf (fDetector_parameter) have to be activated
void InitializeRootInputRaw() ;
// Activated associated Branches and link it to the private member DetectorPhysics address
// In this method mother Branches (Detector) AND daughter leaf (parameter) have to be activated
void InitializeRootInputPhysics() ;
// Create associated branches and associated private member DetectorPhysics address
void InitializeRootOutput() ;
// This method is called at each event read from the Input Tree. Aime is to build treat Raw dat in order to extract physical parameter.
void BuildPhysicalEvent() ;
// Same as above, but only the simplest event and/or simple method are used (low multiplicity, faster algorythm but less efficient ...).
// This method aimed to be used for analysis performed during experiment, when speed is requiered.
// NB: This method can eventually be the same as BuildPhysicalEvent.
void BuildSimplePhysicalEvent() ;
// Same as above but for online analysis
void BuildOnlinePhysicalEvent() {BuildPhysicalEvent();};
// Those two method all to clear the Event Physics or Data
void ClearEventPhysics() {Clear();}
void ClearEventData() {m_EventData->Clear();}
public: // Specific to Sharc Array
// Clear The PreTeated object
void ClearPreTreatedData() {m_PreTreatedData->Clear();}
// Remove bad channel, calibrate the data and apply threshold
void PreTreat();
// Return false if the channel is disabled by user
// Frist argument is either "X","Y","SiLi","CsI"
bool IsValidChannel(const string DetectorType, const int telescope , const int channel);
// Initialize the standard parameter for analysis
// ie: all channel enable, maximum multiplicity for strip = number of telescope
void InitializeStandardParameter();
// Read the user configuration file; if no file found, load standard one
void ReadAnalysisConfig();
// Add a Detector
void AddBoxDetector( double Z);
void AddQQQDetector( double R,double Phi,double Z);
// Give and external TMustData object to TSharcPhysics. Needed for online analysis for example.
void SetRawDataPointer(TSharcData* rawDataPointer) {m_EventData = rawDataPointer;}
// Retrieve raw and pre-treated data
TSharcData* GetRawData() const {return m_EventData;}
TSharcData* GetPreTreatedData() const {return m_PreTreatedData;}
// Use to access the strip position
double GetStripPositionX( const int N , const int Front , const int Back ) const{ return m_StripPositionX[N-1][Front-1][Back-1] ; } ;
double GetStripPositionY( const int N , const int Front , const int Back ) const{ return m_StripPositionY[N-1][Front-1][Back-1] ; } ;
double GetStripPositionZ( const int N , const int Front , const int Back ) const{ return m_StripPositionZ[N-1][Front-1][Back-1] ; } ;
double GetNumberOfDetector() const { return m_NumberOfDetector; };
// To be called after a build Physical Event
int GetEventMultiplicity() const { return EventMultiplicity; };
TVector3 GetPositionOfInteraction(const int i) const;
TVector3 GetDetectorNormal(const int i) const;
private: // Parameter used in the analysis
// By default take EX and TY.
bool m_Take_E_Front;//!
bool m_Take_T_Back;//!
// Event over this value after pre-treatment are not treated / avoid long treatment time on spurious event
unsigned int m_MaximumStripMultiplicityAllowed ;//!
// Give the allowance in percent of the difference in energy between X and Y
double m_StripEnergyMatchingSigma ; //!
double m_StripEnergyMatchingNumberOfSigma ; //!
// Threshold
double m_StripFront_E_RAW_Threshold ;//!
double m_StripFront_E_Threshold ;//!
double m_StripBack_E_RAW_Threshold ;//!
double m_StripBack_E_Threshold ;//!
double m_PAD_E_RAW_Threshold ;//!
double m_PAD_E_Threshold ;//!
private: // Root Input and Output tree classes
TSharcData* m_EventData;//!
TSharcData* m_PreTreatedData;//!
TSharcPhysics* m_EventPhysics;//!
private: // Map of activated channel
map< int, vector<bool> > m_FrontChannelStatus;//!
map< int, vector<bool> > m_BackChannelStatus;//!
map< int, vector<bool> > m_PADChannelStatus;//!
private: // Spatial Position of Strip Calculated on bases of detector position
int m_NumberOfDetector;//!
vector< vector < vector < double > > > m_StripPositionX;//!
vector< vector < vector < double > > > m_StripPositionY;//!
vector< vector < vector < double > > > m_StripPositionZ;//!
ClassDef(TSharcPhysics,1) // SharcPhysics structure
};
namespace Sharc_LOCAL
{
// tranform an integer to a string
string itoa(unsigned int value);
// DSSD
// Front
double fStrip_Front_E(const TSharcData* Data, const int i);
double fStrip_Front_T(const TSharcData* Data, const int i);
// Back
double fStrip_Back_E(const TSharcData* Data, const int i);
double fStrip_Back_T(const TSharcData* Data, const int i);
// PAD
double fPAD_E(const TSharcData* Data, const int i);
double fPAD_T(const TSharcData* Data, const int i);
}
#endif
This diff is collapsed.
/********************************************************************
* TSharcPhysicsDict.h
* CAUTION: DON'T CHANGE THIS FILE. THIS FILE IS AUTOMATICALLY GENERATED
* FROM HEADER FILES LISTED IN G__setup_cpp_environmentXXX().
* CHANGE THOSE HEADER FILES AND REGENERATE THIS FILE.
********************************************************************/
#ifdef __CINT__
#error TSharcPhysicsDict.h/C is only for compilation. Abort cint.
#endif
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#define G__ANSIHEADER
#define G__DICTIONARY
#define G__PRIVATE_GVALUE
#include "G__ci.h"
#include "FastAllocString.h"
extern "C" {
extern void G__cpp_setup_tagtableTSharcPhysicsDict();
extern void G__cpp_setup_inheritanceTSharcPhysicsDict();
extern void G__cpp_setup_typetableTSharcPhysicsDict();
extern void G__cpp_setup_memvarTSharcPhysicsDict();
extern void G__cpp_setup_globalTSharcPhysicsDict();
extern void G__cpp_setup_memfuncTSharcPhysicsDict();
extern void G__cpp_setup_funcTSharcPhysicsDict();
extern void G__set_cpp_environmentTSharcPhysicsDict();
}
#include "TObject.h"
#include "TMemberInspector.h"
#include "TSharcPhysics.h"
#include <algorithm>
namespace std { }
using namespace std;
#ifndef G__MEMFUNCBODY
#endif
extern G__linked_taginfo G__TSharcPhysicsDictLN_TClass;
extern G__linked_taginfo G__TSharcPhysicsDictLN_TBuffer;
extern G__linked_taginfo G__TSharcPhysicsDictLN_TMemberInspector;
extern G__linked_taginfo G__TSharcPhysicsDictLN_TObject;
extern G__linked_taginfo G__TSharcPhysicsDictLN_vectorlEunsignedsPshortcOallocatorlEunsignedsPshortgRsPgR;
extern G__linked_taginfo G__TSharcPhysicsDictLN_vectorlEdoublecOallocatorlEdoublegRsPgR;
extern G__linked_taginfo G__TSharcPhysicsDictLN_string;
extern G__linked_taginfo G__TSharcPhysicsDictLN_vectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgR;
extern G__linked_taginfo G__TSharcPhysicsDictLN_reverse_iteratorlEvectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgRcLcLiteratorgR;
extern G__linked_taginfo G__TSharcPhysicsDictLN_vectorlETVirtualArraymUcOallocatorlETVirtualArraymUgRsPgR;
extern G__linked_taginfo G__TSharcPhysicsDictLN_reverse_iteratorlEvectorlETVirtualArraymUcOallocatorlETVirtualArraymUgRsPgRcLcLiteratorgR;
extern G__linked_taginfo G__TSharcPhysicsDictLN_TSharcData;
extern G__linked_taginfo G__TSharcPhysicsDictLN_maplEstringcOvectorlEdoublecOallocatorlEdoublegRsPgRcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEdoublecOallocatorlEdoublegRsPgRsPgRsPgRsPgR;
extern G__linked_taginfo G__TSharcPhysicsDictLN_vectorlEstringcOallocatorlEstringgRsPgR;
extern G__linked_taginfo G__TSharcPhysicsDictLN_reverse_iteratorlEvectorlEstringcOallocatorlEstringgRsPgRcLcLiteratorgR;
extern G__linked_taginfo G__TSharcPhysicsDictLN_maplEstringcOstringcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOstringgRsPgRsPgR;
extern G__linked_taginfo G__TSharcPhysicsDictLN_NPA;
extern G__linked_taginfo G__TSharcPhysicsDictLN_NPAcLcLVDetector;
extern G__linked_taginfo G__TSharcPhysicsDictLN_TMatrixTBaselEfloatgR;
extern G__linked_taginfo G__TSharcPhysicsDictLN_TMatrixTBaselEdoublegR;
extern G__linked_taginfo G__TSharcPhysicsDictLN_TVectorTlEfloatgR;
extern G__linked_taginfo G__TSharcPhysicsDictLN_TVectorTlEdoublegR;
extern G__linked_taginfo G__TSharcPhysicsDictLN_TElementActionTlEfloatgR;
extern G__linked_taginfo G__TSharcPhysicsDictLN_TElementPosActionTlEfloatgR;
extern G__linked_taginfo G__TSharcPhysicsDictLN_TMatrixTlEfloatgR;
extern G__linked_taginfo G__TSharcPhysicsDictLN_TMatrixTRow_constlEfloatgR;
extern G__linked_taginfo G__TSharcPhysicsDictLN_TMatrixTRowlEfloatgR;
extern G__linked_taginfo G__TSharcPhysicsDictLN_TMatrixTDiag_constlEfloatgR;
extern G__linked_taginfo G__TSharcPhysicsDictLN_TMatrixTColumn_constlEfloatgR;
extern G__linked_taginfo G__TSharcPhysicsDictLN_TMatrixTFlat_constlEfloatgR;
extern G__linked_taginfo G__TSharcPhysicsDictLN_TMatrixTSub_constlEfloatgR;
extern G__linked_taginfo G__TSharcPhysicsDictLN_TMatrixTSparseRow_constlEfloatgR;
extern G__linked_taginfo G__TSharcPhysicsDictLN_TMatrixTSparseDiag_constlEfloatgR;
extern G__linked_taginfo G__TSharcPhysicsDictLN_TMatrixTColumnlEfloatgR;
extern G__linked_taginfo G__TSharcPhysicsDictLN_TMatrixTDiaglEfloatgR;
extern G__linked_taginfo G__TSharcPhysicsDictLN_TMatrixTFlatlEfloatgR;
extern G__linked_taginfo G__TSharcPhysicsDictLN_TMatrixTSublEfloatgR;
extern G__linked_taginfo G__TSharcPhysicsDictLN_TMatrixTSparseRowlEfloatgR;
extern G__linked_taginfo G__TSharcPhysicsDictLN_TMatrixTSparseDiaglEfloatgR;
extern G__linked_taginfo G__TSharcPhysicsDictLN_TVector3;
extern G__linked_taginfo G__TSharcPhysicsDictLN_TSharcPhysics;
extern G__linked_taginfo G__TSharcPhysicsDictLN_vectorlETVector2cOallocatorlETVector2gRsPgR;
extern G__linked_taginfo G__TSharcPhysicsDictLN_reverse_iteratorlEvectorlETVector2cOallocatorlETVector2gRsPgRcLcLiteratorgR;
extern G__linked_taginfo G__TSharcPhysicsDictLN_vectorlEintcOallocatorlEintgRsPgR;
extern G__linked_taginfo G__TSharcPhysicsDictLN_reverse_iteratorlEvectorlEintcOallocatorlEintgRsPgRcLcLiteratorgR;
extern G__linked_taginfo G__TSharcPhysicsDictLN_maplEintcOvectorlEboolcOallocatorlEboolgRsPgRcOlesslEintgRcOallocatorlEpairlEconstsPintcOvectorlEboolcOallocatorlEboolgRsPgRsPgRsPgRsPgR;
extern G__linked_taginfo G__TSharcPhysicsDictLN_vectorlEvectorlEdoublecOallocatorlEdoublegRsPgRcOallocatorlEvectorlEdoublecOallocatorlEdoublegRsPgRsPgRsPgR;
extern G__linked_taginfo G__TSharcPhysicsDictLN_reverse_iteratorlEvectorlEvectorlEdoublecOallocatorlEdoublegRsPgRcOallocatorlEvectorlEdoublecOallocatorlEdoublegRsPgRsPgRsPgRcLcLiteratorgR;
extern G__linked_taginfo G__TSharcPhysicsDictLN_vectorlEvectorlEvectorlEdoublecOallocatorlEdoublegRsPgRcOallocatorlEvectorlEdoublecOallocatorlEdoublegRsPgRsPgRsPgRcOallocatorlEvectorlEvectorlEdoublecOallocatorlEdoublegRsPgRcOallocatorlEvectorlEdoublecOallocatorlEdoublegRsPgRsPgRsPgRsPgRsPgR;
extern G__linked_taginfo G__TSharcPhysicsDictLN_reverse_iteratorlEvectorlEvectorlEvectorlEdoublecOallocatorlEdoublegRsPgRcOallocatorlEvectorlEdoublecOallocatorlEdoublegRsPgRsPgRsPgRcOallocatorlEvectorlEvectorlEdoublecOallocatorlEdoublegRsPgRcOallocatorlEvectorlEdoublecOallocatorlEdoublegRsPgRsPgRsPgRsPgRsPgRcLcLiteratorgR;
/* STUB derived class for protected member access */
include ../Makefile.arch
#------------------------------------------------------------------------------
SHARELIB = libTigressData.so
#libTigressPhysics.so
SHARELIB = libTigressData.so libTigressPhysics.so
all: $(SHARELIB)
#------------------------------------------------------------------------------
############### Detector ##############
## Tigress ##
libTigressData.so: TTigressData.o TTigressDataDict.o
libTigressData.so: TTigressData.o TTigressDataDict.o TTigEventFragment.o TTigEventFragmentDict.o
$(LD) $(SOFLAGS) $^ $(OutPutOpt) $@
TTigressDataDict.cxx: TTigressData.h
rootcint -f $@ -c $^
#libTigressPhysics.so: TTigressPhysics.o TTigressPhysicsDict.o
# $(LD) $(SOFLAGS) $^ $(OutPutOpt) $@
TTigEventFragmentDict.cxx: TTigEventFragment.h
rootcint -f $@ -c $^
libTigressPhysics.so: TTigressPhysics.o TTigressPhysicsDict.o TTigressClover.o TTigressCrystal.o
$(LD) $(SOFLAGS) $^ $(OutPutOpt) $@
#TTigressPhysicsDict.cxx: TTigressPhysics.h
# rootcint -f $@ -c $^
TTigressPhysicsDict.cxx: TTigressPhysics.h
rootcint -f $@ -c $^
# dependances
TTigressData.o: TTigressData.cxx TTigressData.h
#TTigressPhysics.o: TTigressPhysics.cxx TTigressPhysics.h
TTigressData.o: TTigressData.cxx TTigressData.h
TTigEventFragment.o: TTigEventFragment.cxx TTigEventFragment.h
TTigressPhysics.o: TTigressPhysics.cxx TTigressPhysics.h
TTigressClover.o: TTigressClover.cxx TTigressClover.h
TTigressCrystal.o: TTigressCrystal.cxx TTigressCrystal.h
#######################################
############# Clean and More ##########
......
#include"TTigEventFragment.h"
ClassImp(TTigEventFragment)
extern int midas_events_read;
TTigEventFragment::TTigEventFragment(){
Clear();
}
TTigEventFragment::TTigEventFragment(int MaxChannel){
tig_midas_id.reserve(MaxChannel);
tig_type.reserve(MaxChannel);
channel_number.reserve(MaxChannel);
channel_raw.reserve(MaxChannel);
cfd_value.reserve(MaxChannel);
led_value.reserve(MaxChannel);
charge_raw.reserve(MaxChannel);
charge_cal.reserve(MaxChannel);
timestamp_low.reserve(MaxChannel);
timestamp_high.reserve(MaxChannel);
timestamp_live.reserve(MaxChannel);
timestamp_tr.reserve(MaxChannel);
timestamp_ta.reserve(MaxChannel);
waveform.reserve(MaxChannel);
}
TTigEventFragment::~TTigEventFragment(){
Clear();
}
void TTigEventFragment::Clear(){
tig_num_chan=0;
tig_event_id=0;
tig_midas_id.clear();
tig_type.clear();
channel_number.clear();
channel_raw.clear();
cfd_value.clear();
led_value.clear();
charge_raw.clear();
charge_cal.clear();
timestamp_low.clear();
timestamp_high.clear();
timestamp_live.clear();
timestamp_tr.clear();
timestamp_ta.clear();
waveform.clear();
}
#ifndef TTigEventFragment_H
#define TTigEventFragment_H
#include"TH1F.h"
#include"TObject.h"
#include <vector>
using namespace std;
class TTigEventFragment : public TObject{
public:
TTigEventFragment();
// Create the class and reserve the vector size for MaxChannel
// Limit the number of dynamic allocation, so better perf but more memory used
TTigEventFragment(int MaxChannel);
~TTigEventFragment();
public:
int tig_num_chan;
int tig_event_id;
vector<int> tig_midas_id;
vector<int> tig_type; //0 for tig10 and 1 for tig 64, sound ok? good.
vector<int> channel_number;
vector<int> channel_raw;
vector<int> cfd_value;
vector<int> led_value;
vector<int> charge_raw;
vector<float> charge_cal;
vector<int> timestamp_low;
vector<int> timestamp_high;
vector<int> timestamp_live;
vector<int> timestamp_tr; // triggers requested
vector<int> timestamp_ta; // triggers accepted
vector<TH1F> waveform;
public:
void Clear() ;
void Clear(const Option_t*) {};
void Dump() const {};
ClassDef(TTigEventFragment,1) // TTigEventFragment structure
};
#endif
This diff is collapsed.
/********************************************************************
* TTigEventFragmentDict.h
* CAUTION: DON'T CHANGE THIS FILE. THIS FILE IS AUTOMATICALLY GENERATED
* FROM HEADER FILES LISTED IN G__setup_cpp_environmentXXX().
* CHANGE THOSE HEADER FILES AND REGENERATE THIS FILE.
********************************************************************/
#ifdef __CINT__
#error TTigEventFragmentDict.h/C is only for compilation. Abort cint.
#endif
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#define G__ANSIHEADER
#define G__DICTIONARY
#define G__PRIVATE_GVALUE
#include "G__ci.h"
#include "FastAllocString.h"
extern "C" {
extern void G__cpp_setup_tagtableTTigEventFragmentDict();
extern void G__cpp_setup_inheritanceTTigEventFragmentDict();
extern void G__cpp_setup_typetableTTigEventFragmentDict();
extern void G__cpp_setup_memvarTTigEventFragmentDict();
extern void G__cpp_setup_globalTTigEventFragmentDict();
extern void G__cpp_setup_memfuncTTigEventFragmentDict();
extern void G__cpp_setup_funcTTigEventFragmentDict();
extern void G__set_cpp_environmentTTigEventFragmentDict();
}
#include "TObject.h"
#include "TMemberInspector.h"
#include "TTigEventFragment.h"
#include <algorithm>
namespace std { }
using namespace std;
#ifndef G__MEMFUNCBODY
#endif
extern G__linked_taginfo G__TTigEventFragmentDictLN_TClass;
extern G__linked_taginfo G__TTigEventFragmentDictLN_TBuffer;
extern G__linked_taginfo G__TTigEventFragmentDictLN_TMemberInspector;
extern G__linked_taginfo G__TTigEventFragmentDictLN_TObject;
extern G__linked_taginfo G__TTigEventFragmentDictLN_vectorlEfloatcOallocatorlEfloatgRsPgR;
extern G__linked_taginfo G__TTigEventFragmentDictLN_vectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgR;
extern G__linked_taginfo G__TTigEventFragmentDictLN_reverse_iteratorlEvectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgRcLcLiteratorgR;
extern G__linked_taginfo G__TTigEventFragmentDictLN_vectorlETVirtualArraymUcOallocatorlETVirtualArraymUgRsPgR;
extern G__linked_taginfo G__TTigEventFragmentDictLN_reverse_iteratorlEvectorlETVirtualArraymUcOallocatorlETVirtualArraymUgRsPgRcLcLiteratorgR;
extern G__linked_taginfo G__TTigEventFragmentDictLN_TVectorTlEfloatgR;
extern G__linked_taginfo G__TTigEventFragmentDictLN_TVectorTlEdoublegR;
extern G__linked_taginfo G__TTigEventFragmentDictLN_TTigEventFragment;
extern G__linked_taginfo G__TTigEventFragmentDictLN_vectorlEintcOallocatorlEintgRsPgR;
extern G__linked_taginfo G__TTigEventFragmentDictLN_reverse_iteratorlEvectorlEintcOallocatorlEintgRsPgRcLcLiteratorgR;
extern G__linked_taginfo G__TTigEventFragmentDictLN_vectorlETH1FcOallocatorlETH1FgRsPgR;
extern G__linked_taginfo G__TTigEventFragmentDictLN_reverse_iteratorlEvectorlETH1FcOallocatorlETH1FgRsPgRcLcLiteratorgR;
/* STUB derived class for protected member access */
/*****************************************************************************
* 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 "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-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 <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
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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