11 #include "FairLogger.h"
12 #include "FairRootManager.h"
14 #include "TClonesArray.h"
25 : FairTask(
"CbmMuchHitProducerIdeal")
27 , fMuchPixelHits(NULL)
32 , fDigiFile(digiFileName)
38 FairRootManager* ioman = FairRootManager::Instance();
39 fMuchPoints =
static_cast<TClonesArray*
>(ioman->GetObject(
"MuchPoint"));
41 ioman->Register(
"MuchPixelHit",
44 IsOutputBranchPersistent(
"MuchPixelHit"));
48 TFile* oldfile = gFile;
50 TObjArray* stations = (TObjArray*) file->Get(
"stations");
59 static Int_t eventNo = 0;
62 Int_t nofMuchPoints =
fMuchPoints->GetEntriesFast();
63 for (Int_t iPoint = 0; iPoint < nofMuchPoints; iPoint++) {
68 Double_t dX = gRandom->Gaus(0,
fSigmaX);
69 Double_t dY = gRandom->Gaus(0,
fSigmaY);
70 Double_t dZ = gRandom->Gaus(0,
fSigmaZ);
80 Int_t address = point->GetDetectorID();
83 new ((*fMuchPixelHits)[iHit++])
87 LOG(info) <<
"CbmMuchHitProducerIdeal::Exec: eventNo=" << eventNo