Commit 6d774a7d authored by Adrien Matta's avatar Adrien Matta
Browse files

* Polishing Strasse terminology:

        - now using the Longitudinal/Transverse terminology
parent 48ee0f90
Pipeline #76597 passed with stages
in 14 minutes and 49 seconds
......@@ -45,22 +45,22 @@ TStrasseData::~TStrasseData() {
//////////////////////////////////////////////////////////////////////
void TStrasseData::Clear() {
// Energy X
fInner_XE_DetectorNbr.clear();
fInner_XE_StripNbr.clear();
fInner_XE_Energy.clear();
// Energy Y
fInner_YE_DetectorNbr.clear();
fInner_YE_StripNbr.clear();
fInner_YE_Energy.clear();
fInner_TE_DetectorNbr.clear();
fInner_TE_StripNbr.clear();
fInner_TE_Energy.clear();
// Energy L
fInner_LE_DetectorNbr.clear();
fInner_LE_StripNbr.clear();
fInner_LE_Energy.clear();
// Energy X
fOuter_XE_DetectorNbr.clear();
fOuter_XE_StripNbr.clear();
fOuter_XE_Energy.clear();
// Energy Y
fOuter_YE_DetectorNbr.clear();
fOuter_YE_StripNbr.clear();
fOuter_YE_Energy.clear();
fOuter_TE_DetectorNbr.clear();
fOuter_TE_StripNbr.clear();
fOuter_TE_Energy.clear();
// Energy L
fOuter_LE_DetectorNbr.clear();
fOuter_LE_StripNbr.clear();
fOuter_LE_Energy.clear();
}
......@@ -72,12 +72,12 @@ void TStrasseData::Dump() const {
cout << "XXXXXXXXXXXXXXXXXXXXXXXX New Event [TStrasseData::Dump()] XXXXXXXXXXXXXXXXX" << endl;
// Energy
size_t mysize = fInner_XE_DetectorNbr.size();
cout << "Inner Strasse_XE_Mult: " << mysize << endl;
size_t mysize = fInner_TE_DetectorNbr.size();
cout << "Inner Strasse_TE_Mult: " << mysize << endl;
for (size_t i = 0 ; i < mysize ; i++){
cout << "X-DetNbr: " << fInner_XE_DetectorNbr[i]
<< " X-Energy: " << fInner_XE_Energy[i];
cout << "T-DetNbr: " << fInner_TE_DetectorNbr[i]
<< " T-Energy: " << fInner_TE_Energy[i];
}
}
......@@ -35,22 +35,22 @@ class TStrasseData : public TObject {
// to allow multiplicity treatment
private:
// First Stage Front Energy
vector<unsigned short> fInner_XE_DetectorNbr;
vector<unsigned short> fInner_XE_StripNbr;
vector<double> fInner_XE_Energy;
vector<unsigned short> fInner_TE_DetectorNbr;
vector<unsigned short> fInner_TE_StripNbr;
vector<double> fInner_TE_Energy;
// First Stage Back Energy
vector<unsigned short> fInner_YE_DetectorNbr;
vector<unsigned short> fInner_YE_StripNbr;
vector<double> fInner_YE_Energy;
vector<unsigned short> fInner_LE_DetectorNbr;
vector<unsigned short> fInner_LE_StripNbr;
vector<double> fInner_LE_Energy;
// Second Stage Front Energy
vector<unsigned short> fOuter_XE_DetectorNbr;
vector<unsigned short> fOuter_XE_StripNbr;
vector<double> fOuter_XE_Energy;
vector<unsigned short> fOuter_TE_DetectorNbr;
vector<unsigned short> fOuter_TE_StripNbr;
vector<double> fOuter_TE_Energy;
// Second Stage Back Energy
vector<unsigned short> fOuter_YE_DetectorNbr;
vector<unsigned short> fOuter_YE_StripNbr;
vector<double> fOuter_YE_Energy;
vector<unsigned short> fOuter_LE_DetectorNbr;
vector<unsigned short> fOuter_LE_StripNbr;
vector<double> fOuter_LE_Energy;
//////////////////////////////////////////////////////////////
......@@ -76,71 +76,71 @@ class TStrasseData : public TObject {
public:
////////////////////// SETTERS ////////////////////////
// First Stage Energy Front
inline void SetInnerXE(const unsigned short& DetNbr, const unsigned short& StripNbr, const Double_t& Energy){
fInner_XE_DetectorNbr.push_back(DetNbr);
fInner_XE_StripNbr.push_back(StripNbr);
fInner_XE_Energy.push_back(Energy);
inline void SetInnerTE(const unsigned short& DetNbr, const unsigned short& StripNbr, const Double_t& Energy){
fInner_TE_DetectorNbr.push_back(DetNbr);
fInner_TE_StripNbr.push_back(StripNbr);
fInner_TE_Energy.push_back(Energy);
};//!
// First Stage Energy Back
inline void SetInnerYE(const unsigned short& DetNbr, const unsigned short& StripNbr, const Double_t& Energy){
fInner_YE_DetectorNbr.push_back(DetNbr);
fInner_YE_StripNbr.push_back(StripNbr);
fInner_YE_Energy.push_back(Energy);
inline void SetInnerLE(const unsigned short& DetNbr, const unsigned short& StripNbr, const Double_t& Energy){
fInner_LE_DetectorNbr.push_back(DetNbr);
fInner_LE_StripNbr.push_back(StripNbr);
fInner_LE_Energy.push_back(Energy);
};//!
//////
// Second Stage Energy Front
inline void SetOuterXE(const unsigned short& DetNbr, const unsigned short& StripNbr, const Double_t& Energy){
fOuter_XE_DetectorNbr.push_back(DetNbr);
fOuter_XE_StripNbr.push_back(StripNbr);
fOuter_XE_Energy.push_back(Energy);
inline void SetOuterTE(const unsigned short& DetNbr, const unsigned short& StripNbr, const Double_t& Energy){
fOuter_TE_DetectorNbr.push_back(DetNbr);
fOuter_TE_StripNbr.push_back(StripNbr);
fOuter_TE_Energy.push_back(Energy);
};//!
// Second Stage Energy Back
inline void SetOuterYE(const unsigned short& DetNbr, const unsigned short& StripNbr, const Double_t& Energy){
fOuter_YE_DetectorNbr.push_back(DetNbr);
fOuter_YE_StripNbr.push_back(StripNbr);
fOuter_YE_Energy.push_back(Energy);
inline void SetOuterLE(const unsigned short& DetNbr, const unsigned short& StripNbr, const Double_t& Energy){
fOuter_LE_DetectorNbr.push_back(DetNbr);
fOuter_LE_StripNbr.push_back(StripNbr);
fOuter_LE_Energy.push_back(Energy);
};//!
////////////////////// GETTERS ////////////////////////
// First Stage Energy X
inline unsigned short GetInnerMultXEnergy() const
{return fInner_XE_DetectorNbr.size();}
inline unsigned short GetInner_XE_DetectorNbr(const unsigned int &i) const
{return fInner_XE_DetectorNbr[i];}//!
inline unsigned short GetInner_XE_StripNbr(const unsigned int &i) const
{return fInner_XE_StripNbr[i];}//!
inline Double_t GetInner_XE_Energy(const unsigned int &i) const
{return fInner_XE_Energy[i];}//!
// First Stage Energy Y
inline unsigned short GetInnerMultYEnergy() const
{return fInner_YE_DetectorNbr.size();}
inline unsigned short GetInner_YE_DetectorNbr(const unsigned int &i) const
{return fInner_YE_DetectorNbr[i];}//!
inline unsigned short GetInner_YE_StripNbr(const unsigned int &i) const
{return fInner_YE_StripNbr[i];}//!
inline Double_t GetInner_YE_Energy(const unsigned int &i) const
{return fInner_YE_Energy[i];}//!
// First Stage Energy T
inline unsigned short GetInnerMultTEnergy() const
{return fInner_TE_DetectorNbr.size();}
inline unsigned short GetInner_TE_DetectorNbr(const unsigned int &i) const
{return fInner_TE_DetectorNbr[i];}//!
inline unsigned short GetInner_TE_StripNbr(const unsigned int &i) const
{return fInner_TE_StripNbr[i];}//!
inline Double_t GetInner_TE_Energy(const unsigned int &i) const
{return fInner_TE_Energy[i];}//!
// First Stage Energy L
inline unsigned short GetInnerMultLEnergy() const
{return fInner_LE_DetectorNbr.size();}
inline unsigned short GetInner_LE_DetectorNbr(const unsigned int &i) const
{return fInner_LE_DetectorNbr[i];}//!
inline unsigned short GetInner_LE_StripNbr(const unsigned int &i) const
{return fInner_LE_StripNbr[i];}//!
inline Double_t GetInner_LE_Energy(const unsigned int &i) const
{return fInner_LE_Energy[i];}//!
//////
// Second Stage Energy X
inline unsigned short GetOuterMultXEnergy() const
{return fOuter_XE_DetectorNbr.size();}
inline unsigned short GetOuter_XE_DetectorNbr(const unsigned int &i) const
{return fOuter_XE_DetectorNbr[i];}//!
inline unsigned short GetOuter_XE_StripNbr(const unsigned int &i) const
{return fOuter_XE_StripNbr[i];}//!
inline Double_t GetOuter_XE_Energy(const unsigned int &i) const
{return fOuter_XE_Energy[i];}//!
// Second Stage Energy Y
inline unsigned short GetOuterMultYEnergy() const
{return fOuter_YE_DetectorNbr.size();}
inline unsigned short GetOuter_YE_DetectorNbr(const unsigned int &i) const
{return fOuter_YE_DetectorNbr[i];}//!
inline unsigned short GetOuter_YE_StripNbr(const unsigned int &i) const
{return fOuter_YE_StripNbr[i];}//!
inline Double_t GetOuter_YE_Energy(const unsigned int &i) const
{return fOuter_YE_Energy[i];}//!
// Second Stage Energy T
inline unsigned short GetOuterMultTEnergy() const
{return fOuter_TE_DetectorNbr.size();}
inline unsigned short GetOuter_TE_DetectorNbr(const unsigned int &i) const
{return fOuter_TE_DetectorNbr[i];}//!
inline unsigned short GetOuter_TE_StripNbr(const unsigned int &i) const
{return fOuter_TE_StripNbr[i];}//!
inline Double_t GetOuter_TE_Energy(const unsigned int &i) const
{return fOuter_TE_Energy[i];}//!
// Second Stage Energy L
inline unsigned short GetOuterMultLEnergy() const
{return fOuter_LE_DetectorNbr.size();}
inline unsigned short GetOuter_LE_DetectorNbr(const unsigned int &i) const
{return fOuter_LE_DetectorNbr[i];}//!
inline unsigned short GetOuter_LE_StripNbr(const unsigned int &i) const
{return fOuter_LE_StripNbr[i];}//!
inline Double_t GetOuter_LE_Energy(const unsigned int &i) const
{return fOuter_LE_Energy[i];}//!
//////////////////////////////////////////////////////////////
// Required for ROOT dictionnary
......
......@@ -184,26 +184,26 @@ void TStrassePhysics::BuildPhysicalEvent() {
EventMultiplicity = couple.size();
for(unsigned int i=0; i<couple.size(); i++){
int N = m_PreTreatedData->GetInner_XE_DetectorNbr(couple[i].X());
int X = m_PreTreatedData->GetInner_XE_StripNbr(couple[i].X());
int Y = m_PreTreatedData->GetInner_YE_StripNbr(couple[i].Y());
int N = m_PreTreatedData->GetInner_TE_DetectorNbr(couple[i].X());
int X = m_PreTreatedData->GetInner_TE_StripNbr(couple[i].X());
int Y = m_PreTreatedData->GetInner_LE_StripNbr(couple[i].Y());
double XE = m_PreTreatedData->GetInner_XE_Energy(couple[i].X());
double YE = m_PreTreatedData->GetInner_YE_Energy(couple[i].Y());
double TE = m_PreTreatedData->GetInner_TE_Energy(couple[i].X());
double LE = m_PreTreatedData->GetInner_LE_Energy(couple[i].Y());
DetectorNumber.push_back(N);
StripX.push_back(X);
StripY.push_back(Y);
DE.push_back(XE);
DE.push_back(TE);
PosX.push_back(GetPositionOfInteraction(i).x());
PosY.push_back(GetPositionOfInteraction(i).y());
PosZ.push_back(GetPositionOfInteraction(i).z());
int OuterMult = m_PreTreatedData->GetOuterMultXEnergy();
int OuterMult = m_PreTreatedData->GetOuterMultTEnergy();
for(unsigned int j=0; j<OuterMult; j++){
if(m_PreTreatedData->GetOuter_XE_DetectorNbr(j)==N){
double XDE = m_PreTreatedData->GetOuter_XE_Energy(j);
double YDE = m_PreTreatedData->GetOuter_YE_Energy(j);
if(m_PreTreatedData->GetOuter_TE_DetectorNbr(j)==N){
double XDE = m_PreTreatedData->GetOuter_TE_Energy(j);
double YDE = m_PreTreatedData->GetOuter_LE_Energy(j);
E.push_back(XDE);
}
......@@ -216,31 +216,31 @@ void TStrassePhysics::BuildPhysicalEvent() {
vector<TVector2> TStrassePhysics::Match_X_Y(){
vector<TVector2> ArrayOfGoodCouple;
static unsigned int m_XEMult, m_YEMult;
m_XEMult = m_PreTreatedData->GetInnerMultXEnergy();
m_YEMult = m_PreTreatedData->GetInnerMultYEnergy();
static unsigned int m_TEMult, m_LEMult;
m_TEMult = m_PreTreatedData->GetInnerMultTEnergy();
m_LEMult = m_PreTreatedData->GetInnerMultLEnergy();
if(m_XEMult>m_MaximumStripMultiplicityAllowed || m_YEMult>m_MaximumStripMultiplicityAllowed){
if(m_TEMult>m_MaximumStripMultiplicityAllowed || m_LEMult>m_MaximumStripMultiplicityAllowed){
return ArrayOfGoodCouple;
}
for(unsigned int i=0; i<m_XEMult; i++){
for(unsigned int j=0; j<m_YEMult; j++){
for(unsigned int i=0; i<m_TEMult; i++){
for(unsigned int j=0; j<m_LEMult; j++){
// Declaration of variable for clarity
int XDetNbr = m_PreTreatedData->GetInner_XE_DetectorNbr(i);
int YDetNbr = m_PreTreatedData->GetInner_YE_DetectorNbr(j);
int XDetNbr = m_PreTreatedData->GetInner_TE_DetectorNbr(i);
int YDetNbr = m_PreTreatedData->GetInner_LE_DetectorNbr(j);
// if same detector check energy
if(XDetNbr == YDetNbr){
// Declaration of variable for clarity
double XE = m_PreTreatedData->GetInner_XE_Energy(i);
double YE = m_PreTreatedData->GetInner_YE_Energy(i);
double XStripNbr = m_PreTreatedData->GetInner_XE_StripNbr(i);
double YStripNbr = m_PreTreatedData->GetInner_YE_StripNbr(i);
double TE = m_PreTreatedData->GetInner_TE_Energy(i);
double LE = m_PreTreatedData->GetInner_LE_Energy(i);
double XStripNbr = m_PreTreatedData->GetInner_TE_StripNbr(i);
double YStripNbr = m_PreTreatedData->GetInner_LE_StripNbr(i);
// look if energy matches
if(abs(XE-YE)/2.<m_StripEnergyMatching){
if(abs(TE-LE)/2.<m_StripEnergyMatching){
ArrayOfGoodCouple.push_back(TVector2(i,j));
}
}
......@@ -253,7 +253,7 @@ vector<TVector2> TStrassePhysics::Match_X_Y(){
///////////////////////////////////////////////////////////////////////////
int TStrassePhysics::CheckEvent(){
// Check the size of the different elements
if(m_PreTreatedData->GetInnerMultXEnergy() == m_PreTreatedData->GetInnerMultYEnergy() )
if(m_PreTreatedData->GetInnerMultTEnergy() == m_PreTreatedData->GetInnerMultLEnergy() )
return 1;
else
......@@ -274,46 +274,46 @@ void TStrassePhysics::PreTreat() {
//////
// First Stage Energy
unsigned int sizeFront = m_EventData->GetInnerMultXEnergy();
unsigned int sizeFront = m_EventData->GetInnerMultTEnergy();
for (UShort_t i = 0; i < sizeFront ; ++i) {
if (m_EventData->GetInner_XE_Energy(i) > m_E_RAW_Threshold) {
Double_t Energy = m_EventData->GetInner_XE_Energy(i);
//Double_t Energy = Cal->ApplyCalibration("Strasse/ENERGY"+NPL::itoa(m_EventData->GetInner_XE_DetectorNbr(i)),m_EventData->GetInner_XE_Energy(i));
if (m_EventData->GetInner_TE_Energy(i) > m_E_RAW_Threshold) {
Double_t Energy = m_EventData->GetInner_TE_Energy(i);
//Double_t Energy = Cal->ApplyCalibration("Strasse/ENERGY"+NPL::itoa(m_EventData->GetInner_TE_DetectorNbr(i)),m_EventData->GetInner_TE_Energy(i));
if (Energy > m_E_Threshold) {
m_PreTreatedData->SetInnerXE(m_EventData->GetInner_XE_DetectorNbr(i), m_EventData->GetInner_XE_StripNbr(i), Energy);
m_PreTreatedData->SetInnerTE(m_EventData->GetInner_TE_DetectorNbr(i), m_EventData->GetInner_TE_StripNbr(i), Energy);
}
}
}
unsigned int sizeBack = m_EventData->GetInnerMultXEnergy();
unsigned int sizeBack = m_EventData->GetInnerMultTEnergy();
for (UShort_t i = 0; i < sizeBack ; ++i) {
if (m_EventData->GetInner_YE_Energy(i) > m_E_RAW_Threshold) {
Double_t Energy = m_EventData->GetInner_YE_Energy(i);
//Double_t Energy = Cal->ApplyCalibration("Strasse/ENERGY"+NPL::itoa(m_EventData->GetInner_YE_DetectorNbr(i)),m_EventData->GetInner_YE_Energy(i));
if (m_EventData->GetInner_LE_Energy(i) > m_E_RAW_Threshold) {
Double_t Energy = m_EventData->GetInner_LE_Energy(i);
//Double_t Energy = Cal->ApplyCalibration("Strasse/ENERGY"+NPL::itoa(m_EventData->GetInner_LE_DetectorNbr(i)),m_EventData->GetInner_LE_Energy(i));
if (Energy > m_E_Threshold) {
m_PreTreatedData->SetInnerYE(m_EventData->GetInner_YE_DetectorNbr(i), m_EventData->GetInner_YE_StripNbr(i), Energy);
m_PreTreatedData->SetInnerLE(m_EventData->GetInner_LE_DetectorNbr(i), m_EventData->GetInner_LE_StripNbr(i), Energy);
}
}
}
//////
// Second Stage Energy
sizeFront = m_EventData->GetOuterMultXEnergy();
sizeFront = m_EventData->GetOuterMultTEnergy();
for (UShort_t i = 0; i < sizeFront ; ++i) {
if (m_EventData->GetOuter_XE_Energy(i) > m_E_RAW_Threshold) {
Double_t Energy = m_EventData->GetOuter_XE_Energy(i);
//Double_t Energy = Cal->ApplyCalibration("Strasse/ENERGY"+NPL::itoa(m_EventData->GetOuter_XE_DetectorNbr(i)),m_EventData->GetOuter_XE_Energy(i));
if (m_EventData->GetOuter_TE_Energy(i) > m_E_RAW_Threshold) {
Double_t Energy = m_EventData->GetOuter_TE_Energy(i);
//Double_t Energy = Cal->ApplyCalibration("Strasse/ENERGY"+NPL::itoa(m_EventData->GetOuter_TE_DetectorNbr(i)),m_EventData->GetOuter_TE_Energy(i));
if (Energy > m_E_Threshold) {
m_PreTreatedData->SetOuterXE(m_EventData->GetOuter_XE_DetectorNbr(i), m_EventData->GetOuter_XE_StripNbr(i), Energy);
m_PreTreatedData->SetOuterTE(m_EventData->GetOuter_TE_DetectorNbr(i), m_EventData->GetOuter_TE_StripNbr(i), Energy);
}
}
}
sizeBack = m_EventData->GetOuterMultXEnergy();
sizeBack = m_EventData->GetOuterMultTEnergy();
for (UShort_t i = 0; i < sizeBack ; ++i) {
if (m_EventData->GetOuter_YE_Energy(i) > m_E_RAW_Threshold) {
Double_t Energy = m_EventData->GetOuter_YE_Energy(i);
//Double_t Energy = Cal->ApplyCalibration("Strasse/ENERGY"+NPL::itoa(m_EventData->GetOuter_YE_DetectorNbr(i)),m_EventData->GetOuter_YE_Energy(i));
if (m_EventData->GetOuter_LE_Energy(i) > m_E_RAW_Threshold) {
Double_t Energy = m_EventData->GetOuter_LE_Energy(i);
//Double_t Energy = Cal->ApplyCalibration("Strasse/ENERGY"+NPL::itoa(m_EventData->GetOuter_LE_DetectorNbr(i)),m_EventData->GetOuter_LE_Energy(i));
if (Energy > m_E_Threshold) {
m_PreTreatedData->SetOuterYE(m_EventData->GetOuter_YE_DetectorNbr(i), m_EventData->GetOuter_YE_StripNbr(i), Energy);
m_PreTreatedData->SetOuterLE(m_EventData->GetOuter_LE_DetectorNbr(i), m_EventData->GetOuter_LE_StripNbr(i), Energy);
}
}
}
......
......@@ -104,12 +104,12 @@ void TStrasseSpectra::FillRawSpectra(TStrasseData* RawData) {
static string family;
// Energy
unsigned int sizeE = RawData->GetInnerMultXEnergy();
unsigned int sizeE = RawData->GetInnerMultTEnergy();
for (unsigned int i = 0; i < sizeE; i++) {
name = "Strasse"+NPL::itoa(RawData->GetInner_XE_DetectorNbr(i))+"_ENERGY_RAW";
name = "Strasse"+NPL::itoa(RawData->GetInner_TE_DetectorNbr(i))+"_ENERGY_RAW";
family = "Strasse/RAW";
FillSpectra(family,name,RawData->GetInner_XE_Energy(i));
FillSpectra(family,name,RawData->GetInner_TE_Energy(i));
}
}
......@@ -122,12 +122,12 @@ void TStrasseSpectra::FillPreTreatedSpectra(TStrasseData* PreTreatedData) {
static string family;
// Energy
unsigned int sizeE = PreTreatedData->GetInnerMultXEnergy();
unsigned int sizeE = PreTreatedData->GetInnerMultTEnergy();
for (unsigned int i = 0; i < sizeE; i++) {
name = "Strasse"+NPL::itoa(PreTreatedData->GetInner_XE_DetectorNbr(i))+"_ENERGY_CAL";
name = "Strasse"+NPL::itoa(PreTreatedData->GetInner_TE_DetectorNbr(i))+"_ENERGY_CAL";
family = "Strasse/CAL";
FillSpectra(family,name,PreTreatedData->GetInner_XE_Energy(i));
FillSpectra(family,name,PreTreatedData->GetInner_TE_Energy(i));
}
}
......
......@@ -86,8 +86,8 @@ namespace Strasse_NS{
double Inner_PCB_DownstreamWidth=2*mm;
double Inner_PCB_MidWidth=2*mm;
double Inner_PCB_Thickness=3*mm;
double Inner_Wafer_FrontStrips= 128;
double Inner_Wafer_BackStrips= 128;
double Inner_Wafer_TransverseStrips= 128;
double Inner_Wafer_LongitudinalStrips= 128;
////////////////////
// Outer Detector //
......@@ -109,8 +109,8 @@ namespace Strasse_NS{
double Outer_PCB_DownstreamWidth=2*mm;
double Outer_PCB_MidWidth=2*mm;
double Outer_PCB_Thickness=3*mm;
double Outer_Wafer_FrontStrips= 128;
double Outer_Wafer_BackStrips= 128;
double Outer_Wafer_TransverseStrips= 128;
double Outer_Wafer_LongitudinalStrips= 128;
}
......@@ -462,8 +462,8 @@ void Strasse::ReadConfiguration(NPL::InputParser parser){
"Inner_PCB_DownstreamWidth",
"Inner_PCB_MidWidth",
"Inner_PCB_Thickness",
"Inner_Wafer_FrontStrips",
"Inner_Wafer_BackStrips",
"Inner_Wafer_TransverseStrips",
"Inner_Wafer_LongitudinalStrips",
"Outer_Wafer_Length",
"Outer_Wafer_Width",
"Outer_Wafer_Thickness",
......@@ -478,8 +478,8 @@ void Strasse::ReadConfiguration(NPL::InputParser parser){
"Outer_PCB_DownstreamWidth",
"Outer_PCB_MidWidth",
"Outer_PCB_Thickness",
"Outer_Wafer_FrontStrips",
"Outer_Wafer_BackStrips"
"Outer_Wafer_TransverseStrips",
"Outer_Wafer_LongitudinalStrips"
};
if(blocks_info[0]->HasTokenList(info)){
......@@ -491,8 +491,8 @@ void Strasse::ReadConfiguration(NPL::InputParser parser){
Inner_Wafer_PADExternal = blocks_info[0]->GetDouble("Inner_Wafer_PADExternal","mm");
Inner_Wafer_PADInternal = blocks_info[0]->GetDouble("Inner_Wafer_PADInternal","mm");
Inner_Wafer_GuardRing = blocks_info[0]->GetDouble("Inner_Wafer_GuardRing","mm");
Inner_Wafer_FrontStrips = blocks_info[0]->GetInt("Inner_Wafer_FrontStrips");
Inner_Wafer_BackStrips = blocks_info[0]->GetInt("Inner_Wafer_BackStrips");
Inner_Wafer_TransverseStrips = blocks_info[0]->GetInt("Inner_Wafer_TransverseStrips");
Inner_Wafer_LongitudinalStrips = blocks_info[0]->GetInt("Inner_Wafer_LongitudinalStrips");
Inner_PCB_PortWidth = blocks_info[0]->GetDouble("Inner_PCB_PortWidth","mm");
Inner_PCB_StarboardWidth = blocks_info[0]->GetDouble("Inner_PCB_StarboardWidth","mm");
Inner_PCB_BevelAngle = blocks_info[0]->GetDouble("Inner_PCB_BevelAngle","mm");
......@@ -507,8 +507,8 @@ void Strasse::ReadConfiguration(NPL::InputParser parser){
Outer_Wafer_PADExternal = blocks_info[0]->GetDouble("Outer_Wafer_PADExternal","mm");
Outer_Wafer_PADInternal = blocks_info[0]->GetDouble("Outer_Wafer_PADInternal","mm");
Outer_Wafer_GuardRing = blocks_info[0]->GetDouble("Outer_Wafer_GuardRing","mm");
Outer_Wafer_FrontStrips = blocks_info[0]->GetInt("Outer_Wafer_FrontStrips");
Outer_Wafer_BackStrips = blocks_info[0]->GetInt("Outer_Wafer_BackStrips");
Outer_Wafer_TransverseStrips = blocks_info[0]->GetInt("Outer_Wafer_TransverseStrips");
Outer_Wafer_LongitudinalStrips = blocks_info[0]->GetInt("Outer_Wafer_LongitudinalStrips");
Outer_PCB_PortWidth = blocks_info[0]->GetDouble("Outer_PCB_PortWidth","mm");
Outer_PCB_StarboardWidth = blocks_info[0]->GetDouble("Outer_PCB_StarboardWidth","mm");
Outer_PCB_BevelAngle = blocks_info[0]->GetDouble("Outer_PCB_BevelAngle","deg");
......@@ -577,9 +577,9 @@ void Strasse::ReadConfiguration(NPL::InputParser parser){
// Construct detector and inialise sensitive part.
// Called After DetecorConstruction::AddDetector Method
void Strasse::ConstructDetector(G4LogicalVolume* world){
// Inner Barrel
for (unsigned short i = 0 ; i < m_Inner_R.size() ; i++) {
G4ThreeVector Det_pos = G4ThreeVector(0,m_Inner_R[i],m_Inner_Z[i]) ;
Det_pos.rotate(-m_Inner_Phi[i],G4ThreeVector(0,0,1));
G4RotationMatrix* Rot = new G4RotationMatrix(0*deg,0*deg,m_Inner_Phi[i]);
......@@ -587,12 +587,10 @@ void Strasse::ConstructDetector(G4LogicalVolume* world){
new G4PVPlacement(G4Transform3D(*Rot,Det_pos),
BuildInnerDetector(),
"Strasse",world,false,i+1);
}
// Outer Barrel
for (unsigned short i = 0 ; i < m_Outer_R.size() ; i++) {
G4ThreeVector Det_pos = G4ThreeVector(0,m_Outer_R[i],m_Outer_Z[i]) ;
Det_pos.rotate(-m_Outer_Phi[i],G4ThreeVector(0,0,1));
G4RotationMatrix* Rot = new G4RotationMatrix(0*deg,0*deg,m_Outer_Phi[i]);
......@@ -625,22 +623,23 @@ void Strasse::ReadSensitive(const G4Event* ){
// Inner barrel scorer
DSSDScorers::PS_Rectangle* InnerScorer1= (DSSDScorers::PS_Rectangle*) m_InnerScorer1->GetPrimitive(0);
unsigned int sizeFront = InnerScorer1->GetWidthMult();
for(unsigned int i = 0 ; i < sizeFront ; i++){
unsigned int size = InnerScorer1->GetWidthMult();
for(unsigned int i = 0 ; i < size; i++){
double Energy = RandGauss::shoot(InnerScorer1->GetEnergyWidth(i), ResoEnergy);
if(Energy>EnergyThreshold){
int DetNbr = InnerScorer1->GetDetectorWidth(i);
int StripFront = InnerScorer1->GetStripWidth(i);
m_Event->SetInnerXE(DetNbr, StripFront, Energy);
int StripTransverse = InnerScorer1->GetStripWidth(i);
m_Event->SetInnerTE(DetNbr, StripTransverse, Energy);
}
}
unsigned int sizeBack = InnerScorer1->GetLengthMult();
for(unsigned int i = 0 ; i < sizeBack ; i++){
size = InnerScorer1->GetLengthMult();
for(unsigned int i = 0 ; i < size ; i++){
double Energy = RandGauss::shoot(InnerScorer1->GetEnergyLength(i), ResoEnergy);
if(Energy>EnergyThreshold){
int DetNbr = InnerScorer1->GetDetectorLength(i);
int StripBack= InnerScorer1->GetStripLength(i);
m_Event->SetInnerYE(DetNbr, StripBack, Energy);
int Strip= InnerScorer1->GetStripLength(i);
m_Event->SetInnerLE(DetNbr, Strip, Energy);
}
}
InnerScorer1->clear();
......@@ -648,22 +647,22 @@ void Strasse::ReadSensitive(const G4Event* ){
// second silicon
DSSDScorers::PS_Rectangle* InnerScorer2= (DSSDScorers::PS_Rectangle*) m_InnerScorer2->GetPrimitive(0);
sizeFront = InnerScorer2->GetWidthMult();
for(unsigned int i = 0 ; i < sizeFront ; i++){
size = InnerScorer2->GetWidthMult();
for(unsigned int i = 0 ; i < size; i++){
double Energy = RandGauss::shoot(InnerScorer2->GetEnergyWidth(i), ResoEnergy);
if(Energy>EnergyThreshold){
int DetNbr = InnerScorer2->GetDetectorWidth(i);
int StripFront = InnerScorer2->GetStripWidth(i)+Inner_Wafer_FrontStrips;
m_Event->SetInnerXE(DetNbr, StripFront, Energy);
int StripTransverse = InnerScorer2->GetStripWidth(i)+Inner_Wafer_TransverseStrips;
m_Event->SetInnerTE(DetNbr, StripTransverse, Energy);
}
}
sizeBack = InnerScorer2->GetLengthMult();
for(unsigned int i = 0 ; i < sizeBack ; i++){
size = InnerScorer2->GetLengthMult();
for(unsigned int i = 0 ; i < size ; i++){
double Energy = RandGauss::shoot(InnerScorer2->GetEnergyLength(i), ResoEnergy);
if(Energy>EnergyThreshold){
int DetNbr = InnerScorer2->GetDetectorLength(i);
int StripBack= InnerScorer2->GetStripLength(i);
m_Event->SetInnerYE(DetNbr, StripBack, Energy);
int Strip= InnerScorer2->GetStripLength(i);
m_Event->SetInnerLE(DetNbr, Strip, Energy);
}
}
InnerScorer2->clear();
......@@ -674,22 +673,22 @@ void Strasse::ReadSensitive(const G4Event* ){
// Outer barrel scorer
DSSDScorers::PS_Rectangle* OuterScorer1= (DSSDScorers::PS_Rectangle*) m_OuterScorer1->GetPrimitive(0);
sizeFront = OuterScorer1->GetWidthMult();
for(unsigned int i = 0 ; i < sizeFront ; i++){
size = OuterScorer1->GetWidthMult();
for(unsigned int i = 0 ; i < size; i++){
double Energy = RandGauss::shoot(OuterScorer1->GetEnergyWidth(i), ResoEnergy);
if(Energy>EnergyThreshold){
int DetNbr = OuterScorer1->GetDetectorWidth(i);
int StripFront = OuterScorer1->GetStripWidth(i);
m_Event->SetOuterXE(DetNbr, StripFront, Energy);
int StripTransverse = OuterScorer1->GetStripWidth(i);
m_Event->SetOuterTE(DetNbr, StripTransverse, Energy);
}
}
sizeBack = OuterScorer1->GetLengthMult();
for(unsigned int i = 0 ; i < sizeBack ; i++){
size = OuterScorer1->GetLengthMult();
for(unsigned int i = 0 ; i < size ; i++){
double Energy = RandGauss::shoot(OuterScorer1->GetEnergyLength(i), ResoEnergy);