14 -22.5 * TMath::Pi() / 180.;
53 if(frag ==
nullptr || chan ==
nullptr) {
116 std::vector<double> EneR;
117 std::vector<double> EneS;
118 std::vector<bool> UsedRing;
119 std::vector<bool> UsedSector;
121 EneR.push_back(fS3RingHit.GetEnergy());
122 UsedRing.push_back(
false);
125 EneS.push_back(fS3SectorHit.GetEnergy());
126 UsedSector.push_back(
false);
152 UsedSector[j] =
true;
164 for(
auto&& i : UsedRing) {
170 for(
auto&& i : UsedSector) {
177 if(ringcount > 1 || sectorcount > 1) {
185 if(UsedSector.at(j)) {
191 if(UsedSector.at(k)) {
234 UsedSector[j] =
true;
235 UsedSector[k] =
true;
245 for(
auto&& i : UsedRing) {
251 for(
auto&& i : UsedSector) {
257 if(ringcount > 1 || sectorcount > 1) {
260 if(UsedSector.at(i)) {
269 for(
size_t k = j + 1; k <
fS3RingHits.size(); ++k) {
312 UsedSector[i] =
true;
332TVector3
TS3::GetPosition(
int ring,
int sector,
double offsetphi,
double offsetZ,
bool sectorsdownstream,
bool smear)
338 double radius = inner_radius + ring_width * (ring + 0.5);
339 double phi = phi_width * sector;
344 if(sectorsdownstream) {
353 double sep = ring_width * 0.025;
354 double r1 = radius - ring_width * 0.5 + sep;
355 double r2 = radius + ring_width * 0.5 - sep;
356 radius = sqrt(gRandom->Uniform(r1 * r1, r2 * r2));
357 double sepphi = sep / radius;
358 phi = gRandom->Uniform(phi - phi_width * 0.5 + sepphi, phi + phi_width * 0.5 - sepphi);
361 return {cos(phi) * radius, sin(phi) * radius, offsetZ};
368 hit.SetSectorNumber();
380 std::cerr <<
"S3 ring hits are out of range" << std::endl;
390 std::cerr <<
"S3 sector hits are out of range" << std::endl;
400 std::cerr <<
"S3 Pixel hits are out of range" << std::endl;
412 std::ostringstream str;
413 str << __PRETTY_FUNCTION__ <<
"\tnot yet written." << std::endl;
const TMnemonic * GetMnemonic() const
void Copy(TObject &) const override
!
void Clear(Option_t *="") override
!
static TAnalysisOptions * AnalysisOptions()
virtual EMnemonic CollectedCharge() const
void SetSectorNumber(Short_t sn)
void SetRingNumber(Short_t rn)
void SetWavefit(const TFragment &)
static bool SectorPreference()
!
static TTransientBits< UShort_t > fGlobalS3Bits
Global Bit.
static int fRingNumber
for geometery
Int_t GetPixelMultiplicity()
std::vector< TS3Hit > fS3PixelHits
! transient vector to hold the on-the-fly calculated pixel hits
std::vector< TS3Hit > fS3RingHits
vector to store hits of the ring side
static double fOffsetPhiSet
!
void Clear(Option_t *opt="all") override
!
Short_t GetRingMultiplicity() const
TS3Hit * GetRingHit(const int &i)
static bool KeepShared()
!
@ kMultHit
Attempt to reconstruct multi strip-hit events.
std::vector< TS3Hit > fS3SectorHits
vector to store hits of the sector side
static int fSectorNumber
!
static TVector3 GetPosition(int ring, int sector, bool smear=false)
TS3Hit * GetPixelHit(const int &i)
static bool SetMultiHit(bool set=true)
!
static double fInnerDiameter
!
static double fOffsetPhiCon
!
void AddFragment(const std::shared_ptr< const TFragment > &, TChannel *) override
!
void SetPixels(bool flag=true)
TTransientBits< UChar_t > fS3Bits
flags for transient members
static double fOuterDiameter
!
static double fFrontBackEnergy
!
static double fTargetDistance
!
TS3 & operator=(const TS3 &)
TS3Hit * GetSectorHit(const int &i)
static double fFrontBackOffset
!
Short_t GetSectorMultiplicity() const
void SetBitNumber(ES3Bits bit, Bool_t set=true)
void Copy(TObject &) const override
static Int_t fFrontBackTime
!
void Print(Option_t *opt="") const override
!
void SetBit(T bit, Bool_t flag)
Bool_t TestBit(T bit) const