Skip to content

Commit 08c7d77

Browse files
committed
Process TRD,TOF fake flags in MC study workflow
1 parent 3b68b1c commit 08c7d77

File tree

1 file changed

+39
-2
lines changed

1 file changed

+39
-2
lines changed

Detectors/GlobalTrackingWorkflow/study/src/TrackMCStudy.cxx

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -570,11 +570,30 @@ void TrackMCStudy::process(const o2::globaltracking::RecoContainer& recoData)
570570
tref.flags |= RecTrack::FakeITS;
571571
}
572572
}
573-
if (msk[DetID::TPC] && trackFam.entITSTPC < 0) { // has both ITS and TPC contribution
574-
trackFam.entITSTPC = tcnt;
573+
if (msk[DetID::TPC]) {
574+
if (trackFam.entITSTPC < 0) { // has both ITS and TPC contribution
575+
trackFam.entITSTPC = tcnt;
576+
}
575577
if (recoData.getTrackMCLabel(gidSet[GTrackID::ITSTPC]).isFake()) {
576578
tref.flags |= RecTrack::FakeITSTPC;
577579
}
580+
581+
if (msk[DetID::TRD]) {
582+
if (recoData.getTrackMCLabel(gidSet[GTrackID::ITSTPCTRD]).isFake()) {
583+
tref.flags |= RecTrack::FakeTRD;
584+
}
585+
if (msk[DetID::TOF]) {
586+
if (recoData.getTrackMCLabel(gidSet[GTrackID::ITSTPCTRDTOF]).isFake()) {
587+
tref.flags |= RecTrack::FakeTOF;
588+
}
589+
}
590+
} else {
591+
if (msk[DetID::TOF]) {
592+
if (recoData.getTrackMCLabel(gidSet[GTrackID::ITSTPCTOF]).isFake()) {
593+
tref.flags |= RecTrack::FakeTOF;
594+
}
595+
}
596+
}
578597
}
579598
}
580599
if (msk[DetID::TPC]) {
@@ -592,6 +611,24 @@ void TrackMCStudy::process(const o2::globaltracking::RecoContainer& recoData)
592611
if (recoData.getTrackMCLabel(gidSet[GTrackID::TPC]).isFake()) {
593612
tref.flags |= RecTrack::FakeTPC;
594613
}
614+
if (!msk[DetID::ITS]) {
615+
if (msk[DetID::TRD]) {
616+
if (recoData.getTrackMCLabel(gidSet[GTrackID::TPCTRD]).isFake()) {
617+
tref.flags |= RecTrack::FakeTRD;
618+
}
619+
if (msk[DetID::TOF]) {
620+
if (recoData.getTrackMCLabel(gidSet[GTrackID::TPCTRDTOF]).isFake()) {
621+
tref.flags |= RecTrack::FakeTOF;
622+
}
623+
}
624+
} else {
625+
if (msk[DetID::TOF]) {
626+
if (recoData.getTrackMCLabel(gidSet[GTrackID::TPCTOF]).isFake()) {
627+
tref.flags |= RecTrack::FakeTOF;
628+
}
629+
}
630+
}
631+
}
595632
}
596633
float ts = 0, terr = 0;
597634
if (tref.gid.getSource() != GTrackID::ITS) {

0 commit comments

Comments
 (0)