// -*- mode: c++ -*- // // $Id: BrMultRdoModule.h,v 1.13 2002/05/08 16:30:57 cholm Exp $ // $Author: cholm $ // $Date: 2002/05/08 16:30:57 $ // $Copyright: (C) 2001 BRAHMS Collaboration // #ifndef BRAT_BrMultRdoModule #define BRAT_BrMultRdoModule #ifndef BRAT_BrModule #include "BrModule.h" #endif #ifndef BRAT_BrMultUtil #include "BrMultUtil.h" #endif #ifndef BRAT_BrMultCalibration #include "BrMultCalibration.h" #endif #ifndef BRAT_BrMultParameters #include "BrMultParameters.h" #endif #ifndef BRAT_BrEventNode #include "BrEventNode.h" #endif #ifndef BRAT_BrMultRdo #include "BrMultRdo.h" #endif #ifndef BRAT_BrRunInfo #include "BrRunInfo.h" #endif #ifndef ROOT_TH1 #include "TH1.h" #endif #ifndef ROOT_TH2 #include "TH2.h" #endif #include class BrMultRdoModule : public BrModule , public BrMultUtil { public: enum EOutlierMethod { kCloseNeighbors, kFractionArray, kHitCorrection, kNoCorrection }; protected: #ifdef BR_MULT_CAL_TMP BrMultTmpCalibration* fCalibration; #else BrMultCalibration* fCalibration; #endif BrMultParameters* fParameters; const BrRunInfo* fCurrentRun; TH2F* fSingleAdcHisto; // Single vs Adc histogram TH2F* fSingleCalAdcHisto; // Single vs Calibrated ADC histogram TH2F* fSingleEnergyHisto; // Single vs deposited energy histogram TH2F* fSingleMultHisto; // Single vs Multiplicity histogram TH2F* fRingCalAdcHisto; // Ring vs Calibraed ADC histogram TH2F* fRingEnergyHisto; // Ring vs deposited energy histogram TH2F* fRingMultHisto; // Ring vs Multiplicity histogram TH2F* fRingHitsHisto; // Ring vs # Hits histogram TH1F* fArrayCalAdcHisto; // Total Calibrated ADC histogram TH1F* fArrayEnergyHisto; // Total energy histogram TH1F* fArrayMultHisto; // Total Multiplicity histogram TH1F* fArrayHitsHisto; // Total # Hits histogram TH2F* fVtxVsCalAdcHisto; // TH2F* fVtxVsMultHisto; // TH1F* fEtaDistHisto; // psuedo dN/deta TH1F* fdNdEtaSumHisto; // dN/deta Sum TH1F* fdNdEtaFillHisto; // dN/deta Fills TH1F* fdNdEtaHisto; // dN/deta Normalised UInt_t fEtaFills; // Count how many times dN/deta was filled Int_t fAdcGapLimit; // Lower bound of ADCs gap Float_t fThresholdFactor; // Thresholdfactor for ADC's Int_t fSaturationChannel; // Saturation value for ADC's EOutlierMethod fOutlierMethod; // Method to correct for outliers virtual void CalibrateRings(BrMultRdo* rdo); virtual void CalibrateRingsCloseNeighbors(BrMultRdo* rdo); virtual void CalibrateRingsFractionArray(BrMultRdo* rdo); virtual void CalibrateArray(BrMultRdo* rdo); virtual Double_t CalibrateEta(); virtual Double_t CalibrateAdc(Int_t adc, Bool_t& below); virtual Double_t CalibrateEnergy(Double_t calAdc); virtual Double_t CalibrateMultiplicity(Double_t ringEta); virtual Double_t CalibrateArrayMultiplicity() = 0; virtual Double_t CalibrateAvgEta(Double_t& ringScale); // Some cache variables Short_t fCurrentSingle; Short_t fCurrentRing; Double_t fCurrentRingZ; Double_t fCurrentRingR; Double_t fCurrentRingEta; Double_t fCurrentVtxZ; // Histograms scales Float_t fSingleAdcLow; Float_t fSingleAdcHigh; Float_t fSingleAdcComp; Float_t fBaseCalAdc; Float_t fBaseMult; Float_t fBaseEnergy; public: BrMultRdoModule(); BrMultRdoModule(const Char_t* name, const Char_t* title); virtual ~BrMultRdoModule () {} virtual void SetAdcGapLimit(Int_t gapLimit=0) { fAdcGapLimit = gapLimit; } virtual void SetThresholdFactor(Float_t factor=5) { fThresholdFactor = factor; } virtual void SetSaturationChannel(Int_t channel=1000000) { fSaturationChannel = channel; } virtual void SetOutlierMethod(EOutlierMethod m=kNoCorrection) { fOutlierMethod = m;} virtual void SetSingleAdcLow(Float_t low) { fSingleAdcLow = low; } virtual void SetSingleAdcHigh(Float_t high) { fSingleAdcHigh = high; } virtual void SetSingleAdcComp(Float_t comp) { fSingleAdcComp = comp; } virtual void DefineHistograms(); virtual void Begin(); virtual void Finish(); virtual void Print(Option_t* option="B") const; // *MENU* ClassDef(BrMultRdoModule,0) // ABC for SMA/TMA RDO Modules }; #endif //____________________________________________________________________ // // $Log: BrMultRdoModule.h,v $ // Revision 1.13 2002/05/08 16:30:57 cholm // Added 3 histograms, one of the sum of the multiplicity in each eta bin, // one with the number of fills, and a third, the ratio of these two. Unless // something tricky is going on, this should be our dN/deta distribution for // the TMA and SMA. Also fixed a few warning (probably GCC3 errors) in the // Si and Tile modules. // // Revision 1.12 2002/02/19 21:26:48 sanders // modified pointer argument to call by reference // // Revision 1.11 2002/01/27 16:13:00 cholm // Use pass-by-reference ('&') rather than pointers ('*') in the method // BrMultRdoModule::CalibrateAdc, since that's the proper C++ way to go // about these things. // // Revision 1.10 2002/01/26 16:17:33 sanders // Modified point where the energy threshold is applied. Delaying the // threshold cut until after the energy calibration is necessary for // checking the energy calibration. // Also corrected an indexing error that was cutting off the first adc // channel in the histograms. // // Revision 1.9 2002/01/04 21:30:11 sanders // Added "Setters" for range of raw adc values. // // Revision 1.8 2001/12/06 00:35:16 sanders // Revised method for obtaining average pseudorapidity and // geometric scaling factors for rings. // // Revision 1.7 2001/11/24 15:47:08 sanders // Added code to calculate dNdEta values for rings (average over // individual dNdEta values calculated for each detector) and // HIJING weighted pseudorapidity. // // Revision 1.6 2001/11/19 04:07:49 sanders // Revised rdo modules for 2001 si and tile calibrations. // // Revision 1.5 2001/10/30 17:20:11 sanders // fixed const problem with fCurrentRun // // Revision 1.4 2001/10/29 21:01:17 cholm // Corrected a very bad mistake in the previous commit: A manager was // initialised in the module - BAD. Managers may not be initialised in // modules, only thier services may be used. // // Revision 1.3 2001/09/26 02:37:32 sanders // Modified to allow TmpCalibration // // Revision 1.2 2001/09/20 13:44:15 cholm // Removed the use of temp ASCII files, since not needed anymore // // Revision 1.1.1.1 2001/06/21 14:55:08 hagel // Initial revision of brat2 // // Revision 1.1 2001/05/31 01:44:40 cholm // Second rewamp of this directory. All RDO modules use the common // BrMultRdoModule, and they both write BrMultRdo Objects. Also introduced // ABC for Br[Tile|Si][Parameters|Calibration] since they have a lot in common, // and the code can be made more efficient this way. // // A possible further thing to do, is to make an ABC for the CentModules, and // the corresponding calibration modules, since they are very VERY similar. // However, the current module BrMultCentModule is in the way. Need to talk // to Steve about that. // //