39 FairRootManager* ioman = FairRootManager::Instance();
43 std::cout <<
" -E- PndMvdNoiseProducer::Init: RootManager not instantiated!" << std::endl;
63 fMCEventheader = (FairMCEventHeader*) ioman->GetObject(
"MCEventHeader.");
65 Warning(
"Init",
"Did not find the MC event header, assume 50ns of noise clockticks per call of Exec().");
75 std::cout <<
" -I- PndLmdNoiseProducer: Registered Sensors: "
81 std::cout <<
" -I- PndMvdNoiseProducer: Intialisation successfull" << std::endl;
114 if(
fVerbose>0) Info(
"Init()",
"ideal charge conversion for pixel part");
118 if(
fVerbose>0) Info(
"Init()",
"use TOT charge conversion for pixel part");
126 else Fatal (
"Init()",
"pixel part: charge conversion method not defined!");
136 for (
int i = 0;
i < sensorNames->GetEntries();
i++)
138 TString volpath = ((TObjString*)(sensorNames->At(
i)))->GetString();
140 if(!volpath.Contains(
"Lum"))
continue;
143 TString volname = volvec[volvec.size()-1].c_str();
144 if(
fVerbose>2)std::cout <<
"VolName: " << volname.Data();
145 if(volname.Contains(
"Active"))
149 if(volname.Contains(
"Pixel")) {
fPixelIds.push_back(
i);
if(
fVerbose>2)std::cout <<
" \tAdded to Pixel" << std::endl;}
158 FairRun* ana = FairRun::Instance();
159 FairRuntimeDb*
rtdb=ana->GetRuntimeDb();
167 if (
fGeoH == NULL ) {
221 chanmax = nrCh * nrFE;
223 std::cout <<
" found " << nrFE <<
" sensors " <<
" with in total " << chanmax <<
" pixels " << std::endl;
229 <<
" e " << xfrac*100 <<
" % pixels should have fired " << std::endl;
232 chanwhite = gRandom->Poisson(xfrac*cycles*chanmax);
234 if(
fVerbose>1) std::cout <<
" -I- PndLmdNoiseProducer: PIXEL <N> = " << xfrac*cycles*chanmax
235 <<
" leading to " << chanwhite <<
" noisy digis of " << chanmax
236 <<
" total channels" << std::endl;
237 for(Int_t
i = 0;
i < chanwhite;
i++)
241 rnd = gRandom->Integer(chanmax);
278 int ihalf, iplane, imodule, iside, idie, isensor;
279 if (fe < 0 || fe > 399) std::cout <<
"error! :" <<
fe <<
" does not match the total number of channels" << std::endl;
281 std::cout <<
"error! :" <<
fe <<
" " << did <<
" " <<
col <<
" " <<
row <<
" " << charge << std::endl;
292 std::cout <<
" -I- PndLmdNoiseProducer: Noise produced\t"
293 <<nNoisyStripRects <<
"xStripRect\t"
294 <<nNoisyStripTraps <<
"xStripTrap\t"
295 <<nNoisyPixels <<
"xPixels"<<std::endl;
306 timewindow = FairRootManager::Instance()->GetEventTime();
316 if(
fVerbose>10)
printf(
" -I- PndLmdNoiseProducer::CalcReadoutCycles(): %g cycles (%gMHz,%gns)\n",cycles,clock,timewindow);
328 std::vector<Int_t> indices;
329 indices.push_back(iPoint);
337 if(tempPixel->GetTimeStamp()<0){
339 tempPixel->SetTimeStamp(timeSt);
printf("RealTime=%f seconds, CpuTime=%f seconds\n", rtime, ctime)
PndSdsTotDigiPar * fTotDigiParPix
std::vector< std::string > GetStringVector(void)
Int_t GetChargeConvMethod() const
std::vector< Int_t > fPixelIds2
std::vector< Int_t > fStripRectSIds
virtual void SetParContainers()
void AddDigiPixel(Int_t &noisies, Int_t iPoint, Int_t sensorID, Int_t fe, Int_t col, Int_t row, Double_t charge)
Double_t GetCharge() const
virtual Double_t GetTimeStamp(Double_t tof, Double_t charge, Double_t MCEventTime)=0
absolute time stamp of a hit in ns (clock is taken into account)
Charge Digitization Parameter Class for SDS.
PndSdsDigiPixelWriteoutBuffer * fDigiPixelBuffer
Double_t GetFeBusClock() const
Double_t GetConstCurrent() const
Double_t GetNoise() const
Bool_t fTimeOrderedDigi
parameter to switch to time ordered simulation
Double_t GetClockFrequency() const
std::vector< Int_t > fStripRectLIds
void Get_sensor_by_id(const int sensor_id, int &ihalf, int &iplane, int &imodule, int &iside, int &idie, int &isensor)
TObjArray * GetSensorNames()
static PndGeoHandling * Instance()
virtual InitStatus Init()
virtual Double_t GetTimeStampErrorAfterCorrection()
PndSdsChargeConversion * fPixChargeConv
virtual Double_t ChargeToDigiValue(Double_t Charge)=0
Converts a given charge in electrons into the electronics answer e.g. ToT [ns].
PndSdsPixelDigiPar * fDigiParPix
Double_t GetChargingTime() const
std::vector< Int_t > fPixelIds
Double_t CalcReadoutCycles(Double_t clock)
static PndLmdDim & Get_instance()
std::vector< Int_t > fStripTrapIds
Data class to store the digi output of a pixel module.
virtual Double_t GetTimeWalk(Double_t)
FairMCEventHeader * fMCEventheader
Geometry name handling.
Double_t CalcDistFraction(Double_t spread, Double_t threshold)
Double_t GetThreshold() const
Digitization Parameter Class for SDS-Pixel part.