Skip to content

Commit c4f3afa

Browse files
committed
the data is biased due to tracking code bias, so tracksegements get excluded. This is before the attempt to use non tracking code way of working
1 parent 16917f2 commit c4f3afa

6 files changed

Lines changed: 245 additions & 166 deletions

File tree

DataFormats/Reconstruction/src/TrackParametrizationWithError.cxx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,20 +50,24 @@ GPUd() bool TrackParametrizationWithError<value_T>::propagateTo(value_t xk, valu
5050
//----------------------------------------------------------------
5151
value_t dx = xk - this->getX();
5252
if (gpu::CAMath::Abs(dx) < constants::math::Almost0) {
53+
//LOGP(info,"gpu::CAMath::Abs({}) < constants::math::Almost0) ",dx);
5354
return true;
5455
}
5556
value_t crv = this->getCurvature(b);
5657
value_t x2r = crv * dx;
5758
value_t f1 = this->getSnp(), f2 = f1 + x2r;
5859
if ((gpu::CAMath::Abs(f1) > constants::math::Almost1) || (gpu::CAMath::Abs(f2) > constants::math::Almost1)) {
60+
//LOGP(info,"gpu::CAMath::Abs({}) > constants::math::Almost1) || (gpu::CAMath::Abs({}) > constants::math::Almost1))",f1,f2);
5961
return false;
6062
}
6163
value_t r1 = gpu::CAMath::Sqrt((1.f - f1) * (1.f + f1));
6264
if (gpu::CAMath::Abs(r1) < constants::math::Almost0) {
65+
//LOGP(info,"gpu::CAMath::Abs({}) < constants::math::Almost0)",r1);
6366
return false;
6467
}
6568
value_t r2 = gpu::CAMath::Sqrt((1.f - f2) * (1.f + f2));
6669
if (gpu::CAMath::Abs(r2) < constants::math::Almost0) {
70+
//LOGP(info,"gpu::CAMath::Abs({}) < constants::math::Almost0)",r2);
6771
return false;
6872
}
6973
double dy2dx = (f1 + f2) / (r1 + r2);
@@ -80,6 +84,7 @@ GPUd() bool TrackParametrizationWithError<value_T>::propagateTo(value_t xk, valu
8084
//
8185
auto arg = r1 * f2 - r2 * f1;
8286
if (gpu::CAMath::Abs(arg) > constants::math::Almost1) {
87+
// LOGP(info,"gpu::CAMath::Abs({}) > constants::math::Almost1) {}*{}-{}*{}",arg,r1,f2,r2,f1);
8388
return false;
8489
}
8590
value_t rot = gpu::CAMath::ASin(arg); // more economic version from Yura.
@@ -443,29 +448,34 @@ GPUd() bool TrackParametrizationWithError<value_T>::propagateTo(value_t xk, cons
443448

444449
value_t dx = xk - this->getX();
445450
if (gpu::CAMath::Abs(dx) < constants::math::Almost0) {
451+
// LOGP(info,"{} {} (gpu::CAMath::Abs({}) < constants::math::Almost0)",__LINE__,__func__,dx);
446452
return true;
447453
}
448454
// Do not propagate tracks outside the ALICE detector
449455
if (gpu::CAMath::Abs(dx) > 1e5 || gpu::CAMath::Abs(this->getY()) > 1e5 || gpu::CAMath::Abs(this->getZ()) > 1e5) {
450-
LOG(warning) << "Anomalous track, target X:" << xk;
456+
// LOG(warning) << "Anomalous track, target X:" << xk;
451457
// print();
452458
return false;
453459
}
454460
value_t crv = (gpu::CAMath::Abs(b[2]) < constants::math::Almost0) ? 0.f : this->getCurvature(b[2]);
455461
if (gpu::CAMath::Abs(crv) < constants::math::Almost0) {
462+
//LOGP(info,"{} {} (gpu::CAMath::Abs({}?v) < constants::math::Almost0) ",__LINE__,__func__,crv);
456463
return propagateTo(xk, 0.);
457464
}
458465
value_t x2r = crv * dx;
459466
value_t f1 = this->getSnp(), f2 = f1 + x2r;
460467
if ((gpu::CAMath::Abs(f1) > constants::math::Almost1) || (gpu::CAMath::Abs(f2) > constants::math::Almost1)) {
468+
//LOGP(info," {} {} ((gpu::CAMath::Abs({}) > constants::math::Almost1) || (gpu::CAMath::Abs({}) > constants::math::Almost1))",__LINE__,__func__,f1,f2);
461469
return false;
462470
}
463471
value_t r1 = gpu::CAMath::Sqrt((1.f - f1) * (1.f + f1));
464472
if (gpu::CAMath::Abs(r1) < constants::math::Almost0) {
473+
//LOGP(info,"{} {} (gpu::CAMath::Abs() < constants::math::Almost0)",__LINE__,__func__,r1);
465474
return false;
466475
}
467476
value_t r2 = gpu::CAMath::Sqrt((1.f - f2) * (1.f + f2));
468477
if (gpu::CAMath::Abs(r2) < constants::math::Almost0) {
478+
// LOGP(info,"{} {} (gpu::CAMath::Abs() < constants::math::Almost0)",__LINE__,__func__,r2);
469479
return false;
470480
}
471481

@@ -477,6 +487,7 @@ GPUd() bool TrackParametrizationWithError<value_T>::propagateTo(value_t xk, cons
477487
// get the track x,y,z,px/p,py/p,pz/p,p,sinAlpha,cosAlpha in the Global System
478488
std::array<value_t, 9> vecLab{0.f};
479489
if (!this->getPosDirGlo(vecLab)) {
490+
LOGP(info,"{} {} getPosDirGlo failed",__LINE__,__func__);
480491
return false;
481492
}
482493
//
@@ -576,6 +587,7 @@ GPUd() bool TrackParametrizationWithError<value_T>::propagateTo(value_t xk, cons
576587
value_t x = vecLab[0], y = vecLab[1], z = vecLab[2];
577588
if (gpu::CAMath::Abs(dx) > constants::math::Almost0) {
578589
if (gpu::CAMath::Abs(vecLab[3]) < constants::math::Almost0) {
590+
LOGP(info,"{} {} (gpu::CAMath::Abs(vecLab[3]) < constants::math::Almost0)",__LINE__,__func__,vecLab[3]);
579591
return false;
580592
}
581593
dx = xk - vecLab[0];

Detectors/TRD/qc/include/TRDQC/CoordinateTransformer.h

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ class TrackSegment
144144

145145
/// detector number
146146
int getDetector() const { return mStartPoint.getDetector(); }
147-
int getPadRow() const { return mStartPoint.getPadRow();}
147+
float getPadRow() const { return mStartPoint.getPadRowF();}
148148
int getPadCol() const { return mStartPoint.getPadCol();}
149149

150150
int getCollisionId() const { return mCollisionId;}
@@ -158,15 +158,47 @@ class TrackSegment
158158
void setStartPoint(const ChamberSpacePoint& startpoint) { mStartPoint=startpoint; }
159159
void setEndPoint(const ChamberSpacePoint& endpoint) {mEndPoint=endpoint; }
160160

161+
int getRefTPCId()const { return mRefTPCId;}
162+
int getRefITSId()const { return mRefITSId;}
163+
void setRefTPCId(int id) { mRefTPCId=id;}
164+
void setRefITSId(int id) { mRefITSId=id;}
165+
166+
float getPt(){return mPt;}
167+
float getSnp(){return mSnp;}
168+
float getPhi(){return mPhi;}
169+
float getAlpha(){return mAlpha;}
170+
float getStartX(){return mStartX;}
171+
float getStartY(){return mStartY;}
172+
float getStartZ(){return mStartZ;}
173+
void setPt(float pt){ mPt=pt;}
174+
void setSnp(float snp){ mSnp=snp;}
175+
void setPhi(float phi){ mPhi=phi;}
176+
void setAlpha(float alpha){ mAlpha=alpha;}
177+
void setStartX(float x){ mStartX=x;}
178+
void setStartY(float y){ mStartY=y;}
179+
void setStartZ(float z){ mStartZ=z;}
180+
161181
protected:
162182
ChamberSpacePoint mStartPoint, mEndPoint;
163183
std::array<ChamberSpacePoint,6> mDriftPoints, mAnodePoints; // [0] is the point of drift start and anode wires respectively
164184
int mTrackID;
185+
int mRefTPCId;
186+
int mRefITSId;
165187
int mCollisionId{0};
166188
float mTriggerTime{0.0};
167189
float mSagita; // this is findable from the TrackID
168190
int mDetector;
169191
int mDetector2; // for those instances where the track finishes a layer in a different detector to that which is starts in.
192+
float mPt{0.0};
193+
float mPhi{0.0};
194+
float mSnp{0.0};
195+
float mStartX{0.0};
196+
float mStartY{0.0};
197+
float mStartZ{0.0};
198+
float mAlpha{0.0};
199+
200+
201+
170202
};
171203

172204
// std::ostream& operator<<(std::ostream& os, const ChamberSpacePoint& p);

Detectors/TRD/qc/include/TRDQC/RawDataManager.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ class RawDataManager
136136
// void SetMatchWindowTPC(float min, float max)
137137
// { mMatchTimeMinTPC=min; mMatchTimeMaxTPC=max; }
138138

139-
bool nextTimeFrame();
139+
bool nextTimeFrame(bool onlydigits=false);
140140
bool nextEvent();
141141

142142
/// access time frame info
@@ -192,7 +192,7 @@ class RawDataManager
192192
o2::trd::TrackletTransformer mTransformer;
193193
bool propagateToLayerX(o2::dataformats::TrackTPCITS& track, float xToGo, float e, float maxStep);
194194
void prepareTracking();//std::array<int32_t,540*mMaxTriggers>& trdTrackletIndexArray);
195-
bool propagateTrack(o2::dataformats::TrackTPCITS& track, float e, float maxStep, float triggertime, int& glbTrkltIdxOffset, int collisionId);
195+
int propagateTrack(o2::dataformats::TrackTPCITS& track, float e, float maxStep, float triggertime, int& glbTrkltIdxOffset, int collisionId);
196196
int32_t getSector(float alpha);
197197
float getAlphaOfSector(const int32_t sec);
198198
int32_t getDetectorNumber(const float zPos, const float alpha, const int32_t layer);

Detectors/TRD/qc/include/TRDQC/RawDisplay.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,14 @@ class RawDisplay
6262
class MCMDisplay : public RawDisplay
6363
{
6464
public:
65-
MCMDisplay(RawDataSpan& mcmdata, int eventnum=-1, TVirtualPad* pad = nullptr);
65+
MCMDisplay(RawDataSpan& mcmdata, int eventnum=-1, int tf=-1, TVirtualPad* pad = nullptr);
6666
};
6767

6868
class PadRowDisplay : public RawDisplay
6969
{
7070

7171
public:
72-
PadRowDisplay(RawDataSpan& padrowdata, int eventnum=-1,TVirtualPad* pad = nullptr);
72+
PadRowDisplay(RawDataSpan& padrowdata, int eventnum=-1, int tf=-1, TVirtualPad* pad = nullptr);
7373

7474
private:
7575
int mPadRow;

0 commit comments

Comments
 (0)