// -*- mode: c++ -*- #ifndef BRAT_BrDriverDC #define BRAT_BrDriverDC #ifndef __IOSTREAM_H #include #endif #ifndef __FSTREAM_H #include #endif #ifndef __MATH_H #include #endif #ifndef ROOT_TNamed #include #endif #ifndef ROOT_TMath #include #endif #ifndef ROOT_TString #include #endif //BRAT Includes #ifndef BRAT_BrMath #include "BrMath.h" #endif #ifndef BRAT_BrLine3D #include "BrLine3D.h" #endif /////////////////////////////////////////////////////////////////////// // // // BrDriverDC // // // // BRAHMS class // // // // Author : Pawel Staszel // // Created : Maj 1999 // // Version : 1.1 // // Changed : units from [mm] to [cm] (5/10/2000) // // // /////////////////////////////////////////////////////////////////////// // // $Id: BrDriverDC.h,v 1.9 2002/06/10 16:36:19 ufstasze Exp $ // class BrDriverDC : public TNamed { // Member Variables: private: Char_t fSlowo[7]; Char_t detector[2]; Int_t fNormalMode,fZPosRef; // construction parameters: Float_t fWireDist,fActiveRangeX,fActiveRangeY,fCenterToWindowDist,fModuleDisp; Float_t fBaseWirePosXA,fBaseWirePosXB,fBaseWirePosXC,fBaseWirePosYA,fBaseWirePosYB; Float_t fBaseWirePosYC,fBaseWirePosUA,fBaseWirePosUB,fBaseWirePosVA,fBaseWirePosVB; Float_t fXmax,fXmin,fYmax,fYmin,fDCX0,fDCY0,fXDCWide,fYDCWide; Float_t fRefDist; // Int_t fModuleNumber,fPlaneNumber; Int_t fNumberOfWires; Float_t fAx,fAy,fX0,fY0; // track parameters; Float_t fTrParam[4]; // diffrent way to keep track parameter Int_t fDebLevel; Float_t fX1,fX2,fY1,fY2,fZ; // This public variables represent the ends of DC wires - to defined // then call the function WireEndPoints. Int_t fMaxPlaneNum; Int_t frunNumber; // hits cleaning stuff Int_t fMinWidth,fMinTdc,fMaxTdc; Int_t fnCuts[3][10]; Int_t fTdcLowCut[3][10][15]; Int_t fTdcUppCut[3][10][15]; Float_t fWidthLowCut[3][10][15]; Float_t fWidthUppCut[3][10][15]; // calibration stuff Float_t fDCCalib[3][10][1000]; Int_t fOffset[3][10][48]; // DC correction Float_t fPlaneCorr[30]; Bool_t fRealSetup; public: BrDriverDC(const Char_t *Name,const Char_t *Title); void Init(); void ShowWord(); Float_t ZfromDCFront(); void ShowPlaneSpecif(); Float_t GetAngle(); Float_t PlanePosition(); Float_t GetPlanePosition(Int_t imod, Int_t iplane); Float_t SubModulePlanePosition(); Float_t GetRefDist() {return fRefDist;} Float_t GetSubModulePosition() {return (fModuleNumber-1)*fModuleDisp;} Int_t VirtualNumber(Int_t); Float_t WirePosition(Int_t); // returns wire position form the center of the left-upper positioning pin. Int_t WireStatus(Int_t); // null when wire does not exist Float_t WireEndPoints(Int_t); void AtSubModule(Int_t); void AtPlane(Int_t); void At(Int_t, Int_t); void SetMode(Int_t); Int_t GetMode(); void SetSubModuleTrack(Float_t* trPar); void SetDetectorTrack(Float_t* trPar); void SetMinWidth(Int_t MinWidth = 11) {fMinWidth=MinWidth;} void SetMinTdc(Int_t MinTdc = 0) {fMinTdc=MinTdc;} void SetMaxTdc(Int_t MaxTdc = 6000) {fMaxTdc=MaxTdc;} void ShowTrack(); void SetSetupStatus(Bool_t status){fRealSetup=status;} Float_t* GetTrack(); void GoThroughModule(Int_t* wires, Float_t* xdrifts); void GoThroughPlane(Int_t& wire, Float_t& xdrift); Float_t HitToWireDist(Int_t); Float_t GetWirePosition(Int_t); //returns wire distance from point x=0, y=0 (plane center). void SetZPosRef(Int_t ZRef) {fZPosRef = ZRef;} Int_t GetZPosRef() {return fZPosRef;} void SetDebugLevel(Int_t debLev) {fDebLevel=debLev;} Int_t DebugLevel() {return fDebLevel;} Int_t GetMaxPlaneNum() {return fMaxPlaneNum;} Int_t GetMaxWireNum() {return fNumberOfWires;} Int_t GetView(Int_t iplane){return fView[iplane];} Float_t GetZ() {return fZ;} Float_t GetX1() {return fX1;} Float_t GetY1() {return fY1;} Float_t GetX2() {return fX2;} Float_t GetY2() {return fY2;} Int_t GetMinWidth() {return fMinWidth;} Int_t GetMinTdc() {return fMinTdc;} Int_t GetMaxTdc() {return fMaxTdc;} Bool_t ReadCuts(); Bool_t HitIsOK(Int_t it,Int_t iw); void ReadCalibData(TString CalibFile,Int_t CalibChan); void ReadOffsets(TString OffsetFile,Int_t globalTdcOffset); Float_t GetDriftDist(Int_t im,Int_t ip,Int_t iw,Int_t il); void DefineCorrections(); //////Methodes for matching global tracks (probably temporary stuff) /////// private: Int_t fN,fK,fNumbOfMatching; Float_t fEff,fMeanX,fMeanY,fMeanU,fSigmaX,fSigmaY,fSigmaU,fASig; Int_t fView[10]; Int_t fException[3][10]; public: void SetRunNumber(Int_t irun); void SetMatchCondition(Int_t ik,Float_t ASig); void SetMatchCondition(Float_t fraction); Float_t GetMatchEfficiency(); Double_t Sil(Int_t n); void ResetMatchingStuff(); Bool_t CheckIfMatch(Float_t dev, Int_t iplane); Bool_t CheckIfMatch(Float_t proj, Int_t imodule, Int_t iplane, Int_t iwire); Bool_t GetMatchingStatus(); Int_t GetNumComfirmed() {return fNumbOfMatching;} Int_t LineAcceptanceStatus(BrLine3D line, Int_t opt=0); ClassDef(BrDriverDC,1) // DC Driver class for ... }; #endif // // $Log: BrDriverDC.h,v $ // Revision 1.9 2002/06/10 16:36:19 ufstasze // Added member fRealSetup // // Revision 1.8 2002/05/11 14:29:01 ufstasze // Added exception to support run 5544 for T4 // // Revision 1.7 2002/02/15 15:21:34 ufstasze // Modified ReadOffset method by adding globalTdcOffset to the list of arguments // // Revision 1.6 2001/11/05 23:42:45 hagel // Added GetRefDist method // // Revision 1.5 2001/08/23 11:33:14 staszel // Now we define plane correction in the DefineCorrections method // called only ones per job. // // Revision 1.4 2001/08/13 11:49:33 staszel // New method GetView and member fView[10]. // // Revision 1.3 2001/07/30 11:42:30 staszel // Changes that has to do with introduction of T4/T5 calibration // and tracking. // // Revision 1.2 2001/07/20 16:14:03 staszel // Changes to HitIsOk() and At(). // // Revision 1.1.1.1 2001/06/21 14:55:14 hagel // Initial revision of brat2 // // Revision 1.8 2001/06/15 15:47:44 staszel // Changes having to do with development of dc tracking package // // Revision 1.7 2001/06/13 13:29:19 staszel // the last revision of BrDriverDC // // Revision 1.6 2001/01/19 17:56:48 staszel // Changes having to do with development of BrDCTrackingModule // // Revision 1.5 2001/01/04 13:05:57 staszel // Few methods added to allow check if DC hits match global // tracks from - T1, T2 and H1. // // Revision 1.4 2000/11/23 01:32:39 brahmlib // Cleaned up code in general. BrDriverDC now usess ClassImp/ClassDef. // // Revision 1.3 2000/10/25 17:58:03 hagel // Further development of BrDCTrackingModule // // Revision 1.2 2000/10/25 14:52:05 staszel // main changes: now detector parameters declared as private members and // defined in Init method. // // Revision 1.1 2000/10/11 14:49:12 staszel // Initial revision. // //