det(must): Add first version of the MUST detector
First version of the MUST detector. Includes simulation and simplified digitization and hit finding.
Merge request reports
Activity
@bartosz.sobol: To be synchronized with !2007 to spread the changes in one or the other MR and avoid conflicts/regressions
There are no apparent conflicts/overlaps with !2007 except CbmMustDigi. My MR will probably land first as it's needed for the beamtime (I plan to finalize the parameters and code as much as possible before Monday), so I guess after that, we can discuss and agree on the final form of the Digi class?
Edited by Bartosz Sobol
- Resolved by David Emschermann
@r.karabowicz Hi Radek, how did you include the PASTA v24a geometry into MUST? Does part of the geometry have to be renamed?
Edited by David Emschermann
- core/data/must/CbmMustDigi.h 0 → 100644
Hi @r.karabowicz,
Please use the CbmStsDigi or CbmTofDigi as a reference. The important points here:
- no inheritance from TObject
- no ROOT types (use the C++ default types instead)
- replace the fDetectorId with the address (see my comments on the !2007)
changed this file in version 3 of the diff
Dear @s.zharko , thank you for all your comments. I will push some fixes later today, but due to the size of the PR, it will take some time.
- core/data/must/CbmMustHit.h 0 → 100644
112 /** This variable contains the radial distance to the wire **/ 113 Double_t fIsochrone{0.}; 114 ; 115 /** This variable contains the error on the radial distance to the wire **/ 116 Double_t fIsochroneError{0.}; 117 118 /** time pulse **/ 119 Double_t fPulse{0.}; 120 121 /** deposit charge (arbitrary units) **/ 122 Double_t fDepCharge{0.}; 123 124 /** tube id **/ 125 Int_t fDetSysId{0}; // CHECK added 126 Int_t fDetectorId{0}; 127 Int_t fSkewed{0}; - Comment on lines +110 to +127
- core/data/must/CbmMustHit.h 0 → 100644
112 /** This variable contains the radial distance to the wire **/ 113 Double_t fIsochrone{0.}; 114 ; 115 /** This variable contains the error on the radial distance to the wire **/ 116 Double_t fIsochroneError{0.}; 117 118 /** time pulse **/ 119 Double_t fPulse{0.}; 120 121 /** deposit charge (arbitrary units) **/ 122 Double_t fDepCharge{0.}; 123 124 /** tube id **/ 125 Int_t fDetSysId{0}; // CHECK added 126 Int_t fDetectorId{0}; 127 Int_t fSkewed{0}; - core/data/must/CbmMustPoint.h 0 → 100644
95 protected: 96 // exit coordinates in straw frame 97 Double_t fX_out_local, fY_out_local, fZ_out_local; 98 // entry coordinates in straw frame 99 Double_t fX_in_local, fY_in_local, fZ_in_local; 100 101 Double_t fPx_out, fPy_out, fPz_out; 102 Double_t fPx_in, fPy_in, fPz_in; 103 // wire direction 104 // Double_t fX_wire_dir, fY_wire_dir, fZ_wire_dir; 105 106 // particle mass 107 Double_t fMass; 108 Int_t fLayerID; 109 Int_t fModuleID; 110 Int_t fStrawID; - core/data/must/CbmMustPoint.h 0 → 100644
92 /** Output to screen **/ 93 virtual void Print(const Option_t* opt) const; 94 95 protected: 96 // exit coordinates in straw frame 97 Double_t fX_out_local, fY_out_local, fZ_out_local; 98 // entry coordinates in straw frame 99 Double_t fX_in_local, fY_in_local, fZ_in_local; 100 101 Double_t fPx_out, fPy_out, fPz_out; 102 Double_t fPx_in, fPy_in, fPz_in; 103 // wire direction 104 // Double_t fX_wire_dir, fY_wire_dir, fZ_wire_dir; 105 106 // particle mass 107 Double_t fMass; - reco/detectors/must/CbmMustFindHits.cxx 0 → 100644
38 CbmMustFindHits::CbmMustFindHits() : FairTask("MustFindHits", 1) {} 39 40 // ----- Destructor ---------------------------------------------------- 41 CbmMustFindHits::~CbmMustFindHits() {} 42 // ------------------------------------------------------------------------- 43 44 // ----- Task execution ------------------------------------------------ 45 void CbmMustFindHits::Exec(Option_t* /*opt*/) 46 { 47 assert(fDigiArray); 48 fHitArray->Delete(); 49 50 // LOG(info) << "got " << fDigiArray->GetEntriesFast() << " points"; 51 for (Int_t iDigi = 0; iDigi < fDigiArray->GetEntriesFast(); iDigi++) { 52 const CbmMustDigi* digi = (const CbmMustDigi*) fDigiArray->At(iDigi); 53 if (!digi) LOG(info) << "no digi"; - reco/detectors/must/CbmMustFindHits.cxx 0 → 100644
37 // ------------------------------------------------------------------------- 38 CbmMustFindHits::CbmMustFindHits() : FairTask("MustFindHits", 1) {} 39 40 // ----- Destructor ---------------------------------------------------- 41 CbmMustFindHits::~CbmMustFindHits() {} 42 // ------------------------------------------------------------------------- 43 44 // ----- Task execution ------------------------------------------------ 45 void CbmMustFindHits::Exec(Option_t* /*opt*/) 46 { 47 assert(fDigiArray); 48 fHitArray->Delete(); 49 50 // LOG(info) << "got " << fDigiArray->GetEntriesFast() << " points"; 51 for (Int_t iDigi = 0; iDigi < fDigiArray->GetEntriesFast(); iDigi++) { 52 const CbmMustDigi* digi = (const CbmMustDigi*) fDigiArray->At(iDigi); Please, use a C++-style casting formats. Here you know, that fDigiArray contains exactly a CbmMustDigi object, so you could just use a static_cast:
const auto* digi = static_cast<const CbmMustDigi*>(fDigiArray->At(iDigi));
A remark to my comment below: in such case you would not need a check for the nullptr anymore
Edited by Sergei Zharko
- reco/detectors/must/CbmMustFindHits.cxx 0 → 100644
74 75 // ----- Initialisation ----------------------------------------------- 76 InitStatus CbmMustFindHits::Init() 77 { 78 FairRootManager* ioman = FairRootManager::Instance(); 79 if (!ioman) { 80 std::cout << "-E- CbmMustFindHits::Init: " /// todo replace with logger! 81 << "RootManager not instantiated!" << std::endl; 82 return kFATAL; 83 } 84 85 fDigiArray = static_cast<TClonesArray*>(ioman->GetObject("MUSTDigi")); 86 if (!fDigiArray) { 87 std::cout << "-W- CbmMustFindHits::Init: " 88 << "No Digi array!" << std::endl; 89 return kERROR; @r.karabowicz, the MR request looks impressive. To integrate it into the CbmRoot you should consider the data formats, used for other detectors. I would suggest taking a look at the corresponding classes for STS (CbmStsPoint, CbmStsDigi, CbmStsHit) and for TRD (CbmTrdPoint, CbmTrdDigi, CbmTrdHit).
Also, if MUST is supposed to be a part of tracking, please provide a tracking interface class (CbmMustTrackingInterface) and add it here: https://git.cbm.gsi.de/computing/cbmroot/-/blob/master/reco/L1/CbmTrackingDetectorInterfaceInit.h?ref_type=heads. The reference classes are CbmStsTrackingInterface, CbmTofTrackingInterface and CbmTrdTrackingInteface
Edited by Sergei ZharkoDear @f.uhlig, @v.friese, @p.-a.loizeau,
you have been identified as code owner of at least one file which was changed with this merge request.
Please check the changes and approve them or request changes.
added CodeOwners label
mentioned in merge request !2040
I have decided to break this MR into smaller chunks. The simulation part is under !2040 I have implemented the requested changes.