- Timestamp:
- 08/19/13 12:07:14 (11 years ago)
- Location:
- branches/Mars_MC
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Mars_MC/macros/rootlogon.C
r15269 r17011 190 190 dbg += " -std=c++0x "; 191 191 192 lib += " -lnova -lz"; 192 //lib += " -lnova -lz"; 193 lib +=" -lnova -L/cm/shared/apps/fact/libs/libnova-0.14.0/src/.libs -lz"; 193 194 194 195 gSystem->SetLinkedLibs(lib); -
branches/Mars_MC/mjobs/MJSimulation.cc
r15277 r17011 260 260 write.AddContainer("IncidentAngle", "Events", kFALSE); 261 261 } 262 263 void MJSimulation::SetupHeaderKeys(MWriteFitsFile &write) const 264 { 265 write.SetHeaderKey("TELESCOP", "FACT", ""); 266 write.SetHeaderKey("PACKAGE", "MARS Cheobs", ""); 267 write.SetHeaderKey("VERSION", "1.0", ""); 268 write.SetHeaderKey("CREATOR", "Ceres", ""); 269 write.SetHeaderKey("EXTREL", 1., ""); 270 write.SetHeaderKey("COMPILED", "1970-01-01T00:00:00", ""); 271 write.SetHeaderKey("REVISION", "0", ""); 272 write.SetHeaderKey("ORIGIN", "FACT", ""); 273 write.SetHeaderKey("DATE", "1970-01-01T00:00:00", ""); 274 write.SetHeaderKey("NIGHT", 19700101, ""); 275 write.SetHeaderKey("TIMESYS", "UTC", ""); 276 write.SetHeaderKey("TIMEUNIT", "d", ""); 277 write.SetHeaderKey("MJDREF", 40587, ""); 278 write.SetHeaderKey("BLDVER", 1, ""); 279 write.SetHeaderKey("RUNID", 1, ""); 280 write.SetHeaderKey("NBOARD", 40, ""); 281 write.SetHeaderKey("NPIX", 1440, ""); 282 write.SetHeaderKey("NROI", 150, ""); 283 write.SetHeaderKey("NROITM", 0, ""); 284 write.SetHeaderKey("TMSHIFT", 0, ""); 285 write.SetHeaderKey("CAMERA", "MGeomCamFACT", ""); 286 write.SetHeaderKey("DAQ", "DRS4", ""); 287 write.SetHeaderKey("ADCRANGE", 2000, "Dynamic range in mV"); 288 write.SetHeaderKey("ADC", 12, "Resolution in bits"); 289 write.SetHeaderKey("RUNTYPE", "data", ""); 290 write.SetHeaderKey("ID", 777, "Board 0: Board ID"); 291 write.SetHeaderKey("FMVER", 532, "Board 0: Firmware Version"); 292 write.SetHeaderKey("DNA", "0", ""); 293 write.SetHeaderKey("BOARD", 0, ""); 294 write.SetHeaderKey("PRESC", 40, ""); 295 write.SetHeaderKey("PHASE", 0, ""); 296 write.SetHeaderKey("DAC0", 26500, ""); 297 write.SetHeaderKey("DAC1", 0, ""); 298 write.SetHeaderKey("DAC2", 0, ""); 299 write.SetHeaderKey("DAC3", 0, ""); 300 write.SetHeaderKey("DAC4", 28800, ""); 301 write.SetHeaderKey("DAC5", 28800, ""); 302 write.SetHeaderKey("DAC6", 28800, ""); 303 write.SetHeaderKey("DAC7", 28800, ""); 304 write.SetHeaderKey("REFCLK", 2000.0768, ""); 305 write.SetHeaderKey("DRSCALIB", false, ""); 306 write.SetHeaderKey("TSTARTI", 0, ""); 307 write.SetHeaderKey("TSTARTF", 0., ""); 308 write.SetHeaderKey("TSTOPI", 0, ""); 309 write.SetHeaderKey("TSTOPF", 0., ""); 310 write.SetHeaderKey("DATE-OBS", "1970-01-01T00:00:00", ""); 311 write.SetHeaderKey("DATE-END", "1970-01-01T00:00:00", ""); 312 write.SetHeaderKey("NTRG", 0, ""); 313 write.SetHeaderKey("NTRGPED", 0, ""); 314 write.SetHeaderKey("NTRGLPE", 0, ""); 315 write.SetHeaderKey("NTRGTIM", 0, ""); 316 write.SetHeaderKey("NTRGLPI", 0, ""); 317 write.SetHeaderKey("NTRGEXT1", 0, ""); 318 write.SetHeaderKey("NTRGEXT2", 0, ""); 319 write.SetHeaderKey("NTRGMISC", 0, ""); 320 } 321 322 void MJSimulation::SetupVetoColumns(MWriteFitsFile &write) const 323 { 324 write.VetoColumn("MParameterD.fVal"); 325 write.VetoColumn("MRawEvtData.fLoGainPixId"); 326 write.VetoColumn("MRawEvtData.fLoGainFadcSamples"); 327 write.VetoColumn("MRawEvtData.fABFlags"); 328 write.VetoColumn("MRawEvtData.fIsSigned"); 329 write.VetoColumn("MRawEvtHeader.fNumTrigLvl2"); 330 write.VetoColumn("MRawEvtHeader.fTrigPattern"); 331 write.VetoColumn("MRawEvtHeader.fNumLoGainOn"); 332 } 333 262 334 Bool_t MJSimulation::Process(const MArgs &args, const MSequence &seq) 263 335 { … … 558 630 MTask &write3a = fWriteFitsFile ? static_cast<MTask&>(write3af) : static_cast<MTask&>(write3ar); 559 631 560 write3af.SetHeaderKey("DUMMY0", 3, "First dummy"); 561 write3af.SetHeaderKey("DUMMY1", 3.14159265358979323846, "Second dummy"); 562 write3af.SetHeaderKey("DUMMY2", true, "Third dummy"); 563 write3af.SetHeaderKey("DUMMY3", "one value", "Fourth dummy"); 564 565 write3af.VetoColumn("MParameterD.fVal"); 566 write3af.VetoColumn("MCorsikaEvtHeader.fEvtNumber"); 567 write3af.VetoColumn("MCorsikaEvtHeader.fNumReuse"); 568 write3af.VetoColumn("MCorsikaEvtHeader.fTotalEnergy"); 569 write3af.VetoColumn("MCorsikaEvtHeader.fStartAltitude"); 570 write3af.VetoColumn("MCorsikaEvtHeader.fFirstTargetNum"); 571 write3af.VetoColumn("MCorsikaEvtHeader.fFirstInteractionHeight"); 572 write3af.VetoColumn("MCorsikaEvtHeader.fMomentumX"); 573 write3af.VetoColumn("MCorsikaEvtHeader.fMomentumY"); 574 write3af.VetoColumn("MCorsikaEvtHeader.fMomentumZ"); 575 write3af.VetoColumn("MCorsikaEvtHeader.fAz"); 576 write3af.VetoColumn("MCorsikaEvtHeader.fWeightedNumPhotons"); 577 write3af.VetoColumn("MCorsikaEvtHeader.fZd"); 578 write3af.VetoColumn("MCorsikaEvtHeader.fAd"); 579 write3af.VetoColumn("MCorsikaEvtHeader.fX"); 580 write3af.VetoColumn("MCorsikaEvtHeader.fY"); 581 write3af.VetoColumn("MCorsikaEvtHeader.fWeightNumPhotons"); 582 write3af.VetoColumn("MMcEvt.fEvtNumber"); 583 write3af.VetoColumn("MMcEvt.fThick0"); 584 write3af.VetoColumn("MMcEvt.fFirstTarget"); 585 write3af.VetoColumn("MMcEvt.fZFirstInteraction"); 586 write3af.VetoColumn("MMcEvt.fCoreD"); 587 write3af.VetoColumn("MMcEvt.fCoreX"); 588 write3af.VetoColumn("MMcEvt.fCoreY"); 589 write3af.VetoColumn("MMcEvt.fTimeFirst"); 590 write3af.VetoColumn("MMcEvt.fTimeLast"); 591 write3af.VetoColumn("MMcEvt.fLongiNmax"); 592 write3af.VetoColumn("MMcEvt.fLongit0"); 593 write3af.VetoColumn("MMcEvt.fLongitmax"); 594 write3af.VetoColumn("MMcEvt.fLongia"); 595 write3af.VetoColumn("MMcEvt.fLongib"); 596 write3af.VetoColumn("MMcEvt.fLongic"); 597 write3af.VetoColumn("MMcEvt.fLongichi2"); 598 write3af.VetoColumn("MMcEvt.fPhotIni"); 599 write3af.VetoColumn("MMcEvt.fPassPhotAtm"); 600 write3af.VetoColumn("MMcEvt.fPassPhotRef"); 601 write3af.VetoColumn("MMcEvt.fPassPhotCone"); 602 write3af.VetoColumn("MMcEvt.fPhotElfromShower"); 603 write3af.VetoColumn("MMcEvt.fPhotElinCamera"); 604 write3af.VetoColumn("MMcEvt.fElecCphFraction"); 605 write3af.VetoColumn("MMcEvt.fMuonCphFraction"); 606 write3af.VetoColumn("MMcEvt.fOtherCphFraction"); 607 write3af.VetoColumn("MMcEvt.fFadcTimeJitter"); 608 write3af.VetoColumn("MMcEvt.fEventReuse"); 609 610 write3af.VetoColumn("MRawEvtData.fHiGainPixId"); 611 write3af.VetoColumn("MRawEvtData.fLoGainPixId"); 612 write3af.VetoColumn("MRawEvtData.fLoGainFadcSamples"); 613 write3af.VetoColumn("MRawEvtData.fABFlags"); 614 write3af.VetoColumn("MRawEvtData.fStartCells"); 615 write3af.VetoColumn("MRawEvtData.fNumBytesPerSample"); 616 write3af.VetoColumn("MRawEvtData.fIsSigned"); 617 write3af.VetoColumn("MRawEvtHeader.fDAQEvtNumber"); //EventNum ? 618 write3af.VetoColumn("MRawEvtHeader.fNumTrigLvl1"); 619 write3af.VetoColumn("MRawEvtHeader.fNumTrigLvl2"); 620 write3af.VetoColumn("MRawEvtHeader.fTrigPattern"); 621 write3af.VetoColumn("MRawEvtHeader.fNumLoGainOn"); 632 SetupHeaderKeys(write3af); 633 SetupVetoColumns(write3af); 622 634 623 635 write3af.SetBytesPerSample("Data", 2); … … 649 661 write3af.AddContainer("IntendedPulsePos", "RunHeaders"); 650 662 write3af.AddContainer("MRawEvtData", "Events"); 663 write3af.AddContainer("MPhotonEvent","Events"); 651 664 652 665 write3ar.AddContainer("ElectronicNoise", "RunHeaders"); -
branches/Mars_MC/mjobs/MJSimulation.h
r14864 r17011 34 34 void SetupCommonFileStructure(MWriteRootFile &write) const; 35 35 void SetupCommonFileStructure(MWriteFitsFile& write) const; 36 void SetupHeaderKeys(MWriteFitsFile& write) const; 37 void SetupVetoColumns(MWriteFitsFile& write) const; 36 38 37 39 public: -
branches/Mars_MC/mmc/MMcEvt.hxx
r9937 r17011 10 10 { 11 11 private: 12 UInt_t fEvtNumber; 12 UInt_t fEvtNumber; // {fits: name=EventNum ; unit=uint32} 13 13 Float_t fThick0; // [g/cm2] 14 14 Float_t fFirstTarget; // [] -
branches/Mars_MC/mraw/MRawEvtData.h
r14870 r17011 36 36 37 37 MArrayB *fABFlags; //-> A information about the exact trigger position 38 MArrayS *fStartCells; // 38 MArrayS *fStartCells; // {fits: unit=uint16 ; name=StartCellData } 39 39 40 40 UShort_t fNumBytesPerSample; -
branches/Mars_MC/msimcamera/MSimCamera.cc
r10167 r17011 135 135 return kFALSE; 136 136 137 fAccidentalPhotons = (MPedestalCam*)pList->FindObject("AccidentalPhotonRates","MPedestalCam"); 138 if(!fAccidentalPhotons) 139 { 140 *fLog << err << "AccidentalPhotonRates [MPedestalCam] not found... aborting." << endl; 141 return kFALSE; 142 } 143 137 144 MParSpline *pulse = (MParSpline*)pList->FindObject("PulseShape", "MParSpline"); 138 145 if (!pulse) … … 238 245 const Double_t rms = pix.GetPedestalRms(); 239 246 247 // FTemme: Implementation of AC-coupling: 248 // to calculate the value of the accoupling per slice I use the 249 // following equation: 250 // accouplingPerSlice = accidentalPhotonRate * (1 + crossTalkProb) 251 // * areaOfOnePulse / samplingRate; 252 // Therefore I need the following variables 253 Double_t accidentalPhotonRate = 0; // [MHz] 254 Float_t crossTalkProb = 0; // [1] 255 Double_t areaOfOnePulse = 0; // [ADC-Counts * s] 256 Double_t samplingRate = 0; // [slices * MHz] 257 258 // The accidental photon rate is stored in GHz, so we have to multiply 259 // with 1E3 to get MHz: 260 MPedestalPix &accPhoPix = (*fAccidentalPhotons)[i]; 261 accidentalPhotonRate = accPhoPix.GetPedestal() * 1E3; 262 263 // I don't know how to get the variable fCrosstalkProb from 264 // the class APD (see MAvalanchePhotoDiode.h), because there is no 265 // getter for the APD array(fAPDs) in MSimAPD. 266 // So I set the crossTalkProb hardcoded to the value 0.15, which is 267 // equal to the value of the apd of type 4 268 crossTalkProb = 0.15; 269 270 // To get the area of one Pulse, I only need to calculate the Integral 271 // of the Pulse Shape, which is stored in fSpline. Because the spline is 272 // normalized to a maximal amplitude of 1.0, I had to multiply it with 273 // the Default gain: 274 areaOfOnePulse = fSpline->Integral() * fDefaultGain; 275 276 // The sampling rate I get from the RunHeader: 277 samplingRate = fRunHeader->GetFreqSampling(); 278 279 Double_t accouplingPerSlice = accidentalPhotonRate * (1 + crossTalkProb) 280 * areaOfOnePulse / samplingRate; 281 282 // The accoupling is substracted from the timeline by decreasing the 283 // mean of the gaussian noise which is added 284 240 285 if (!fBaselineGain) 241 286 { 242 (*fCamera)[i].AddGaussianNoise(rms, val );287 (*fCamera)[i].AddGaussianNoise(rms, val - accouplingPerSlice); 243 288 continue; 244 289 } … … 250 295 // FIXME: How stable is the offset? 251 296 // FIXME: Should we write a container AppliedGain for MSImTrigger? 252 (*fCamera)[i].AddGaussianNoise(rms*gain, val*gain); 297 298 (*fCamera)[i].AddGaussianNoise(rms*gain, (val - accouplingPerSlice)*gain); 253 299 } 254 300 -
branches/Mars_MC/msimcamera/MSimCamera.h
r9625 r17011 24 24 MPedestalCam *fElectronicNoise; //! Electronic noise (baseline and rms) 25 25 MPedestalCam *fGain; //! Electronic noise (baseline and rms) 26 MPedestalCam *fAccidentalPhotons;//! Accidental photon rates 26 27 27 28 MAnalogChannels *fCamera; //! Output of the analog signals 28 29 MMcEvt *fMcEvt; //! For information stored in MMcEvt 29 30 30 const MSpline3 *fSpline; // Pulse Shape 31 const MSpline3 *fSpline; // Pulse Shape 31 32 32 33 Bool_t fBaselineGain; // Should the gain be applied to baseline and electronic noise? -
branches/Mars_MC/msimcamera/MSimReadout.cc
r9422 r17011 145 145 fData->InitRead(fRunHeader); 146 146 fData->ResetPixels(); 147 fData->InitStartCells(); 147 148 fData->SetIndices(); 148 149 … … 202 203 203 204 // Check if the whole requested signal can be digitized 204 if (trig+nslices> =nsamp)205 if (trig+nslices>nsamp) 205 206 { 206 207 *fLog << err << "ERROR - Trigger position beyond valid analog signal range." << endl;
Note:
See TracChangeset
for help on using the changeset viewer.