Draft: TRD hitfinder improvements.
The current state of my version of the TRD 1D and 2D hitfinders, for viewing by @a.bercuci and @p.kaehler.
This is still a work in progress, but as of now it is able to process one of the high-multiplicity problem-timeslices with around 15 million TRD digis in around 5 seconds.
Merge request reports
Activity
requested review from @a.bercuci
assigned to @d.smith
It is great job @d.smith ! On the other hand, the classes you just touched are the core of TRD detector. They need extensive testing on measurements and simulations before merging. This will take time and statistics. So I am afraid that the timeline for making this MR merge-able will not be very short.
@a.bercuci I don't really intend to merge this. These classes will eventually turn into the new ones in the online-software folder. I still have to de-ROOTify them to achieve this, amongst other things, so this will still take some time. The original classes will remain as they are. Maybe it is worthwhile to pick out some improvements from here and transfer them however.
As I said in our last discussion, I think we should aim from the start to have only ONE instance of the algo. This means that once we have a working version for the online we should replace all the algorithmic part also in the offline + monitoring and QA etc. I think it is mandatory to aim at running the same code in all instances where we do the same data processing ! Keep in touch
@a.bercuci There are two rather long functions that don't seem to be called anywhere.
The first is:
Int_t CbmTrdModuleRec2D::LoadDigis(vector<const CbmTrdDigi*>* digis, vector<CbmTrdDigi*>* vdgM, vector<Bool_t>* vmask, ULong64_t& t0, Int_t& cM)
There is another
LoadDigis
function with a shorter signature, which is used, but this one isn't.The other is:
Int_t CbmTrdModuleRec2D::LoadDigisRC(vector<const CbmTrdDigi*>* digis, const Int_t r0, const Int_t a0, /*vector<CbmTrdDigi*> *vdgM, */ ULong64_t& t0, Int_t& cM)
Are these still in use?
@a.bercuci
CbmTrdModuleRec2D::MergeDigis
is also called no where. Is it needed?- Resolved by Dominik Smith
195 Int_t CbmTrdModuleRec2D::FindClusters(bool clr) 143 std::vector<CbmTrdCluster> CbmTrdModuleRec2D::BuildClusters(bool clr) 196 144 { 197 int ncl0(0), ncl(0), mcl(0); 198 std::list<CbmTrdCluster*>::iterator itc0, itc1, itc; 145 std::vector<CbmTrdCluster> clustersOut; 146 199 147 for (auto& clRow : fBuffer) { 200 if (CWRITE(0)) cout << "\nrow=" << clRow.first << " ncl=" << clRow.second.size() << endl; 148 149 // TODO look left and right for masked channels. If they exists add them to cluster. 201 150 // Phase 0 : try merge clusters if more than one on a row 202 if (clRow.second.size() > 1) { 203 itc0 = clRow.second.begin(); 204 // TODO look left and right for masked channels. If they exists add them to cluster. 205 // if (AddClusterEdges(*itc0) && CWRITE(0)) cout << " edge cl[0] : " << (*itc0)->ToString(); - Comment on lines -204 to -205
@a.bercuci What is the situation with this commented-out line? The function
AddClusterEdges()
is not used anywhere else and can be dropped if the line is not needed.The purpose seems to be to by default treat noisy / masked channels as if they contained a valid part of the cluster. This seems risky.
- Resolved by Dominik Smith
276 220 Bool_t CbmTrdModuleRec2D::CheckConvolution(CbmTrdHit* /*h*/) const { return kFALSE; } 277 221 278 222 //_______________________________________________________________________________ 279 223 Bool_t CbmTrdModuleRec2D::Deconvolute(CbmTrdHit* /*h*/) { return kFALSE; } - Comment on lines 255 to 279
@a.bercuci The PreProcessHits() function does nothing except call CheckConvolution() and Deconvolute(), which are both empty. Is this an instance of ongoing developments, which can be removed for the time being?