// -*- mode: c++ -*- //____________________________________________________________________ // // $Id: BrTpcHitModule.h,v 1.4 2002/08/15 17:25:09 videbaek Exp $ // $Author: videbaek $ // $Date: 2002/08/15 17:25:09 $ // $Copyright: (C) 2001 BRAHMS Collaboration // #ifndef BRAT_BrTpcHitModule #define BRAT_BrTpcHitModule // ROOT includes #ifndef ROOT_TH1 #include "TH1.h" #endif #ifndef ROOT_TH2 #include "TH2.h" #endif // BRAT includes #ifndef BRAT_BrModule #include "BrModule.h" #endif #ifndef BRAT_BrEventNode #include "BrEventNode.h" #endif #ifndef BRAT_BrDataTable #include "BrDataTable.h" #endif #ifndef BRAT_BrTpcCluster #include "BrTpcCluster.h" #endif #ifndef BRAT_BrDetectorParamsTPC #include "BrDetectorParamsTPC.h" #endif class BrTpcCalibration; class BrTpcHitModule : public BrModule { private: BrDataTable *fClusterTable; // cluster input data table BrDataTable *fHitTable; // hit output table BrDetectorParamsTPC *fParams; // tpc detector parameters Bool_t fUsePadGain; // Flag indicating if gain calibration to be done // using database constants. BrTpcCalibration* fCalibration; // Tpc calibration pointer - owned by Calibration Manager. Double_t fWhiteNoise; // white noise Bool_t fUseCalibratedWidths;// use fixed error from calibrations void ConvertClustersToHits(); Bool_t FindHitWeightedMean(BrTpcCluster *cluster); void WeightedMean(const Int_t, const Double_t *, const Double_t *, const Double_t *, Double_t &, Double_t &, Double_t &); // histograms TH2F *hPadTime; // Pad-time distribution of hits TH2F *hPadRow; // Pad-row distribution of hits TH1F *hX; // local x (pad) distribution of hits TH1F *hY; // local y (time) distribution of hits TH1F *hDx; // error distribution on local x (pad) TH1F *hDy; // error distribution on local y (time) public: BrTpcHitModule(); BrTpcHitModule(const Char_t* name, const Char_t* title); virtual ~BrTpcHitModule () {} virtual void DefineHistograms(); virtual void Init(); virtual void Event(BrEventNode* inNode, BrEventNode* outNode); virtual void Print(Option_t* option="B") const; // *MENU* virtual void SetWhiteNoise(Double_t val = 2) { fWhiteNoise = val; } virtual void SetUseCalibratedWidths(Bool_t val = kFALSE) { fUseCalibratedWidths = val; } virtual void SetUsePadGain(Bool_t val =kFALSE) { fUsePadGain = val;} ClassDef(BrTpcHitModule,0) // BRAHMS Tpc Hit Module }; #endif //____________________________________________________________________ // // $Log: BrTpcHitModule.h,v $ // Revision 1.4 2002/08/15 17:25:09 videbaek // Add code to correct for adcgain if in database. // he default is not to use this. // // Revision 1.3 2001/10/12 10:56:00 pchristi // Added option to use the calibrated hit widths from the database. // You have to do SetUseCalibratedWidths(kTRUE) to and have them // read in. // // Revision 1.2 2001/06/22 17:45:33 cholm // Change names so that every data class has the same format, so that // we will not have to worry about that later on. The affected classes // are: // // BrTPCSequence -> BrTpcSequence // BrTPCCluster -> BrTpcCluster // BrTPCClusterTable -> BrTpcClusterTable // // These changes has ofcourse been propegated to the modules as well, // giving the changes // // BrTPCClusterFinder -> BrTpcClusterFinder // BrTPCSequenceAdder -> BrTpcSequenceAdder // // Revision 1.1.1.1 2001/06/21 14:55:13 hagel // Initial revision of brat2 // // Revision 1.2 2001/06/17 17:29:48 pchristi // Near final version. A little cosmetics is still needed. // // Revision 1.1 2001/05/29 14:20:44 pchristi // Initial import of new Tpc classes // //