Skip to content

Commit

Permalink
Merge pull request #996 from jsmallcombe/master
Browse files Browse the repository at this point in the history
BGO saving and S3 mnemonic
  • Loading branch information
VinzenzBildstein authored Mar 14, 2018
2 parents d9ff603 + e7c0b56 commit 73ea9fa
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
4 changes: 3 additions & 1 deletion include/TS3.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,15 @@ class TS3 : public TGRSIDetector {

bool PixelsSet() const { return TestBitNumber(ES3Bits::kPixelsSet); }
void SetPixels(bool flag = true) { SetBitNumber(ES3Bits::kPixelsSet, flag); }
void BuildPixels();
void BuildPixels();

static TVector3 GetPosition(int ring, int sector, bool smear = false);
static TVector3 GetPosition(int ring, int sector, double offsetphi, double offsetZ, bool sectorsdownstream,
bool smear = false);

void SetTargetDistance(double dist) { fTargetDistance = dist; }

void ResetRingsSectors();

void ClearTransients() override
{
Expand Down
2 changes: 2 additions & 0 deletions include/TS3Hit.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ class TS3Hit : public TGRSIDetectorHit {

void SetRingNumber(TFragment& frag) { fRing = frag.GetSegment(); }
void SetSectorNumber(TFragment& frag) { fSector = frag.GetSegment(); }
void SetRingNumber() { fRing = GetSegment(); }
void SetSectorNumber() { fSector = GetSegment(); }
void SetSectorNumber(int n) { fSector = n; }
void SetRingNumber(int n) { fRing = n; }

Expand Down
11 changes: 11 additions & 0 deletions libraries/TGRSIAnalysis/TS3/TS3.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,17 @@ TVector3 TS3::GetPosition(int ring, int sector, double offsetphi, double offsetZ
return TVector3(cos(phi) * radius, sin(phi) * radius, offsetZ);
}

void TS3::ResetRingsSectors(){
// This is necessary if you want mnemonics in a cal file to override those used during frag sort.
for(size_t i = 0; i < fS3SectorHits.size(); ++i) {
fS3SectorHits.at(i).SetSectorNumber();
}
for(size_t i = 0; i < fS3RingHits.size(); ++i) {
fS3RingHits.at(i).SetRingNumber();
}
}


TGRSIDetectorHit* TS3::GetHit(const int& idx)
{
return GetS3Hit(idx);
Expand Down
1 change: 1 addition & 0 deletions libraries/TGRSIAnalysis/TTigress/TTigress.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ void TTigress::Copy(TObject& rhs) const
static_cast<TTigress&>(rhs).fTigressHits = fTigressHits;
static_cast<TTigress&>(rhs).fAddbackHits = fAddbackHits;
static_cast<TTigress&>(rhs).fAddbackFrags = fAddbackFrags;
static_cast<TTigress&>(rhs).fBgos = fBgos;
static_cast<TTigress&>(rhs).fTigressBits = 0;
}

Expand Down

0 comments on commit 73ea9fa

Please sign in to comment.