14 vector<Int_t>& outCodes,
18 Int_t decaysWritten = 0;
25 vector<Int_t> outHitsCnt;
26 outHitsCnt.resize(outCodes.size(), 0);
32 auto it = find(outCodes.begin(), outCodes.end(), offspringTrack->
GetPdgCode());
33 if (it == outCodes.end())
35 Int_t iOffspring = it - outCodes.begin();
43 if (point->GetTrackID() != jTrack)
48 if (
TESTBIT(stations, iStation))
50 SETBIT(stations, iStation);
51 outHitsCnt[iOffspring]++;
57 if (point->GetTrackID() != jTrack)
62 if (
TESTBIT(stations, iStation))
64 SETBIT(stations, iStation);
65 outHitsCnt[iOffspring]++;
77 for (
size_t iOffspring = 0; iOffspring < outCodes.size(); iOffspring++) {
79 if (outHitsCnt[iOffspring] < minHits) {
89 return (decaysWritten == 1);
116 struct dirent** namelist;
117 const regex re(
".+.r12");
119 n = scandir(dir, &namelist, 0, alphasort);
126 if (regex_match(namelist[
i]->d_name, re)) {
127 vec.push_back(dir + _curFile);
140 vector<vector<vector<TH2*>>>& hitVec)
152 driftCenterShift = 0.15;
154 driftCenterShift = 0.75;
157 Int_t iLayerOwned = -1;
158 for (
size_t iLay = 0; iLay < mod->
GetStripLayers().size(); iLay++) {
165 if (iLayerOwned == -1)
167 Int_t iZone = iLayerOwned / 2;
187 vector<vector<vector<TH2*>>>& hitVec)
198 Int_t iLayerOwned = -1;
202 driftCenterShift = 0.15;
204 driftCenterShift = 0.75;
207 for (
size_t iLay = 0; iLay < mod->
GetStripLayers().size(); iLay++) {
222 if (iLayerOwned == -1)
224 Int_t iZone = iLayerOwned / 2;
226 BmnHit* hitClosest =
nullptr;
236 if (
dist < MinDistance) {
241 if (MinDistance < thr) {
263 const Int_t nIters = 20;
269 for (
Int_t i = 0;
i < nIters - 1;
i++) {
273 cutg->
SetPoint(
i, x + projX * ct - projY * st, y + projX * st + projY * ct);
278 cutg->
SetPoint(nIters - 1, firstX, firstY);
289 Int_t ClusterSizeThr,
294 if (treeDST && gemHits ) {
296 if (gemHits->
GetClass() == BmnGemStripHit::Class()) {
313 if (gemHits->
GetClass() == BmnSiliconHit::Class()) {
330 if (gemHits->
GetClass() == BmnCSCHit::Class()) {
363 printf(
"Min = %f max = %f\n", minVal, maxVal);
365 TH1F* hSig =
new TH1F(name, name, nBins, minVal, maxVal);
367 if (treeDST && gemHits ) {
369 if (gemHits->
GetClass() == BmnGemStripHit::Class()) {
413 if (gemHits->
GetClass() == BmnSiliconHit::Class()) {
427 if (gemHits->
GetClass() == BmnCSCHit::Class()) {
453 name =
Form(
"hIntSig_%s_%d", arMC->
GetName(), rand());
456 maxVal + 0.5 * (maxVal - minVal) / (
Double_t)nBins);
478 hIntSig.
Scale(1 / bc);
489 hIntSig.GetXaxis()->FindBin(x[0]);
491 iBin + ((x[0] > hIntSig.GetBinCenter(iBin)) ? 1 : -1);
492 Double_t v = hIntSig.GetBinContent(iBin)
493 + (hIntSig.GetBinContent(jBin) - hIntSig.GetBinContent(iBin)) * 2
494 * abs(x[0] - hIntSig.GetBinCenter(iBin))
495 / (hIntSig.GetBinWidth(iBin) + hIntSig.GetBinWidth(jBin));
513 TF1* funcRescale =
new TF1(
vector< Double_t > dist(vector< Double_t > qp, Double_t mu)
char * Form(const char *fmt,...)
Double_t GetStripTotalSignalInLowerLayer()
Strip layer characteristics of the hit (total signal, cluster size, strip position as the cluster mea...
Int_t GetClusterSizeInLowerLayer()
Int_t GetClusterSizeInLowerLayer()
Double_t GetStripTotalSignalInLowerLayer()
Strip layer characteristics of the hit (total signal, cluster size, strip position as the cluster mea...
Bool_t IsPointInsideStripLayer(Double_t x, Double_t y)
BmnGemStripLayer & GetStripLayer(Int_t num)
ElectronDriftDirectionInModule GetElectronDriftDirection()
vector< BmnGemStripLayer > & GetStripLayers()
BmnGemStripStation * GetStation(Int_t station_num)
BmnGemStripModule * GetModule(Int_t module_num)
Short_t GetStation() const
Double_t GetStripTotalSignalInLowerLayer()
Strip layer characteristics of the hit (total signal, cluster size, strip position as the cluster mea...
Int_t GetClusterSizeInLowerLayer()
Class BmnStripDigit Base class for strip detector digits.
Double_t GetStripSignal()
Int_t GetMotherId() const
Int_t GetPdgCode() const
Accessors.
Double_t GetY(Double_t z) const
Double_t GetX(Double_t z) const
Point coordinates at given z from linear extrapolation.
virtual void SetLineColor(Color_t lcolor)
TClass * GetClass() const
const char * GetName() const override
virtual Double_t GetXmax() const
virtual void SetNpx(Int_t npx=100)
virtual Double_t GetX(Double_t y, Double_t xmin=0, Double_t xmax=0, Double_t epsilon=1.E-10, Int_t maxiter=100, Bool_t logx=false) const
virtual Double_t Eval(Double_t x, Double_t y=0, Double_t z=0, Double_t t=0) const
virtual Double_t GetXmin() const
virtual void SetPoint(Int_t i, Double_t x, Double_t y)
virtual Int_t GetPoint(Int_t i, Double_t &x, Double_t &y) const
virtual Int_t Fill(const char *name, Double_t w)
virtual void SetBinContent(Int_t bin, Double_t content)
virtual Double_t GetBinContent(Int_t bin) const
virtual void Scale(Double_t c1=1, Option_t *option="")
Int_t GetEntriesFast() const
TObject * At(Int_t idx) const override
TObject * UncheckedAt(Int_t i) const
virtual Int_t GetEntry(Long64_t entry, Int_t getall=0)
virtual Long64_t GetEntries() const
*brief user defined string literal for JSON values *sa std::size_t n