#ifndef __HSTARTHITSSIMULATOR_H__ #define __HSTARTHITSSIMULATOR_H__ #include "hreconstructor.h" #include "hcategory.h" #include "TMatrixD.h" #include "TArrayD.h" #include #include class HSpecGeomPar ; //-------------------------------------------------------------------------------- class HStartHitsSimulator : public HReconstructor { protected: HCategory* fCatStart2Cal; //! pointer to the start cal category HCategory* fCatStart2Hit; //! pointer to the start hit category HCategory* fCatGeantMdc; //! pointer to the geant mdc category HCategory* fCatGeantKine; //! pointer to the geant kine category HSpecGeomPar* fSpecGeomPar; //! pointer to the spectrometer geometry par container std::vector fTargetZPos; // The positions of the target disks std::set sAllStartHits, sAllStartCluster; //! TMatrixD tmdBinomial; //! TMatrixD tmdCorrelations; //! Double_t fStartTimeRangeReduction; // How much the start time range is effectively reduced by event selection Double_t fStartTimeReferenceMin; // The begin of the range corresponding to the provided PMF Double_t fStartTimeReferenceMax; // The end of the range corresponding to the provided PMF Double_t fStartTimeReferenceRange; // The start time range corresponding to the provided PMF Double_t fStartTimeMin; // The begin of the range in which artificial start hits are put Double_t fStartTimeMax; // The end of the range in which artificial start hits are put Double_t fStartTimeRange; // The effective range in which artificial start hits are put Double_t fDeltaTimeMin; // The begin of the range in which full artificial delta electrons are put Double_t fDeltaTimeMax; // The end of the range in which full artificial delta electrons are put Double_t fDeltaTimeRange; // The effective range in which full artificial delta electrons are put Double_t fDeltaAddTimeMin; // The begin of the range in which reduced artificial delta electrons are put Double_t fDeltaAddTimeMax; // The end of the range in which reduced artificial delta electrons are put Double_t fDeltaAddTimeRange; // The effective range in which reduced artificial delta electrons are put Double_t fDeltaScaleFactor; // The scale factor used for full artificial delta electrons Double_t fDeltaAddScaleFactor; // The scale factor used for reduced artificial delta electrons UShort_t fNStartHitsReferenceMax; // The maximum amount of start hits in one event in the reference time interval TArrayD fNStartHitsReferencePMF; // The probability mass function of NStartCluster in the start time reference range Double_t fDeltaNStartScalingBase; // The amount of simulated beam ions to fill 1 microsecond with uncorrelated delta electrons Double_t fDeltaNStartScalingSlope; // The amount of simulated beam ions to fill 1 real Beam Ion with delta electrons - In a perfect world it would be exactly 1! UShort_t fNStartHitsMax; // The maximum amount of start hits in one event in the full time interval TArrayD fNStartHitsPMF; // The probability mass function of NStartCluster in the full start time range (Calculated in init()) UShort_t fNDeltaFiles; // The amount of delta electron files used Double_t fDeltaFileScaling; // Proportion of a delta electron file corresponding to a single beam ion traversing the target Double_t FitPMF(Double_t*, Double_t*); UShort_t getRandomNStartHits(UShort_t); Double_t getRandomDeltaScaling(); void getAllStartHits(); void getAllStartCluster(Float_t); UShort_t getNStartCluster(Float_t, Float_t, Float_t); Short_t getTargetLayer(); public: HStartHitsSimulator(const Text_t* name = "", const Text_t* title = ""); virtual ~HStartHitsSimulator() {} Bool_t init(); Bool_t reinit(); Int_t execute(); Bool_t finalize() { return kTRUE; } ClassDef(HStartHitsSimulator,0) }; #endif // __HSTARTHITSSIMULATOR_H__