//-*-mode:c++-*- // $Id: BrDigitizeTPC.h,v 1.4 2001/09/18 19:31:07 trine Exp $ // $Author: trine $ // $Date: 2001/09/18 19:31:07 $ // /////////////////////////////////////////////////////////////////////// // // // BrDigitizeTPC // // // // BRAHMS TPC digitization class - slow simulator // // // // // // Author : F.Videbaek // // Created : // // Version : 1.1 // // Changed : July 31, 1991 FV // Remove refs to BrDigTPC class // // // /////////////////////////////////////////////////////////////////////// // #ifndef BRAT_BrDigitizeTPC #define BRAT_BrDigitizeTPC // ROOT Classes #ifndef ROOT_TH1 #include "TH1.h" #endif #ifndef ROOT_TH2 #include "TH2.h" #endif #ifndef ROOT_TProfile #include "TProfile.h" #endif #ifndef ROOT_TClonesArray #include "TClonesArray.h" #endif //Brat Classes // #ifndef BRAT_BrModule #include "BrModule.h" #endif #ifndef BRAT_BrEventNode #include "BrEventNode.h" #endif #ifndef BRAT_BrDetectorParamsTPC #include "BrDetectorParamsTPC.h" #endif #ifndef BRAT_BrDetectorVolume #include "BrDetectorVolume.h" #endif #ifndef BRAT_BrDataTable #include "BrDataTable.h" #endif #ifndef BRAT_BrDetectorTPC #include "BrDetectorTPC.h" #endif class BrDigitizeTPC : public BrModule { #define MAXPAD 192 #define MAXTIME 150 public: // constructors and destructors // BrDigitizeTPC(); BrDigitizeTPC(const Char_t *Name, const Char_t *Title); virtual ~BrDigitizeTPC(); // // Methods // virtual void Init(); virtual void Event(BrEventNode* InputTable, BrEventNode* OutputTable); private: TH1F* hNGeantHits; // number of Geant hits per event TH1F* hNSequences; // number of TPC sequences per event TH1F* hNTimebins; // number of timebins per sequence TH1F* hAdcDist; // ADC distribution TH1F* hAdcSumDist; // ADC sum distribution, per sequence TH1F* hN0Dist; // number of electrons per cluster TH1F* hSigmaTDist; // distribution of transverse cluster widths TH1F* hSigmaLDist; // distribution of longitudinal cluster widths TH1F* hSigmaLTotDist; // distribution of longitudinal cluster widths // folded with shaper response TH1F* hSigmaTRes; // distribution of transverse "residual" TH1F* hSigmaLRes; // distribution of longitudinal "residual" TH1F* hPadCentroid; // distribution of pad centroids TH1F* hSequenceCentroid; // distribution of sequence centroids TH1F* hSequenceCentroidDecimal; // distribution of sequence centroids // minus closest integer TH1F* hYmiss; // difference in time between cluster and sequence TH1F* hXDistToHit; // difference in X between hit and pad centroid TH1F* hYDistToHit; // difference in Y between hit and time centroid TProfile* hPadShape; // profile of cluster, in pad direction TProfile* hShapeResp; // shaper response TH2F* hTimeCluster2D; // time shape of original cluster TH2F* hTimeShape2D; // time shape of folded cluster TH2F* hPadShape2D; // time shape of pad TProfile* hSequenceShape; // profile of sequence, in timebins TH2F* hSequenceShapeY2D; // profile of sequence vs driftlength TH2F* hSequenceShapeYsl2D; // profile of sequence vs driftlength TProfile* hSigmaTVsY; // transverse cluster width vs drift length TProfile* hSigmaTVsXsl; // transverse cluster width vs X slope TProfile* hSigmaLVsY; // longitudinal cluster width vs drift length TProfile* hSigmaLTotVsY; // shaped longitudinal cluster width vs driftlength TH2F* hSigmaLTotVsY2D; // 2D hist of longitudinal cluster width vs driftlength TProfile* hSigmaLTotVsYsl; // shaped longitudinal cluster width vs Y slope TH2F* hSigmaLTotVsYsl2D; // 2D hist of longitudinal cluster width vs Y slope TProfile* hSigmaTResVsY; // transverse "residual" vs Y TProfile* hSigmaLResVsY; // longitudinal "residual" vs Y TProfile* hSigmaTResVsXsl; // transverse "residual" vs Xslope TProfile* hSigmaLResVsYsl; // longitudinal "residual" vs Yslope TProfile* hSigmaTResVsN0; // trans res vs cluster charge TProfile* hSigmaLResVsN0; // long res vs cluster charge BrDetectorParamsTPC* fParams_p; BrDetectorVolume* fVolumeParams_p; // DetectorVolume public: BrDetectorParamsTPC* GetDetectorParamsTPC(){ return fParams_p;} BrDetectorVolume* GetDetectorVolume() const { return fVolumeParams_p;} void DefineHistograms(); void ListDetectorParameters(); void ListEventStatistics(); void DrawGeantHits(); void SetNoise(Float_t value){fNoise=value;} Float_t GetNoise() const {return fNoise;} void SetAdcCut(Float_t value){fAdcCut=value;} Float_t GetAdcCut() const {return fAdcCut;} void SetDedxToNeff(Float_t value) {fDedxTon0 = value;} Float_t GetDedxToNeff() const {return fDedxTon0;} void SetUseGongTimeResp(Bool_t value) {fUseGongTimeResp = value;} Bool_t GetUseGongTimeResp() const {return fUseGongTimeResp;} void SetUseHyperbolic(Bool_t value) { fUseHyperbolic = value;} Bool_t GetUseHyperbolic() const {return fUseHyperbolic;} void SetTauScale(Float_t value){fTauScale=value;} Float_t GetTauScale() const {return fTauScale;} void SetTshift(Float_t value){fTshift=value;} Float_t GetTshift() const {return fTshift;} void SetN0_pad_to_tot(Float_t value){fN0_pad_to_tot=value;} Float_t GetN0_pad_to_tot() const {return fN0_pad_to_tot;} void SetAbsorp(Float_t value){fAbsorp=value;} Float_t GetAbsorp() const {return fAbsorp;} void SetMinNbins(Int_t value){fMinNbins=value;} Int_t GetMinNbins() const {return fMinNbins;} private: BrDataTable *fGeantHits; //! geanthits used for Display purposes Int_t fNumDigHits; BrDetectorTPC *fDetectorNode; // // Controlling parameters for digitization Float_t fAdcCut; // cut value in accepting a time bin adc-value Float_t fNoise; // noise added following digitization Int_t fNpads; // Number of pads. Set in Init() from BrDetectorParamsTPC Int_t fNbuckets; // Number of Time buckets. Set in Init() from BrDetectorParamsTPC Float_t fDedxTon0; // Conversion of dedx to effective number of electron clusters Bool_t fUseGongTimeResp; // use realistic time response // t**2 * exp(-t/tau) folded with Gaussian // must be adjusted empirically Bool_t fUseHyperbolic; // use hyperbolic pad response Float_t fTauScale; // use if fUseGongTimeResp set to kTRUE // scaling width of time response Float_t fTshift; // use if fUseGongTimeResp set to kTRUE // compensate for shift in centroid Float_t fN0_pad_to_tot; // ratio of tot.no.e- / e- per pad Float_t fAbsorp; // absorption in the gas Int_t fMinNbins; // Minimum number of bins in sequence Float_t **fAdcVal; //! internal storage of 2D array. Float_t* fDiffused_array; Float_t* fShaped_array; Float_t* fFinal_array; Float_t* fShaper_lookup_array; ClassDef(BrDigitizeTPC,0) // BRAHMS TPC digitization routine }; #endif // $Log: BrDigitizeTPC.h,v $ // Revision 1.4 2001/09/18 19:31:07 trine // Improved description of angled tracks and of residuals. // Added members for setting: // - min. no of bins in a BrTpcSequence // - ratio of total no. of electrons / electrons per pad. // // Revision 1.3 2001/09/14 11:26:35 trulsml // Changed class version number from 1 to 0. // // Revision 1.2 2001/08/12 13:33:01 cholm // Changed CTOR prototype to comply with BrModule CTOR (const Char_t*'s instead // of just Char_t*'s). // // Revision 1.1.1.1 2001/06/21 14:55:06 hagel // Initial revision of brat2 // // Revision 1.18 2001/06/19 18:56:25 trine // Added possibility to use more realistic time response taken from // Gong's STAR note, instead of Gaussian default. // Moved calculation of "residuals" to after place in code where track // slopes are folded into cluster widths. // // Revision 1.17 2000/10/02 17:07:30 pchristi // Cleaned up headers and source files in the tpc dir // // Revision 1.16 2000/08/28 00:17:43 videbaek // Mostly moved CVS log information to end of header files. Other changes // documenter in message to listserver August 26. // // Revision 1.15 2000/04/28 21:22:07 videbaek // Add new classes for TPC. Many changes and not completely debugged. // Note that the old method BrTPCLocaltracking has been tested to work. // // Revision 1.14 2000/01/18 18:38:49 videbaek // lized and checkout of digitization, reconstruction code. // Added (possible noise ) to digitization. Changed default value of // dedxton0. Made it parameter in DetectorParamsTPC // // Revision 1.13 2000/01/04 21:48:53 videbaek // start adding dynamic arrays rather than fixed size. // // Revision 1.12 1999/12/30 19:44:56 videbaek // Code changes to use the intrinsic cocrdinates consistently. // // Revision 1.11 1999/08/14 17:01:59 videbaek // Updates for // a) RawData adding the Trigger TDCs' // b) Implied new data objects BrTrigBB // c) Clean up of TPC code // d) Test MyMonitor and scripts // // Revision 1.10 1999/02/25 14:52:52 videbaek // Inserted code for using BrTPCSequnece instead of BrDigTPC for both // TPC digitization and the TPC local track reconstruction. // // Revision 1.9 1999/01/21 23:23:26 hagel // 1. Changed convention for checking includes. Current convention is: // BRAT_Br...... eg BRAT_BrModule ala ROOT. // 2. Added CVS logs to .h files that didn't have them. // 3. Moved checking of include definition to first line for easier reading // 4. Put checks before all includes in the include files as per BRAT specifications // 5. Added BrGeantHeader to Geant Makefile // 6. All changes have been checked to compile on NT ala Cygnus // // Revision 1.8 1999/01/15 16:35:36 videbaek // Changes included using clonesarrays in digitizations. // Localtracking added cuts for type 4 clusters // // Revision 1.7 1999/01/06 23:08:04 hagel // Add support for DrawGeantTracks in Digitize // // Revision 1.6 1998/12/21 20:27:39 videbaek // Improved geometry for MTP1 and MTP2 // // Revision 1.5 1998/12/04 21:37:12 videbaek // Many changed to accomodate variable# of active rows in the TPC. // The present layout corresponds to the gbrahms setup as of November 98 // being used for production. // // Revision 1.4 1998/09/27 17:10:30 alv // removed fTimer, fCpuTime, EventStatisticsStart and EventStatisticsEnd // (inherit them from BrModule) // // Revision 1.3 1998/05/13 20:31:20 hagel // Changes to compile under Solaris // // Revision 1.2 1998/04/01 22:10:58 hagel // Changes for adding local tracking // // Revision 1.1.1.1 1998/03/04 21:34:02 brahmlib // Brat tpc // // //