diff --git a/slsDetectorSoftware/slsDetector/slsDetector.cpp b/slsDetectorSoftware/slsDetector/slsDetector.cpp index e8e769cfd..217913328 100644 --- a/slsDetectorSoftware/slsDetector/slsDetector.cpp +++ b/slsDetectorSoftware/slsDetector/slsDetector.cpp @@ -493,6 +493,8 @@ int slsDetector::initializeDetectorSize(detectorType type) { thisDetector->nChan[X]=128; thisDetector->nChan[Y]=1; thisDetector->nChips=10; + thisDetector->nChip[X]=10; + thisDetector->nChip[Y]=1; thisDetector->nDacs=6; thisDetector->nAdcs=0; thisDetector->nModMax[X]=24; @@ -508,6 +510,8 @@ int slsDetector::initializeDetectorSize(detectorType type) { thisDetector->nChan[X]=128; thisDetector->nChan[Y]=1; thisDetector->nChips=12; + thisDetector->nChip[X]=12; + thisDetector->nChip[Y]=1; thisDetector->nDacs=6; thisDetector->nAdcs=0; thisDetector->nModMax[X]=6; @@ -519,6 +523,8 @@ int slsDetector::initializeDetectorSize(detectorType type) { thisDetector->nChan[X]=128; thisDetector->nChan[Y]=1; thisDetector->nChips=10; + thisDetector->nChip[X]=10; + thisDetector->nChip[Y]=1; thisDetector->nDacs=8; thisDetector->nAdcs=5; thisDetector->nModMax[X]=1; @@ -530,6 +536,8 @@ int slsDetector::initializeDetectorSize(detectorType type) { thisDetector->nChan[X]=160; thisDetector->nChan[Y]=160; thisDetector->nChips=1; + thisDetector->nChip[X]=1; + thisDetector->nChip[Y]=1; thisDetector->nDacs=8; thisDetector->nAdcs=1; thisDetector->nModMax[X]=1; @@ -541,6 +549,8 @@ int slsDetector::initializeDetectorSize(detectorType type) { thisDetector->nChan[X]=0; thisDetector->nChan[Y]=0; thisDetector->nChips=0; + thisDetector->nChip[X]=0; + thisDetector->nChip[Y]=0; thisDetector->nDacs=0; thisDetector->nAdcs=0; thisDetector->nModMax[X]=0; diff --git a/slsDetectorSoftware/slsDetector/slsDetector.h b/slsDetectorSoftware/slsDetector/slsDetector.h index 8c99e1283..8a70194f2 100644 --- a/slsDetectorSoftware/slsDetector/slsDetector.h +++ b/slsDetectorSoftware/slsDetector/slsDetector.h @@ -120,6 +120,8 @@ class slsDetector : public slsDetectorUtils, public energyConversion { int nChan[2]; /** number of chips per module*/ int nChips; + /** number of chips per module in one direction */ + int nChip[2]; /** number of dacs per module*/ int nDacs; /** number of adcs per module */ @@ -572,6 +574,9 @@ class slsDetector : public slsDetectorUtils, public energyConversion { /** Returns the number of chips per module (without connecting to the detector) */ int getNChips(){return thisDetector->nChips;}; // + /** Returns the number of chips per module (without connecting to the detector) */ + int getNChips(dimension d){return thisDetector->nChip[d];}; // + /** Returns the number of modules (without connecting to the detector) */ int getNMods(){return thisDetector->nMods;}; // @@ -580,7 +585,7 @@ class slsDetector : public slsDetectorUtils, public energyConversion { int getChansPerMod(int imod=0){return thisDetector->nChans*thisDetector->nChips;}; - int getChansPerMod( dimension d,int imod=0){return thisDetector->nChan[d]*thisDetector->nChips;}; + int getChansPerMod( dimension d,int imod=0){return thisDetector->nChan[d]*thisDetector->nChip[d];}; /** Returns the max number of modules in direction d (without connecting to the detector) */ int getNMaxMod(dimension d){return thisDetector->nModMax[d];}; // @@ -591,11 +596,11 @@ class slsDetector : public slsDetectorUtils, public energyConversion { int getTotalNumberOfChannels(){return thisDetector->nChans*thisDetector->nChips*thisDetector->nMods;}; - int getTotalNumberOfChannels(dimension d){return thisDetector->nChan[d]*thisDetector->nChips*thisDetector->nMod[d];}; + int getTotalNumberOfChannels(dimension d){return thisDetector->nChan[d]*thisDetector->nChip[d]*thisDetector->nMod[d];}; int getMaxNumberOfChannels(){return thisDetector->nChans*thisDetector->nChips*thisDetector->nModsMax;}; - int getMaxNumberOfChannels(dimension d){return thisDetector->nChan[d]*thisDetector->nChips*thisDetector->nModMax[d];}; + int getMaxNumberOfChannels(dimension d){return thisDetector->nChan[d]*thisDetector->nChip[d]*thisDetector->nModMax[d];}; /** Returns number of rois */ int getNRoi(){return thisDetector->nROI;};