diff -c -r -N VER-1-2/base/src/BrBaseMonitor.cxx VER-1-2-1/base/src/BrBaseMonitor.cxx *** VER-1-2/base/src/BrBaseMonitor.cxx Sat Jul 31 01:29:59 1999 --- VER-1-2-1/base/src/BrBaseMonitor.cxx Fri Nov 5 18:14:52 1999 *************** *** 85,90 **** --- 85,93 ---- #include "TEnv.h" #include "TGMsgBox.h" + #include + #include + #include const Int_t TEXTSIZE=175; *************** *** 757,766 **** // http://root.cern.ch/root/html/src/TGClient.cxx.html). GCValues_t gval; gval.fMask = kGCForeground | kGCFont; ! gval.fFont = gGXW->GetFontHandle(labelfont); gClient->GetColorByName("red", gval.fForeground); ! fRedTextGC = gGXW->CreateGC(gClient->GetRoot()->GetId(), &gval); //--------------------------------- int i, ax, ay; --- 760,771 ---- // http://root.cern.ch/root/html/src/TGClient.cxx.html). GCValues_t gval; gval.fMask = kGCForeground | kGCFont; ! // gval.fFont = gGXW->GetFontHandle(labelfont); ! gval.fFont = gVirtualX->GetFontHandle(labelfont); gClient->GetColorByName("red", gval.fForeground); ! // fRedTextGC = gGXW->CreateGC(gClient->GetRoot()->GetId(), &gval); ! fRedTextGC = gVirtualX->CreateGC(gClient->GetRoot()->GetId(), &gval); //--------------------------------- int i, ax, ay; *************** *** 951,957 **** // position relative to the parent's window Window_t wdum; ! gGXW->TranslateCoordinates(main->GetId(), GetParent()->GetId(), (((TGFrame *) main)->GetWidth() - fWidth) >> 1, (((TGFrame *) main)->GetHeight() - fHeight) >> 1, ax, ay, wdum); --- 956,966 ---- // position relative to the parent's window Window_t wdum; ! //gGXW->TranslateCoordinates(main->GetId(), GetParent()->GetId(), ! // (((TGFrame *) main)->GetWidth() - fWidth) >> 1, ! // (((TGFrame *) main)->GetHeight() - fHeight) >> 1, ! // ax, ay, wdum); ! gVirtualX->TranslateCoordinates(main->GetId(), GetParent()->GetId(), (((TGFrame *) main)->GetWidth() - fWidth) >> 1, (((TGFrame *) main)->GetHeight() - fHeight) >> 1, ax, ay, wdum); *************** *** 981,987 **** delete f3; delete f4; delete f5; delete f2; delete f1; delete fL1; delete fL2; delete fL3; delete fL4; delete fL5; delete fL6; delete fL21; ! gGXW->DeleteGC(fRedTextGC); } void ExpandDialogBox::CloseWindow() --- 990,997 ---- delete f3; delete f4; delete f5; delete f2; delete f1; delete fL1; delete fL2; delete fL3; delete fL4; delete fL5; delete fL6; delete fL21; ! gVirtualX->DeleteGC(fRedTextGC); ! // gGXW->DeleteGC(fRedTextGC); } void ExpandDialogBox::CloseWindow() diff -c -r -N VER-1-2/base/src/BrMonitorPicture.cxx VER-1-2-1/base/src/BrMonitorPicture.cxx *** VER-1-2/base/src/BrMonitorPicture.cxx Fri Sep 17 17:02:14 1999 --- VER-1-2-1/base/src/BrMonitorPicture.cxx Fri Nov 5 18:13:04 1999 *************** *** 44,49 **** --- 44,51 ---- #include "TCanvas.h" #endif + #include + ClassImp(BrMonitorPicture) //__________________________________________________________________ Binary files VER-1-2/base/src/a.out and VER-1-2-1/base/src/a.out differ diff -c -r -N VER-1-2/bb/src/BrMonitorBB.cxx VER-1-2-1/bb/src/BrMonitorBB.cxx *** VER-1-2/bb/src/BrMonitorBB.cxx Thu Jul 29 02:02:01 1999 --- VER-1-2-1/bb/src/BrMonitorBB.cxx Fri Nov 5 18:15:39 1999 *************** *** 36,41 **** --- 36,44 ---- #include "BrDigBB.h" #endif + #include + + ClassImp(BrMonitorBB) //__________________________________________________________________ Binary files VER-1-2/bin/linux/brat and VER-1-2-1/bin/linux/brat differ Binary files VER-1-2/bin/osf1/brat and VER-1-2-1/bin/osf1/brat differ diff -c -r -N VER-1-2/c1/src/BrMonitorC1.cxx VER-1-2-1/c1/src/BrMonitorC1.cxx *** VER-1-2/c1/src/BrMonitorC1.cxx Mon Aug 16 05:35:26 1999 --- VER-1-2-1/c1/src/BrMonitorC1.cxx Fri Nov 5 18:16:11 1999 *************** *** 54,59 **** --- 54,60 ---- #include "BrDigC1.h" #endif + #include ClassImp(BrMonitorC1) Binary files VER-1-2/db/src/a.out and VER-1-2-1/db/src/a.out differ Binary files VER-1-2/foo and VER-1-2-1/foo differ Binary files VER-1-2/geant/src/a.out and VER-1-2-1/geant/src/a.out differ Binary files VER-1-2/geometry/src/a.out and VER-1-2-1/geometry/src/a.out differ diff -c -r -N VER-1-2/include/BrAnaDigBB.h VER-1-2-1/include/BrAnaDigBB.h *** VER-1-2/include/BrAnaDigBB.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrAnaDigBB.h Fri Nov 5 18:26:25 1999 *************** *** 0 **** --- 1,62 ---- + #ifndef BRAT_BrAnaDigBB + #define BRAT_BrAnaDigBB + + // $Id: BrAnaDigBB.h,v 1.2 1999/01/21 23:23:18 hagel Exp $ + // + // $Log: BrAnaDigBB.h,v $ + // Revision 1.2 1999/01/21 23:23:18 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.1 1998/09/27 17:40:21 alv + // *** empty log message *** + // + // + + class TDirectory; + class TH1F; + class BrEventNode; + class BrDetectorParamsBB; + + #ifndef BRAT_BrModule + #include "BrModule.h" + #endif + + class BrAnaDigBB : public BrModule { + + BrAnaDigBB(const BrAnaDigBB&); + void operator=(const BrAnaDigBB&); + + public: + + BrAnaDigBB(); + BrAnaDigBB(Text_t *Name, Char_t *Title); + virtual ~BrAnaDigBB(); + + void SetDetectorParamsBB(BrDetectorParamsBB *par); + virtual void DefineHistograms(); + virtual void Event(BrEventNode*, BrEventNode*); + + private: + + TDirectory* hdir; // Histogram directory + TH1F** hltdc; // TDC spectra of left tubes ([0]=all) + TH1F** hladc; // ADC spectra of left tubes + TH1F** hrtdc; // TDC spectra of right tubes + TH1F** hradc; // ADC spectra of right tubes + TH1F* hlhits; // Hits per event (left tubes) + TH1F* hltubes; // Tubes hit per event (left tubes) + TH1F* hrhits; // Hits per event (right tubes) + TH1F* hrtubes; // Tubes hit per event (right tubes) + + BrDetectorParamsBB *fParams_p; + + ClassDef(BrAnaDigBB,0) // BRAHMS BB analyze digitization routine + + }; + #endif diff -c -r -N VER-1-2/include/BrAna_LinkDef.h VER-1-2-1/include/BrAna_LinkDef.h *** VER-1-2/include/BrAna_LinkDef.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrAna_LinkDef.h Fri Nov 5 18:26:25 1999 *************** *** 0 **** --- 1,16 ---- + // $Id: BrAna_LinkDef.h,v 1.1 1998/09/27 17:40:21 alv Exp $ + // + // $Log: BrAna_LinkDef.h,v $ + // Revision 1.1 1998/09/27 17:40:21 alv + // *** empty log message *** + // + // + #ifdef __CINT__ + + #pragma link off all globals; + #pragma link off all classes; + #pragma link off all functions; + + #pragma link C++ class BrAnaDigBB; + + #endif diff -c -r -N VER-1-2/include/BrBB_LinkDef.h VER-1-2-1/include/BrBB_LinkDef.h *** VER-1-2/include/BrBB_LinkDef.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrBB_LinkDef.h Fri Nov 5 18:26:20 1999 *************** *** 0 **** --- 1,37 ---- + // $Id: BrBB_LinkDef.h,v 1.5 1999/08/14 17:01:57 videbaek Exp $ + // + // $Log: BrBB_LinkDef.h,v $ + // Revision 1.5 1999/08/14 17:01:57 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.4 1999/07/29 00:02:40 hagel + // Implemented Initial revision of BrMonitorBB + // + // Revision 1.3 1998/10/09 19:20:30 videbaek + // Add the BrRdoBB and BrRdoModule classes + // + // Revision 1.2 1998/07/27 16:26:55 videbaek + // Stat on modifiing BB - not complete + // + // Revision 1.1 1998/07/02 19:40:34 videbaek + // Preliminary version of BB + // + #ifdef __CINT__ + + #pragma link off all globals; + #pragma link off all classes; + #pragma link off all functions; + + #pragma link C++ class BrDetectorParamsBB; + #pragma link C++ class BrDigBB; + #pragma link C++ class BrTrigBB; + #pragma link C++ class BrRdoBB; + #pragma link C++ class BrRdoModuleBB; + #pragma link C++ class BrDigitizeBB; + #pragma link C++ class BrMonitorBB; + + #endif diff -c -r -N VER-1-2/include/BrBaseDetector.h VER-1-2-1/include/BrBaseDetector.h *** VER-1-2/include/BrBaseDetector.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrBaseDetector.h Fri Nov 5 18:25:59 1999 *************** *** 0 **** --- 1,84 ---- + #ifndef BRAT_BrBaseDetector + #define BRAT_BrBaseDetector + // $Id: BrBaseDetector.h,v 1.4 1999/02/25 15:01:29 videbaek Exp $ + // + // $Log: BrBaseDetector.h,v $ + // Revision 1.4 1999/02/25 15:01:29 videbaek + // Add a memeber function Warning at the BrModule level. This has a buildin limit counter + // such that Warning will not go on for all events. + // The code is copied for the TObject::Warning. + // + // Revision 1.3 1999/01/21 23:23:18 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.2 1999/01/15 15:32:12 videbaek + // Updates to volume files. + // Added member histon to BrModule, and member function HistOn(). + // Added BrMath as standard math library. + // + // + /////////////////////////////////////////////////////////// + // + // BrBaseDetector + // + // BRAHMS Base Detector Class + // + // Author : K. Hagel + // Created: 4-Nov-1998 + // Version: 1.0 + // + // + /////////////////////////////////////////////////////////// + + // ROOT classes + #ifndef ROOT_TNode + #include "TNode.h" + #endif + + #ifndef ROOT_TMixture + #include "TMixture.h" + #endif + + // BRAHMS classes + // + class BrDetectorVolume; + + class BrBaseDetector : public TNode { + + public: + + BrBaseDetector(); + BrBaseDetector(Char_t *name, Char_t *title,Text_t *shape,Float_t xx,Float_t yy,Float_t zz,Text_t *rot,Option_t *opt); + BrBaseDetector(Char_t *name, Char_t *title,TShape *shape,Float_t xx,Float_t yy,Float_t zz,TRotMatrix *rot,Option_t *opt); + BrBaseDetector(Char_t *name, Char_t *title,BrDetectorVolume *vol); + virtual ~BrBaseDetector(); + + virtual void ExecuteTNodeConstructor(const Text_t *name, const Text_t *title, const Text_t *shapename, Double_t x, Double_t y, Double_t z, const Text_t *matrixname, Option_t *option); + virtual void ExecuteTNodeConstructor(const Text_t *name, const Text_t *title, TShape *shape, Double_t x, Double_t y, Double_t z, TRotMatrix *matrix, Option_t *option); + virtual Int_t DebugLevel() {return fDebugLevel;} + virtual void SetDebugLevel(Int_t level) {fDebugLevel = level;} + protected: + + TMixture *fMixture; + Int_t fGHitColor; // Marker color for geanthits + Int_t fGHitMarkerType; // MarkerType for geanthits + + private: + + virtual void CreateDefaultDetector(Text_t *name,Text_t *title,BrDetectorVolume *vol); + Int_t fDebugLevel; + + public: + + ClassDef(BrBaseDetector,1) // BRAHMS Module definitions + }; + + #endif + + diff -c -r -N VER-1-2/include/BrBaseMonitor.h VER-1-2-1/include/BrBaseMonitor.h *** VER-1-2/include/BrBaseMonitor.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrBaseMonitor.h Fri Nov 5 18:25:59 1999 *************** *** 0 **** --- 1,245 ---- + #ifndef BRAT_BrBaseMonitor + #define BRAT_BrBaseMonitor + // $Id: BrBaseMonitor.h,v 1.7 1999/07/30 23:29:58 hagel Exp $ + // + // $Log: BrBaseMonitor.h,v $ + // Revision 1.7 1999/07/30 23:29:58 hagel + // Enhancements to BrMonitor + // + // Revision 1.6 1999/07/29 00:03:23 hagel + // Implement possibility to read from file with BrBaseMonitor + // + // Revision 1.5 1999/07/28 14:59:03 hagel + // Added functionality to BrBaseMonitor + // + // Revision 1.4 1999/07/27 15:01:57 hagel + // Added timer and rate + // + // Revision 1.3 1999/07/23 22:55:58 hagel + // Implemented GUI in BrBaseMonitor. + // Implemented BrMonitorPicture usage in BrBaseMonitor GUI + // Made use of picture and GUI implementation in inherited classes; + // ie BrMonitorC1, BrMonitorMult, BrMonitorTof, BrMonitorTof, BrMonitorZDC + // + // Put in capability for BrRawDataInput not to waitForever for events + // from EVB. That is for GUI in case no data acquisition so that + // it doesn't hang up + // + // Revision 1.2 1999/06/22 00:08:30 hagel + // Implement Analysis into BrBaseMonitor + // + // Revision 1.1 1999/06/20 22:40:33 hagel + // Implemented BrBaseMonitor + // + // + /////////////////////////////////////////////////////////////////////// + // // + // BrBaseMonitor // + // // + // BRAHMS Base Monitor // + // // + // This is a base class for Online (or offline perhaps) monitor // + // objects. It contains some useful information for anyone // + // wishig to build a class to monitor their detector. // + // // + // copyright (C) BRAHMS exp. RHIC/BNL // + // Use of this software is granted for non-commerical application // + // upon addition of this note in all source code. // + // // + // Author : K. Hagel // + // Created : 6/19/99 // + // Version : 1.0 // + // Changed : // + // // + /////////////////////////////////////////////////////////////////////// + + // ROOT Classes + // + #ifndef ROOT_TCanvas + #include "TCanvas.h" + #endif + + #ifndef ROOT_TH1 + #include "TH1.h" + #endif + + #ifndef ROOT_TDirectory + #include "TDirectory.h" + #endif + + // Brat Classes + + #ifndef BRAT_BrModule + # include "BrModule.h" + #endif + + #ifndef BRAT_BrEvent + #include "BrEvent.h" + #endif + + #ifndef BRAT_BrMonitorPicture + #include "BrMonitorPicture.h" + #endif + + //Includes for BrBaseMonitor + #include "TGFrame.h" + #include "TGMenu.h" + #include "TGLayout.h" + #include "TGListBox.h" + #include "TGButton.h" + #include "TGTextBuffer.h" + #include "TGTextEntry.h" + #include "TGTextView.h" + + //Extra includes for ExpandDialogBox + #include "TGLabel.h" + + //class BrBaseMonitor : public BrModule { + class BrBaseMonitor : public TGMainFrame { + + public: + // constructors and destructors + // + BrBaseMonitor(); + BrBaseMonitor(Text_t *Name, Char_t *Title); + BrBaseMonitor(Text_t *Name, Char_t *Title,Char_t *filename, + Char_t *options=""); + virtual ~BrBaseMonitor(); + // + // Methods + // + virtual void Init(); + virtual void Event(BrEventNode* InputTable); + virtual void Draw(const Char_t *canvas=""); + virtual TCanvas *CreateCanvas(const Char_t *canvas=""); + virtual void SetMonitorCanvasName(const Char_t *name=""); + virtual const Char_t *GetMonitorCanvasName() const {return fMonitorCanvasName;} + virtual void Analyze(const Int_t numevts=0); + + virtual void Info() const; + + Int_t GetNumProcessedEvents() const {return fNumProcessedEvents;} + + protected: + TCanvas *fMonitorCanvas; //! canvas to show monitoring stuff + + TDirectory *fHistogramDir; //! histogram directory + + virtual void AddHistogram(TH1 *hist,Option_t *opt="ylog"); + virtual void AddPicture(BrMonitorPicture *pict); + virtual void ClearArrays(); + private: + Char_t fMonitorCanvasName[64]; //! name of canvas for monitoring stuff + TObject *fRawDataInput; //! raw data input pointer + Int_t fNumProcessedEvents; //! number of events it has done. + Int_t fNumEventsSinceStart; //! number processed since acq started + Int_t fEventRateCounter; //! counter for purpose of calc rate + Bool_t OpenEVB(const Char_t *node); //! open event builder + Bool_t OpenRawFile(const Char_t *filename); //! open a raw event file + Bool_t fContinueProcessing; //! toggle to indicate stop processing + TObjArray *fHistogramList; //! list of pictures with one histogram + TObjArray *fPictureList; //! list of pictures to plot + Int_t fMonitorStatus; //!status of monitor with respect to EVB + + BrMonitorPicture *fLastDisplayedPicture; //! last picture displayed + + // Gui stuff + virtual void SetupGui(); + Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t); + + TGMenuBar *fMenuBar; //! + TGPopupMenu *fMenuFile; //!, *fMenuTool, *fMenuHelp; + // TGLayoutHints *fLayout; //! + TGLayoutHints *fMenuBarLayout; //! + TGLayoutHints *fMenuBarLayout2; //! + TGLayoutHints *fMenuBarLayout3; //! + + TGVerticalFrame *fTop; //! + TGLayoutHints *fL1; //! + TGLayoutHints *fL2; //! + TGLayoutHints *fL3; //! + TGLayoutHints *fL4; //! + TGHorizontalFrame *fH1; //! + TGHorizontalFrame *fH2; //! + TGHorizontalFrame *fH3; //! + TGHorizontalFrame *fHH2; //! + TGHorizontalFrame *fHH3; //! + + TGGroupFrame *fG1; //! + TGGroupFrame *fG2; //! + TGGroupFrame *fG3; //! + TGGroupFrame *fGG2; //! + TGGroupFrame *fGG3; //! + + TGHorizontalFrame *fOptionsWindow; //! + TGGroupFrame *fOptionsGroup; //! + TGHorizontalFrame *fExpandFrame; //! + TGHorizontalFrame *fOverlayFrame; //! + + TGTextButton *fExpandButton; //! + TGCheckButton *fOverlayButton; //! + + TGListBox *fListBox; //! + TGListBox *fPictureListBox; //! + TGTextButton *fB[5]; //! + + TGTextBuffer *fTbOpt; //! + TGTextEntry *fOpt; //! + TGTextFrame *fNumEventsAnalyzedText; //! + TGTextFrame *fEventRateText; //! + TGTextFrame *fMonitorStatusText; //! + + + enum EQuikPlotGuiCommId { + kStatusStopped = 4, + kStatusAnalyzing = 5, + kStatusWaiting = 6 + }; + + public: + // + + ClassDef(BrBaseMonitor,1) // BRAHMS Beam Beam digitization routine + + }; + + + + class ExpandDialogBox : public TGTransientFrame { + + private: + TGCompositeFrame *f1, *f2, *f3, *f4, *f5, *f6, *f7; + // TGCompositeFrame *f21, *f22, *f44, *f55, *f66, *f77; + TGButton *fTestButton, *fCancelButton, *fDefaultButton; + TGPictureButton *fPictureButton; + TGRadioButton *fR[4]; + TGCheckButton *fC[9]; + TGGroupFrame *fG1, *fG2; + TGLayoutHints *fL1, *fL2, *fL3, *fL4, *fL5, *fL6, *fL21; + TGTextEntry *fXminText, *fXmaxText, *fYminText, *fYmaxText; + TGTextEntry *fFrameSelectText; + TGTextBuffer *fTbXmin, *fTbXmax, *fTbYmin, *fTbYmax; + TGTextBuffer *fTbFrameSelect; + TGLabel *fXminTitle, *fXmaxTitle, *fYminTitle, *fYmaxTitle; + GContext_t fRedTextGC; + + TH1 *fHistogram; + BrMonitorPicture *fPicture; + + void SetupWindow(const TGWindow *main); + + public: + ExpandDialogBox(const TGWindow *p, const TGWindow *main, UInt_t w, UInt_t h, + UInt_t options,TH1 *hist); + ExpandDialogBox(const TGWindow *p, const TGWindow *main, UInt_t w, UInt_t h, + UInt_t options,BrMonitorPicture *pict); + + virtual ~ExpandDialogBox(); + + virtual void CloseWindow(); + virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2); + }; + + + #endif + diff -c -r -N VER-1-2/include/BrBase_LinkDef.h VER-1-2-1/include/BrBase_LinkDef.h *** VER-1-2/include/BrBase_LinkDef.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrBase_LinkDef.h Fri Nov 5 18:25:59 1999 *************** *** 0 **** --- 1,161 ---- + // $Id: BrBase_LinkDef.h,v 1.14 1999/09/22 15:05:06 videbaek Exp $ + // + // $Log: BrBase_LinkDef.h,v $ + // Revision 1.14 1999/09/22 15:05:06 videbaek + // Add class BrMath to be accesibel form interactive ROOT. + // + // Revision 1.13 1999/08/14 17:01:57 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.12 1999/07/22 22:51:17 hagel + // Implement BrMonitorPicture + // + // Revision 1.11 1999/06/20 22:40:33 hagel + // Implemented BrBaseMonitor + // + // Revision 1.10 1999/05/12 16:22:20 hagel + // Implemented + , =+ and = operators for BrEventNode. These will be useful + // for adding events together. Has been tested for single pion events and seems + // to work. In the course of implementing this, several conflicts with const were + // identified. These were cleaned up by adding appropriate const s where needed. + // It was checked that it did not break other things. + // + // Revision 1.9 1999/03/07 00:00:41 hagel + // 1. Implemented BrFSTrackingModule. Started with BrMRSTrackingModule and made + // appropriate changes to handle the forward spectrometer. It uses the new + // track classes as well as extensively using geometry classes. It also uses + // new methods and functionality as described below. + // 2. Changed BrMagnetVolume + // a. Added method SwimBack(BrLine3D &,Double_t momentum): takes a + // track at the exit of magnet and given the momentum, calculates + // where the track would come into the front of the magnet. + // b. Added method GlobalToLocal(BrLine3D &): does a combination of + // GlobalToLocal(BrVector3D &,BrVector3D&,0) and + // GlobalToLocal(BrVector3D &,BrVector3D&,1) + // c. Added method LocalToGlobal(BrLine3D &): does a combination of + // LocalToGlobal(BrVector3D &,BrVector3D&,0) and + // LocalToGlobal(BrVector3D &,BrVector3D&,1) + // d. Changed BrDetectorVolume: same additions of methods GlobalToLocal + // and LocalToGlobal as in BrMagnetVolume + // 2. Added a parameter base class BrDetectorParamsBase: helps when reading + // in database files. Declared ASCII reading routines to be virtual. + // Has main ReadASCIIFile which decodes the ASCII parameter files, then + // calls the detector specific methods SetASCIIParameter + // 3. Implemented SetASCIIParameter in BrDetectorParamsDC, BrDetectorParamsTPC, + // BrDetectorParamsTof, BrDetectorParamsBB + // 4. Implemented BrParameterDbManager. It currently works similarly to + // BrGeometryDbManager and creates the BrDetectorParamsXXX objects when + // called. These objects then read in ASCII parameter files with a currently + // "well defined" format using the above implemented routines using a constructor: + // BrDetectorParamsXXX(Char_t *name, Char_t *title,Char_t *ASCIIFileName); + // 5. If no parameter file is specified, it executes the constructor we + // have been using so far, namely BrDetectorParamsXXX(Char_t *name,Char_t *title). + // These constructors generate default parameters and are semi-intelligent + // which means they generate approximately appropriate parameters depending + // upon which detector they are. I should say that the parameters were + // deemed appropriate at the time of writing the SetDefaultParams routine. + // a. It is used in the same way as BrGeometryDbManager, that is: + // BrParameterDbManager *gParamDb = BrParameterDbManager::Instance(); + // gParamDb->SetDbParameterFileName("DetectorParameters.txt"); + // 6. Added a new directory, params, in BRAT. This directory has the file + // DetectorParameters.txt in it. If the BrParameterDbManager is started + // and the DetectorParameter.txt file is specified, it will look in the + // $BRATSYS/params directory if it cannot find the file in the directory + // that the user has set default to. + // 7. Implemented BrParameterDbManager in DC digitize and tracking code. The + // SetDetectorParams methods have been moved to private and can no longer be + // used from the macro or program. + // 8. Implemented BrParameterDbManager in TPC digitize and tracking code. + // 9. Implemented BrParameterDbManager in Tof Calibrate and GeneratePid code. + // 10 Changed the GetEntries() in BrDataTable to use the GetLast()+1 method in + // TObjArray. This should be much faster, but has the caveat that it assumes + // that all slots in TObjArray are full. That seems to me to be the case + // in how we use TObjArray at least in BrDataTable, but if problems arise due + // to this change, it can always be easily changed back. It has been used a + // fair amount before checking in and no problems were found. + // + // Modified Files: + // base/inc/BrBase_LinkDef.h base/inc/BrDataTable.h + // base/inc/BrDetectorVolume.h base/inc/BrMagnetVolume.h + // base/inc/LinkDefBratBaseINC.h base/src/BrDataTable.cxx + // base/src/BrDetectorVolume.cxx base/src/BrEventNode.cxx + // base/src/BrMagnetVolume.cxx base/src/BrTableManager.cxx + // base/src/Makefile bb/inc/BrDetectorParamsBB.h + // bb/src/BrDetectorParamsBB.cxx db/inc/BrParameterDbManager.h + // db/src/BrParameterDbManager.cxx dc/inc/BrDetectorParamsDC.h + // dc/src/BrDetectorDC.cxx dc/src/BrDetectorParamsDC.cxx + // dc/src/BrDigitizeDC.cxx dc/src/BrLocalTrackDC.cxx + // geometry/inc/BrPlane3D.h geometry/src/BrPlane3D.cxx + // params/DetectorParameters.txt tof/inc/BrDetectorParamsTof.h + // tof/src/BrDetectorParamsTof.cxx tof/src/BrGeneratePid.cxx + // tpc/inc/BrDetectorParamsTPC.h tpc/src/BrDetectorParamsTPC.cxx + // tpc/src/BrDetectorTPC.cxx tpc/src/BrDigitizeTPC.cxx + // tpc/src/BrLocalTrackTPC.cxx track/inc/BrDetectorTrack.h + // track/inc/BrFSTrackingModule.h + // track/inc/BrSpectrometerTracks.h track/src/BrDetectorTrack.cxx + // track/src/BrFSTrackingModule.cxx + // track/src/BrSpectrometerTracks.cxx + // + // Revision 1.8 1999/02/06 02:39:45 hagel + // Include support for BrTableManager + // + // Revision 1.7 1998/12/21 20:17:58 videbaek + // Added magnet voluems. Additional features for Modules. + // + // Revision 1.6 1998/12/08 20:50:19 hagel + // Add Support for BrBaseDetector + // + // Revision 1.5 1998/08/25 17:00:09 hagel + // Add BrEventIO + // + // Revision 1.4 1998/07/20 17:37:03 videbaek + // updated files + // + // Revision 1.3 1998/04/30 17:12:17 videbaek + // Added functionality to BrIOModule + // + // Revision 1.2 1998/04/06 21:11:45 videbaek + // Clean up and additions for Win95 + // + // + #ifdef __CINT__ + + #pragma link off all globals; + #pragma link off all classes; + #pragma link off all functions; + + //#pragma link C++ function operator<<(ostream&,BrDetectorVolume*); + + #pragma link C++ class BrEvent; + #pragma link C++ class BrEventIO-; + #pragma link C++ class BrEventNode; + #pragma link C++ class BrDataObject; + #pragma link C++ class BrClonesArray; + #pragma link C++ class BrCreationID; + #pragma link C++ class BrEventHeader-; + #pragma link C++ class BrDataTable; + #pragma link C++ class BrModuleContainer; + #pragma link C++ class BrModule; + #pragma link C++ class BrIOModule; + #pragma link C++ class BrMagnetVolume; + #pragma link C++ class BrDetectorVolume; + #pragma link C++ class BrUnits; + #pragma link C++ class BrMath ; + #pragma link C++ class BrBaseDetector; + #pragma link C++ class BrDetectorParamsBase; + #pragma link C++ class BrTableManager; + #pragma link C++ class BrBaseMonitor; + #pragma link C++ class BrMonitorPicture; + + #pragma link C++ function operator<<(ostream&,const BrEventIO&); + + #pragma link C++ function operator+(const BrEventNode&,const BrEventNode&); + #pragma link C++ function operator+(const BrDataTable&,const BrDataTable&); + + #endif + + diff -c -r -N VER-1-2/include/BrC1_LinkDef.h VER-1-2-1/include/BrC1_LinkDef.h *** VER-1-2/include/BrC1_LinkDef.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrC1_LinkDef.h Fri Nov 5 18:26:34 1999 *************** *** 0 **** --- 1,23 ---- + // $Id: BrC1_LinkDef.h,v 1.1 1999/06/22 00:06:38 hagel Exp $ + // + // $Log: BrC1_LinkDef.h,v $ + // Revision 1.1 1999/06/22 00:06:38 hagel + // Initial revision of C1 structures and monitoring code + // + // Revision 1.2 1999/06/20 22:38:50 hagel + // Implemented BrMonitorZDC + // + // Revision 1.1 1999/06/09 02:49:26 hagel + // Initial revision + // + // + #ifdef __CINT__ + + #pragma link off all globals; + #pragma link off all classes; + #pragma link off all functions; + + #pragma link C++ class BrDigC1; + #pragma link C++ class BrMonitorC1; + + #endif diff -c -r -N VER-1-2/include/BrCalTof.h VER-1-2-1/include/BrCalTof.h *** VER-1-2/include/BrCalTof.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrCalTof.h Fri Nov 5 18:26:12 1999 *************** *** 0 **** --- 1,70 ---- + #ifndef BRAT_BrCalTof + #define BRAT_BrCalTof + + // $Id: BrCalTof.h,v 1.2 1999/02/19 21:31:06 bearden Exp $ + // + // $Log: BrCalTof.h,v $ + // Revision 1.2 1999/02/19 21:31:06 bearden + // Added ADCs to Tof calibration, now returns ADC sum (top+bottom) in channels + // + // Revision 1.1 1999/02/06 02:34:47 hagel + // Initial revision + // + // + // + /////////////////////////////////////////////////////////////////////// + // // + // BrCalTof // + // // + // BRAHMS Raw Data Element for Time-Of-Flight element // + // // + // Author : F.Videbaek // + // Created : February 98 // + // Version : 1.0 // + // Changed : added energy as well IGB 18FEB99 // + // // + // // + /////////////////////////////////////////////////////////////////////// + + // Root Classes + #ifndef ROOT_TObject + #include "TObject.h" + #endif + + // Brahms Classes + // + class BrCalTof: public TObject { + + public: + BrCalTof(){ }; + + virtual ~BrCalTof() { }; + + Bool_t IsSortable() const {return kTRUE;} + Int_t Compare(TObject *BrCalTof); + + virtual Int_t GetSlatno() const {return fSlatno;} + virtual Float_t GetTof() const {return fTof;} + virtual Float_t GetSlEnergy() const {return fEnergy;} + virtual Float_t GetPosition() const {return fPosition;} + + virtual void SetSlatno(Int_t i) {fSlatno = i;} + virtual void SetTof(Float_t time) {fTof = time;} + virtual void SetSlEnergy(Float_t energy) {fEnergy = energy;} + virtual void SetPosition(Float_t pos) {fPosition = pos;} + + virtual void List(); + + private: + Int_t fSlatno; // SlatNumber + Float_t fTof; // Calibrated Time of Flight + Float_t fPosition; // Calibrated Position + Float_t fEnergy; // Energy calculated in BrCalibrateTof + + public: + + ClassDef(BrCalTof,1) // BRAHMS Tof Digitized data class + + }; + + #endif diff -c -r -N VER-1-2/include/BrCalibrateTof.h VER-1-2-1/include/BrCalibrateTof.h *** VER-1-2/include/BrCalibrateTof.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrCalibrateTof.h Fri Nov 5 18:26:12 1999 *************** *** 0 **** --- 1,79 ---- + #ifndef BRAT_BrCalibrateTof + #define BRAT_BrCalibrateTof + // $Id: BrCalibrateTof.h,v 1.1 1999/02/04 22:04:55 hagel Exp $ + // $Log + // + // Tof Digitization Module + // + /////////////////////////////////////////////////////////////////////// + // // + // BrCalibrateTof // + // // + // BRAHMS Tof analysis class // + // // + // Take digitized data and get TOF for use in PID in MDC-II // + // // + // Author : K. Hagel // + // Created : 1/12/99 // + // Version : 1.0 // + // Changed : // + // // + /////////////////////////////////////////////////////////////////////// + + //ROOT Includes + #ifndef ROOT_TH2 + #include "TH2.h" + #endif + + //BRAT Includes + #ifndef BRAT_BrModule + #include "BrModule.h" + #endif + + class BrEventNode; + class BrDetectorParamsTof; + class BrDetectorVolume; + + class BrCalibrateTof : public BrModule { + + public: + // constructors and destructors + // + BrCalibrateTof(); + BrCalibrateTof(Text_t *Name, Char_t *Title); + virtual ~BrCalibrateTof(); + // + // Methods + // + virtual void Init(); + virtual void Event(BrEventNode* InputTable, BrEventNode* OutputTable); + + private: + BrDetectorVolume* fVolumeParamsTof_p; + BrDetectorParamsTof* fParamsTof_p; + + TH2F *hT1vsT2; + + // Following moved to private since BrGeometryDbManager and BrParameterDbManager + // are now implemented. + void SetDetectorParamsTof(BrDetectorParamsTof* par); + void SetDetectorParamsTof(const BrDetectorParamsTof& par); + virtual void SetDetectorVolume(BrDetectorVolume* vol){ fVolumeParamsTof_p = vol;} + + public: + virtual BrDetectorParamsTof* GetDetectorParamsTof() const { + return (BrDetectorParamsTof*) fParamsTof_p;} + virtual BrDetectorVolume* GetDetectorVolume() const { + return fVolumeParamsTof_p;} + BrDetectorVolume* DetectorVolume(){return fVolumeParamsTof_p;} + + void ListDetectorParameters() const; + void Info() const; + // + + ClassDef(BrCalibrateTof,1) // BRAHMS Tof calibration routine + + }; + + #endif + diff -c -r -N VER-1-2/include/BrClonesArray.h VER-1-2-1/include/BrClonesArray.h *** VER-1-2/include/BrClonesArray.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrClonesArray.h Fri Nov 5 18:25:59 1999 *************** *** 0 **** --- 1,69 ---- + #ifndef BRAT_BrClonesArray + #define BRAT_BrClonesArray + + // $Id: BrClonesArray.h,v 1.4 1999/01/21 23:23:18 hagel Exp $ + // + // $Log: BrClonesArray.h,v $ + // Revision 1.4 1999/01/21 23:23:18 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.3 1998/09/16 20:02:34 alv + // Removed unused a in definition of copy constructors. + // Added method GetSize(). + // + // Revision 1.2 1998/04/06 21:11:46 videbaek + // Clean up and additions for Win95 + // + // + ////////////////////////////////////////////////////////////////////// + // // + // BrClonesArray // + // // + // A Class to hide the ROOT TClonesArray and provide possible // + // special functionality for BRAHMS analysis // + // // + // Author : Kris Hagel (hagel@comp.tamu.edu) // + // Created : 10/MAR/1998 Version : 1.0 // + // Changed : // + // // + ////////////////////////////////////////////////////////////////////// + + // Root Classes + #ifndef ROOT_TClonesArray + #include "TClonesArray.h" + #endif + + + class BrClonesArray : public TClonesArray { + + public: + + BrClonesArray() : TClonesArray() { } ; + BrClonesArray(Text_t *classname, Int_t size = 1000, Bool_t call_dtor = kTRUE) + : TClonesArray(classname,size,call_dtor) { }; + BrClonesArray(const TClonesArray &) { MayNotUse("TClonesArray"); } + BrClonesArray(const BrClonesArray &) { MayNotUse("BrClonesArray"); } + void RemoveAndCompressAt(Int_t i) {RemoveAt(i);Compress();} + Int_t GetSize() const { return fSize; } + + virtual ~BrClonesArray(); + + private: + + public: + + ClassDef(BrClonesArray,1) // BRAHMS clones data container class + + }; + + #endif + + + + diff -c -r -N VER-1-2/include/BrCombinedHit.h VER-1-2-1/include/BrCombinedHit.h *** VER-1-2/include/BrCombinedHit.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrCombinedHit.h Fri Nov 5 18:26:09 1999 *************** *** 0 **** --- 1,89 ---- + #ifndef BRAT_BrCombinedHit + #define BRAT_BrCombinedHit + + // $Id: BrCombinedHit.h,v 1.6 1999/01/21 23:23:27 hagel Exp $ + // + // $Log: BrCombinedHit.h,v $ + // Revision 1.6 1999/01/21 23:23:27 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.5 1999/01/15 16:37:03 videbaek + // Working version of MRS tracking of mtp1,mtp2 and new general track + // classes. Changes also added to BrModuleMatchTrack for this reason. + // + // + /////////////////////////////////////////////////////////////////////// + // // + // BrCombinedHit // + // // + // BRAHMS Hit class // + // // + // Author : Kris Hagel (hagel@comp.tamu.edu) // + // Created : 9/Mar/1998 // + // Version : 1.0 // + // Changed : // + // // + /////////////////////////////////////////////////////////////////////// + + #include "iostream.h" + + // Root Classes + #ifndef ROOT_TObject + #include "TObject.h" + #endif + + // Brahms Classes + class BrTPCCluster; + + class BrCombinedHit: public TObject { + + public: + BrCombinedHit(); + + virtual ~BrCombinedHit(); + + virtual Int_t GetID() {return fID;} + virtual Float_t *GetPos() {return fPos;} + virtual Float_t *GetDpos() {return fDpos;} + virtual Int_t GetImod() {return fImod;} + virtual Int_t GetNhit() {return fNhit;} + virtual Int_t GetStat() {return fStat;} + virtual Int_t GetType() {return fType;} + virtual Int_t GetPlace() {return fPlace;} + + virtual void SetID(Int_t i) {fID = i;} + virtual void SetPos(Float_t *pos) {for(Int_t i=0;i<3;i++) fPos[i] = pos[i];} + virtual void SetDpos(Float_t *dpos) {for(Int_t i=0;i<2;i++) fDpos[i] = dpos[i];} + virtual void SetImod(Int_t i) {fImod = i;} + virtual void SetNhit(Int_t i) {fNhit = i;} + virtual void SetStat(Int_t i) {fStat = i;} + virtual void SetType(Int_t i) {fType = i;} + virtual void SetStatBit(Int_t i) {fStat |= i;} + virtual void SetPlace(Int_t i) {fPlace = i;} + + + private: + + Int_t fID; // Unique Id + Float_t fPos[3]; // Hit position in local coordinates + Float_t fDpos[2]; // Estimated uncertainty on (x,y) position + Int_t fImod; // Rownumber for TPC; Module+row for DC.. + Int_t fNhit; // + Int_t fStat; // + Int_t fType; // + Int_t fPlace; // Test to see where it was created; + + public: + friend ostream& operator<< (ostream& os,BrCombinedHit* hitcmb); + + ClassDef(BrCombinedHit,1) // BRAHMS hit data class + + }; + + #endif diff -c -r -N VER-1-2/include/BrCoordinateSystem.h VER-1-2-1/include/BrCoordinateSystem.h *** VER-1-2/include/BrCoordinateSystem.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrCoordinateSystem.h Fri Nov 5 18:25:57 1999 *************** *** 0 **** --- 1,106 ---- + #ifndef BRAT_BrCoordinateSystem + #define BRAT_BrCoordinateSystem + + // $Id: BrCoordinateSystem.h,v 1.3 1999/01/21 23:23:24 hagel Exp $ + // + // $Log: BrCoordinateSystem.h,v $ + // Revision 1.3 1999/01/21 23:23:24 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.2 1998/12/21 20:32:03 videbaek + // coordinate system changes mainly + // + // Revision 1.1 1998/12/01 20:49:57 videbaek + // Added several classes to Geometry. Updated source and makefile(s) + // - BrLine3D + // - BrCoordinateSystem + // - BrRotMatrix + // + // + ////////////////////////////////////////////////////////////////////////////// + // + // BrCoordinateSysten + // + // 3D Coordinate systems and related transformations. + // Part of the Geometry classes Points, Line, Lines, Planes. + // + // Author: F.Videbaek + // Created: November 1998 + // + // + ///////////////////////////////////////////////////////////////////////////// + + #include + // + // ROOT classes + // + #ifndef ROOT_TObject + #include "TObject.h" + #endif + + // Brat classes + #ifndef BRAT_BrRotMatrix + #include "BrRotMatrix.h" + #endif + + #ifndef BRAT_BrVector3D + #include "BrVector3D.h" + #endif + + + class BrCoordinateSystem : public TObject { + + public: + + // constructors and destructors + // + BrCoordinateSystem(); + BrCoordinateSystem(const BrVector3D&, const BrRotMatrix&); + ~BrCoordinateSystem(){}; + + + public: + // access methods + // + BrVector3D GetOrigin() const {return fOrigin;}; + + void SetOrigin(const BrVector3D& vector) { fOrigin = vector;}; + void SetRotMatrix(const BrRotMatrix& rotm){ fRotMatrix = rotm; SetInverseMatrix();} + + // + // Class operations + // + BrRotMatrix* GetRotMatrix() {return &fRotMatrix;}; + BrVector3D RotateToMaster(const BrVector3D&); + BrVector3D RotateFromMaster(const BrVector3D&); + BrVector3D TransformToMaster(const BrVector3D&); + BrVector3D TransformFromMaster(const BrVector3D&); + // BrVector3D TransLateToMaster(const BrVector3D&); + // BrVector3D TransLateFromMaster(const BrVector3D&); + + private: + + BrVector3D fOrigin; // Origin for coordinate system in Master system + BrRotMatrix fRotMatrix; // Rotation matrix for the coordinate system. + Double_t fInverseRotMatrix[9]; // Inverse Rotation matrix for the coordinate system + + void SetInverseMatrix(); + + + ClassDef(BrCoordinateSystem,1) + + }; + + // + // Related Global functions + // + + ostream& operator<<(ostream& str, const BrCoordinateSystem&); + + #endif diff -c -r -N VER-1-2/include/BrCreationID.h VER-1-2-1/include/BrCreationID.h *** VER-1-2/include/BrCreationID.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrCreationID.h Fri Nov 5 18:26:00 1999 *************** *** 0 **** --- 1,81 ---- + #ifndef BRAT_BrCreationID + #define BRAT_BrCreationID + + // $Id: BrCreationID.h,v 1.4 1999/01/21 23:23:18 hagel Exp $ + // + // $Log: BrCreationID.h,v $ + // Revision 1.4 1999/01/21 23:23:18 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.3 1998/08/14 21:26:22 videbaek + // Some cleanup mods + // + // Revision 1.2 1998/04/06 21:11:46 videbaek + // Clean up and additions for Win95 + // + // + /////////////////////////////////////////////////////////////////////// + // // + // TBrCreationID // + // // + // Stores creation details for BrDataObject // + // // + // Author : Kris Hagel // + // Created : October 1997 // + // Version : 1.0 // + // Changed : 2/24/98 // + // // + /////////////////////////////////////////////////////////////////////// + + // Root Classes + + #ifndef ROOT_TClass + #include "TClass.h" + #endif + + #ifndef ROOT_TObject + #include "TObject.h" + #endif + + #ifndef ROOT_TSystem + #include "TSystem.h" + #endif + + #include "time.h" + // + // BRAHMS Classes + // + + class BrCreationID : public TObject { + + public: + + BrCreationID(); + BrCreationID(TObject *Creator); + + virtual ~BrCreationID(); + + private: + + time_t fTime; // time when object was created + TNamed *fCreatorClassName; // Class name of creating object + Version_t fCreatorClassVersion;// Class version of creating object + TInetAddress *fHost; // Host running creating process + UInt_t fUserID; // User ID for creating process + + public: + + ClassDef(BrCreationID,1) // BRAHMS data object creation identifier + }; + + #endif + + + + diff -c -r -N VER-1-2/include/BrDCHit.h VER-1-2-1/include/BrDCHit.h *** VER-1-2/include/BrDCHit.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrDCHit.h Fri Nov 5 18:26:18 1999 *************** *** 0 **** --- 1,67 ---- + #ifndef BRAT_BrDCHit + #define BRAT_BrDCHit + + // $Id: BrDCHit.h,v 1.2 1999/01/21 23:23:21 hagel Exp $ + // + // $Log: BrDCHit.h,v $ + // Revision 1.2 1999/01/21 23:23:21 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 + // + + /////////////////////////////////////////////////////////////////////// + // // + // BrDCHits // + // // + // BRAHMS Hit class // + // // + // Author : Kris Hagel (hagel@comp.tamu.edu) // + // Created : 13-Mar-1998 // + // Version : 1.0 // + // Changed : // + // // + /////////////////////////////////////////////////////////////////////// + + // Root Classes + + #ifndef ROOT_TObject + #include "TObject.h" + #endif + + // Brahms Classes + class BrCombinedHit; + class BrDCHitPosition; + + class BrDCHit: public TObject { + + public: + BrDCHit(); + + virtual ~BrDCHit() { }; + + virtual Int_t GetImod() {return fImod;} + BrCombinedHit *GetHitcmb(){return fHitcmb;} + BrDCHitPosition *GetHitpos() {return fHitpos;} + + virtual void SetImod(Int_t i) {fImod = i;} + virtual void SetHitcmb(BrCombinedHit *hitcmb){fHitcmb = hitcmb;} + virtual void SetHitpos(BrDCHitPosition *hitpos) {fHitpos = hitpos;} + + private: + + Int_t fImod; + BrCombinedHit *fHitcmb; + BrDCHitPosition *fHitpos; + + public: + + ClassDef(BrDCHit,1) // BRAHMS DC hit data class + + }; + + #endif diff -c -r -N VER-1-2/include/BrDCHitPosition.h VER-1-2-1/include/BrDCHitPosition.h *** VER-1-2/include/BrDCHitPosition.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrDCHitPosition.h Fri Nov 5 18:26:18 1999 *************** *** 0 **** --- 1,81 ---- + #ifndef BRAT_BrDCHitPosition + #define BRAT_BrDCHitPosition + // $Id: BrDCHitPosition.h,v 1.3 1999/01/21 23:23:22 hagel Exp $ + // + // $Log: BrDCHitPosition.h,v $ + // Revision 1.3 1999/01/21 23:23:22 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 + // + + /////////////////////////////////////////////////////////////////////// + // // + // BrDCHitPosition // + // // + // BRAHMS Hit class // + // // + // Author : Kris Hagel (hagel@comp.tamu.edu) // + // Created : 13-Mar-1998 // + // Version : 1.0 // + // Changed : // + // // + /////////////////////////////////////////////////////////////////////// + #include "iostream.h" + + // Root Classes + + #ifndef ROOT_TObject + #include "TObject.h" + #endif + + // Brahms Classes + #ifndef BRAT_BrDCPlane + #include "BrDCPlane.h" + #endif + + class BrDCHitPosition: public TObject { + + public: + BrDCHitPosition(); + + virtual ~BrDCHitPosition() { }; + + virtual Float_t GetXwire() {return fXwire;} + virtual Float_t GetXdrift(){return fXdrift;} + virtual Float_t GetSign() {return fSign;} + virtual Float_t GetUhit() {return fUhit;} + + virtual void SetXwire(Float_t x) {fXwire = x;} + virtual void SetXdrift(Float_t x){fXdrift = x;} + virtual void SetSign(Float_t x) {fSign = x;} + virtual void SetUhit(Float_t x) {fUhit = x;} + + private: + + Float_t fXwire; + Float_t fXdrift; + Float_t fSign; + Float_t fUhit; + + // From SONATA++ + /* float xwire; + float xdrift; + float sign; + float uhit; + digHIT* dighit; + gHITS* ghits; + int hitcmb;*/ + + public: + friend ostream& operator<< (ostream& os,BrDCHitPosition* hitpos); + + ClassDef(BrDCHitPosition,1) // PHOBOS hit data class + + }; + + #endif diff -c -r -N VER-1-2/include/BrDCPlane.h VER-1-2-1/include/BrDCPlane.h *** VER-1-2/include/BrDCPlane.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrDCPlane.h Fri Nov 5 18:26:18 1999 *************** *** 0 **** --- 1,120 ---- + #ifndef BRAT_BrDCPlane + #define BRAT_BrDCPlane + + // $Id: BrDCPlane.h,v 1.4 1999/04/07 21:11:19 hagel Exp $ + // + // $Log: BrDCPlane.h,v $ + // Revision 1.4 1999/04/07 21:11:19 hagel + // Add support for BrDCPlane to specify stagger + // + // Revision 1.3 1999/03/16 21:04:11 hagel + // 1. Make BrDCPlane inherit from BrPlane3D. BrDCPlane how has information about + // where it is located. + // 2. Change BrDigitizeDC and BrLocalTrackDC to make use of new BrDCPlane information. + // 3. Move Decode(...) from BrDigitizeDC to BrLocalTrackDC. + // 4. Change cut parameters to be member data with defaults rather than hardwired. + // + // Revision 1.2 1999/01/21 23:23:22 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 + // + + /////////////////////////////////////////////////////////////////////// + // // + // BrDCPlane // + // // + // // + // // + /////////////////////////////////////////////////////////////////////// + + // Root Classes + /* + #ifndef ROOT_TNamed + #include "TNamed.h" + #endif + */ + + #ifndef BRAT_BrPlane3D + #include "BrPlane3D.h" + #endif + // BRAHMS Classes + + //class BrDCPlane : public TNamed { + class BrDCPlane : public BrPlane3D { + + public: + BrDCPlane(); + BrDCPlane(Char_t *name,Char_t *title); + BrDCPlane(Char_t *name,Char_t *title, + Float_t wirdis, Float_t wirang,Float_t stagger); + BrDCPlane(Char_t *name,Char_t *title, + Float_t wirdis, Float_t wirang,Float_t stagger, + const BrVector3D &p1, const BrVector3D &p2, const BrVector3D &p3); + + BrDCPlane(Char_t *name, Char_t *title, + Float_t wirdis, Float_t wirang,Float_t stagger, + const Double_t x1, const Double_t y1, const Double_t z1, + const Double_t x2, const Double_t y2, const Double_t z2, + const Double_t x3, const Double_t y3, const Double_t z3 ); + + BrDCPlane(Char_t *name, Char_t *title, + Float_t wirdis, Float_t wirang,Float_t stagger,const Double_t z); + + virtual ~BrDCPlane(); + + void SetDefaultParams(); + + // Int_t GetNwire() {return fNwire;} + Int_t GetNwire(); + Float_t GetWirdis() {return fWirdis;} + Float_t GetWirang() {return fWirang;} + const Text_t *GetName() {return fName;} + const Text_t *GetTitle() {return fTitle;} + + Double_t GetPlaneZ(Float_t x,Float_t y) {if (GetC() !=0) return -(x*GetA() + y*GetB() + GetD())/GetC(); else return 0;} + Float_t GetWirePosition(const Int_t iwire); + Int_t GetWireNumber(const Float_t xpos); + Float_t GetStagger() {return fStagger;} + + Float_t GetTdcConv(const Int_t iwire); + Float_t GetTdcOffset(const Int_t iwire); + Float_t GetRealTime(const Int_t adc_time,const Int_t iwire); + + // void SetNwire(Int_t i) {fNwire = i;} + void SetWirdis(Float_t x) {fWirdis = x;} + void SetWirang(Float_t x) {fWirang = x;} + void SetStagger(Float_t x) {fStagger = x;} + void SetName(const Text_t *name); + void SetTitle(const Text_t *title); + + void ListParameters(); + private: + + Char_t fName[64]; + Char_t fTitle[64]; + // Int_t fNwire; + Float_t fWirdis; + Float_t fWirang; + Float_t fStagger; + + // For the moment, use same TDC conversion factors for all wires. + // This will change later. + Float_t fTdcConv; + Float_t fTdcOffset; + + public: + + ClassDef(BrDCPlane,1) // BRAHMS detector volume class + + }; + + #endif + + + + diff -c -r -N VER-1-2/include/BrDC_LinkDef.h VER-1-2-1/include/BrDC_LinkDef.h *** VER-1-2/include/BrDC_LinkDef.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrDC_LinkDef.h Fri Nov 5 18:26:18 1999 *************** *** 0 **** --- 1,20 ---- + #ifdef __CINT__ + + #pragma link off all globals; + #pragma link off all classes; + #pragma link off all functions; + + #pragma link C++ global kAllSinglePlanes; + #pragma link C++ global kPairsWhenTogether; + + #pragma link C++ function operator<<(ostream&, BrDigHit*); + #pragma link C++ class BrDetectorParamsDC; + #pragma link C++ class BrDigitizeDC; + #pragma link C++ class BrLocalTrackDC; + #pragma link C++ class BrDCHit; + #pragma link C++ class BrDCHitPosition; + #pragma link C++ class BrDigHit; + #pragma link C++ class BrDCPlane; + #pragma link C++ class BrDetectorDC; + + #endif diff -c -r -N VER-1-2/include/BrDaqMapUtil.h VER-1-2-1/include/BrDaqMapUtil.h *** VER-1-2/include/BrDaqMapUtil.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrDaqMapUtil.h Mon Nov 8 14:01:06 1999 *************** *** 0 **** --- 1,21 ---- + #ifndef BRAT_BrDaqMapUtil + #define BRAT_BrDaqMapUtil + // + // Basic data types: uint32 and uint16. + // + typedef unsigned int uint32; + typedef unsigned short uint16; + typedef unsigned char uint8; + + + extern void map96(const char* connector, + const char* mapString, + uint32 map[96]); + + extern void findFastbusModule(const void* dataRecord, + uint32 dataRecordLength, + uint32 fbslot, + uint32*& dptr, + uint32& dsize); + + #endif diff -c -r -N VER-1-2/include/BrDataObject.h VER-1-2-1/include/BrDataObject.h *** VER-1-2/include/BrDataObject.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrDataObject.h Fri Nov 5 18:26:00 1999 *************** *** 0 **** --- 1,108 ---- + #ifndef BRAT_BrDataObject + #define BRAT_BrDataObject + + // $Id: BrDataObject.h,v 1.8 1999/05/12 16:22:20 hagel Exp $ + // + // $Log: BrDataObject.h,v $ + // Revision 1.8 1999/05/12 16:22:20 hagel + // Implemented + , =+ and = operators for BrEventNode. These will be useful + // for adding events together. Has been tested for single pion events and seems + // to work. In the course of implementing this, several conflicts with const were + // identified. These were cleaned up by adding appropriate const's where needed. + // It was checked that it did not break other things. + // + // Revision 1.7 1999/01/21 23:23:18 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.6 1998/08/20 14:00:33 hagel + // Add Copy method + // + // Revision 1.5 1998/08/17 16:38:12 hagel + // Make BrDataObject inherit from TObject for the purpose of using in Trees + // Include fName, fTitle data members + // Include SetName, GetName, SetTitle, GetTitle methods + // All this because TTree seems to have problem working with TString. + // + // Revision 1.4 1998/08/14 21:26:23 videbaek + // Some cleanup mods + // + // Revision 1.3 1998/08/13 22:20:56 hagel + // Eliminate fCreationID for the moment + // + // Revision 1.2 1998/03/09 20:53:32 videbaek + // Ensure that pointers are non-NULL before deleting + // + // + /////////////////////////////////////////////////////////////////////// + // // + // BrDataObject // + // // + // BRAHMS data storage class. // + // // + // Author : Kris Hagel from a template by Gunther Roland // + // Created : July 13 1997 // + // Version : 1.1 // + // Changed : 2/24/98 fv + // // + /////////////////////////////////////////////////////////////////////// + + // Root Classes + #ifndef ROOT_TNamed + #include "TNamed.h" + #endif + + // BRAHMS Classes + #ifdef _use_creation_id + #ifndef BRAT_BrCreationID + #include "BrCreationID.h" + #endif + #endif + + class BrDataObject : public TObject { + + public: + + BrDataObject(); + BrDataObject(const Char_t* Name, const Char_t* Title = NULL); + + virtual ~BrDataObject(); + #ifdef _use_creation_id + virtual BrCreationID *GetCreationID() const { return fCreationID; } + #endif + virtual Bool_t IsPersistent() const { return fIsPersistent; } + virtual Bool_t IsNode() const {return kFALSE;} + virtual void SetCreationID(TObject *Creator); + virtual void SetPersistent(Bool_t b) { fIsPersistent = b; } + + virtual const Text_t *GetName() const {return fName;} + virtual const Text_t *GetTitle() const {return fTitle;} + virtual void SetName(const Text_t *name); + virtual void SetTitle(const Text_t *title); + virtual void Copy(BrDataObject &dataobject); + + protected: + + #ifdef _use_creation_id + BrCreationID *fCreationID; // Globally unique ID specifying creation details + #endif + + Bool_t fIsPersistent; // Flag marking object as persistent + Char_t fName[64]; //Name of data object; + Char_t fTitle[64]; //Title of data object; + + public: + ClassDef(BrDataObject,1) // BRAHMS data container class + + }; + + #endif + + + + diff -c -r -N VER-1-2/include/BrDataTable.h VER-1-2-1/include/BrDataTable.h *** VER-1-2/include/BrDataTable.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrDataTable.h Fri Nov 5 18:26:00 1999 *************** *** 0 **** --- 1,188 ---- + // $Id: BrDataTable.h,v 1.9 1999/09/13 21:06:44 videbaek Exp $ + // $Log: BrDataTable.h,v $ + // Revision 1.9 1999/09/13 21:06:44 videbaek + // Modify constructor to deal properly with Title param + // + // Revision 1.8 1999/05/12 16:22:20 hagel + // Implemented + , =+ and = operators for BrEventNode. These will be useful + // for adding events together. Has been tested for single pion events and seems + // to work. In the course of implementing this, several conflicts with const were + // identified. These were cleaned up by adding appropriate consts where needed. + // It was checked that it did not break other things. + // + // Revision 1.7 1999/04/28 15:19:58 hagel + // Benevolent changes to make more interchangable with TObjArray + // + // Revision 1.6 1999/04/25 20:35:34 hagel + // Added RemoveAt and Compress methods + // + // Revision 1.5 1999/03/07 00:00:41 hagel + // 1. Implemented BrFSTrackingModule. Started with BrMRSTrackingModule and made + // appropriate changes to handle the forward spectrometer. It uses the new + // track classes as well as extensively using geometry classes. It also uses + // new methods and functionality as described below. + // 2. Changed BrMagnetVolume + // a. Added method SwimBack(BrLine3D &,Double_t momentum): takes a + // track at the exit of magnet and given the momentum, calculates + // where the track would come into the front of the magnet. + // b. Added method GlobalToLocal(BrLine3D &): does a combination of + // GlobalToLocal(BrVector3D &,BrVector3D&,0) and + // GlobalToLocal(BrVector3D &,BrVector3D&,1) + // c. Added method LocalToGlobal(BrLine3D &): does a combination of + // LocalToGlobal(BrVector3D &,BrVector3D&,0) and + // LocalToGlobal(BrVector3D &,BrVector3D&,1) + // d. Changed BrDetectorVolume: same additions of methods GlobalToLocal + // and LocalToGlobal as in BrMagnetVolume + // 2. Added a parameter base class BrDetectorParamsBase: helps when reading + // in database files. Declared ASCII reading routines to be virtual. + // Has main ReadASCIIFile which decodes the ASCII parameter files, then + // calls the detector specific methods SetASCIIParameter + // 3. Implemented SetASCIIParameter in BrDetectorParamsDC, BrDetectorParamsTPC, + // BrDetectorParamsTof, BrDetectorParamsBB + // 4. Implemented BrParameterDbManager. It currently works similarly to + // BrGeometryDbManager and creates the BrDetectorParamsXXX objects when + // called. These objects then read in ASCII parameter files with a currently + // "well defined" format using the above implemented routines using a constructor: + // BrDetectorParamsXXX(Char_t *name, Char_t *title,Char_t *ASCIIFileName); + // 5. If no parameter file is specified, it executes the constructor we + // have been using so far, namely BrDetectorParamsXXX(Char_t *name,Char_t *title). + // These constructors generate default parameters and are semi-intelligent + // which means they generate approximately appropriate parameters depending + // upon which detector they are. I should say that the parameters were + // deemed appropriate at the time of writing the SetDefaultParams routine. + // a. It is used in the same way as BrGeometryDbManager, that is: + // BrParameterDbManager *gParamDb = BrParameterDbManager::Instance(); + // gParamDb->SetDbParameterFileName("DetectorParameters.txt"); + // 6. Added a new directory, params, in BRAT. This directory has the file + // DetectorParameters.txt in it. If the BrParameterDbManager is started + // and the DetectorParameter.txt file is specified, it will look in the + // $BRATSYS/params directory if it cannot find the file in the directory + // that the user has set default to. + // 7. Implemented BrParameterDbManager in DC digitize and tracking code. The + // SetDetectorParams methods have been moved to private and can no longer be + // used from the macro or program. + // 8. Implemented BrParameterDbManager in TPC digitize and tracking code. + // 9. Implemented BrParameterDbManager in Tof Calibrate and GeneratePid code. + // 10 Changed the GetEntries() in BrDataTable to use the GetLast()+1 method in + // TObjArray. This should be much faster, but has the caveat that it assumes + // that all slots in TObjArray are full. That seems to me to be the case + // in how we use TObjArray at least in BrDataTable, but if problems arise due + // to this change, it can always be easily changed back. It has been used a + // fair amount before checking in and no problems were found. + // + // Modified Files: + // base/inc/BrBase_LinkDef.h base/inc/BrDataTable.h + // base/inc/BrDetectorVolume.h base/inc/BrMagnetVolume.h + // base/inc/LinkDefBratBaseINC.h base/src/BrDataTable.cxx + // base/src/BrDetectorVolume.cxx base/src/BrEventNode.cxx + // base/src/BrMagnetVolume.cxx base/src/BrTableManager.cxx + // base/src/Makefile bb/inc/BrDetectorParamsBB.h + // bb/src/BrDetectorParamsBB.cxx db/inc/BrParameterDbManager.h + // db/src/BrParameterDbManager.cxx dc/inc/BrDetectorParamsDC.h + // dc/src/BrDetectorDC.cxx dc/src/BrDetectorParamsDC.cxx + // dc/src/BrDigitizeDC.cxx dc/src/BrLocalTrackDC.cxx + // geometry/inc/BrPlane3D.h geometry/src/BrPlane3D.cxx + // params/DetectorParameters.txt tof/inc/BrDetectorParamsTof.h + // tof/src/BrDetectorParamsTof.cxx tof/src/BrGeneratePid.cxx + // tpc/inc/BrDetectorParamsTPC.h tpc/src/BrDetectorParamsTPC.cxx + // tpc/src/BrDetectorTPC.cxx tpc/src/BrDigitizeTPC.cxx + // tpc/src/BrLocalTrackTPC.cxx track/inc/BrDetectorTrack.h + // track/inc/BrFSTrackingModule.h + // track/inc/BrSpectrometerTracks.h track/src/BrDetectorTrack.cxx + // track/src/BrFSTrackingModule.cxx + // track/src/BrSpectrometerTracks.cxx + // + // Revision 1.4 1999/01/21 23:23:18 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.3 1998/03/26 23:31:48 hagel + // Added GetEntries to same as Entries + // + // Revision 1.2 1998/03/09 20:53:32 videbaek + // Ensure that pointers are non-NULL before deleting + // + // Revision 1.1.1.1 1998/03/04 21:32:49 brahmlib + // Brat base + // + // + #ifndef BRAT_BrDataTable + #define BRAT_BrDataTable + + /////////////////////////////////////////////////////////////////////// + // // + // BrDataTable // + // // + // BRAMS data container class. Raw data and the results of // + // calibration and reconstruction operations are stored in // + // BrDataTable objects, which in turn are managed and // + // stored using the BrEvent class. // + // // + // Author : Kris Hagel from a template by Gunther Roland // + // Created : July 13 1997 // + // Version : 1.0 // + // Changed : // + // // + /////////////////////////////////////////////////////////////////////// + + // Root Classes + #include "TObjArray.h" + + // BRAHMS Classes + + #include "BrDataObject.h" + + class BrDataTable : public BrDataObject { + + public: + + BrDataTable(); + BrDataTable(const Char_t *Name, const Char_t *Title = NULL); + + virtual ~BrDataTable(); + + virtual void Add(TObject *object); + virtual void AddAt(TObject *object,Int_t idx); + + virtual TObjArray *GetObjectList() { return fObjectList; } + Int_t Entries() {if(fObjectList) return fObjectList->GetEntries(); else return 0;} + //Int_t GetEntries() {if(fObjectList) return fObjectList->GetEntries(); else return 0;} //kh 26-mar-1998 same as EntrieS + Int_t GetEntries() const {if(fObjectList) return fObjectList->GetLast()+1; else return 0;} //kh 26-mar-1998 same as EntrieS + BrDataTable *At(Int_t i) const {return (BrDataTable*)fObjectList->At(i);} + void Sort(Int_t upto) {fObjectList->Sort(upto);} + void Sort() {if(fObjectList)fObjectList->Sort(Entries());} + void Clear() {if(fObjectList)fObjectList->Clear();} + void Delete() {if(fObjectList)fObjectList->Delete();} + void Remove(TObject *obj) {if(fObjectList)fObjectList->Remove(obj);} + void RemoveAt(Int_t i) {if(fObjectList)fObjectList->RemoveAt(i);} + void Compress() {if(fObjectList)fObjectList->Compress();} + void DeleteAndCompressAt(Int_t i); + void DeleteAndCompress(TObject* obj); + //BrDataTable operator + () const; + BrDataTable& operator +=(const BrDataTable&); + + + protected: + + TObjArray *fObjectList; // List of objects stored in container + + private: + friend BrDataTable operator+(const BrDataTable& table1, const BrDataTable& table2); + + + public: + + ClassDef(BrDataTable, 1) // BRAHMS data container class + + }; + + #endif + + + + diff -c -r -N VER-1-2/include/BrDb_LinkDef.h VER-1-2-1/include/BrDb_LinkDef.h *** VER-1-2/include/BrDb_LinkDef.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrDb_LinkDef.h Fri Nov 5 18:26:07 1999 *************** *** 0 **** --- 1,31 ---- + // $Id: BrDb_LinkDef.h,v 1.2 1999/02/06 02:32:09 hagel Exp $ + // + // $Log: BrDb_LinkDef.h,v $ + // Revision 1.2 1999/02/06 02:32:09 hagel + // Added BrParameterDbManager + // + // Revision 1.1 1998/12/09 17:01:36 videbaek + // Add new db manager class. It has been checked out for + // the simple BrDetectorVolume class. + // + // Revision 1.3 1998/10/09 19:20:30 videbaek + // Add the BrRdoBB and BrRdoModule classes + // + // Revision 1.2 1998/07/27 16:26:55 videbaek + // Stat on modifiing BB - not complete + // + // Revision 1.1 1998/07/02 19:40:34 videbaek + // Preliminary version of BB + // + #ifdef __CINT__ + + #pragma link off all globals; + #pragma link off all classes; + #pragma link off all functions; + + #pragma link C++ class BrGeometryDbManager; + #pragma link C++ class BrParameterDbManager; + #pragma link C++ class BrDbObject; + + + #endif diff -c -r -N VER-1-2/include/BrDetectorDC.h VER-1-2-1/include/BrDetectorDC.h *** VER-1-2/include/BrDetectorDC.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrDetectorDC.h Fri Nov 5 18:26:18 1999 *************** *** 0 **** --- 1,87 ---- + #ifndef BRAT_BrDetectorDC + #define BRAT_BrDetectorDC + // $Id: BrDetectorDC.h,v 1.5 1999/02/28 22:14:36 hagel Exp $ + // + // $Log: BrDetectorDC.h,v $ + // Revision 1.5 1999/02/28 22:14:36 hagel + // Changes to make event display more robust and seamless + // + // Revision 1.4 1999/01/21 23:23:22 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.3 1998/12/17 22:09:16 hagel + // Add CVS headers + // + /////////////////////////////////////////////////////////// + // + // BrDetectorDC + // + // BRAHMS DC Detector Class + // + // Author : K. Hagel + // Created: 5-Nov-1998 + // Version: 1.0 + // + // + /////////////////////////////////////////////////////////// + + // ROOT classes + #ifndef ROOT_TPolyMarker3D + #include "TPolyMarker3D.h" + #endif + + #ifndef ROOT_TPolyLine3D + #include "TPolyLine3D.h" + #endif + + // BRAHMS classes + // + #ifndef BRAT_BrBaseDetector + #include "BrBaseDetector.h" + #endif + + class BrDetectorVolume; + class TNode; + class BrDataTable; + + #define MaxTracksToDraw 100 + + class BrDetectorDC : public BrBaseDetector { + + public: + + BrDetectorDC(); + BrDetectorDC(const Char_t *name, const Char_t *title,const Char_t *det_name=0); //,BrDetectorVolume *vol,BrDetectorVolume *vol1,BrDetectorVolume *vol2,BrDetectorVolume *vol3); + virtual ~BrDetectorDC(); + + virtual void EventDisplay(); + virtual void Clear(); + virtual void DrawGeantHits(BrDataTable *ghits[3]); + virtual void DrawLocalTracks(BrDataTable *tracktable); + + private: + + TShape *fDc1Shape; + TShape *fDc2Shape; + TShape *fDc3Shape; + + TNode *fDCSubModule[3]; + + TPolyMarker3D *fPolyMarker; + Float_t *f3DPoints; //points for the polymarker and polyline + TPolyLine3D *fPolyLine[MaxTracksToDraw]; //lines for the polyline + + public: + + ClassDef(BrDetectorDC,1) // BRAHMS DC detector definition + }; + + #endif + + diff -c -r -N VER-1-2/include/BrDetectorHit.h VER-1-2-1/include/BrDetectorHit.h *** VER-1-2/include/BrDetectorHit.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrDetectorHit.h Fri Nov 5 18:26:09 1999 *************** *** 0 **** --- 1,77 ---- + #ifndef BRAT_BrDetectorHit + #define BRAT_BrDetectorHit + // + // $Id: BrDetectorHit.h,v 1.1 1999/03/07 22:37:38 videbaek Exp $ + // + // $Log: BrDetectorHit.h,v $ + // Revision 1.1 1999/03/07 22:37:38 videbaek + // Added DetectorHit and BrLocalTrackingModule as a more general way to + // deal with local tracks and hits. Initial insertion. Not fully debugged. + // + // + // + /////////////////////////////////////////////////////////////////////// + // // + // BrDetectorHit // + // // + // BRAHMS Detector Hit Class // + // // + // Author : F.Videbaek // + // Created : 26/Feb/1999 // + // Version : 1.0 // + // Changed : // + // // + /////////////////////////////////////////////////////////////////////// + + #include + + // Root Classes + #ifndef ROOT_TObject + #include "TObject.h" + #endif + + // Brahms Classes + class BrTPCCluster; + + class BrDetectorHit: public TObject { + + public: + BrDetectorHit(); + + virtual ~BrDetectorHit(); + + virtual Int_t GetID() {return fID;} + virtual Float_t *GetPos() {return fPos;} + virtual Float_t *GetDpos() {return fDpos;} + virtual Int_t GetImod() {return fImod;} + virtual Int_t GetRow() {return fImod;} + virtual Int_t GetUsed() {return fUsed;} + virtual Int_t GetStat() {return fStat;} + + virtual void SetID(Int_t i) {fID = i;} + virtual void SetPos(Float_t *pos) {for(Int_t i=0;i<3;i++) fPos[i] = pos[i];} + virtual void SetDpos(Float_t *dpos) {for(Int_t i=0;i<2;i++) fDpos[i] = dpos[i];} + virtual void SetImod(Int_t i) {fImod = i;} + virtual void SetRow(Int_t i) {fImod = i;} + virtual void SetUsed(Int_t i) {fUsed = i;} + virtual void SetStat(Int_t i) {fStat = i;} + virtual void IncrementUsed() {fUsed++;} + virtual void DecrementUsed() {fUsed--;} + + private: + + Int_t fID; // Unique Id + Float_t fPos[3]; // Hit position in local coordinates + Float_t fDpos[2]; // Estimated uncertainty on (x,y) position + Int_t fImod; // Rownumber for TPC; Module+row for DC.. + Int_t fUsed; //! Number of times Hit is used (in tracking..) + Int_t fStat; // Indicates quality of HIT + + public: + friend ostream& operator<< (ostream& os, BrDetectorHit* hitp); + + ClassDef(BrDetectorHit,1) // BRAHMS hit data class + + }; + + #endif diff -c -r -N VER-1-2/include/BrDetectorParamsBB.h VER-1-2-1/include/BrDetectorParamsBB.h *** VER-1-2/include/BrDetectorParamsBB.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrDetectorParamsBB.h Fri Nov 5 18:26:20 1999 *************** *** 0 **** --- 1,233 ---- + #ifndef BRAT_BrDetectorParamsBB + #define BRAT_BrDetectorParamsBB + + // $Id: BrDetectorParamsBB.h,v 1.9 1999/03/07 00:00:42 hagel Exp $ + // $Log: BrDetectorParamsBB.h,v $ + // Revision 1.9 1999/03/07 00:00:42 hagel + // 1. Implemented BrFSTrackingModule. Started with BrMRSTrackingModule and made + // appropriate changes to handle the forward spectrometer. It uses the new + // track classes as well as extensively using geometry classes. It also uses + // new methods and functionality as described below. + // 2. Changed BrMagnetVolume + // a. Added method SwimBack(BrLine3D &,Double_t momentum): takes a + // track at the exit of magnet and given the momentum, calculates + // where the track would come into the front of the magnet. + // b. Added method GlobalToLocal(BrLine3D &): does a combination of + // GlobalToLocal(BrVector3D &,BrVector3D&,0) and + // GlobalToLocal(BrVector3D &,BrVector3D&,1) + // c. Added method LocalToGlobal(BrLine3D &): does a combination of + // LocalToGlobal(BrVector3D &,BrVector3D&,0) and + // LocalToGlobal(BrVector3D &,BrVector3D&,1) + // d. Changed BrDetectorVolume: same additions of methods GlobalToLocal + // and LocalToGlobal as in BrMagnetVolume + // 2. Added a parameter base class BrDetectorParamsBase: helps when reading + // in database files. Declared ASCII reading routines to be virtual. + // Has main ReadASCIIFile which decodes the ASCII parameter files, then + // calls the detector specific methods SetASCIIParameter + // 3. Implemented SetASCIIParameter in BrDetectorParamsDC, BrDetectorParamsTPC, + // BrDetectorParamsTof, BrDetectorParamsBB + // 4. Implemented BrParameterDbManager. It currently works similarly to + // BrGeometryDbManager and creates the BrDetectorParamsXXX objects when + // called. These objects then read in ASCII parameter files with a currently + // "well defined" format using the above implemented routines using a constructor: + // BrDetectorParamsXXX(Char_t *name, Char_t *title,Char_t *ASCIIFileName); + // 5. If no parameter file is specified, it executes the constructor we + // have been using so far, namely BrDetectorParamsXXX(Char_t *name,Char_t *title). + // These constructors generate default parameters and are semi-intelligent + // which means they generate approximately appropriate parameters depending + // upon which detector they are. I should say that the parameters were + // deemed appropriate at the time of writing the SetDefaultParams routine. + // a. It is used in the same way as BrGeometryDbManager, that is: + // BrParameterDbManager *gParamDb = BrParameterDbManager::Instance(); + // gParamDb->SetDbParameterFileName("DetectorParameters.txt"); + // 6. Added a new directory, params, in BRAT. This directory has the file + // DetectorParameters.txt in it. If the BrParameterDbManager is started + // and the DetectorParameter.txt file is specified, it will look in the + // $BRATSYS/params directory if it cannot find the file in the directory + // that the user has set default to. + // 7. Implemented BrParameterDbManager in DC digitize and tracking code. The + // SetDetectorParams methods have been moved to private and can no longer be + // used from the macro or program. + // 8. Implemented BrParameterDbManager in TPC digitize and tracking code. + // 9. Implemented BrParameterDbManager in Tof Calibrate and GeneratePid code. + // 10 Changed the GetEntries() in BrDataTable to use the GetLast()+1 method in + // TObjArray. This should be much faster, but has the caveat that it assumes + // that all slots in TObjArray are full. That seems to me to be the case + // in how we use TObjArray at least in BrDataTable, but if problems arise due + // to this change, it can always be easily changed back. It has been used a + // fair amount before checking in and no problems were found. + // + // Modified Files: + // base/inc/BrBase_LinkDef.h base/inc/BrDataTable.h + // base/inc/BrDetectorVolume.h base/inc/BrMagnetVolume.h + // base/inc/LinkDefBratBaseINC.h base/src/BrDataTable.cxx + // base/src/BrDetectorVolume.cxx base/src/BrEventNode.cxx + // base/src/BrMagnetVolume.cxx base/src/BrTableManager.cxx + // base/src/Makefile bb/inc/BrDetectorParamsBB.h + // bb/src/BrDetectorParamsBB.cxx db/inc/BrParameterDbManager.h + // db/src/BrParameterDbManager.cxx dc/inc/BrDetectorParamsDC.h + // dc/src/BrDetectorDC.cxx dc/src/BrDetectorParamsDC.cxx + // dc/src/BrDigitizeDC.cxx dc/src/BrLocalTrackDC.cxx + // geometry/inc/BrPlane3D.h geometry/src/BrPlane3D.cxx + // params/DetectorParameters.txt tof/inc/BrDetectorParamsTof.h + // tof/src/BrDetectorParamsTof.cxx tof/src/BrGeneratePid.cxx + // tpc/inc/BrDetectorParamsTPC.h tpc/src/BrDetectorParamsTPC.cxx + // tpc/src/BrDetectorTPC.cxx tpc/src/BrDigitizeTPC.cxx + // tpc/src/BrLocalTrackTPC.cxx track/inc/BrDetectorTrack.h + // track/inc/BrFSTrackingModule.h + // track/inc/BrSpectrometerTracks.h track/src/BrDetectorTrack.cxx + // track/src/BrFSTrackingModule.cxx + // track/src/BrSpectrometerTracks.cxx + // + // Revision 1.8 1999/01/21 23:23:20 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.7 1998/08/25 16:35:15 videbaek + // Changed parameteer description + // Added setter function + // + // Revision 1.6 1998/08/21 13:33:52 videbaek + // improvements to algorithm. Consider theta + // + // Revision 1.5 1998/08/04 20:24:25 videbaek + // Changed detector parameters + // + // Revision 1.4 1998/08/03 20:54:06 videbaek + // Fix algorithms for bb + // + // Revision 1.3 1998/07/31 19:32:12 videbaek + // Working version of BB digitize + // + // Revision 1.2 1998/07/27 16:26:56 videbaek + // Stat on modifiing BB - not complete + // + // Revision 1.1 1998/07/02 19:40:34 videbaek + // Preliminary version of BB + // + // + /////////////////////////////////////////////////////////////////////// + // // + // BrDetectorParamsBB // + // // + // Parameters describing the physical properties of the BB slats. // + // Some of these are presently simulation parameters others are // + // relevant to both simulations and reconstruction. // + // // + /////////////////////////////////////////////////////////////////////// + + #ifndef ROOT_TNamed + #include "TNamed.h" + #endif + + #ifndef BRAT_BrDetectorParamsBase + #include "BrDetectorParamsBase.h" + #endif + + class BrDetectorParamsBB : public BrDetectorParamsBase{ + + public: + BrDetectorParamsBB(); + BrDetectorParamsBB(Char_t *name,Char_t *title); + BrDetectorParamsBB(Char_t *name,Char_t *title,Char_t *filename); + + virtual ~BrDetectorParamsBB(); + + void ListParameters() const; + void SetDefaultParams(); + + virtual void SetNpePercm(Float_t value) {fNpePercm=value;} + + virtual Float_t GetAdcGain() const {return fAdcGain;} + virtual Float_t GetSigmaAdc() const {return fSigmaAdc;} + virtual Float_t GetSigmaTime() const {return fSigmaTime;} + + virtual Int_t GetNoLeftTubes() const {return fNoTubesLeft;} + virtual Int_t GetNoRightTubes() const {return fNoTubesRight;} + + virtual Float_t GetTdcConv() const {return fTdcConv;} + virtual Float_t GetTdcOffset() const {return fTdcOffset;} + virtual Float_t GetAdcOffset() const {return fAdcOffset;} + virtual Float_t GetUVTLength() const {return fUVTLength;} + virtual Float_t GetSignalSpeed() const {return fSignalSpeed;} + virtual Float_t GetNpePercm() const {return fNpePercm;} + + virtual Int_t SetNoLeftTubes() {return fNoTubesLeft;} + virtual Int_t SetNoRightTubes() {return fNoTubesRight;} + + virtual Float_t SetTdcConv() {return fTdcConv;} + virtual Float_t SetTdcOffset() {return fTdcOffset;} + virtual Float_t SetAdcOffset() {return fAdcOffset;} + virtual Float_t SetUVTLength() {return fUVTLength;} + virtual Float_t SetSignalSpeed() {return fSignalSpeed;} + virtual Float_t GetNpePercm() {return fNpePercm;} + + virtual Float_t GetThetaAtt() {return fThetaAtt;} + virtual Float_t GetThetaCut() {return fThetaCut;} + + + virtual void SetAdcGain(const Float_t adc){fAdcGain = adc;} + virtual void SetSigmaAdc(Float_t value ){ fSigmaAdc=value;} + virtual void SetSigmaTime(Float_t value){ fSigmaTime=value;} + + virtual void SetNoLeftTubes(Int_t value){ fNoTubesLeft=value;} + virtual void SetNoRightTubes(Int_t value){ fNoTubesRight=value;} + + virtual void SetTdcConv(Float_t value){ fTdcConv=value;} + virtual void SetTdcOffset(Float_t value){ fTdcOffset=value;} + virtual void SetAdcOffset(Float_t value){ fAdcOffset=value;} + virtual void SetUVTLength(Float_t value){ fUVTLength=value;} + virtual void SetSignalSpeed(Float_t value){ fSignalSpeed=value;} + virtual void GetNpePercm(Float_t value){ fNpePercm=value;} + + virtual void GetThetaAtt(Float_t value){ fThetaAtt=value;} + virtual void GetThetaCut(Float_t value){ fThetaCut=value;} + + + virtual void SetASCIIParameters(Char_t *line); + + private: + // + // Geometry + // + Int_t fNoTubesLeft; // Number of slats in BB Left Array + Int_t fNoTubesRight; // Number of slats in BB Left Array + + // + // Calibration & Simulation parameters (implies they should be database + // and are needed for generation of simulated data. + // + Float_t fAdcGain; // Gain of Tube + ADC. (in channel per pe) + Float_t fSigmaTime; // Intrinsic time-resolution + Float_t fSigmaAdc; // Intrinsic pulse height resolution (on top of Pe stst) + Float_t fTdcConv; // pico seconds per channel + Float_t fTdcOffset; // Channel number for t0 + Float_t fAdcOffset; // ADC pedestal value + Float_t fUVTLength; // lenght of active Converted (cm). + + // + // Simulation Parameters. Physical parameters and options + // Not needed in analysis of data. + // + Float_t fNpePercm; // Number of pe per cm ; statistics done on this + // number + Float_t fSignalSpeed; // Propagation time of pulse in radiator. + Float_t fThetaAtt; // Attenuation in NPE vs theta particle + Float_t fThetaCut; // Cutoff angle for attenuation. + + public: + + ClassDef(BrDetectorParamsBB, 1) // BRAHMS detector parameter class + + }; + + #endif + + + + diff -c -r -N VER-1-2/include/BrDetectorParamsBase.h VER-1-2-1/include/BrDetectorParamsBase.h *** VER-1-2/include/BrDetectorParamsBase.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrDetectorParamsBase.h Fri Nov 5 18:26:00 1999 *************** *** 0 **** --- 1,48 ---- + #ifndef BRAT_BrDetectorParamsBase + #define BRAT_BrDetectorParamsBase + // $Id: BrDetectorParamsBase.h,v 1.2 1999/03/02 23:47:08 hagel Exp $ + // + // $Log: BrDetectorParamsBase.h,v $ + // Revision 1.2 1999/03/02 23:47:08 hagel + // Initial revision + // + // + /////////////////////////////////////////////////////////////////////// + // // + // BrDetectorParamsBase // + // // + // // + /////////////////////////////////////////////////////////////////////// + + //ROOT Includes + #ifndef ROOT_TNamed + #include "TNamed.h" + #endif + + class BrDetectorParamsBase : public TNamed { + + public: + BrDetectorParamsBase(); + BrDetectorParamsBase(Char_t *name,Char_t *title); + BrDetectorParamsBase(Char_t *name,Char_t *title,Char_t *filename); + + virtual ~BrDetectorParamsBase(); + + void ListParameters() const; + void SetDefaultParams(); + + virtual void ReadASCIIFile(Char_t *ASCIIFileName); + virtual void SetASCIIParameters(Char_t *line); + + private: + + public: + + ClassDef(BrDetectorParamsBase,1) // BRAHMS TPC parameter class + }; + + #endif + + + + diff -c -r -N VER-1-2/include/BrDetectorParamsDC.h VER-1-2-1/include/BrDetectorParamsDC.h *** VER-1-2/include/BrDetectorParamsDC.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrDetectorParamsDC.h Fri Nov 5 18:26:19 1999 *************** *** 0 **** --- 1,186 ---- + #ifndef BRAT_BrDetectorParamsDC + #define BRAT_BrDetectorParamsDC + + // $Id: BrDetectorParamsDC.h,v 1.8 1999/03/16 21:04:11 hagel Exp $ + // + // $Log: BrDetectorParamsDC.h,v $ + // Revision 1.8 1999/03/16 21:04:11 hagel + // 1. Make BrDCPlane inherit from BrPlane3D. BrDCPlane how has information about + // where it is located. + // 2. Change BrDigitizeDC and BrLocalTrackDC to make use of new BrDCPlane information. + // 3. Move Decode(...) from BrDigitizeDC to BrLocalTrackDC. + // 4. Change cut parameters to be member data with defaults rather than hardwired. + // + // Revision 1.7 1999/03/07 00:00:43 hagel + // 1. Implemented BrFSTrackingModule. Started with BrMRSTrackingModule and made + // appropriate changes to handle the forward spectrometer. It uses the new + // track classes as well as extensively using geometry classes. It also uses + // new methods and functionality as described below. + // 2. Changed BrMagnetVolume + // a. Added method SwimBack(BrLine3D &,Double_t momentum): takes a + // track at the exit of magnet and given the momentum, calculates + // where the track would come into the front of the magnet. + // b. Added method GlobalToLocal(BrLine3D &): does a combination of + // GlobalToLocal(BrVector3D &,BrVector3D&,0) and + // GlobalToLocal(BrVector3D &,BrVector3D&,1) + // c. Added method LocalToGlobal(BrLine3D &): does a combination of + // LocalToGlobal(BrVector3D &,BrVector3D&,0) and + // LocalToGlobal(BrVector3D &,BrVector3D&,1) + // d. Changed BrDetectorVolume: same additions of methods GlobalToLocal + // and LocalToGlobal as in BrMagnetVolume + // 2. Added a parameter base class BrDetectorParamsBase: helps when reading + // in database files. Declared ASCII reading routines to be virtual. + // Has main ReadASCIIFile which decodes the ASCII parameter files, then + // calls the detector specific methods SetASCIIParameter + // 3. Implemented SetASCIIParameter in BrDetectorParamsDC, BrDetectorParamsTPC, + // BrDetectorParamsTof, BrDetectorParamsBB + // 4. Implemented BrParameterDbManager. It currently works similarly to + // BrGeometryDbManager and creates the BrDetectorParamsXXX objects when + // called. These objects then read in ASCII parameter files with a currently + // "well defined" format using the above implemented routines using a constructor: + // BrDetectorParamsXXX(Char_t *name, Char_t *title,Char_t *ASCIIFileName); + // 5. If no parameter file is specified, it executes the constructor we + // have been using so far, namely BrDetectorParamsXXX(Char_t *name,Char_t *title). + // These constructors generate default parameters and are semi-intelligent + // which means they generate approximately appropriate parameters depending + // upon which detector they are. I should say that the parameters were + // deemed appropriate at the time of writing the SetDefaultParams routine. + // a. It is used in the same way as BrGeometryDbManager, that is: + // BrParameterDbManager *gParamDb = BrParameterDbManager::Instance(); + // gParamDb->SetDbParameterFileName("DetectorParameters.txt"); + // 6. Added a new directory, params, in BRAT. This directory has the file + // DetectorParameters.txt in it. If the BrParameterDbManager is started + // and the DetectorParameter.txt file is specified, it will look in the + // $BRATSYS/params directory if it cannot find the file in the directory + // that the user has set default to. + // 7. Implemented BrParameterDbManager in DC digitize and tracking code. The + // SetDetectorParams methods have been moved to private and can no longer be + // used from the macro or program. + // 8. Implemented BrParameterDbManager in TPC digitize and tracking code. + // 9. Implemented BrParameterDbManager in Tof Calibrate and GeneratePid code. + // 10 Changed the GetEntries() in BrDataTable to use the GetLast()+1 method in + // TObjArray. This should be much faster, but has the caveat that it assumes + // that all slots in TObjArray are full. That seems to me to be the case + // in how we use TObjArray at least in BrDataTable, but if problems arise due + // to this change, it can always be easily changed back. It has been used a + // fair amount before checking in and no problems were found. + // + // Modified Files: + // base/inc/BrBase_LinkDef.h base/inc/BrDataTable.h + // base/inc/BrDetectorVolume.h base/inc/BrMagnetVolume.h + // base/inc/LinkDefBratBaseINC.h base/src/BrDataTable.cxx + // base/src/BrDetectorVolume.cxx base/src/BrEventNode.cxx + // base/src/BrMagnetVolume.cxx base/src/BrTableManager.cxx + // base/src/Makefile bb/inc/BrDetectorParamsBB.h + // bb/src/BrDetectorParamsBB.cxx db/inc/BrParameterDbManager.h + // db/src/BrParameterDbManager.cxx dc/inc/BrDetectorParamsDC.h + // dc/src/BrDetectorDC.cxx dc/src/BrDetectorParamsDC.cxx + // dc/src/BrDigitizeDC.cxx dc/src/BrLocalTrackDC.cxx + // geometry/inc/BrPlane3D.h geometry/src/BrPlane3D.cxx + // params/DetectorParameters.txt tof/inc/BrDetectorParamsTof.h + // tof/src/BrDetectorParamsTof.cxx tof/src/BrGeneratePid.cxx + // tpc/inc/BrDetectorParamsTPC.h tpc/src/BrDetectorParamsTPC.cxx + // tpc/src/BrDetectorTPC.cxx tpc/src/BrDigitizeTPC.cxx + // tpc/src/BrLocalTrackTPC.cxx track/inc/BrDetectorTrack.h + // track/inc/BrFSTrackingModule.h + // track/inc/BrSpectrometerTracks.h track/src/BrDetectorTrack.cxx + // track/src/BrFSTrackingModule.cxx + // track/src/BrSpectrometerTracks.cxx + // + // Revision 1.6 1999/02/04 17:23:11 hagel + // Added ReadASCIIFile() + // + // Revision 1.5 1999/01/21 23:23:22 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.4 1999/01/12 20:25:13 hagel + // Add CVS logs to several modules missing it + // + + /////////////////////////////////////////////////////////////////////// + // // + // BrDetectorParamsDC // + // // + /////////////////////////////////////////////////////////////////////// + + //Root Includes + #ifndef ROOT_TObjArray + #include "TObjArray.h" + #endif + + //Brat Includes + #ifndef BRAT_BrDetectorParamsBase + #include "BrDetectorParamsBase.h" + #endif + + #ifndef BRAT_BrDCPlane + #include "BrDCPlane.h" + #endif + + class BrDetectorParamsDC : public BrDetectorParamsBase { + + public: + BrDetectorParamsDC(); + BrDetectorParamsDC(Char_t *name,Char_t *title); + BrDetectorParamsDC(Char_t *name, Char_t *title, + BrDCPlane *p1 , BrDCPlane *p2=0, BrDCPlane *p3=0, BrDCPlane *p4=0, + BrDCPlane *p5=0, BrDCPlane *p6=0, BrDCPlane *p7=0, BrDCPlane *p8=0, + BrDCPlane *p9=0, BrDCPlane *p10=0,BrDCPlane *p11=0,BrDCPlane *p12=0, + BrDCPlane *p13=0,BrDCPlane *p14=0,BrDCPlane *p15=0,BrDCPlane *p16=0); + BrDetectorParamsDC(Char_t *name,Char_t *title,Char_t *asciifilename); + + virtual ~BrDetectorParamsDC(); + + void ListParameters(); + void SetDefaultParams(); + void SetDefaultPlanes(); + + virtual Float_t GetTwoPar() {return fTwoPar;} + virtual Float_t GetEff() {return fEff;} + virtual Float_t GetDriftv() {return fDriftv;} + virtual Float_t GetPldis() {return fPldis;} + virtual Int_t GetNplane() {return fDCPlaneList->GetEntries();} + virtual Float_t GetPosres() {return fPosres;} + + virtual void SetEff(Float_t eff) {fEff=eff;} + virtual void SetTwoPar(Float_t twopar) {fTwoPar = twopar;} + virtual void SetDriftv(Float_t driftv) {fDriftv = driftv;} + virtual void SetPldis(Float_t pldis) {fPldis = pldis;} + virtual void SetPosres(Float_t posres) {fPosres = posres;} + + // void AddPlane(TBrDCPlane* plane) {fDCPlane[fNplane++]=plane;} + // TBrDCPlane* GetPlaneAt(Int_t i) {return fDCPlane[i];} + void AddPlane(BrDCPlane* plane); + BrDCPlane* GetPlaneAt(Int_t i){return (BrDCPlane*)fDCPlaneList->At(i);} + + virtual void SetASCIIParameters(Char_t *line); + + private: + + Float_t fTwoPar; + Float_t fEff; + Float_t fDriftv; + Float_t fPldis; + Int_t fNplane; + Float_t fPosres; + + TObjArray* fDCPlaneList; + Float_t GetDefaultPlaneZ(Int_t ipl,Int_t nplanes); + + public: + + ClassDef(BrDetectorParamsDC,1) // BRAHMS DC Parameter class + + }; + + #endif + + + + diff -c -r -N VER-1-2/include/BrDetectorParamsTPC.h VER-1-2-1/include/BrDetectorParamsTPC.h *** VER-1-2/include/BrDetectorParamsTPC.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrDetectorParamsTPC.h Fri Nov 5 18:26:16 1999 *************** *** 0 **** --- 1,133 ---- + #ifndef BRAT_BrDetectorParamsTPC + #define BRAT_BrDetectorParamsTPC + // BrDetectorParamsTPC.h,v 1.4 1998/05/08 20:45:55 videbaek Exp + // BrDetectorParamsTPC.h,v + // Revision 1.4 1998/05/08 20:45:55 videbaek + // TPC class updates; added functionality + // + // Revision 1.3 1998/05/08 00:58:42 videbaek + // TPC code updates + // + // Revision 1.2 1998/04/01 22:10:57 hagel + // Changes for adding local tracking + // + // Revision 1.1.1.1 1998/03/04 21:34:02 brahmlib + // Brat tpc + // + // + /////////////////////////////////////////////////////////////////////// + // // + // BrDetectorParamsTPC // + // // + // // + /////////////////////////////////////////////////////////////////////// + + //ROOT Includes + //#ifndef ROOT_TNamed + //#include "TNamed.h" + //#endif + + #ifndef BRAT_BrDetectorParamsBase + #include "BrDetectorParamsBase.h" + #endif + + class BrDetectorParamsTPC : public BrDetectorParamsBase { + + public: + BrDetectorParamsTPC(); + BrDetectorParamsTPC(Char_t *name,Char_t *title); + BrDetectorParamsTPC(Char_t *name,Char_t *title,Char_t *filename); + + virtual ~BrDetectorParamsTPC(); + + void ListParameters() const; + void SetDefaultParams(); + + Float_t GetTwoPar() {return fTwoPar;} + Float_t GetDlong() {return fDlong; } + Float_t GetDtrans() {return fDtrans;} + Float_t GetEff() {return fEff;} + Float_t GetAnodeGap() {return fAnodeGap;} + + Float_t GetDriftv() {return fDriftv;} + Float_t GetTimeBucket() {return fTimeBucket;} + Float_t GetShapingTime() {return fShapingTime;} + Float_t GetADCGain() {return fADCGain;} + Int_t GetADCChannels() {return fADCChannels;} + + Float_t GetRowDistance() {return fRowDistance;} + Int_t GetNumberOfRows(){return fNumberOfRows;} + Int_t GetNumberOfActiveRows(){return fNumberOfActiveRows;} + Int_t GetPadsprow(){return fPadsprow;} + Float_t GetPadDistance() {return fPadDistance;} + Float_t GetPadWidth() {return fPadWidth;} + Float_t GetPadLength() {return fPadLength;} + Float_t GetRowPosition(Int_t irow) {return fRowPosition[irow-1];} + Float_t GetActiveRowPosition(Int_t irow) {return fRowPosition[fActiveRowNumber[irow-1]];} + Int_t GetActiveRowNumber(Int_t irow){return fActiveRowNumber[irow-1]+1;} + void SetDlong(const Float_t Dlong) {fDlong = Dlong;} + void SetDtrans(Float_t Dtrans){fDtrans=Dtrans;} + void SetEff(Float_t Eff){fEff=Eff;} + void SetAnodeGap(Float_t AnodeGap){fAnodeGap = AnodeGap;} + + void SetDriftv(Float_t Driftv){fDriftv = Driftv;} + void SetTimeBucket(Float_t TimeBucket){fTimeBucket = TimeBucket;} + void SetShapingTime(Float_t ShapingTime){fShapingTime = ShapingTime;} + void SetADCGain(Float_t ADCGain){fADCGain = ADCGain;} + void SetADCChannels(Int_t ADCChannels){fADCChannels = ADCChannels;} + + void SetRowDistance(Float_t RowDistance){fRowDistance = RowDistance;} + void SetNumberOfRows(Int_t NumberOfRows){fNumberOfRows = NumberOfRows;} + void SetPadPerRow(Int_t PadsPerRow){fPadsprow = PadsPerRow;} + void SetPadDistance(Float_t PadDistance){fPadDistance=PadDistance;} + void SetPadWidth(Float_t PadWidth){fPadWidth = PadWidth;} + void SetPadLength(Float_t PadLength){fPadLength = PadLength;} + void SetRowPosition(Int_t irow,Float_t xpos); + + virtual void SetASCIIParameters(Char_t *line); + + private: + void SetActiveParameters(); + private: + // + // Simulation parameters + // + Float_t fTwoPar; // Twoparticle resolution (not used) + Float_t fDlong; // Longitudinal Diffusion coeffecient + Float_t fDtrans; // Transverse Diffisuion coefficient + Float_t fEff; // Efficiency for padrows + Float_t fAnodeGap; // Distance between Pad and anode wire + // The proper sim and analysis parameter is really + // the pad resolution function (PRF) + // + // Gas and readout parameters + // + Float_t fDriftv; // Drift velocity + Float_t fTimeBucket; // Bucket size + Float_t fShapingTime; // Preamp shaper time + Float_t fADCGain; // Gain of Preamp + Int_t fADCChannels; // Number of bins in adc (128, 150, 256..) + // + // Geometry parameters + // + Float_t fRowDistance; // Distance between Rows + Int_t fNumberOfRows; // Number of Rows + Int_t fPadsprow; // Number of Pads per row + Float_t fPadDistance; // Distance between pads + Float_t fPadWidth; // Width of Pads + Float_t fPadLength; // Length of pads + Float_t fRowPosition[18]; // Z position of rows + Bool_t fRowActive[18]; // Status of given row + Int_t fNumberOfActiveRows; // Number of active rows + Int_t fActiveRowNumber[18]; //! Actual Row number for active row; + + public: + + ClassDef(BrDetectorParamsTPC,1) // BRAHMS TPC parameter class + }; + + #endif + + + + diff -c -r -N VER-1-2/include/BrDetectorParamsTof.h VER-1-2-1/include/BrDetectorParamsTof.h *** VER-1-2/include/BrDetectorParamsTof.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrDetectorParamsTof.h Fri Nov 5 18:26:12 1999 *************** *** 0 **** --- 1,189 ---- + #ifndef BRAT_BrDetectorParamsTof + #define BRAT_BrDetectorParamsTof + + // $Id: BrDetectorParamsTof.h,v 1.6 1999/03/07 00:00:45 hagel Exp $ + // + // $Log: BrDetectorParamsTof.h,v $ + // Revision 1.6 1999/03/07 00:00:45 hagel + // 1. Implemented BrFSTrackingModule. Started with BrMRSTrackingModule and made + // appropriate changes to handle the forward spectrometer. It uses the new + // track classes as well as extensively using geometry classes. It also uses + // new methods and functionality as described below. + // 2. Changed BrMagnetVolume + // a. Added method SwimBack(BrLine3D &,Double_t momentum): takes a + // track at the exit of magnet and given the momentum, calculates + // where the track would come into the front of the magnet. + // b. Added method GlobalToLocal(BrLine3D &): does a combination of + // GlobalToLocal(BrVector3D &,BrVector3D&,0) and + // GlobalToLocal(BrVector3D &,BrVector3D&,1) + // c. Added method LocalToGlobal(BrLine3D &): does a combination of + // LocalToGlobal(BrVector3D &,BrVector3D&,0) and + // LocalToGlobal(BrVector3D &,BrVector3D&,1) + // d. Changed BrDetectorVolume: same additions of methods GlobalToLocal + // and LocalToGlobal as in BrMagnetVolume + // 2. Added a parameter base class BrDetectorParamsBase: helps when reading + // in database files. Declared ASCII reading routines to be virtual. + // Has main ReadASCIIFile which decodes the ASCII parameter files, then + // calls the detector specific methods SetASCIIParameter + // 3. Implemented SetASCIIParameter in BrDetectorParamsDC, BrDetectorParamsTPC, + // BrDetectorParamsTof, BrDetectorParamsBB + // 4. Implemented BrParameterDbManager. It currently works similarly to + // BrGeometryDbManager and creates the BrDetectorParamsXXX objects when + // called. These objects then read in ASCII parameter files with a currently + // "well defined" format using the above implemented routines using a constructor: + // BrDetectorParamsXXX(Char_t *name, Char_t *title,Char_t *ASCIIFileName); + // 5. If no parameter file is specified, it executes the constructor we + // have been using so far, namely BrDetectorParamsXXX(Char_t *name,Char_t *title). + // These constructors generate default parameters and are semi-intelligent + // which means they generate approximately appropriate parameters depending + // upon which detector they are. I should say that the parameters were + // deemed appropriate at the time of writing the SetDefaultParams routine. + // a. It is used in the same way as BrGeometryDbManager, that is: + // BrParameterDbManager *gParamDb = BrParameterDbManager::Instance(); + // gParamDb->SetDbParameterFileName("DetectorParameters.txt"); + // 6. Added a new directory, params, in BRAT. This directory has the file + // DetectorParameters.txt in it. If the BrParameterDbManager is started + // and the DetectorParameter.txt file is specified, it will look in the + // $BRATSYS/params directory if it cannot find the file in the directory + // that the user has set default to. + // 7. Implemented BrParameterDbManager in DC digitize and tracking code. The + // SetDetectorParams methods have been moved to private and can no longer be + // used from the macro or program. + // 8. Implemented BrParameterDbManager in TPC digitize and tracking code. + // 9. Implemented BrParameterDbManager in Tof Calibrate and GeneratePid code. + // 10 Changed the GetEntries() in BrDataTable to use the GetLast()+1 method in + // TObjArray. This should be much faster, but has the caveat that it assumes + // that all slots in TObjArray are full. That seems to me to be the case + // in how we use TObjArray at least in BrDataTable, but if problems arise due + // to this change, it can always be easily changed back. It has been used a + // fair amount before checking in and no problems were found. + // + // Modified Files: + // base/inc/BrBase_LinkDef.h base/inc/BrDataTable.h + // base/inc/BrDetectorVolume.h base/inc/BrMagnetVolume.h + // base/inc/LinkDefBratBaseINC.h base/src/BrDataTable.cxx + // base/src/BrDetectorVolume.cxx base/src/BrEventNode.cxx + // base/src/BrMagnetVolume.cxx base/src/BrTableManager.cxx + // base/src/Makefile bb/inc/BrDetectorParamsBB.h + // bb/src/BrDetectorParamsBB.cxx db/inc/BrParameterDbManager.h + // db/src/BrParameterDbManager.cxx dc/inc/BrDetectorParamsDC.h + // dc/src/BrDetectorDC.cxx dc/src/BrDetectorParamsDC.cxx + // dc/src/BrDigitizeDC.cxx dc/src/BrLocalTrackDC.cxx + // geometry/inc/BrPlane3D.h geometry/src/BrPlane3D.cxx + // params/DetectorParameters.txt tof/inc/BrDetectorParamsTof.h + // tof/src/BrDetectorParamsTof.cxx tof/src/BrGeneratePid.cxx + // tpc/inc/BrDetectorParamsTPC.h tpc/src/BrDetectorParamsTPC.cxx + // tpc/src/BrDetectorTPC.cxx tpc/src/BrDigitizeTPC.cxx + // tpc/src/BrLocalTrackTPC.cxx track/inc/BrDetectorTrack.h + // track/inc/BrFSTrackingModule.h + // track/inc/BrSpectrometerTracks.h track/src/BrDetectorTrack.cxx + // track/src/BrFSTrackingModule.cxx + // track/src/BrSpectrometerTracks.cxx + // + // Revision 1.5 1999/02/04 18:16:09 hagel + // Added ReadASCIIFile() + // + // Revision 1.4 1999/01/21 23:23:25 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.3 1998/08/24 19:35:08 videbaek + // Added Set member functions + // Inserted Id and Log + // + /////////////////////////////////////////////////////////////////////// + // // + // BrDetectorParamsTof // + // // + // Parameters describing the physical properties of the TOF slats.// + // Some of these are presently simulation parameters others are // + // relevant to both simulations and reconstruction. // + // // + /////////////////////////////////////////////////////////////////////// + + //ROOT Includes + #ifndef ROOT_TNamed + #include "TNamed.h" + #endif + + #ifndef ROOT_TClass + #include "TClass.h" + #endif + + //BRAT Includes + #ifndef BRAT_BrDetectorParamsBase + #include "BrDetectorParamsBase.h" + #endif + + class BrDetectorParamsTof : public BrDetectorParamsBase { + + public: + BrDetectorParamsTof(); + BrDetectorParamsTof(Char_t *name,Char_t *title); + BrDetectorParamsTof(Char_t *name,Char_t *title,Char_t *asciifilename); + + virtual ~BrDetectorParamsTof(); + + void ListParameters() const; + void SetDefaultParams(); + + + virtual Float_t GetADCGainUp() const {return fADCGainUp;} + virtual Float_t GetADCGainDown()const {return fADCGainDown;} + virtual Float_t GetTimeConversion()const {return fTimeConversion;} + virtual Float_t GetSigmaTime() const {return fSigmaTime;} + virtual Float_t GetSigmaAdc() const {return fSigmaAdc;} + virtual Int_t GetNoSlats() const {return fNoSlats;} + virtual Float_t GetTdcConv() const {return fTdcConv;} + virtual Float_t GetTdcOffset() const {return fTdcOffset;} + virtual Float_t GetScintLength() const{ return fScintLength;} + virtual Float_t GetMeVperMIP() const{ return fMeVperMIP;} + virtual Float_t GetSignalSpeed() const{ return fSignalSpeed;} + virtual Float_t GetAttLength() const{ return fAttLength;} + + virtual void SetADCGainUp(const Float_t adc){fADCGainUp = adc;} + virtual void SetADCGainDown(const Float_t adc){fADCGainDown = adc;} + + virtual void SetNoSlats(const Int_t nslat){fNoSlats=nslat;} + virtual void SetTimeConversion(const Float_t value){fTimeConversion= value;} + virtual void SetSigmaTime(const Float_t value){fSigmaTime= value;} + virtual void SetfSigmaAdc(const Float_t value){fSigmaAdc= value;} + virtual void SetTdcConv(const Float_t value) {fTdcConv = value;} + virtual void SetTdcOffset(const Float_t value){fTdcOffset= value;} + virtual void SetMeVperMIP(const Float_t value){fMeVperMIP= value;} + virtual void SetAttLength(const Float_t value){fAttLength= value;} + virtual void SetScintLength(const Float_t value){fScintLength= value;} + virtual void SetSignalSpeed(const Float_t value){fSignalSpeed= value;} + + virtual void SetASCIIParameters(Char_t *line); + + private: + + Float_t fADCGainUp; // Gain of Tube + ADC. (up tubes) + Float_t fADCGainDown; // Gain of Tube + ADC. (down tube) + Float_t fTimeConversion; // light propagation speed. psec per cm. + Float_t fSigmaTime; // Intrinsic time-resolution + Float_t fSigmaAdc; // Intrinsic pulse height resolution + Int_t fNoSlats; // Number of slats in Tof Wall + Float_t fTdcConv; // pico seconds per channel + Float_t fTdcOffset; // Channel number for t0 + Float_t fMeVperMIP; // Normalisation Constant + Float_t fAttLength; // attenuation length for material (cm) + Float_t fScintLength; // lenght of active scintillator (cm). + Float_t fSignalSpeed; // Propagation time of pulse in scint. + public: + + ClassDef(BrDetectorParamsTof,1) // BRAHMS detector volume class + + }; + + #endif + + + + diff -c -r -N VER-1-2/include/BrDetectorTPC.h VER-1-2-1/include/BrDetectorTPC.h *** VER-1-2/include/BrDetectorTPC.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrDetectorTPC.h Fri Nov 5 18:26:17 1999 *************** *** 0 **** --- 1,86 ---- + #ifndef BRAT_BrDetectorTPC + #define BRAT_BrDetectorTPC + // $Id: BrDetectorTPC.h,v 1.4 1999/02/28 22:14:37 hagel Exp $ + // + // $Log: BrDetectorTPC.h,v $ + // Revision 1.4 1999/02/28 22:14:37 hagel + // Changes to make event display more robust and seamless + // + // Revision 1.3 1999/01/28 21:27:31 videbaek + // Added BrTPSSqquences to libraries. Not yet in use, though. Expected to + // replace BrDigTPC objects + // Added cvs flags + // + // Revision 1.2 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.1 1999/01/06 23:19:55 hagel + // Add BrDetectorTPC + // + // + /////////////////////////////////////////////////////////// + // // + // BrDetectorTPC // + // // + // BRAHMS TPC Detector Class // + // // + // Author : K. Hagel // + // Created: 5-Nov-1998 // + // Version: 1.0 // + // // + // // + /////////////////////////////////////////////////////////// + + // ROOT classes + #ifndef ROOT_TPolyMarker3D + # include "TPolyMarker3D.h" + #endif + + #ifndef ROOT_TPolyLine3D + # include "TPolyLine3D.h" + #endif + + // BRAHMS classes + // + #ifndef BRAT_BrBaseDetector + # include "BrBaseDetector.h" + #endif + + class BrDetectorVolume; + class TNode; + class BrDataTable; + + #define MaxTracksToDraw 100 + + class BrDetectorTPC : public BrBaseDetector { + + public: + + BrDetectorTPC(); + BrDetectorTPC(const Char_t *name, const Char_t *title,const Char_t *det_name); //BrDetectorVolume *vol); + virtual ~BrDetectorTPC(); + + virtual void Clear(); + virtual void DrawGeantHits(BrDataTable *ghits); + virtual void DrawLocalTracks(BrDataTable *tracktable); + + private: + + TPolyMarker3D *fPolyMarker; //! + Float_t *f3DPoints; //!points for the polymarker and polyline + TPolyLine3D *fPolyLine[MaxTracksToDraw]; //!lines for the polyline + + public: + + ClassDef(BrDetectorTPC,1) // BRAHMS TPC detector definition + }; + + #endif + + diff -c -r -N VER-1-2/include/BrDetectorTrack.h VER-1-2-1/include/BrDetectorTrack.h *** VER-1-2/include/BrDetectorTrack.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrDetectorTrack.h Fri Nov 5 18:26:09 1999 *************** *** 0 **** --- 1,184 ---- + #ifndef BRAT_BrDetectorTrack + #define BRAT_BrDetectorTrack + + // $Id: BrDetectorTrack.h,v 1.8 1999/04/02 15:29:56 hagel Exp $ + // + // $Log: BrDetectorTrack.h,v $ + // Revision 1.8 1999/04/02 15:29:56 hagel + // Zero elements in constructor BrDetectorTrack.h + // + // Revision 1.7 1999/03/07 00:00:46 hagel + // 1. Implemented BrFSTrackingModule. Started with BrMRSTrackingModule and made + // appropriate changes to handle the forward spectrometer. It uses the new + // track classes as well as extensively using geometry classes. It also uses + // new methods and functionality as described below. + // 2. Changed BrMagnetVolume + // a. Added method SwimBack(BrLine3D &,Double_t momentum): takes a + // track at the exit of magnet and given the momentum, calculates + // where the track would come into the front of the magnet. + // b. Added method GlobalToLocal(BrLine3D &): does a combination of + // GlobalToLocal(BrVector3D &,BrVector3D&,0) and + // GlobalToLocal(BrVector3D &,BrVector3D&,1) + // c. Added method LocalToGlobal(BrLine3D &): does a combination of + // LocalToGlobal(BrVector3D &,BrVector3D&,0) and + // LocalToGlobal(BrVector3D &,BrVector3D&,1) + // d. Changed BrDetectorVolume: same additions of methods GlobalToLocal + // and LocalToGlobal as in BrMagnetVolume + // 2. Added a parameter base class BrDetectorParamsBase: helps when reading + // in database files. Declared ASCII reading routines to be virtual. + // Has main ReadASCIIFile which decodes the ASCII parameter files, then + // calls the detector specific methods SetASCIIParameter + // 3. Implemented SetASCIIParameter in BrDetectorParamsDC, BrDetectorParamsTPC, + // BrDetectorParamsTof, BrDetectorParamsBB + // 4. Implemented BrParameterDbManager. It currently works similarly to + // BrGeometryDbManager and creates the BrDetectorParamsXXX objects when + // called. These objects then read in ASCII parameter files with a currently + // "well defined" format using the above implemented routines using a constructor: + // BrDetectorParamsXXX(Char_t *name, Char_t *title,Char_t *ASCIIFileName); + // 5. If no parameter file is specified, it executes the constructor we + // have been using so far, namely BrDetectorParamsXXX(Char_t *name,Char_t *title). + // These constructors generate default parameters and are semi-intelligent + // which means they generate approximately appropriate parameters depending + // upon which detector they are. I should say that the parameters were + // deemed appropriate at the time of writing the SetDefaultParams routine. + // a. It is used in the same way as BrGeometryDbManager, that is: + // BrParameterDbManager *gParamDb = BrParameterDbManager::Instance(); + // gParamDb->SetDbParameterFileName("DetectorParameters.txt"); + // 6. Added a new directory, params, in BRAT. This directory has the file + // DetectorParameters.txt in it. If the BrParameterDbManager is started + // and the DetectorParameter.txt file is specified, it will look in the + // $BRATSYS/params directory if it cannot find the file in the directory + // that the user has set default to. + // 7. Implemented BrParameterDbManager in DC digitize and tracking code. The + // SetDetectorParams methods have been moved to private and can no longer be + // used from the macro or program. + // 8. Implemented BrParameterDbManager in TPC digitize and tracking code. + // 9. Implemented BrParameterDbManager in Tof Calibrate and GeneratePid code. + // 10 Changed the GetEntries() in BrDataTable to use the GetLast()+1 method in + // TObjArray. This should be much faster, but has the caveat that it assumes + // that all slots in TObjArray are full. That seems to me to be the case + // in how we use TObjArray at least in BrDataTable, but if problems arise due + // to this change, it can always be easily changed back. It has been used a + // fair amount before checking in and no problems were found. + // + // Modified Files: + // base/inc/BrBase_LinkDef.h base/inc/BrDataTable.h + // base/inc/BrDetectorVolume.h base/inc/BrMagnetVolume.h + // base/inc/LinkDefBratBaseINC.h base/src/BrDataTable.cxx + // base/src/BrDetectorVolume.cxx base/src/BrEventNode.cxx + // base/src/BrMagnetVolume.cxx base/src/BrTableManager.cxx + // base/src/Makefile bb/inc/BrDetectorParamsBB.h + // bb/src/BrDetectorParamsBB.cxx db/inc/BrParameterDbManager.h + // db/src/BrParameterDbManager.cxx dc/inc/BrDetectorParamsDC.h + // dc/src/BrDetectorDC.cxx dc/src/BrDetectorParamsDC.cxx + // dc/src/BrDigitizeDC.cxx dc/src/BrLocalTrackDC.cxx + // geometry/inc/BrPlane3D.h geometry/src/BrPlane3D.cxx + // params/DetectorParameters.txt tof/inc/BrDetectorParamsTof.h + // tof/src/BrDetectorParamsTof.cxx tof/src/BrGeneratePid.cxx + // tpc/inc/BrDetectorParamsTPC.h tpc/src/BrDetectorParamsTPC.cxx + // tpc/src/BrDetectorTPC.cxx tpc/src/BrDigitizeTPC.cxx + // tpc/src/BrLocalTrackTPC.cxx track/inc/BrDetectorTrack.h + // track/inc/BrFSTrackingModule.h + // track/inc/BrSpectrometerTracks.h track/src/BrDetectorTrack.cxx + // track/src/BrFSTrackingModule.cxx + // track/src/BrSpectrometerTracks.cxx + // + // Revision 1.6 1999/01/21 23:23:27 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.5 1998/12/21 20:23:11 videbaek + // Included MRS tracking, and track combine module as part of a more + // generalized set of Methods and classes. + // + // Revision 1.4 1998/12/04 21:35:35 videbaek + // Started updating structures for tracking. Using BrVector3D + // in many places where double* or float* was used before. + // Fix type SHLIB->$(SHLIB) .. + // + // + ////////////////////////////////////////////////////////////////////////// + // // + // BrDetectorTrack // + // // + // BRAHMS Detector Track class // + // // + // Author : Kris Hagel (hagel@comp.tamu.edu) // + // Created : 9-Mar-1998 // + // Version : 1.0 // + // Changed : November 1998 // + // // + // // + // // + // Description: // + // A self contained description of local tracks. It is presently // + // not possible to see what tracking station the track belongs to. // + // It is assumed that a container , or data table with a detector // + // name is responsible for tracks. Also if the are copied to a final // + // track it is clear where a given track belongs. // + // The pointers to the local tracks and their ghost are not kept. It // + // is the assumption that this will be done usding associate classes // + // This has the advantage that sizes are kept down until // + ////////////////////////////////////////////////////////////////////////// + + // Root Classes + #ifndef ROOT_TObject + #include "TObject.h" + #endif + + // Brahms Classes + // + #ifndef BRAT_BrVector3D + #include "BrVector3D.h" + #endif + + #ifndef BRAT_BrLine3D + #include "BrLine3D.h" + #endif + + #define BrDetectortrackObsolete + + class BrDetectorTrack: public TObject { + + public: + BrDetectorTrack(); + + virtual ~BrDetectorTrack() { }; + + const BrVector3D GetPos() const {return fPos;} + const BrVector3D GetAlpha() const {return fAlpha;} + Int_t GetFlag() const {return fFlag;} + Int_t GetID() const {return fId;} + Int_t GetGroupID() const {return fGroupId;} + BrLine3D GetTrackLine(); + + + void SetPos(const Float_t* pos); + void SetAlpha(const Float_t* alpha); + void SetPos(const BrVector3D& pos) { fPos = pos;}; + void SetAlpha(const BrVector3D& alpha) { fAlpha = alpha;}; + void SetFlag(Int_t i) {fFlag = i;} + void SetID(Int_t i) {fId = i;} + void SetGroupID(Int_t i) {fGroupId = i;} + + + private: + Int_t fId; // Unique Id (for a given Data Table) + Int_t fGroupId; // Id for sets of detector tracks. + BrVector3D fPos; // Position of track - in local detector coordinates + BrVector3D fAlpha; // Direction vector of track - in local detector coordinates + Int_t fFlag; // Status, quality flag. + Double_t fQuality; // Quality indicator (could be chi**2 of track) + public: + friend ostream& operator<< (ostream& os, BrDetectorTrack* track_p); + + public: + + ClassDef(BrDetectorTrack,1) // BRAHMS Detector Track Class + }; + #endif diff -c -r -N VER-1-2/include/BrDetectorVolume.h VER-1-2-1/include/BrDetectorVolume.h *** VER-1-2/include/BrDetectorVolume.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrDetectorVolume.h Fri Nov 5 18:26:01 1999 *************** *** 0 **** --- 1,256 ---- + #ifndef BRAT_BrDetectorVolume + #define BRAT_BrDetectorVolume + // + // $Id: BrDetectorVolume.h,v 1.16 1999/04/21 14:47:39 videbaek Exp $ + // $Log: BrDetectorVolume.h,v $ + // Revision 1.16 1999/04/21 14:47:39 videbaek + // Added Methods SetHistOn() .. see comments + // + // Revision 1.15 1999/03/07 00:00:41 hagel + // 1. Implemented BrFSTrackingModule. Started with BrMRSTrackingModule and made + // appropriate changes to handle the forward spectrometer. It uses the new + // track classes as well as extensively using geometry classes. It also uses + // new methods and functionality as described below. + // 2. Changed BrMagnetVolume + // a. Added method SwimBack(BrLine3D &,Double_t momentum): takes a + // track at the exit of magnet and given the momentum, calculates + // where the track would come into the front of the magnet. + // b. Added method GlobalToLocal(BrLine3D &): does a combination of + // GlobalToLocal(BrVector3D &,BrVector3D&,0) and + // GlobalToLocal(BrVector3D &,BrVector3D&,1) + // c. Added method LocalToGlobal(BrLine3D &): does a combination of + // LocalToGlobal(BrVector3D &,BrVector3D&,0) and + // LocalToGlobal(BrVector3D &,BrVector3D&,1) + // d. Changed BrDetectorVolume: same additions of methods GlobalToLocal + // and LocalToGlobal as in BrMagnetVolume + // 2. Added a parameter base class BrDetectorParamsBase: helps when reading + // in database files. Declared ASCII reading routines to be virtual. + // Has main ReadASCIIFile which decodes the ASCII parameter files, then + // calls the detector specific methods SetASCIIParameter + // 3. Implemented SetASCIIParameter in BrDetectorParamsDC, BrDetectorParamsTPC, + // BrDetectorParamsTof, BrDetectorParamsBB + // 4. Implemented BrParameterDbManager. It currently works similarly to + // BrGeometryDbManager and creates the BrDetectorParamsXXX objects when + // called. These objects then read in ASCII parameter files with a currently + // "well defined" format using the above implemented routines using a constructor: + // BrDetectorParamsXXX(Char_t *name, Char_t *title,Char_t *ASCIIFileName); + // 5. If no parameter file is specified, it executes the constructor we + // have been using so far, namely BrDetectorParamsXXX(Char_t *name,Char_t *title). + // These constructors generate default parameters and are semi-intelligent + // which means they generate approximately appropriate parameters depending + // upon which detector they are. I should say that the parameters were + // deemed appropriate at the time of writing the SetDefaultParams routine. + // a. It is used in the same way as BrGeometryDbManager, that is: + // BrParameterDbManager *gParamDb = BrParameterDbManager::Instance(); + // gParamDb->SetDbParameterFileName("DetectorParameters.txt"); + // 6. Added a new directory, params, in BRAT. This directory has the file + // DetectorParameters.txt in it. If the BrParameterDbManager is started + // and the DetectorParameter.txt file is specified, it will look in the + // $BRATSYS/params directory if it cannot find the file in the directory + // that the user has set default to. + // 7. Implemented BrParameterDbManager in DC digitize and tracking code. The + // SetDetectorParams methods have been moved to private and can no longer be + // used from the macro or program. + // 8. Implemented BrParameterDbManager in TPC digitize and tracking code. + // 9. Implemented BrParameterDbManager in Tof Calibrate and GeneratePid code. + // 10 Changed the GetEntries() in BrDataTable to use the GetLast()+1 method in + // TObjArray. This should be much faster, but has the caveat that it assumes + // that all slots in TObjArray are full. That seems to me to be the case + // in how we use TObjArray at least in BrDataTable, but if problems arise due + // to this change, it can always be easily changed back. It has been used a + // fair amount before checking in and no problems were found. + // + // Modified Files: + // base/inc/BrBase_LinkDef.h base/inc/BrDataTable.h + // base/inc/BrDetectorVolume.h base/inc/BrMagnetVolume.h + // base/inc/LinkDefBratBaseINC.h base/src/BrDataTable.cxx + // base/src/BrDetectorVolume.cxx base/src/BrEventNode.cxx + // base/src/BrMagnetVolume.cxx base/src/BrTableManager.cxx + // base/src/Makefile bb/inc/BrDetectorParamsBB.h + // bb/src/BrDetectorParamsBB.cxx db/inc/BrParameterDbManager.h + // db/src/BrParameterDbManager.cxx dc/inc/BrDetectorParamsDC.h + // dc/src/BrDetectorDC.cxx dc/src/BrDetectorParamsDC.cxx + // dc/src/BrDigitizeDC.cxx dc/src/BrLocalTrackDC.cxx + // geometry/inc/BrPlane3D.h geometry/src/BrPlane3D.cxx + // params/DetectorParameters.txt tof/inc/BrDetectorParamsTof.h + // tof/src/BrDetectorParamsTof.cxx tof/src/BrGeneratePid.cxx + // tpc/inc/BrDetectorParamsTPC.h tpc/src/BrDetectorParamsTPC.cxx + // tpc/src/BrDetectorTPC.cxx tpc/src/BrDigitizeTPC.cxx + // tpc/src/BrLocalTrackTPC.cxx track/inc/BrDetectorTrack.h + // track/inc/BrFSTrackingModule.h + // track/inc/BrSpectrometerTracks.h track/src/BrDetectorTrack.cxx + // track/src/BrFSTrackingModule.cxx + // track/src/BrSpectrometerTracks.cxx + // + // Revision 1.14 1999/01/21 23:23:18 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 didnt 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.13 1999/01/15 15:32:13 videbaek + // Updates to volume files. + // Added member histon to BrModule, and member function HistOn(). + // Added BrMath as standard math library. + // + // Revision 1.12 1998/12/21 20:17:58 videbaek + // Added magnet voluems. Additional features for Modules. + // + // Revision 1.11 1998/12/16 23:51:41 hagel + // Add constructor and ReadASCIIFile methods without fspec and mids since that + // is not needed anymore. Keep other ones for time being for compatibility with + // code that already exists. + // + // Revision 1.10 1998/12/04 21:33:11 videbaek + // Modification for better geometry contnued. Nor complete yet + // + // Revision 1.9 1998/12/01 21:20:09 videbaek + // Added refs in Detector volume to deal with BrVector3D + // rather than only float* references. + // + // Revision 1.8 1998/10/05 21:01:54 videbaek + // Add comments to member data + // + // Revision 1.7 1998/09/27 16:54:51 alv + // made first argument of LocalToGlobal and GlobalToLocal const. + // + // Revision 1.6 1998/09/24 23:28:48 hagel + // Added GetXpos, GetYpos, GetZpos to set detetctor positions: + // + // CVS:----------------------------------------------------------------- + // + // Revision 1.5 1998/06/20 23:20:47 hagel + // Add basic ostream support to BrDetectorVolume + // + // Revision 1.4 1998/04/29 02:12:59 hagel + // added GlobalToLocal for BrCombineTracks etc + // + // Revision 1.3 1998/04/06 21:11:47 videbaek + // Clean up and additions for Win95 + // + // Revision 1.2 1998/04/01 22:22:03 hagel + // Put Get()s in front of variables. Leave Others in for now for compatibility + // + // Revision 1.1.1.1 1998/03/04 21:32:48 brahmlib + // Brat base + // + // + + + /////////////////////////////////////////////////////////////////////// + // // + // BrDetectorVolume // + // // + // The detector Volume class. This maintains the basic geometry // + // of the detector i.e. global position, rotation matrices etc. // + // // + // This class in transition. Several of the old members are kept + // until all the code using this is setup peoperly. Also for now the + // initialization is done thorugh the older code. + // The flag DETECTORVOLUMEOBSOLETE is used to isolate the old + // behaviour. + // // + /////////////////////////////////////////////////////////////////////// + + // Root Classes + #ifndef ROOT_TNamed + #include "TNamed.h" + #endif + + // BRAHMS Classes + #ifndef BRAT_BrVector3D + #include "BrVector3D.h" + #endif + + #ifndef BRAT_BrLine3D + #include "BrLine3D.h" + #endif + + #ifndef BRAT_BrCoordinateSystem + #include "BrCoordinateSystem.h" + #endif + + #define DETECTORVOLUMEOBSOLETE + + class BrDetectorVolume : public TNamed { + + public: + BrDetectorVolume(); + BrDetectorVolume(Char_t *name, Char_t *title); + BrDetectorVolume(Char_t *name,Char_t *title,Char_t *ASCIIFileName, Int_t fspec, Int_t mids); + BrDetectorVolume(Char_t *name,Char_t *title,Char_t *ASCIIFileName); + + virtual ~BrDetectorVolume(); + + + void ReadASCIIFile(Char_t *ASCIIFileName,Char_t *name, Int_t fspec, Int_t mids); + void ReadASCIIFile(Char_t *ASCIIFileName,Char_t *name); + void ListParameters(); + + //Put in Get()s in front of variables as agreed to in Feb. 1998 visit to BNL + //Leave others in for now for compatibility + // virtual Float_t *Size() {return fSize;} + virtual Float_t *GetSize() {return fSize;} + + #ifdef DETECTORVOLUMEOBSOLETE + // virtual Float_t Pos() {return fPos; } + virtual Float_t *GetPos() {return fPos; } + virtual BrVector3D GetPosVector3D(); + // virtual Float_t Angle() {return fAngle;} + virtual Float_t GetAngle() {return fAngle;} + virtual Float_t *GetRotm() {return &fRotm[0][0];} + // virtual Float_t *Rotm() {return &fRotm[0][0];} + // virtual Char_t *Type() {return fType;} + virtual Char_t *GetType() {return fType;} + // virtual Int_t *Cut() {return fCut;} + virtual Int_t GetCut() {return fCut;} + // virtual Float_t *Fsize(){return fFsize;} + virtual Float_t *GetFsize(){return fFsize;} + #endif + virtual void SetXpos(Float_t x) {fPos[0] = x;} + virtual void SetYpos(Float_t y) {fPos[1] = y;} + virtual void SetZpos(Float_t z) {fPos[2] = z;} + virtual void GlobalToLocal(const Float_t xg[3],Float_t xl[3],Int_t iflag); + virtual void LocalToGlobal(const Float_t xl[3],Float_t xg[3],Int_t iflag); + virtual void GlobalToLocal(const BrVector3D&, BrVector3D& ,Int_t iflag); + virtual void LocalToGlobal(const BrVector3D&, BrVector3D& ,Int_t iflag); + virtual BrLine3D GlobalToLocal(const BrLine3D& line); + virtual BrLine3D LocalToGlobal(const BrLine3D& line); + virtual void SetCoordinateSystem(BrCoordinateSystem& system){fSystem = system;} + virtual BrCoordinateSystem* GetCoordinateSystem(){return &fSystem;} + virtual BrRotMatrix* GetRotMatrix(){return fSystem.GetRotMatrix();} + + protected: + + Float_t fSize[3]; // Detector size (x,y,z) + #ifdef DETECTORVOLUMEOBSOLETE + Float_t fPos[3]; // Position of center of volume + Float_t fAngle; // rotation angle in horizontal x-z plane + Float_t fRotm[3][3]; + Char_t fType[4]; + Int_t fCut; + Float_t fFsize[2]; // residual cuts (x,y only) + #endif + BrCoordinateSystem fSystem; // Coordinate system definition. + + + void SetVolumeParameters(Float_t xl, Float_t yl, Float_t zl, + Float_t angle, + Float_t xl_center, Float_t yl_center, Float_t zl_center, + Char_t *type); + + public: + friend ostream& operator<< (ostream& os, BrDetectorVolume* volume_p); + + ClassDef(BrDetectorVolume,1) // BRAHMS detector volume class + + }; + + #endif + + + + diff -c -r -N VER-1-2/include/BrDigBB.h VER-1-2-1/include/BrDigBB.h *** VER-1-2/include/BrDigBB.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrDigBB.h Fri Nov 5 18:26:20 1999 *************** *** 0 **** --- 1,86 ---- + #ifndef BRAT_BrDigBB + #define BRAT_BrDigBB + + // $Id: BrDigBB.h,v 1.5 1999/01/21 23:23:21 hagel Exp $ + // + // $Log: BrDigBB.h,v $ + // Revision 1.5 1999/01/21 23:23:21 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.4 1998/07/31 19:32:13 videbaek + // Working version of BB digitize + // + // Revision 1.3 1998/07/28 21:29:12 videbaek + // several fixes to BB + // + // Revision 1.2 1998/07/27 16:26:58 videbaek + // Stat on modifiing BB - not complete + // + // Revision 1.1 1998/07/02 19:40:34 videbaek + // Preliminary version of BB + // + /////////////////////////////////////////////////////////////////////// + // // + // BrDigBB // + // // + // BRAHMS Raw Data Element for Beam-Beam counters // + // // + // Author : F.Videbaek // + // Created : May 1998 // + // Version : 1.0 // + // Changed : // + // // + /////////////////////////////////////////////////////////////////////// + + // Root Classes + + #ifndef ROOT_TObject + #include "TObject.h" + #endif + + // Brahms Classes + // + class BrDigBB: public TObject { + + + private: + Int_t fId; // Reference ID in table. + Int_t fTubeNo; // Tube Number (either left or right) + Int_t fAdc; // Adc value for PMT + Int_t fTdc; // Tdc value for PMT + + public: + BrDigBB(){ }; + + virtual ~BrDigBB() { }; + + Bool_t IsSortable() const {return kTRUE;} + Int_t Compare(TObject *BrDigBB); + + virtual Int_t GetTubeNo() const {return fTubeNo;} + virtual Int_t GetAdc() const {return fAdc;} + virtual Int_t GetTdc() const {return fTdc;} + virtual Int_t GetId() {return fId;} + + + virtual void SetTubeNo(Int_t i) {fTubeNo = i;} + virtual void SetTdc(Int_t time) {fTdc = time;} + virtual void SetAdc(Int_t i) {fAdc = i;} + virtual void SetId(Int_t i) {fId = i;} + + virtual void List(); + + + public: + + ClassDef(BrDigBB,1) // BRAHMS Tof Digitized data class + + }; + + #endif diff -c -r -N VER-1-2/include/BrDigC1.h VER-1-2-1/include/BrDigC1.h *** VER-1-2/include/BrDigC1.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrDigC1.h Fri Nov 5 18:26:34 1999 *************** *** 0 **** --- 1,61 ---- + #ifndef BRAT_BrDigC1 + #define BRAT_BrDigC1 + + // $Id: BrDigC1.h,v 1.1 1999/06/22 00:06:38 hagel Exp $ + // + // $Log: BrDigC1.h,v $ + // Revision 1.1 1999/06/22 00:06:38 hagel + // Initial revision of C1 structures and monitoring code + // + // + /////////////////////////////////////////////////////////////////////// + // // + // BrDigC1 // + // // + // BRAHMS Raw Data Element for C1 counters // + // // + // Author : K. Hagel // + // Created : May 1999 // + // Version : 1.0 // + // Changed : // + // // + /////////////////////////////////////////////////////////////////////// + + // Root Classes + + #ifndef ROOT_TObject + #include "TObject.h" + #endif + + const Int_t kNumC1Chan = 32; + // Brahms Classes + // + class BrDigC1: public TObject { + + + private: + + Int_t fAdc[kNumC1Chan]; // C1 ADC's + + public: + BrDigC1(){ }; + + virtual ~BrDigC1() { }; + + Bool_t IsSortable() const {return kTRUE;} + Int_t Compare(TObject *BrDigC1); + + virtual Int_t GetAdc(const Int_t i) const; // {return fAdc;} + + virtual void SetAdc(const Int_t itube,const Int_t adc); //{fTdc = time;} + + virtual void List(); + + + public: + + ClassDef(BrDigC1,1) // BRAHMS ZDC Digitized data class + + }; + + #endif diff -c -r -N VER-1-2/include/BrDigHit.h VER-1-2-1/include/BrDigHit.h *** VER-1-2/include/BrDigHit.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrDigHit.h Fri Nov 5 18:26:19 1999 *************** *** 0 **** --- 1,102 ---- + #ifndef BRAT_BrDigHit + #define BRAT_BrDigHit + + // $Id: BrDigHit.h,v 1.5 1999/01/21 23:23:22 hagel Exp $ + // + // $Log: BrDigHit.h,v $ + // Revision 1.5 1999/01/21 23:23:22 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 + // + + /////////////////////////////////////////////////////////////////////// + // // + // BrDigHit // + // // + // BRAHMS Hit class // + // // + // Author : Kris Hagel (hagel@comp.tamu.edu) // + // Created : 11-Mar-1998 // + // Version : 1.0 // + // Changed : // + // // + /////////////////////////////////////////////////////////////////////// + + #include "iostream.h" + + // Root Classes + + #ifndef ROOT_TObject + #include "TObject.h" + #endif + + // Brahms Classes + #ifndef BRAT_BrDataTable + #include "BrDataTable.h" + #endif + + class BrDCHitPosition; + class BrDCPlane; + + class BrDigHit: public TObject { + + public: + BrDigHit(); + + virtual ~BrDigHit(); // {fHitpos.Clear(); }; + + Bool_t IsSortable() const {return kTRUE;} + Int_t Compare(TObject *dighit); + + virtual Int_t GetID() {return fID;} + virtual Int_t GetIdet() {return fIdet;} + virtual Int_t GetImod() {return fImod;} + virtual Int_t GetWire() {return fWire;} + virtual Int_t GetTime() {return fTime;} + virtual Int_t GetWidth() {return fWidth;} + virtual Int_t GetIfuse() {return fIfuse;} + virtual Int_t GetUsed() {return fUsed;} + virtual Int_t GetDcpl() {return fDcpl;} + BrDCHitPosition *GetHitposAt(Int_t i) {return (BrDCHitPosition*)fHitpos.At(i);} + virtual Int_t GetHitposEntries() {return fHitpos.GetEntries();} + + virtual void SetID(Int_t i) {fID = i;} + virtual void SetIdet(Int_t i) {fIdet = i;} + virtual void SetImod(Int_t i) {fImod = i;} + virtual void SetWire(Int_t i) {fWire = i;} + virtual void SetTime(Int_t i) {fTime = i;} + virtual void SetWidth(Int_t i) {fWidth = i;} + virtual void SetIfuse(Int_t i) {fIfuse = i;} + virtual void SetUsed(Int_t i) {fUsed = i;} + virtual void SetDcpl(Int_t dcpl) {fDcpl = dcpl;} + virtual void AddHitPos(BrDCHitPosition* hitpos) {fHitpos.Add((TObject*)hitpos);} + virtual void IncUsed() {fUsed++;} + + private: + + Int_t fID; + Int_t fIdet; + Int_t fImod; + Int_t fWire; + Int_t fTime; + Int_t fWidth; + Int_t fIfuse; + Int_t fUsed; + Int_t fDcpl; + BrDataTable fHitpos; + + + + public: + friend ostream& operator<< (ostream& os,BrDigHit* dighit); + + ClassDef(BrDigHit,1) // BRAHMS hit data class + + }; + + #endif diff -c -r -N VER-1-2/include/BrDigMultSi.h VER-1-2-1/include/BrDigMultSi.h *** VER-1-2/include/BrDigMultSi.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrDigMultSi.h Fri Nov 5 18:26:33 1999 *************** *** 0 **** --- 1,69 ---- + #ifndef BRAT_BrDigMultSi + #define BRAT_BrDigMultSi + + // $Id: BrDigMultSi.h,v 1.1 1999/06/19 22:22:49 hagel Exp $ + // + // $Log: BrDigMultSi.h,v $ + // Revision 1.1 1999/06/19 22:22:49 hagel + // Initial Revision + // + // + /////////////////////////////////////////////////////////////////////// + // // + // BrDigMultSi // + // // + // BRAHMS Raw Data Element for Multiplicity Si detectors // + // // + // Author : K. Hagel // + // Created : June 1999 // + // Version : 1.0 // + // Changed : // + // // + /////////////////////////////////////////////////////////////////////// + + // Root Classes + + #ifndef ROOT_TObject + #include "TObject.h" + #endif + + // Brahms Classes + // + class BrDigMultSi: public TObject { + + + private: + + Int_t fId; + Int_t fAdc; + Int_t fTdc; + + public: + BrDigMultSi(){ }; + + virtual ~BrDigMultSi() { }; + + Bool_t IsSortable() const {return kTRUE;} + Int_t Compare(TObject *BrDigMultSi); + + //Getter functions + virtual Int_t GetId() const {return fId;} + virtual Int_t GetAdc() const {return fAdc;} + virtual Int_t GetTdc() const {return fTdc;} + + // Setter functions + virtual void SetId(const Int_t id) {fId = id;} + virtual void SetAdc(const Int_t energy) {fAdc = energy;} + virtual void SetTdc(const Int_t time) {fTdc = time;} + + + virtual void List(); + + + public: + + ClassDef(BrDigMultSi,1) // BRAHMS ZDC Digitized data class + + }; + + #endif diff -c -r -N VER-1-2/include/BrDigMultTile.h VER-1-2-1/include/BrDigMultTile.h *** VER-1-2/include/BrDigMultTile.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrDigMultTile.h Fri Nov 5 18:26:33 1999 *************** *** 0 **** --- 1,69 ---- + #ifndef BRAT_BrDigMultTile + #define BRAT_BrDigMultTile + + // $Id: BrDigMultTile.h,v 1.1 1999/06/19 22:22:49 hagel Exp $ + // + // $Log: BrDigMultTile.h,v $ + // Revision 1.1 1999/06/19 22:22:49 hagel + // Initial Revision + // + // + /////////////////////////////////////////////////////////////////////// + // // + // BrDigMultTile // + // // + // BRAHMS Raw Data Element for Multiplicity Tiles counters // + // // + // Author : K. Hagel // + // Created : June 1999 // + // Version : 1.0 // + // Changed : // + // // + /////////////////////////////////////////////////////////////////////// + + // Root Classes + + #ifndef ROOT_TObject + #include "TObject.h" + #endif + + // Brahms Classes + // + class BrDigMultTile: public TObject { + + + private: + + Int_t fId; + Int_t fAdc; + Int_t fTdc; + + public: + BrDigMultTile(){ }; + + virtual ~BrDigMultTile() { }; + + Bool_t IsSortable() const {return kTRUE;} + Int_t Compare(TObject *BrDigMultTile); + + //Getter functions + virtual Int_t GetId() const {return fId;} + virtual Int_t GetAdc() const {return fAdc;} + virtual Int_t GetTdc() const {return fTdc;} + + // Setter functions + virtual void SetId(const Int_t id) {fId = id;} + virtual void SetAdc(const Int_t energy) {fAdc = energy;} + virtual void SetTdc(const Int_t time) {fTdc = time;} + + + virtual void List(); + + + public: + + ClassDef(BrDigMultTile,1) // BRAHMS ZDC Digitized data class + + }; + + #endif diff -c -r -N VER-1-2/include/BrDigTof.h VER-1-2-1/include/BrDigTof.h *** VER-1-2/include/BrDigTof.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrDigTof.h Fri Nov 5 18:26:12 1999 *************** *** 0 **** --- 1,77 ---- + #ifndef BRAT_BrDigTof + #define BRAT_BrDigTof + + // $Id: BrDigTof.h,v 1.3 1999/02/19 21:31:06 bearden Exp $ + // + // $Log: BrDigTof.h,v $ + // Revision 1.3 1999/02/19 21:31:06 bearden + // Added ADCs to Tof calibration, now returns ADC sum (top+bottom) in channels + // + // Revision 1.2 1999/01/21 23:23:25 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 + // + // + /////////////////////////////////////////////////////////////////////// + // // + // BrDigTof // + // // + // BRAHMS Raw Data Element for Time-Of-Flight element // + // // + // Author : F.Videbaek // + // Created : February 98 // + // Version : 1.0 // + // Changed : // + // // + /////////////////////////////////////////////////////////////////////// + + // Root Classes + #ifndef ROOT_TObject + #include "TObject.h" + #endif + + // Brahms Classes + // + class BrDigTof: public TObject { + + public: + BrDigTof(){ }; + + virtual ~BrDigTof() { }; + + Bool_t IsSortable() const {return kTRUE;} + Int_t Compare(TObject *BrDigTof); + + virtual Int_t GetSlatno() const {return fSlatno;} + virtual Int_t GetAdcUp() const {return fAdcUp;} + virtual Int_t GetAdcDown() const {return fAdcDown;} + virtual Int_t GetTdcUp() const {return fTdcUp;} + virtual Int_t GetTdcDown() const {return fTdcDown;} + + virtual void SetSlatno(Int_t i) {fSlatno = i;} + virtual void SetTdcUp(Int_t time) {fTdcUp = time;} + virtual void SetTdcDown(Int_t time) {fTdcDown = time;} + virtual void SetAdcUp(Int_t energy) {fAdcUp = energy;} + virtual void SetAdcDown(Int_t energy) {fAdcDown = energy;} + + virtual void List(); + + private: + Int_t fSlatno; // SlatNumber + Int_t fAdcUp; // Adc value from top PMT + Int_t fAdcDown; // Adc value from bottom PMT + Int_t fTdcUp; // Tdc value from top PMT + Int_t fTdcDown; // Tdc value from top PMT + + public: + + ClassDef(BrDigTof,1) // BRAHMS Tof Digitized data class + + }; + + #endif diff -c -r -N VER-1-2/include/BrDigZDC.h VER-1-2-1/include/BrDigZDC.h *** VER-1-2/include/BrDigZDC.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrDigZDC.h Fri Nov 5 18:26:31 1999 *************** *** 0 **** --- 1,111 ---- + #ifndef BRAT_BrDigZDC + #define BRAT_BrDigZDC + + // $Id: BrDigZDC.h,v 1.4 1999/06/18 22:37:15 hagel Exp $ + // + // $Log: BrDigZDC.h,v $ + // Revision 1.4 1999/06/18 22:37:15 hagel + // Various modifications to make read raw data + // + // Revision 1.3 1999/06/14 14:17:27 hagel + // Cleanup + // + // Revision 1.2 1999/06/08 22:24:23 hagel + // A place holder that is sort of functional. It is used on first ZDC data file + // + // Revision 1.1 1999/06/01 21:13:36 hagel + // Placeholder version copied from BB until real version comes + // + /////////////////////////////////////////////////////////////////////// + // // + // BrDigZDC // + // // + // BRAHMS Raw Data Element for ZDC counters // + // Placeholder until "real version" supplied // + // // + // Author : K. Hagel // + // Created : May 1999 // + // Version : 1.0 // + // Changed : // + // // + /////////////////////////////////////////////////////////////////////// + + // Root Classes + + #ifndef ROOT_TObject + #include "TObject.h" + #endif + + const Int_t kNumZDCChan = 3; + // Brahms Classes + // + class BrDigZDC: public TObject { + + + private: + // Int_t fAdc; // Adc value for PMT + // Int_t fTdc; // Tdc value for PMT + + // The ZDCs are labelled left and right in the same way as the beam-beam + // counters, that is looking at the experiment from the inside of the ring. + // For communication with RHIC the terms Blue and Yellow are used. + // Blue ZDC faces the Blue ie clockwise beam so Blue ZDC = ZDC right + // Yellow ZDC faces the Yellow ie anticlockwise beam so Yellow ZDC = ZDC left + // Each ZDC consists of 3 modules. The signals from each module as well as + // the analog sum of the 3 modules go into ADCs and TDCs. The TDCs are run + // in common start mode so that if the ZDC is delayed one obseves a larger + // TDC signal. The TDC clock rate is set at 50ps/count. + + Int_t fRightAdc[kNumZDCChan]; // ZDC right ADC + Int_t fRightTdc[kNumZDCChan]; // ZDC right TDC + + Int_t fRightAdcSum; // ZDC right ADC for analog sum + Int_t fRightTdcSum; // ZDC right ADC for analog sum + + Int_t fLeftAdc[kNumZDCChan]; // ZDC left ADC + Int_t fLeftTdc[kNumZDCChan]; // ZDC left TDC + + Int_t fLeftAdcSum; // ZDC left ADC for analog sum + Int_t fLeftTdcSum; // ZDC left ADC for analog sum + + public: + BrDigZDC(){ }; + + virtual ~BrDigZDC() { }; + + Bool_t IsSortable() const {return kTRUE;} + Int_t Compare(TObject *BrDigZDC); + + // virtual Int_t GetTubeNo() const {return fTubeNo;} + virtual Int_t GetLeftAdc(const Int_t i) const; // {return fAdc;} + virtual Int_t GetLeftTdc(const Int_t i) const; // {return fTdc;} + virtual Int_t GetRightAdc(const Int_t i) const; // {return fAdc;} + virtual Int_t GetRightTdc(const Int_t i) const; // {return fTdc;} + virtual Int_t GetLeftAdcSum() {return fLeftAdcSum;} + virtual Int_t GetLeftTdcSum() {return fLeftTdcSum;} + virtual Int_t GetRightAdcSum() {return fRightAdcSum;} + virtual Int_t GetRightTdcSum() {return fRightTdcSum;} + // virtual Int_t GetId() {return fId;} + + + // virtual void SetTubeNo(Int_t i) {fTubeNo = i;} + virtual void SetLeftTdc(const Int_t itube,const Int_t time); // {fTdc = time;} + virtual void SetLeftAdc(const Int_t itube,const Int_t val); // {fAdc = i;} + virtual void SetRightTdc(const Int_t itube,const Int_t time); // {fTdc = time;} + virtual void SetRightAdc(const Int_t itube,const Int_t val); // {fAdc = i;} + virtual void SetLeftAdcSum(const Int_t val) {fLeftAdcSum = val;} + virtual void SetRightAdcSum(const Int_t val) {fRightAdcSum = val;} + virtual void SetLeftTdcSum(const Int_t val) {fLeftTdcSum = val;} + virtual void SetRightTdcSum(const Int_t val) {fRightTdcSum = val;} + // virtual void SetId(Int_t i) {fId = i;} + + virtual void List(); + + + public: + + ClassDef(BrDigZDC,1) // BRAHMS ZDC Digitized data class + + }; + + #endif diff -c -r -N VER-1-2/include/BrDigitizeBB.h VER-1-2-1/include/BrDigitizeBB.h *** VER-1-2/include/BrDigitizeBB.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrDigitizeBB.h Fri Nov 5 18:26:21 1999 *************** *** 0 **** --- 1,115 ---- + #ifndef BRAT_BrDigitizeBB + #define BRAT_BrDigitizeBB + // $Id: BrDigitizeBB.h,v 1.8 1999/04/01 22:21:30 videbaek Exp $ + // + // $Log: BrDigitizeBB.h,v $ + // Revision 1.8 1999/04/01 22:21:30 videbaek + // Changed to use BrParameterDbManager for parameters. + // See BrDigitize.cxx for additional comments + // + // Revision 1.7 1999/01/21 23:23:21 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.6 1999/01/15 15:33:24 videbaek + // Small updates for digitize + // Made BrRdoModule functional. + // + // Revision 1.5 1998/09/17 16:16:30 videbaek + // Removed Mass() static fct from BrDigitizeBB + // + // Revision 1.4 1998/08/21 19:49:52 videbaek + // Include guards was TOF not BB + // + // Revision 1.3 1998/07/28 21:29:12 videbaek + // several fixes to BB + // + // Revision 1.2 1998/07/27 16:26:59 videbaek + // Stat on modifiing BB - not complete + // + // + // BB Digitization Module + // + // + /////////////////////////////////////////////////////////////////////// + // // + // BrDigitizeBB // + // // + // BRAHMS BB digitization class - slow simulator // + // // + // Manages information and operations related to the // + // detector geometry. Module to be used in Digitization // + // phase of software // + // // + // copyright (C) BRAHMS exp. RHIC/BNL // + // Use of this software is granted for non-commerical application // + // upon addition of this note in all source code. // + // // + // Author : F.Videbaek // + // Created : 5/15/98 // + // Version : 1.0 // + // Changed : // + // // + /////////////////////////////////////////////////////////////////////// + + // ROOT Classes + // + // class TH1F; + + // Brat Classes + + + + class BrEventNode; + class BrDetectorParamsBB; + class BrDetectorVolume; + + #ifndef BRAT_BrModule + # include "BrModule.h" + #endif + + + class BrDigitizeBB : public BrModule { + + public: + // constructors and destructors + // + BrDigitizeBB(); + BrDigitizeBB(Text_t *Name, Char_t *Title); + virtual ~BrDigitizeBB(); + // + // Methods + // + virtual void Init(); + virtual void Event(BrEventNode* InputTable, BrEventNode* OutputTable); + + private: + BrDetectorVolume* fVolumeParamsBB_p; // pointer to volume information + BrDetectorParamsBB* fParamsBB_p; // pointer to parameter information + private: + void SetDetectorParamsBB(BrDetectorParamsBB* par); + void SetDetectorParamsBB(const BrDetectorParamsBB& par); + public: + virtual BrDetectorParamsBB* GetDetectorParamsBB() const { + return (BrDetectorParamsBB*) fParamsBB_p;} + virtual BrDetectorVolume* GetDetectorVolume() const { + return fVolumeParamsBB_p;} + BrDetectorVolume* DetectorVolume(){return fVolumeParamsBB_p;} + // virtual void SetDetectorVolume(BrDetectorVolume* vol){ fVolumeParamsBB_p = vol;} + + void ListDetectorParameters() const; + void Info() const; + public: + // + + ClassDef(BrDigitizeBB,1) // BRAHMS Beam Beam digitization routine + + }; + + #endif + diff -c -r -N VER-1-2/include/BrDigitizeDC.h VER-1-2-1/include/BrDigitizeDC.h *** VER-1-2/include/BrDigitizeDC.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrDigitizeDC.h Fri Nov 5 18:26:19 1999 *************** *** 0 **** --- 1,150 ---- + #ifndef BRAT_BrDigitizeDC + #define BRAT_BrDigitizeDC + + // $Id: BrDigitizeDC.h,v 1.16 1999/04/07 21:19:01 hagel Exp $ + // $Log: BrDigitizeDC.h,v $ + // Revision 1.16 1999/04/07 21:19:01 hagel + // Added diagnostic histogram h_Diffx + // + // Revision 1.15 1999/04/01 16:51:42 hagel + // Add getter and setter functions for fPosres + // + // Revision 1.14 1999/03/22 17:37:58 hagel + // Add fPosres as data member. Use it instead of par->GetPosres() to + // simulate DC position resolution. That decouples this from the + // DC tracking routine. In principle, it should be the same however. + // Having it decoupled makes some things easier to simulate. + // + // Revision 1.13 1999/03/16 21:04:11 hagel + // 1. Make BrDCPlane inherit from BrPlane3D. BrDCPlane how has information about + // where it is located. + // 2. Change BrDigitizeDC and BrLocalTrackDC to make use of new BrDCPlane information. + // 3. Move Decode(...) from BrDigitizeDC to BrLocalTrackDC. + // 4. Change cut parameters to be member data with defaults rather than hardwired. + // + // Revision 1.12 1999/02/24 16:36:02 hagel + // Implemented BrParameterDbManager + // + // Revision 1.11 1999/01/21 23:23:22 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.10 1999/01/15 15:35:38 videbaek + // Changes from merging fv and kh files. should be cosmetic only + // + // Revision 1.9 1998/12/18 19:50:30 hagel + // Move SetDetectorVolume() to private + // + // Revision 1.8 1998/12/14 23:37:53 hagel + // cleanup of Initial version of Event Display stuff for DC's + // + // Revision 1.7 1998/12/04 21:37:48 videbaek + // changed comments only + // + // Revision 1.6 1998/09/27 16:56:48 alv + // removed fTimer, fCpuTime, EventStatisticsStart and EventStatisticsEnd + // (inherit them from BrModule) + // + // Revision 1.5 1998/07/02 17:54:15 hagel + // Add const to GetDetectorVolume + // + // Revision 1.4 1998/07/02 13:58:48 videbaek + // comment updates mainly + // + // + /////////////////////////////////////////////////////////////////////// + // // + // BrDigitizeDC // + // // + // BRAHMS DC detector digitization and decode class // + // // + // Author : Kris Hagel (hagel@comp.tamu.edu) // + // Created : 25-MAR-1998 // + // Version : 1.0 // + // Changed : // + // // + /////////////////////////////////////////////////////////////////////// + + //BRAT Includes + #ifndef BRAT_BrModule + #include "BrModule.h" + #endif + + //ROOT Includes + #ifndef ROOT_TH1 + #include "TH1.h" + #endif + + #ifndef ROOT_TGraph + #include "TGraph.h" + #endif + + class BrTrack2D; + + class BrDataTable; + class BrDetectorParamsDC; + class BrDetectorVolume; + class BrDetectorDC; + class TGeometry; + + class BrDigitizeDC : public BrModule { + + public: + BrDigitizeDC(); + BrDigitizeDC(Char_t *Name,Char_t *Title); + + virtual ~BrDigitizeDC(); + + void Init(); + void Event(BrEventNode* InputTable,BrEventNode* OutputTable); + + virtual BrDetectorParamsDC* GetDetectorParamsDC(){return fParams_p;} + + virtual BrDetectorVolume* GetDetectorVolume(const Char_t *name); + + virtual void SetPosres(Float_t posres) {fPosres = posres;} + + virtual Float_t GetPosres() {return fPosres;} + + void ListDetectorParameters(); + void ListEventStatistics(); + + void DrawGeantHits(); + + private: + + Bool_t Digitize(BrEventNode *InputTable,BrEventNode *OutputTable); + void SortDighit(BrDataTable* DigitizedHits); + + void SetDetectorParamsDC(BrDetectorParamsDC* par); + void SetDetectorParamsDC(const BrDetectorParamsDC& par); + + BrDetectorParamsDC* fParams_p; + virtual void SetDetectorVolume(BrDetectorVolume* vol); + BrDetectorVolume* fVolumeParams_p[4]; + Int_t fNumVol; + + Float_t fPosres; //Position resolution we simulate. + + Int_t fNumGeantHits[3]; + BrDataTable *fGeantHits[3]; + Int_t fNumDigHits; + BrDetectorDC *fDetectorNode; + + TH1F *d_Hhits; + TH1F *d_Dz; + TH1F *d_Diffx; + TGraph *d_Graphxz; + + + public: + + ClassDef(BrDigitizeDC,0) // BRAHMS DC Digitization Interface + }; + + #endif diff -c -r -N VER-1-2/include/BrDigitizeTPC.h VER-1-2-1/include/BrDigitizeTPC.h *** VER-1-2/include/BrDigitizeTPC.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrDigitizeTPC.h Fri Nov 5 18:26:17 1999 *************** *** 0 **** --- 1,140 ---- + #ifndef BRAT_BrDigitizeTPC + #define BRAT_BrDigitizeTPC + // $Id: BrDigitizeTPC.h,v 1.11 1999/08/14 17:01:59 videbaek Exp $ + // $Log: BrDigitizeTPC.h,v $ + // 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 + // + // + // + //__________________________________________________________________________ + /////////////////////////////////////////////////////////////////////// + // // + // BrDigitizeTPC // + // // + // BRAHMS TPC digitization class - slow simulator // + // // + // // + // Author : F.Videbaek // + // Created : // + // Version : 1.1 // + // Changed : July 31, 1991 FV + // Remove refs to BrDigTPC class + // + // // + /////////////////////////////////////////////////////////////////////// + // + // ROOT Classes + + class TH1F; + + //Brat Classes + // + #ifndef BRAT_BrModule + # include "BrModule.h" + #endif + + class BrEventNode; + class BrDetectorParamsTPC; + class BrDetectorVolume; + class BrDataTable; + class TClonesArray; + class BrDetectorTPC; + + class BrDigitizeTPC : public BrModule { + + #define TPCSEQUENCE + #define MAXPAD 192 + #define MAXTIME 150 + + public: + // constructors and destructors + // + BrDigitizeTPC(); + BrDigitizeTPC(Char_t *Name,Char_t *Title); + virtual ~BrDigitizeTPC(); + // + // Methods + // + virtual void Init(); + virtual void Event(BrEventNode* InputTable, BrEventNode* OutputTable); + + private: + TH1F* d_Hhits; + BrDetectorParamsTPC* fParams_p; + BrDetectorVolume* fVolumeParams_p; // DetectorVolume + + public: + BrDetectorParamsTPC* GetDetectorParamsTPC(){ + return fParams_p;} + BrDetectorVolume* GetDetectorVolume() const { + return fVolumeParams_p;} + void SetDetectorParamsTPC(BrDetectorParamsTPC* par); + void SetDetectorParamsTPC(const BrDetectorParamsTPC& par); + void DefineHistograms(); + void ListDetectorParameters(); + void ListEventStatistics(); + // void SetDetectorParamsTPC(BrDetectorParamsTPC& par){(BrDetectorParamsTPC*)fParams_p=par;}; + void DrawGeantHits(); + void SetAdcCut(Float_t value){fAdcCut=value;} + Float_t GetAdcCut(){return fAdcCut;} + + private: + + Int_t fNumGeantHits; + Int_t fNumTPCHit; + + BrDataTable *fGeantHits; //! geanthits used for Display purposes + Int_t fNumDigHits; + BrDetectorTPC *fDetectorNode; + Float_t fAdcCut; // cut value in accepting a time bin adc-value + + ClassDef(BrDigitizeTPC,1) // BRAHMS TPC digitization routine + + }; + #endif diff -c -r -N VER-1-2/include/BrDigitizeTof.h VER-1-2-1/include/BrDigitizeTof.h *** VER-1-2/include/BrDigitizeTof.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrDigitizeTof.h Fri Nov 5 18:26:13 1999 *************** *** 0 **** --- 1,92 ---- + // $Id: BrDigitizeTof.h,v 1.5 1999/04/14 20:10:35 videbaek Exp $ + // $Log: BrDigitizeTof.h,v $ + // Revision 1.5 1999/04/14 20:10:35 videbaek + // Utilize DbManager to get defailt parameters + // + // Revision 1.4 1999/01/24 02:25:16 hagel + // Fixed mistake in #include BrModule + // + // Revision 1.3 1999/01/21 23:23:25 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 didnot 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 + // + + // + // Tof Digitization Module + // + #ifndef BRAT_BrDigitizeTof + #define BRAT_BrDigitizeTof + /////////////////////////////////////////////////////////////////////// + // // + // BrDigitizeTof // + // // + // BRAHMS Tof digitization class - slow simulator // + // // + // manages information and operations related to the // + // detector geometry // + // // + // Author : F.Videbaek // + // Created : 2/7/98 // + // Version : 1.0 // + // Changed : // + // // + /////////////////////////////////////////////////////////////////////// + + //ROOT Classes + + // class TH1F; + + //Brat Classes + + //BRAT Includes + #ifndef BRAT_BrModule + #include "BrModule.h" + #endif + + class BrEventNode; + class BrDetectorParamsTof; + class BrDetectorVolume; + + class BrDigitizeTof : public BrModule { + + public: + // constructors and destructors + // + BrDigitizeTof(); + BrDigitizeTof(Text_t *Name, Char_t *Title); + virtual ~BrDigitizeTof(); + // + // Methods + // + virtual void Init(); + virtual void Event(BrEventNode* InputTable, BrEventNode* OutputTable); + + private: + BrDetectorVolume* fVolumeParamsTof_p; + BrDetectorParamsTof* fParamsTof_p; + void SetDetectorParamsTof(BrDetectorParamsTof* par); + void SetDetectorParamsTof(const BrDetectorParamsTof& par); + virtual void SetDetectorVolume(BrDetectorVolume* vol){ fVolumeParamsTof_p = vol;} + public: + virtual BrDetectorParamsTof* GetDetectorParamsTof() const { + return (BrDetectorParamsTof*) fParamsTof_p;} + virtual BrDetectorVolume* GetDetectorVolume() const { + return fVolumeParamsTof_p;} + BrDetectorVolume* DetectorVolume(){return fVolumeParamsTof_p;} + + + void ListDetectorParameters() const; + void Info() const; + // + + ClassDef(BrDigitizeTof,1) // BRAHMS Tof digitization routine + + }; + + #endif + diff -c -r -N VER-1-2/include/BrDisIOProxy.h VER-1-2-1/include/BrDisIOProxy.h *** VER-1-2/include/BrDisIOProxy.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrDisIOProxy.h Mon Nov 8 14:01:06 1999 *************** *** 0 **** --- 1,54 ---- + // + // Name: BrDisIOProxy.h + // Author: K.Olchanski + // Date: 18 June 1999 + // Description: proxy object to import BrRawUnpack into ROOT + // + // $Id: BrDisIOProxy.h,v 1.2 1999/10/15 20:26:25 hagel Exp $ + // + #ifndef BrDisIOProxyH + #define BrDisIOProxyH + + #include "BrRawEvent.h" + + class BrDisIOProxy + { + public: + void* fRealObject; + + BrDisIOProxy(); // ctor + ~BrDisIOProxy(); // dtor + + // Note: all methods return "0" if success, + // error code if failure. + + int create(); + int destroy(); + + // + // Connection management. + // + + int connect(const char* destination); + int disconnect(); + + // + // High-level I/O methods + // + + int sendCommand(const char *cmnd); + int readEvent(BrRawEvent& event,bool waitForever=true); + int readCommand(bool waitForever=true); + const char* getCommandString(); + + // + // error handling methods + // + + int getError() const; + const char* getErrorString() const; + + }; + + #endif + // end file diff -c -r -N VER-1-2/include/BrEvent.h VER-1-2-1/include/BrEvent.h *** VER-1-2/include/BrEvent.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrEvent.h Fri Nov 5 18:26:01 1999 *************** *** 0 **** --- 1,100 ---- + #ifndef BRAT_BrEvent + #define BRAT_BrEvent + + // $Id: BrEvent.h,v 1.7 1999/06/15 23:55:02 hagel Exp $ + // + // $Log: BrEvent.h,v $ + // Revision 1.7 1999/06/15 23:55:02 hagel + // Added fEventType in BrEventHeader since it is in raw data + // + // Revision 1.6 1999/01/21 23:23:19 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.5 1998/08/20 14:29:44 hagel + // Add Copy method + // + // Revision 1.4 1998/08/14 21:26:23 videbaek + // Some cleanup mods + // + // Revision 1.3 1998/04/06 21:11:47 videbaek + // Clean up and additions for Win95 + // + // + /////////////////////////////////////////////////////////////////////// + // // + // BrEvent // + // // + // Brahms event class // + // // + // BrEvent manages access to the raw and reconstructed data // + // for one event in the BRAT environment. // + // environment // + // // + // Author : Kris Hagel from a model by Gunther Roland // + // Created : // + // Version : 1.0 // + // Changed : July 12 1997 // + // // + // Add BrEventHeader // + // Add HashTable for BrDataBuffers // + // Modified all Object named Br... // + // // + /////////////////////////////////////////////////////////////////////// + + // Root Classes + + #ifndef ROOT_TNamed + #include "TNamed.h" + #endif + #ifndef ROOT_THashTable + #include "THashTable.h" + #endif + + + // Brahms Classes + #ifndef BRAT_BrEventHeader + #include "BrEventHeader.h" + #endif + #ifndef BRAT_BrEventNode + #include "BrEventNode.h" + #endif + + + class BrEvent : public BrEventNode { + + public: + BrEvent(); + BrEvent(Char_t* Name, Int_t run, Int_t event); + virtual ~BrEvent(); + + virtual Int_t GetRunNumber() { return fEventHeader->RunNumber();} + virtual Int_t GetEventNumber() { return fEventHeader->EventNumber();} + virtual Int_t GetDate() { return fEventHeader->Date(); } + virtual Int_t GetTriggerMask() { return fEventHeader->TriggerMask(); } + virtual Int_t GetTime() { return fEventHeader->Time(); } + virtual Int_t GetEventType() { return fEventHeader->EventType(); } + + virtual BrEventHeader* GetEventHeader() { return fEventHeader;} + virtual void Copy(BrEvent &event); + + private: + BrEventHeader *fEventHeader; // Event header with general event info + public: + + ClassDef(BrEvent,1) // BRAHMS event data class + + // Needs probably to be 0 and to add a streamer function... + + }; + + #endif + + + + diff -c -r -N VER-1-2/include/BrEventHeader.h VER-1-2-1/include/BrEventHeader.h *** VER-1-2/include/BrEventHeader.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrEventHeader.h Fri Nov 5 18:26:02 1999 *************** *** 0 **** --- 1,94 ---- + #ifndef BRAT_BrEventHeader + #define BRAT_BrEventHeader + // $Id: BrEventHeader.h,v 1.5 1999/07/18 21:25:06 videbaek Exp $ + // + // $Log: BrEventHeader.h,v $ + // Revision 1.5 1999/07/18 21:25:06 videbaek + // Added code to deal with trigger words. This applies to raw data, as well as the + // EventHeader. + // + // Revision 1.4 1999/06/15 23:55:07 hagel + // Added fEventType in BrEventHeader since it is in raw data + // + // Revision 1.3 1999/01/21 23:23:19 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.2 1998/04/06 21:11:47 videbaek + // Clean up and additions for Win95 + // + // + /////////////////////////////////////////////////////////////////////// + // // + // BrEventHeader // + // // + // BRAHMS event class // + // // + // BrEventHeader containing general information on event ID // + // and type // + // // + // Author : Kris Hagel // + // Created : October 97 // + // Version : 1.0 // + // Changed : // + // // + /////////////////////////////////////////////////////////////////////// + + // Root Classes + + #ifndef ROOT_TObject + #include "TObject.h" + #endif + + + class BrEventHeader : public TObject { + + public: + + BrEventHeader(); + BrEventHeader(Int_t run, Int_t event); + + virtual ~BrEventHeader(); + + virtual Int_t RunNumber() { return fRunNumber; } + virtual Int_t EventNumber() { return fEventNumber; } + virtual Int_t TriggerMask() { return fTriggerMask; } + virtual Int_t EventType() { return fEventType; } + virtual Int_t Date() { return fDate; } + virtual Int_t Time() { return fTime; } + virtual Int_t TriggerWord(Int_t i); + + virtual void SetRunNumber(Int_t NRun) { fRunNumber = NRun; } + virtual void SetEventNumber(Int_t NEvent) { fEventNumber = NEvent; } + virtual void SetTriggerMask(Int_t TriggerMask) { fTriggerMask = TriggerMask; } + virtual void SetEventType(Int_t type) {fEventType = type;} + virtual void SetDate(Int_t Date) { fDate = Date; } + virtual void SetTime(Int_t Time) { fTime = Time; } + virtual void SetTriggerWord(Int_t trig, Int_t Value); + + private: + + Int_t fRunNumber; // run number + Int_t fEventNumber; // event number + Int_t fTriggerMask; // trigger mask + Int_t fEventType; // event type + Int_t fDate; // date of the trigger + Int_t fTime; // time of the trigger + Int_t fTriggerWord[2]; // Triggers word from Raw Event + + public: + + ClassDef(BrEventHeader,2) // BRAHMS event header class + + }; + + #endif + + + + diff -c -r -N VER-1-2/include/BrEventIO.h VER-1-2-1/include/BrEventIO.h *** VER-1-2/include/BrEventIO.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrEventIO.h Fri Nov 5 18:26:02 1999 *************** *** 0 **** --- 1,123 ---- + #ifndef BRAT_BrEventIO + #define BRAT_BrEventIO + + // $Id: BrEventIO.h,v 1.4 1999/10/22 18:32:53 videbaek Exp $ + // + // $Log: BrEventIO.h,v $ + // Revision 1.4 1999/10/22 18:32:53 videbaek + // Added code for getting bytes read written properly. + // Now all in base Class BrIOModule + // + // Revision 1.3 1999/01/21 23:23:19 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.2 1998/09/28 21:03:03 videbaek + // Added cvs log id + // + // + /////////////////////////////////////////////////////////////////////// + // // + // // + // Author : K. Hagel // + // Created : July 98 // + // Version : 1.0 // + // Changed : // + // // + /////////////////////////////////////////////////////////////////////// + + #include "stdio.h" + + //BRAT Includes + #ifndef BRAT_BrIOModule + #include "BrIOModule.h" + #endif + + #ifndef BRAT_BrDataTable + #include "BrDataTable.h" + #endif + + //ROOT Includes + #ifndef ROOT_TObject + #include "TObject.h" + #endif + + #ifndef ROOT_TFile + #include "TFile.h" + #endif + + #ifndef ROOT_TTree + #include "TTree.h" + #endif + + #ifndef ROOT_TKey + #include "TKey.h" + #endif + + #define ROOT_FILE_SERIAL 1 + #define ROOT_FILE_TREE 2 + + #define MaxNumEventBranches 50 + + class BrEventIO : public BrIOModule { + + public: + BrEventIO(); + BrEventIO(Char_t *filename); + + virtual ~BrEventIO(); + + virtual Bool_t Open(Char_t *fname,Option_t *option); + virtual Bool_t Close(); + virtual void Event(BrEvent* event); + virtual Bool_t SkipEvent(Int_t numevt); + + virtual Int_t GetFileMode() {return fFileMode;} + virtual void SetFileMode(Int_t mode); + + + private: + + Bool_t InitializeRootSerialFile(); //Do initialization for setting up flat file + Bool_t InitializeRootTreeFile(); //Do initialization for setting up tree + void ProcessRootSerialFile(BrEvent *event); //Read serial file + void ProcessRootTreeFile(BrEvent *event); //Read tree file + + Char_t fFileName[256]; //! File name for Digitized ROOT file + TFile *fROOTFile; //TFile object + TString fFileOption; //Regular TFile option parameter + Int_t fFileMode; //Option to decide what type of file to write + TList *fListOfKeys; //List of Keys in serial file + TIter *fNextKey; //!Key to next event in serial file + TTree *fTree; //Tree to write out + TBranch *fBranch[MaxNumEventBranches]; //Branch for that tree + Int_t fBufsize; //Buffer size for tree + Int_t fSplit; //Split mode? + // Int_t fNumBytesWritten; //Number of bytes written + //Int_t fNumBytesRead; //Number of bytes read + Bool_t fCreateBranch; //To decide if to create branch or not + Int_t fNumBranches; //Number of branches in the Tree + Int_t fNumEntries; //Number of entries in tree; + Int_t fEventNumber; //Event number we are on. + Bool_t fWriteFile; //Specifies read or write mode + Char_t fDateTimeCreated[32]; //Date and time file was created + + public: + + friend ostream& operator<< (ostream& os,BrEventIO* digio_p); + friend ostream& operator<< (ostream& os,BrEventIO& digio_p); + + ClassDef(BrEventIO, 1) // Read/write GBRAHMS Event data in ROOT format + + }; + + #endif + + + + diff -c -r -N VER-1-2/include/BrEventNode.h VER-1-2-1/include/BrEventNode.h *** VER-1-2/include/BrEventNode.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrEventNode.h Fri Nov 5 18:26:02 1999 *************** *** 0 **** --- 1,136 ---- + #ifndef BRAT_BrEventNode + #define BRAT_BrEventNode + + // $Id: BrEventNode.h,v 1.11 1999/09/13 21:06:45 videbaek Exp $ + // + // $Log: BrEventNode.h,v $ + // Revision 1.11 1999/09/13 21:06:45 videbaek + // Modify constructor to deal properly with Title param + // + // Revision 1.10 1999/06/01 20:38:41 hagel + // Added GetEventNode(...) + // + // Revision 1.9 1999/05/12 16:22:20 hagel + // Implemented + , =+ and = operators for BrEventNode. These will be useful + // for adding events together. Has been tested for single pion events and seems + // to work. In the course of implementing this, several conflicts with const were + // identified. These were cleaned up by adding appropriate const's where needed. + // It was checked that it did not break other things. + // + // Revision 1.8 1999/01/21 23:23:19 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.7 1998/08/20 14:20:17 hagel + // Add Copy method + clean up + // + // Revision 1.6 1998/08/14 21:26:23 videbaek + // Some cleanup mods + // + // Revision 1.5 1998/08/05 15:40:15 hagel + // Add Clear to BrEventNode + // + // Revision 1.4 1998/07/28 16:41:12 hagel + // Add GetObjectList() to BrEventNode.h + // + // Revision 1.3 1998/04/06 21:11:48 videbaek + // Clean up and additions for Win95 + // + // + /////////////////////////////////////////////////////////////////////// + // // + // BrEventNode // + // // + // Brahms event class // + // // + // BrEventNode manages access to the raw and reconstructed data // + // for one event branch in the BRAT environment. // + // environment // + // // + // Author : F.Videbaek // + // Created : // + // Version : 1.0 // + // Changed : 2/24/1998 // + // // + // // + // // + /////////////////////////////////////////////////////////////////////// + + // Root Classes + + #ifndef ROOT_TNamed + #include "TNamed.h" + #endif + + #ifndef ROOT_THashTable + #include "THashTable.h" + #endif + + #ifndef ROOT_TObjArray + #include "TObjArray.h" + #endif + + // + // Brahms Classes + // + #ifndef BRAT_BrDataObject + #include "BrDataObject.h" + #endif + + #ifndef BRAT_BrDataTable + #include "BrDataTable.h" + #endif + + //class BrDataTable; + class BrEvent; + + class BrEventNode : public BrDataObject { + + public: + BrEventNode(); + BrEventNode(const Char_t* Name, const Char_t* Title = NULL); + BrEventNode(const BrEventNode &node); //copy constructor + + virtual ~BrEventNode(); + + + virtual void SetVerbose(Int_t i){ fVerbose = i;} // Enable and Disable Verbose mode } + //Enable and Disable Verbose mode. Diagnostice out put occurs + //at each call of the Event memebr functions. + // + virtual Bool_t IsNode() const {return kTRUE;} + virtual BrDataObject* GetObject(const Char_t *ObjectName); + virtual BrDataTable* GetDataTable(const Char_t *ObjectName); + virtual BrEventNode* GetEventNode(const Char_t *NodeName) {return (BrEventNode*)GetObject(NodeName);} + virtual TObjArray* GetObjectList() const {return fObjectList;} + virtual void Clear(); + virtual Int_t AddObject(BrDataObject *Object); + virtual Int_t AddDataTable(BrDataTable *table) {return AddObject(table);} + virtual Int_t AddEventNode(BrEventNode *node) {return AddObject(node);} + virtual void ListObjects() const; + virtual void Copy(BrEventNode &eventnode); + //BrEventNode operator + () const; + BrEventNode& operator +=(const BrEventNode&); + BrEventNode &operator=(const BrEventNode &rhs); // idem + BrEventNode &operator=(const BrEvent &rhs); // idem + + private: + + // THashTable *fObjectList; // List of data objects + TObjArray *fObjectList; // List of data objects + Int_t fVerbose; //! Controls debugging and monitoring output + friend BrEventNode &operator+(const BrEventNode& node1, const BrEventNode& node2); + + public: + + ClassDef(BrEventNode,1) // BRAHMS event data class + + }; + + #endif + diff -c -r -N VER-1-2/include/BrFSTrackingModule.h VER-1-2-1/include/BrFSTrackingModule.h *** VER-1-2/include/BrFSTrackingModule.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrFSTrackingModule.h Fri Nov 5 18:26:09 1999 *************** *** 0 **** --- 1,197 ---- + #ifndef BRAT_BrFSTrackingModule + #define BRAT_BrFSTrackingModule + + // $Id: BrFSTrackingModule.h,v 1.3 1999/04/22 21:38:59 hagel Exp $ + // + // $Log: BrFSTrackingModule.h,v $ + // Revision 1.3 1999/04/22 21:38:59 hagel + // Attempt at improving vertex calculation + // + // Revision 1.2 1999/03/07 00:00:46 hagel + // 1. Implemented BrFSTrackingModule. Started with BrMRSTrackingModule and made + // appropriate changes to handle the forward spectrometer. It uses the new + // track classes as well as extensively using geometry classes. It also uses + // new methods and functionality as described below. + // 2. Changed BrMagnetVolume + // a. Added method SwimBack(BrLine3D &,Double_t momentum): takes a + // track at the exit of magnet and given the momentum, calculates + // where the track would come into the front of the magnet. + // b. Added method GlobalToLocal(BrLine3D &): does a combination of + // GlobalToLocal(BrVector3D &,BrVector3D&,0) and + // GlobalToLocal(BrVector3D &,BrVector3D&,1) + // c. Added method LocalToGlobal(BrLine3D &): does a combination of + // LocalToGlobal(BrVector3D &,BrVector3D&,0) and + // LocalToGlobal(BrVector3D &,BrVector3D&,1) + // d. Changed BrDetectorVolume: same additions of methods GlobalToLocal + // and LocalToGlobal as in BrMagnetVolume + // 2. Added a parameter base class BrDetectorParamsBase: helps when reading + // in database files. Declared ASCII reading routines to be virtual. + // Has main ReadASCIIFile which decodes the ASCII parameter files, then + // calls the detector specific methods SetASCIIParameter + // 3. Implemented SetASCIIParameter in BrDetectorParamsDC, BrDetectorParamsTPC, + // BrDetectorParamsTof, BrDetectorParamsBB + // 4. Implemented BrParameterDbManager. It currently works similarly to + // BrGeometryDbManager and creates the BrDetectorParamsXXX objects when + // called. These objects then read in ASCII parameter files with a currently + // "well defined" format using the above implemented routines using a constructor: + // BrDetectorParamsXXX(Char_t *name, Char_t *title,Char_t *ASCIIFileName); + // 5. If no parameter file is specified, it executes the constructor we + // have been using so far, namely BrDetectorParamsXXX(Char_t *name,Char_t *title). + // These constructors generate default parameters and are semi-intelligent + // which means they generate approximately appropriate parameters depending + // upon which detector they are. I should say that the parameters were + // deemed appropriate at the time of writing the SetDefaultParams routine. + // a. It is used in the same way as BrGeometryDbManager, that is: + // BrParameterDbManager *gParamDb = BrParameterDbManager::Instance(); + // gParamDb->SetDbParameterFileName("DetectorParameters.txt"); + // 6. Added a new directory, params, in BRAT. This directory has the file + // DetectorParameters.txt in it. If the BrParameterDbManager is started + // and the DetectorParameter.txt file is specified, it will look in the + // $BRATSYS/params directory if it cannot find the file in the directory + // that the user has set default to. + // 7. Implemented BrParameterDbManager in DC digitize and tracking code. The + // SetDetectorParams methods have been moved to private and can no longer be + // used from the macro or program. + // 8. Implemented BrParameterDbManager in TPC digitize and tracking code. + // 9. Implemented BrParameterDbManager in Tof Calibrate and GeneratePid code. + // 10 Changed the GetEntries() in BrDataTable to use the GetLast()+1 method in + // TObjArray. This should be much faster, but has the caveat that it assumes + // that all slots in TObjArray are full. That seems to me to be the case + // in how we use TObjArray at least in BrDataTable, but if problems arise due + // to this change, it can always be easily changed back. It has been used a + // fair amount before checking in and no problems were found. + // + // Modified Files: + // base/inc/BrBase_LinkDef.h base/inc/BrDataTable.h + // base/inc/BrDetectorVolume.h base/inc/BrMagnetVolume.h + // base/inc/LinkDefBratBaseINC.h base/src/BrDataTable.cxx + // base/src/BrDetectorVolume.cxx base/src/BrEventNode.cxx + // base/src/BrMagnetVolume.cxx base/src/BrTableManager.cxx + // base/src/Makefile bb/inc/BrDetectorParamsBB.h + // bb/src/BrDetectorParamsBB.cxx db/inc/BrParameterDbManager.h + // db/src/BrParameterDbManager.cxx dc/inc/BrDetectorParamsDC.h + // dc/src/BrDetectorDC.cxx dc/src/BrDetectorParamsDC.cxx + // dc/src/BrDigitizeDC.cxx dc/src/BrLocalTrackDC.cxx + // geometry/inc/BrPlane3D.h geometry/src/BrPlane3D.cxx + // params/DetectorParameters.txt tof/inc/BrDetectorParamsTof.h + // tof/src/BrDetectorParamsTof.cxx tof/src/BrGeneratePid.cxx + // tpc/inc/BrDetectorParamsTPC.h tpc/src/BrDetectorParamsTPC.cxx + // tpc/src/BrDetectorTPC.cxx tpc/src/BrDigitizeTPC.cxx + // tpc/src/BrLocalTrackTPC.cxx track/inc/BrDetectorTrack.h + // track/inc/BrFSTrackingModule.h + // track/inc/BrSpectrometerTracks.h track/src/BrDetectorTrack.cxx + // track/src/BrFSTrackingModule.cxx + // track/src/BrSpectrometerTracks.cxx + // + // Revision 1.1 1999/02/26 21:05:08 hagel + // Initial revision + // This module is meant to replace BrCombineTrack using new more efficient track + // classes. The track classes used are now confined to BrDetectorTrack which are + // used as the input, BrMatchedTrack which are generated in the matching through + // magnets and BrFSTrack which is generated as output. + // + // The routine begins by finding matching tracks through all the magnets. Then + // the output track is built by starting with the set of tracks that matches through + // T3-T4-T5. T2 tracks are then matched to that set and T1 tracks if they are there + // are added. + // + // Tracks that are missed in this routine are legitiment tracks that go from T1 or T2 + // through T4 or even T3, but not further. Generating these in the context of this + // module should be no problem although it has not been put in yet. + // + // There is also a philosophy issue. The T2 Matching is done in a routine in this + // module. The BrModuleMatchTrack could not be used as it assumes there is a magnet + // between. But the routine could be added as a different method to BrModuleMatchTrack. + // + // As of now 26-Feb-1999, the routine has been tested to work on one one pion event. + // Checked in to make sure it doesn't get lost. + // + // + // ROOT Classes + // + #ifndef ROOT_TObject + #include "TObject.h" + #endif + + #ifndef ROOT_TObjArray + #include "TObjArray.h" + #endif + + class TH1F; + + // + //Brat Classes + // + + #ifndef BRAT_BrModule + #include "BrModule.h" + #endif + + #ifndef BRAT_BrDetectorVolume + #include "BrDetectorVolume.h" + #endif + + #ifndef BRAT_BrModuleMatchTrack + #include "BrModuleMatchTrack.h" + #endif + + class BrEventNode; + + + class BrFSTrackingModule : public BrModule { + + public: + + BrFSTrackingModule(); + BrFSTrackingModule(Char_t *Name, Char_t *Title); + + ~BrFSTrackingModule(); + + void Event(BrEventNode*, BrEventNode*); + void GetTracksT3T4T5(); + void GetTracksT2Match(BrEventNode *InputNode); + void TrackToVertex(); + void DefineHistograms(); + private: + + Double_t fMatchDx ; // Matching horizontal cut for T2Match + Double_t fMatchDy; // Matching vertial cut for T2Match + Double_t fMatchDaly; // Matching cosine alpha y cut for T2Match + + BrModuleMatchTrack* fCombineT1T2; // Module that combines T1/T2 track. + BrModuleMatchTrack* fCombineT2T3; // Module that combines T2/T3 track. + BrModuleMatchTrack* fCombineT3T4; // Module that combines T3/T4 track. + BrModuleMatchTrack* fCombineT4T5; // Module that combines T4/T5 track. + + BrDetectorVolume* fVolumeT1; // Pointer to volume T1 + BrDetectorVolume* fVolumeT2; // Pointer to volume T2 + BrDetectorVolume* fVolumeT3; // Pointer to volume T3 + BrDetectorVolume* fVolumeT4; // Pointer to volume T4 + BrDetectorVolume* fVolumeT5; // Pointer to volume T5 + BrMagnetVolume* fMagnetVolumeD1; // Pointer to magnet volume D1 + BrMagnetVolume* fMagnetVolumeD2; // Pointer to magnet volume D2 + BrMagnetVolume* fMagnetVolumeD3; // Pointer to magnet volume D3 + BrMagnetVolume* fMagnetVolumeD4; // Pointer to magnet volume D4 + TObjArray* fTracksT1T2; // Container of matched tracks + TObjArray* fTracksT2T3; // Container of matched tracks + TObjArray* fTracksT3T4; // Container of matched tracks + TObjArray* fTracksT4T5; // Container of matched tracks + + TObjArray* fFSTracks; // Container of FS tracks + + TH1F* hTargetTx; //! Target X image histograms in FS system + TH1F* hTargetTy; //! Target Y image histograms in FS system + TH1F* hP; //! Momentum distribution for accepted tracks + TH1F* hDiffx; //! Difference in x between T1 tracks and swim + + TH1F *hTx; //! Vertex image in x + TH1F *hTy; //! Vertex image in y + TH1F *hTxTest; //! Vertex image in x + TH1F *hTyTest; //! Vertex image in y + + + public: + ClassDef(BrFSTrackingModule, 1) // BRAHMS MRS Tracking Module Interface + }; + + #endif \ No newline at end of file diff -c -r -N VER-1-2/include/BrGeantHeader.h VER-1-2-1/include/BrGeantHeader.h *** VER-1-2/include/BrGeantHeader.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrGeantHeader.h Fri Nov 5 18:26:15 1999 *************** *** 0 **** --- 1,74 ---- + #ifndef BRAT_BrGeantHeader + #define BRAT_BrGeantHeader + // + // $Id: BrGeantHeader.h,v 1.3 1999/02/11 22:27:26 hagel Exp $ + // $Log: BrGeantHeader.h,v $ + // Revision 1.3 1999/02/11 22:27:26 hagel + // Changes to make run on Solaris + // + // Revision 1.2 1999/01/21 23:23:23 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.1 1999/01/15 16:32:06 videbaek + // Added new class BrGeantHeader to take care of additional gbrahms functionality + // + // + + /////////////////////////////////////////////////////////////////////// + // // + // BrGeantHeader // + // // + // BRAHMS Geant information class // + // // + // BrGeantHeader will maintain additional information from // + // the geant runs as stored in the eventheader. This is the // + // kind of information that normally would no go into the regular // + // BrEventHeader // + // // + // Author : F.Videbaek // + // Created : January 99 // + // Version : 1.0 // + // Changed : // + // // + /////////////////////////////////////////////////////////////////////// + // Root Classes + + #ifndef ROOT_TObject + #include "TObject.h" + #endif + + // Brahms Classes + // + #ifndef BRAT_BrDataObject + #include "BrDataObject.h" + #endif + + class BrGeantHeader : public BrDataObject { + + public: + BrGeantHeader(); + BrGeantHeader(Char_t* name, Char_t* title=0); + + virtual ~BrGeantHeader() { }; + + void SetVertex(Double_t val){fVertex=val;} + void SetImpactParameter(Double_t val) {fImpactParameter=val;} + Double_t GetVertex() const {return fVertex;} + Double_t GetImpactParameter() const {return fImpactParameter;} + + + private: + Double_t fVertex; // Vertex position (in cm) + Double_t fImpactParameter; // Impact parameter (in fm) + + ClassDef(BrGeantHeader,1) // BRAHMS geant header data class + + }; + + #endif diff -c -r -N VER-1-2/include/BrGeantHit.h VER-1-2-1/include/BrGeantHit.h *** VER-1-2/include/BrGeantHit.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrGeantHit.h Fri Nov 5 18:26:15 1999 *************** *** 0 **** --- 1,169 ---- + #ifndef BRAT_BrGeantHit + #define BRAT_BrGeantHit + + // $Id: BrGeantHit.h,v 1.11 1999/05/25 20:38:59 videbaek Exp $ + // + // $Log: BrGeantHit.h,v $ + // Revision 1.11 1999/05/25 20:38:59 videbaek + // Add iostream methods + // + // Revision 1.10 1999/01/21 23:23:23 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 didnt 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.9 1998/12/01 19:38:16 videbaek + // Changed dedx to be in standard MeV not KeV + // + // Revision 1.8 1998/09/27 17:05:35 alv + // made most of the "get" methods const. + // + // Revision 1.7 1998/09/17 16:16:05 videbaek + // Moved Mass() static fct to BrGeantHit class + // + // Revision 1.6 1998/07/28 21:30:59 videbaek + // Change units to MeV + // + // Revision 1.5 1998/07/20 17:42:39 videbaek + // Added Pid hit to hit structure. Needed for effecient handling + // of detector response. + // + // Revision 1.4 1998/06/19 20:03:48 videbaek + // Add parameteer description + // + // Revision 1.3 1998/06/06 21:45:10 hagel + // Add ostream capabilities to some objects + // + // Revision 1.2 1998/04/06 21:12:08 videbaek + // Clean up and additions for Win95 + // + // + /////////////////////////////////////////////////////////////////////// + // // + // BrGeantHit // + // // + // BRAHMS Hit class // + // // + // BrGeantHit is the GBRAHMS hit class which is a ROOT class // + // equivalent to data structs in the stream files. // + // programs // + // // + // Author : Kris Hagel // + // Created : October 97 // + // Version : 1.0 // + // Changed : 31/12/97 fv // + // // + /////////////////////////////////////////////////////////////////////// + + #include "iostream.h" + + // Root Classes + + #ifndef ROOT_TObject + #include "TObject.h" + #endif + + // Brahms Classes + + + struct GeantStreamHits { + int trackno; + int DetectorId; + float LocalPositionIn[3]; + float LocalPositionOut[3]; + float GlobalPositionIn[3]; + float GlobalPositionOut[3]; + float Tof; + float dedx; + float Etot; + int Isub; + int Pid; + }; + + class BrGeantHit : public TObject { + + public: + BrGeantHit(); + BrGeantHit(GeantStreamHits& fHits); + + virtual ~BrGeantHit() { }; + + virtual Int_t TrackNo() const {return fTrackNo; } + virtual Int_t DetectorID() const {return fDetectorID; } + virtual Float_t *LocalPosIn() {return fLocalPosIn; } + virtual Float_t *LocalPosOut() {return fLocalPosOut; } + virtual Float_t *GlobalPosIn() {return fGlobalPosIn; } + virtual Float_t *GlobalPosOut(){return fGlobalPosOut;} + + virtual Float_t LocalYPosIn() const {return fLocalPosIn[1];} + virtual Float_t LocalXPosIn() const {return fLocalPosIn[0];} + virtual Float_t LocalZPosIn() const {return fLocalPosIn[2];} + virtual Float_t LocalYPosOut() const {return fLocalPosOut[1];} + virtual Float_t LocalXPosOut() const {return fLocalPosOut[0];} + virtual Float_t LocalZPosOut() const {return fLocalPosOut[2];} + + virtual Float_t Tof() const {return fTof; } + virtual Float_t Dedx() const {return fDedx;} + virtual Float_t Pdet() const {return fPdet;} + virtual Int_t Isub() const {return fIsub; } + virtual Int_t Pid() const {return fPid; } + + virtual void SetTrackNo(Int_t i ) {fTrackNo = i;} + virtual void SetDetectorID(Int_t i) {fDetectorID = i; } + virtual void SetLocalPosIn(Float_t x[3]) { + fLocalPosIn[0] = x[0]; + fLocalPosIn[1] = x[1]; + fLocalPosIn[2] = x[2]; + } + virtual void SetLocalPosOut(Float_t x[3]) { + fLocalPosOut[0] = x[0]; + fLocalPosOut[1] = x[1]; + fLocalPosOut[2] = x[2]; + } + virtual void SetGlobalPosIn(Float_t x[3]) { + fGlobalPosIn[0] = x[0]; + fGlobalPosIn[1] = x[1]; + fGlobalPosIn[2] = x[2]; + } + virtual void SetGlobalPosOut(Float_t x[3]) { + fGlobalPosOut[0] = x[0]; + fGlobalPosOut[1] = x[1]; + fGlobalPosOut[2] = x[2]; + } + virtual void SetTof(Float_t x) {fTof = x;} + virtual void SetDedx(Float_t x){fDedx = x;} + virtual void SetPdet(Float_t x){fPdet = x;} + virtual void SetIsub(Int_t i) {fIsub = i;} + virtual void SetPid(Int_t i) {fPid = i;} + + private: + + Int_t fTrackNo; // Trackno of generating Hit + Int_t fDetectorID; // Detector number for hit + Float_t fLocalPosIn[3]; // Coordinates for hit entrance (in local system) + Float_t fLocalPosOut[3]; // Coordinates for hit exit (in local system) + Float_t fGlobalPosIn[3]; + Float_t fGlobalPosOut[3]; + Float_t fTof; // Time-Of-Flight (nsec) + Float_t fDedx; // Dedx (MeV) + Float_t fPdet; // particle momentum at detector + Int_t fIsub; // Detector number (slat, padrow, volume no etc) + Int_t fPid; // Geant Particle ID code. + + public: + friend ostream& operator<< (ostream& os,BrGeantHit* ghit); + + static Double_t Mass(Int_t pid); + ClassDef(BrGeantHit,1) // BRAHMS hit data class + + }; + + #endif + + + + diff -c -r -N VER-1-2/include/BrGeantInput.h VER-1-2-1/include/BrGeantInput.h *** VER-1-2/include/BrGeantInput.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrGeantInput.h Fri Nov 5 18:26:15 1999 *************** *** 0 **** --- 1,174 ---- + #ifndef BRAT_BrGeantInput + #define BRAT_BrGeantInput + + // $Id: BrGeantInput.h,v 1.17 1999/02/11 22:27:26 hagel Exp $ + // + // $Log: BrGeantInput.h,v $ + // Revision 1.17 1999/02/11 22:27:26 hagel + // Changes to make run on Solaris + // + // Revision 1.16 1999/01/21 23:23:23 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.15 1998/11/13 19:39:20 videbaek + // Added data members for handling different versions of cdat files + // + // Revision 1.14 1998/09/27 17:07:16 alv + // added member functions GetDetectorBit and ListDetectors. + // + // Revision 1.13 1998/09/22 19:59:33 videbaek + // Added TryRepair() boolean function. + // This is used to indicate that logically bad record has been found + // as observed in several .cdat files. After a while the events become + // proper again. + // + // Revision 1.12 1998/09/16 20:10:36 alv + // Added flag fFillHitList. + // Added parameter option (default value "") to Open(name,option) in order to + // have the same number of parameters as BrEventIO::Open. + // + // Revision 1.11 1998/07/17 02:20:07 hagel + // Modifications for byte swapping in BrGeantInput + // + // Revision 1.10 1998/06/21 20:11:04 hagel + // cleanup + // + // Revision 1.9 1998/05/14 21:18:50 videbaek + // update makefile - do not reload .so libraries + // + // Revision 1.8 1998/05/08 00:58:50 videbaek + // TPC code updates + // + // Revision 1.7 1998/04/30 22:24:34 hagel + // Add io.h include for WIN32 again + // + // Revision 1.6 1998/04/30 17:12:33 videbaek + // Added functionality to BrGeantInput + // + // Revision 1.3 1998/04/08 18:09:23 videbaek + // changed GeantInput class to use open,read + // + // Revision 1.2 1998/04/06 21:12:09 videbaek + // Clean up and additions for Win95 + // + // Revision 1.1 1998/04/03 21:15:17 videbaek + // part of first base release + // + // Revision 1.1.1.1 1998/03/04 21:33:10 brahmlib + // Brat geant + // + // + /////////////////////////////////////////////////////////////////////// + // // + // BrGeantData // + // // + // BRAHMS simulated raw data class // + // // + // BrGeantInput read geant raw data in stream i/o format // + // // + // the class is derived from the BrIOModule class // + // // + // Author : F.Videbaek // + // Created : March 98 // + // Version : 1.0 // + // Changed : // + // // + /////////////////////////////////////////////////////////////////////// + + #define USE_FSTREAM 0 + + #if USE_FSTREAM + #include "fstream.h" + #else + #ifdef WIN32 + #include "io.h" + #endif + #endif + #include "stdio.h" + + #ifndef BRAT_BrIOModule + #include "BrIOModule.h" + #endif + + #ifndef ROOT_TObject + #include "TObject.h" + #endif + + const int MAXGIVOLU = 30; + + class BrGeantHit; + class BrGeantTrack; + class BrEvent; + + struct GeantVol { + int shape; + int Npar; + char Name[4]; + float pos[3]; + float rotang[3][3]; + float param[12]; + int Active; //Make sure this stays last in this struct!!! + }; + + struct GeantEventHeader{ + int NevUsr; + int NevPar; + int RunNumber; + float VertexPos; + float ImpactParameter; + }; + + class BrGeantInput : public BrIOModule { + + public: + BrGeantInput(); + BrGeantInput(Char_t *filename); + + virtual ~BrGeantInput(); + + virtual Bool_t Open(Char_t *fname, Option_t *option=""); + virtual Bool_t Close(); + virtual void Event(BrEvent* event); + virtual Bool_t ReadStreamHeader(); + virtual void SkipEvent(Int_t numevt); + + Int_t GetNumberOfVolumes(){return fNumberOfVolumes;} + Bool_t GetrHeader() { return rHeader; } + void SetrHeader( Bool_t rHead ) { rHeader = rHead; } + void SwapLong(int *buffer,int nb); //Swap bytes on other endian + void SetFillHitList(Bool_t b) { fFillHitList = b; } + UInt_t GetDetectorBit(const Text_t *name) const; + void ListDetectors(UInt_t bits) const; + Bool_t TryRepair(){return fRepair;} + private: + void OutStatus(); + private: + Bool_t fRepair; //| Repair in progress flag + Bool_t rHeader; //! Header read mark + Bool_t fByteSwap; // Flag for ByteSwap + Int_t fEventCounter; //! Event counter + Char_t fFileName[256]; //! File name for ASCII file containing raw hits + #if USE_FSTREAM + ifstream *fFilePointer; // File pointer to STREAM file + #else + Int_t fFileDescriptor; // file descriptor + #endif + Int_t fNumberOfVolumes; //! Number of GEANT volumes + GeantVol fVolume[MAXGIVOLU]; //! Geant Volumes in STREAM file + Bool_t fFillHitList; // Flag for Event to fill hit list of tracks + Int_t fVersion; //! Version number for cdat file. + Int_t fEndOfStreamEvent; //! Actual end of stream(event) tag. + public: + + ClassDef(BrGeantInput,0) // Interface to STREAM files + + }; + + #endif + diff -c -r -N VER-1-2/include/BrGeantTrack.h VER-1-2-1/include/BrGeantTrack.h *** VER-1-2/include/BrGeantTrack.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrGeantTrack.h Fri Nov 5 18:26:15 1999 *************** *** 0 **** --- 1,174 ---- + #ifndef BRAT_BrGeantTrack + #define BRAT_BrGeantTrack + + // $Id: BrGeantTrack.h,v 1.10 1999/10/06 13:21:07 videbaek Exp $ + // + // $Log: BrGeantTrack.h,v $ + // Revision 1.10 1999/10/06 13:21:07 videbaek + // Fixed for memory leaks when hits are added. + // + // Revision 1.9 1999/09/15 15:57:30 videbaek + // Modified fHitlist that point to BrGeantHit(s) not to be written out + // in the streamer method. This caused memory leak in reading the root tree files. + // The list should probably be done by means of an list of Ids. + // + // Revision 1.8 1999/05/25 20:38:59 videbaek + // Add iostream methods + // + // Revision 1.7 1999/04/14 20:09:58 videbaek + // Corrected P(). added method Phi() + // + // Revision 1.6 1999/03/17 21:36:29 videbaek + // Added member functions to BrGeantTrack class which are + // useful in analysis Pt(). Modiifed the Rap() to take no-argument. + // The Mass of the particle in the track has already been set by the + // reading routine. + // + // Revision 1.5 1999/01/21 23:23:23 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 didnt 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.4 1998/09/27 17:08:07 alv + // added copy constructor + // added member fHitBits + // added member functions GetHitBits, SetHitBit and HasHitsIn + // made the "get" methods const + // + // Revision 1.3 1998/07/20 17:42:40 videbaek + // Added Pid hit to hit structure. Needed for effecient handling + // of detector response. + // + // Revision 1.2 1998/04/06 21:12:09 videbaek + // Clean up and additions for Win95 + // + // + /////////////////////////////////////////////////////////////////////// + // // + // BrGeantTrack // + // // + // BRAHMS Geant track class // + // // + // BrGeantTrack is a ROOT equivalent of the track structures used // + // in the c-stream files. // + // // + // Author : Kris Hagel from a template by G.Roland // + // Created : October 97 // + // Version : 1.1 // + // Changed : 31/12/97 fv; Major re-write // + // // + /////////////////////////////////////////////////////////////////////// + + // Root Classes + #ifndef ROOT_TObject + # include "TObject.h" + #endif + + #ifndef ROOT_TObjArray + # include "TObjArray.h" + #endif + + + + // BRAHMS Classes + #ifndef BRAT_BrGeantHit + # include "BrGeantHit.h" + #endif + + + struct GeantStreamTracks { + int trackno; + int pid; + int charge; + float pvert[3]; + float vert[3]; + int ntbeam; + int subvol; + int fVolu; + int fReason; + }; + + class BrGeantTrack : public TObject { + + public: + + BrGeantTrack(); + BrGeantTrack(GeantStreamTracks& ffTracks); + BrGeantTrack(const BrGeantTrack *track); + + virtual ~BrGeantTrack(); + + virtual Double_t Vx() const { return fVx;} + virtual Double_t Vy() const { return fVy;} + virtual Double_t Vz() const { return fVz;} + virtual Double_t Px() const { return fPx;} + virtual Double_t Py() const { return fPy;} + virtual Double_t Pz() const { return fPz;} + virtual Double_t Pt() const { return sqrt(fPx*fPx+fPy*fPy);} + virtual Int_t TrackNo() const { return fTrackno;} + + virtual Double_t Energy() const; + virtual Double_t P() const; + virtual Double_t Rap() const; + virtual Double_t Beta() const; + virtual Double_t Theta() const; + virtual Double_t Phi() const; + virtual Double_t Dip() const; + virtual Bool_t IsParent() const {return fNtbeam%10000==0;} + virtual Int_t Ntbeam(){return fNtbeam;} + + virtual void SetStatus(Int_t n) { fStatus = n; } + virtual void SetVx(Double_t x) { fVx = x; } + virtual void SetVy(Double_t x) { fVy = x; } + virtual void SetVz(Double_t x) { fVz = x; } + virtual void SetMass(Double_t x) { fMass = x; } + virtual void SetPid(Int_t n) { fPid = n; } + + virtual void AddHit(BrGeantHit *hit); + virtual TObjArray *HitListp() { return fHitList; } + virtual TObjArray *GetHitList() { return fHitList; } + virtual Int_t NHits() const; + + virtual Int_t Status() const { return fStatus; } + virtual Double_t Mass() const { return fMass; } + virtual Int_t Pid() const { return fPid; } + virtual BrGeantHit *NextHit(); + virtual void ResetHitCounter() { fHitCounter = 0; } + virtual void MakeHitList(); + virtual void ListHits(); + virtual UInt_t GetHitBits() const { return fHitBits; } + virtual void SetHitBit(Int_t ivol) { SETBIT(fHitBits,ivol); } + virtual Bool_t HasHitsIn(UInt_t DetectorBits) + const { return (Bool_t)(DetectorBits ? (fHitBits & DetectorBits) == DetectorBits : 0); } + + private: + + Int_t fStatus; // track status flag + Double_t fVx; // X-origin of the track + Double_t fVy; // Y-origin of the track + Double_t fVz; // Z-origin of the track + Double_t fMass; // Particle mass + Double_t fCharge; // Charge of Track + Double_t fPx; // Momentum in X at vertex + Double_t fPy; // Momentum in Y at vertex + Double_t fPz; // Momentum in Z at vertex + Int_t fPid; // Particle GEANT ID + Int_t fTrackno; // Geant Track Number + Int_t fNtbeam; // Parent Track number (0 if none module 10000) + TObjArray *fHitList; //! List of hits on the track + Int_t fHitCounter; //! Counter for GetNextHit member function + UInt_t fHitBits; //! Bit mask of detector volumes hit + + public: + friend ostream& operator<< (ostream& os,BrGeantTrack* gtrack); + + ClassDef(BrGeantTrack,1) // BRAHMS Geant track class + + }; + + #endif + diff -c -r -N VER-1-2/include/BrGeant_LinkDef.h VER-1-2-1/include/BrGeant_LinkDef.h *** VER-1-2/include/BrGeant_LinkDef.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrGeant_LinkDef.h Fri Nov 5 18:26:15 1999 *************** *** 0 **** --- 1,34 ---- + // $Id: BrGeant_LinkDef.h,v 1.6 1999/09/22 15:10:41 videbaek Exp $ + // + // $Log: BrGeant_LinkDef.h,v $ + // Revision 1.6 1999/09/22 15:10:41 videbaek + // Added ostream operator + // + // Revision 1.5 1999/08/18 19:50:55 hagel + // Remove deleted files + // + // Revision 1.4 1999/01/15 16:32:06 videbaek + // Added new class BrGeantHeader to take care of additional gbrahms functionality + // + // Revision 1.3 1998/09/27 17:28:08 alv + // added BrSelectGeantTracks + // + // Revision 1.2 1998/04/06 21:12:10 videbaek + // Clean up and additions for Win95 + // + // + #ifdef __CINT__ + + #pragma link off all globals; + #pragma link off all classes; + #pragma link off all functions; + + #pragma link C++ class BrGeantHit; + #pragma link C++ class BrGeantTrack; + #pragma link C++ class BrGeantInput; + #pragma link C++ class BrGeantHeader; + #pragma link C++ class BrSelectGeantTracks; + + #pragma link C++ function operator<<(ostream&,const BrGeantTrack&); + + #endif diff -c -r -N VER-1-2/include/BrGeneratePid.h VER-1-2-1/include/BrGeneratePid.h *** VER-1-2/include/BrGeneratePid.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrGeneratePid.h Fri Nov 5 18:26:13 1999 *************** *** 0 **** --- 1,112 ---- + #ifndef BRAT_BrGeneratePid + #define BRAT_BrGeneratePid + // $Id: BrGeneratePid.h,v 1.2 1999/02/19 21:31:07 bearden Exp $ + // $Log + // + // Tof Digitization Module + // + /////////////////////////////////////////////////////////////////////// + // // + // BrGeneratePid // + // // + // BRAHMS PID analysis class // + // // + // Take TOF and track data to get PID in MDC-II // + // // + // Author : K. Hagel // + // Created : 1/27/99 // + // Version : 1.0 // + // Changed : // + // // + /////////////////////////////////////////////////////////////////////// + + //ROOT Includes + #ifndef ROOT_TH1 + #include "TH1.h" + #include "TH2.h" + #endif + + //BRAT Includes + #ifndef BRAT_BrModule + #include "BrModule.h" + #endif + + class BrEventNode; + class BrDetectorParamsTof; + class BrDetectorVolume; + class BrVector3D; + + class BrGeneratePid : public BrModule { + + public: + // constructors and destructors + // + BrGeneratePid(); + BrGeneratePid(Text_t *Name, Char_t *Title); + virtual ~BrGeneratePid(); + // + // Methods + // + virtual void Init(); + virtual void Event(BrEventNode* InputTable, BrEventNode* OutputTable); + + BrDetectorParamsTof *GetH1par() { return fH1par;} //return H1 params to be able to set them + BrDetectorParamsTof *GetH2par() { return fH2par;} //return H1 params to be able to set them + + private: + Double_t fH1Tc2; //Time squared for light to travel from vertex to H1 + Double_t fH2Tc2; //Time squared for light to travel from vertex to H2 + + BrDetectorVolume *fH1vol; //detector volume of H1; + BrDetectorVolume *fH2vol; //detector volume of H2; + BrDetectorVolume *fT1vol; //detector volume of T1; + BrDetectorVolume *fT2vol; //detector volume of T2; + BrDetectorVolume *fT3vol; //detector volume of T3; + BrDetectorVolume *fT4vol; //detector volume of T4; + BrDetectorVolume *fT5vol; //detector volume of T5; + + BrDetectorParamsTof *fH1par; //detector parameters of H1 + BrDetectorParamsTof *fH2par; //detector parameters of H2 + + TH1F *hPidTof1; //Pid diagnostic spectrum + TH1F *hDistTof1; //Diagnostic spectrum + TH1F *hPidTof2; //Pid diagnostic spectrum + TH1F *hDistTof2; //Diagnostic spectrum + TH1F *hDxT3Tof1; //difference in x positions h1-T3 + TH1F *hDyT3Tof1; //difference in y positions h1-T3 + TH1F *hDxT5Tof2; //difference in x positions h2-T5 + TH1F *hDyT5Tof2; //difference in y positions h2-T5 + // my own diagnostics...IGB17FEB99 + TH1F *hH1x; + TH1F *hH1y; + TH1F *hH1z; + TH1F *hH2x; + TH1F *hH2y; + TH1F *hH2z; + TH1F *hH2slat; //h2 slat number + TH1F *hH2xpos; //h2 x position + + TH2F *hH2sv; //see if diff depends on postion. + TH2F *hH1sv; //see if diff depends on postion. + TH2F *hH2gvx; //see if diff depends on postion. + + BrVector3D GetCenterOfSlatH1(Int_t slatno); //Get center of slat in x; to be moved later + BrVector3D GetCenterOfSlatH2(Int_t slatno); //Get center of slat in x; to be moved later + public: + void Info() const; + // + + ClassDef(BrGeneratePid,1) // BRAHMS Tof analysis routine + + }; + + #endif + + + + + + + + + diff -c -r -N VER-1-2/include/BrGeometryDbManager.h VER-1-2-1/include/BrGeometryDbManager.h *** VER-1-2/include/BrGeometryDbManager.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrGeometryDbManager.h Fri Nov 5 18:26:07 1999 *************** *** 0 **** --- 1,120 ---- + #ifndef BRAT_BrGeometryDbManager + #define BRAT_BrGeometryDbManager + // + // $Id: BrGeometryDbManager.h,v 1.7 1999/03/07 22:42:28 videbaek Exp $ + // + // $Log: BrGeometryDbManager.h,v $ + // Revision 1.7 1999/03/07 22:42:28 videbaek + // Remove aprostrofees from several comments. emacs cannot make nice + // layout with those in text. So use do not not dont + // + // Revision 1.6 1999/02/24 15:21:22 hagel + // Enforce const in arguments + // + // Revision 1.5 1999/02/04 20:38:28 hagel + // Added statement so that BrDbObject could support the new class BrParameterDbManager + // See notes in BrParameterDbManager + // + // Revision 1.4 1999/01/21 23:23:21 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 did not 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.3 1998/12/21 20:20:35 videbaek + // added BrMagnetVolume as being managed + // + // Revision 1.1 1998/12/09 17:01:37 videbaek + // Add new db manager class. It has been checked out for + // the simple BrDetectorVolume class. + // + // + // Root Classes + #ifndef ROOT_TObject + #include "TObject.h" + #endif + + #ifndef ROOT_TObjArray + #include "TObjArray.h" + #endif + + + // BRAHMS Classes + + #ifndef BRAT_BrDetectorVolume + #include "BrDetectorVolume.h" + #endif + + class BrGeometryDbManager; + class BrParameterDbManager; + + class BrDbObject : public TObject { + // + // This class is used only by the manager class. + // The objects are used to maintain what databases objects has been + // loaded via this mechanism. + // + public: + BrDbObject(){}; + BrDbObject(const Char_t* classname, const Char_t* detectorname, TObject* obj); + ~BrDbObject(); + private: + + Char_t fClassName[80]; // ClassName for database object + Char_t fDetectorName[80]; // Identifier of detector/magnet name + TObject* fDetectorGeometry; // Pointer to database object. + + public: + friend class BrGeometryDbManager; + friend class BrParameterDbManager; + friend ostream& operator << (ostream& os, BrDbObject* dbobj); + + ClassDef(BrDbObject,0) // BRAHMS Database object + }; + + + + class BrGeometryDbManager : public TObject { + + enum DbStatus_t { + INIT, OPEN + }; + public: + + static BrGeometryDbManager* Instance(); + + // Root is not happy with the protected for the constructor. + // i.e. one cannot invoke the TBrowser. The destructor also + // has be public otherwise CINT complains. + protected: + BrGeometryDbManager(); + public: + ~BrGeometryDbManager(); + public: + void SetDbFileName(Char_t* filename); + void SetDbMagnetFileName(Char_t* filename); + void SetDebugLevel(Int_t level){fDebugLevel=level;} + Bool_t Open(Char_t *filename); + TObject* BrGeometryDbManager::GetDetectorVolume(Char_t* classname, Char_t* detector); + void List(); + + private: + BrDbObject* GetDbObject(const Char_t* classname, const Char_t* detector); + + TObjArray* fObjectlist; // List + DbStatus_t fState; // + DbStatus_t fMagnetState; // + Char_t fFileName[132]; // Filename for geometry (fileopen) + Char_t fMagnetFileName[132]; // Filename for Magnet (fileopen) + Int_t fDebugLevel; // Debug Level + static BrGeometryDbManager* fInstance; + + ClassDef(BrGeometryDbManager,0) // BRAHMS Database Manager object + }; + + + + #endif diff -c -r -N VER-1-2/include/BrGeometry_LinkDef.h VER-1-2-1/include/BrGeometry_LinkDef.h *** VER-1-2/include/BrGeometry_LinkDef.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrGeometry_LinkDef.h Fri Nov 5 18:25:57 1999 *************** *** 0 **** --- 1,70 ---- + // $Id: BrGeometry_LinkDef.h,v 1.10 1998/12/17 21:04:38 hagel Exp $ + // + // $Log: BrGeometry_LinkDef.h,v $ + // Revision 1.10 1998/12/17 21:04:38 hagel + // Add Support for BrPlane3D. Class was generated essentially for the purpose of using + // to find intersections of track vectors with planes. First instance of use is in + // BrDetectorDC::DrawLocalTracks(). Class was started by copying BrVector3D. Many + // of the methods were simply changed to BrPlane3D and might not make sense for planes. + // Eg. Adding and multiplying planes. They can be deleted once it is obvious they are + // not necessary. + // + // Revision 1.9 1998/12/01 20:49:57 videbaek + // Added several classes to Geometry. Updated source and makefile(s) + // - BrLine3D + // - BrCoordinateSystem + // - BrRotMatrix + // + // Revision 1.8 1998/09/18 15:44:50 videbaek + // Removed BrPoint3D class + // Added iostream operator to BrVector3Dn + // + // Revision 1.7 1998/09/15 13:08:32 videbaek + // Id and Log had disappeared from header + // + // Revision 1.5 1998/09/08 19:20:35 videbaek + // cosmetic change + // + // Revision 1.4 1998/07/28 21:30:12 videbaek + // Added Theta() and Phi() members + // + // Revision 1.3 1998/07/27 14:41:38 videbaek + // small fixes to vector class + // + // + #ifdef __CINT__ + + #pragma link off all globals; + #pragma link off all classes; + #pragma link off all functions; + + #pragma link C++ function operator+(const BrVector3D&,const BrVector3D&); + #pragma link C++ function operator-(const BrVector3D&,const BrVector3D&); + #pragma link C++ function operator*(const BrVector3D&,Double_t); + #pragma link C++ function operator/(const BrVector3D&,Double_t); + #pragma link C++ function operator*(Double_t, const BrVector3D&); + + #pragma link C++ function operator+(const BrPlane3D&,const BrPlane3D&); + #pragma link C++ function operator-(const BrPlane3D&,const BrPlane3D&); + #pragma link C++ function operator*(const BrPlane3D&,Double_t); + #pragma link C++ function operator/(const BrPlane3D&,Double_t); + #pragma link C++ function operator*(Double_t, const BrPlane3D&); + + #pragma link C++ function operator==(const BrVector3D&) const; + #pragma link C++ function operator!=(const BrVector3D&) const; + #pragma link C++ function Cross(const BrVector3D&,const BrVector3D&); + #pragma link C++ function Unit() const; + + #pragma link C++ function operator<<(ostream&, const BrVector3D&); + #pragma link C++ function operator>>(istream&, const BrVector3D&); + + #pragma link C++ function operator<<(ostream&, const BrLine3D&); + + #pragma link C++ class BrVector3D; + #pragma link C++ class BrLine3D; + #pragma link C++ class BrPlane3D; + #pragma link C++ class BrRotMatrix; + #pragma link C++ class BrCoordinateSystem; + + #endif + diff -c -r -N VER-1-2/include/BrIOModule.h VER-1-2-1/include/BrIOModule.h *** VER-1-2/include/BrIOModule.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrIOModule.h Fri Nov 5 18:26:03 1999 *************** *** 0 **** --- 1,136 ---- + #ifndef BRAT_BrIOModule + #define BRAT_BrIOModule + // $Id: BrIOModule.h,v 1.9 1999/10/22 18:32:54 videbaek Exp $ + // + // $Log: BrIOModule.h,v $ + // Revision 1.9 1999/10/22 18:32:54 videbaek + // Added code for getting bytes read written properly. + // Now all in base Class BrIOModule + // + // Revision 1.8 1999/01/21 23:23:19 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.7 1999/01/15 15:32:13 videbaek + // Updates to volume files. + // Added member histon to BrModule, and member function HistOn(). + // Added BrMath as standard math library. + // + // Revision 1.6 1998/12/01 21:20:09 videbaek + // Added refs in Detector volume to deal with BrVector3D + // rather than only float* references. + // + // Revision 1.5 1998/09/16 20:03:07 alv + // Removed unused Name in definition of Open. + // + // + /////////////////////////////////////////////////////////////////////// + // // + // BrIOModule // + // // + // BRAHMS Analysis Module Class // + // // + // A standard IO should be derived from // + // this base class. This ensure that the general framewor // + // is capable of accessing these in a common and general // + // The methods (member functions) consists of a general set // + // all modules; but the user if free to add specific ones for // + // specific needs. // + // The initial version is derived from the ROOT base classes, // + // the class share many traits with the BrModule Class but has // + // a different set of member functions. // + // // + // Author : Flemming Videbaek // + // Created: 3/17/98 // + // Version: 1.0 // + // // + // // + /////////////////////////////////////////////////////////////////////// + // + // Modified: + // 10.26.1999 FV + // Add method GetBytesTransferred() + // + // ROOT classes + #ifndef ROOT_TNamed + #include "TNamed.h" + #endif + + #ifndef ROOT_TList + #include "TList.h" + #endif + + #ifndef ROOT_TStopwatch + #include "TStopwatch.h" + #endif + + // System and ROOT include files + // + + // BRAHMS classes + // + + class BrEvent; + + class BrIOModule : public TNamed { + + public: + BrIOModule(); + BrIOModule(Char_t *name, Char_t *title); + virtual ~BrIOModule(); + + virtual Bool_t Open(Char_t*){return kFALSE;}; + virtual Bool_t Close(){return kFALSE;}; + virtual void Begin(){;}; + virtual void Event(BrEvent* event); + virtual void End(){;}; + + virtual void Info() const; + + //Statistics + virtual void EventStatisticsStart(); //To be called by asp + virtual void EventStatisticsEnd(); //To be called by asp + virtual void ListEventStatistics(); //To be called by asp + + void SetDebugLevel(const Int_t level){d_DebugLevel=level;} + Int_t DebugLevel() const {return d_DebugLevel;} //Debuglevel value + void SetVerbose(Int_t Verbose){d_Verbose = Verbose;} + Int_t GetStatus() const {return fStatus;} + Int_t GetBytesRead() const {return fNumBytesRead;}; + Int_t GetBytesWritten() const {return fNumBytesWritten;}; + Bool_t Eof() const {return fEof;} + Bool_t IsEof() const {return fEof;} + Bool_t Error() const { return fError;} + Bool_t IsError() const { return fError;} + protected: + Int_t fStatus; // Status of Module Action + Bool_t fError; // Error - result of transaction + Bool_t fEof; // EndOfFile / EndOfData indicator + Long_t fNumBytesWritten; //! Number of bytes written + Long_t fNumBytesRead; //! Number of bytes read + Int_t d_DebugLevel; // Level for amount of debug information + //output during execution of the module entries + //The application programmer should use the + //member functions DebugLevel() for decision to + //output information + Int_t d_Verbose; // Option flag + private: + // + //Statistics + // + Double_t fCpuTime; //! Time spend in this routine + TStopwatch fTimer; //! + + public: + + ClassDef(BrIOModule,1) // BRAHMS IO Module definitions + }; + + #endif + + diff -c -r -N VER-1-2/include/BrIO_LinkDef.h VER-1-2-1/include/BrIO_LinkDef.h *** VER-1-2/include/BrIO_LinkDef.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrIO_LinkDef.h Fri Nov 5 18:26:22 1999 *************** *** 0 **** --- 1,32 ---- + // $Id: BrIO_LinkDef.h,v 1.7 1999/08/25 18:26:05 videbaek Exp $ + // + // $Log: BrIO_LinkDef.h,v $ + // Revision 1.7 1999/08/25 18:26:05 videbaek + // remove ref to BrDigitizeIo + // + // Revision 1.6 1999/08/18 19:48:38 hagel + // Take out deleted files + // + // Revision 1.5 1998/09/09 17:55:47 videbaek + // re insert << operator + // + // Revision 1.4 1998/09/08 22:19:17 hagel + // Add BrSimulationDatabase + // + // Revision 1.3 1998/08/21 13:54:16 videbaek + // Simple modification to BrDigitizeIo pdates of comments. + // + // + #ifdef __CINT__ + + #pragma link off all globals; + #pragma link off all classes; + #pragma link off all functions; + + + #pragma link C++ class BrSimulationDatabase; + #pragma link C++ class BrSimulationDatabaseEntry; + + + + #endif diff -c -r -N VER-1-2/include/BrLine3D.h VER-1-2-1/include/BrLine3D.h *** VER-1-2/include/BrLine3D.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrLine3D.h Fri Nov 5 18:25:57 1999 *************** *** 0 **** --- 1,106 ---- + #ifndef BRAT_BrLine3D + #define BRAT_BrLine3D + + // $Id: BrLine3D.h,v 1.5 1999/04/21 14:50:38 videbaek Exp $ + // + // $Log: BrLine3D.h,v $ + // Revision 1.5 1999/04/21 14:50:38 videbaek + // removed apostrophe from comments (emac does not like them) + // + // Revision 1.4 1999/04/15 18:00:49 hagel + // Made destructor virtual + // + // Revision 1.3 1999/01/31 21:41:33 hagel + // Added Methods to get shortest distance between two lines + // + // Revision 1.2 1999/01/21 23:23:24 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 didnt 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.1 1998/12/01 20:49:58 videbaek + // Added several classes to Geometry. Updated source and makefile(s) + // - BrLine3D + // - BrCoordinateSystem + // - BrRotMatrix + // + // + ////////////////////////////////////////////////////////////////////////////// + // + // BrLine3D + // + // 3D Line. Part of the Geometry classes Points, Line, Lines, Planes. + // + // Author: F.Videbaek + // Created: July 1998 + // + // + ///////////////////////////////////////////////////////////////////////////// + + // + // ROOT classes + // + #include + + #ifndef ROOT_TObject + #include "TObject.h" + #endif + + // BRAT Classes + #ifndef BRAT_BrVector3D + #include "BrVector3D.h" + #endif + + class BrLine3D : public TObject { + + public: + + // constructors and destructors + // + BrLine3D(const BrVector3D&, const BrVector3D&); + virtual ~BrLine3D(){}; + + BrLine3D(const BrLine3D& line) : + fOrigin(line.fOrigin), fDirection(line.fDirection){}; + + BrLine3D& operator = (const BrLine3D&); + + // access methods + // + BrVector3D GetOrigin() const {return fOrigin;}; + BrVector3D GetDirection() const {return fDirection;}; + + void SetOrigin(const BrVector3D& vector) { fOrigin = vector;}; + void SetDirection(const BrVector3D& vector) {fDirection = vector.Unit();}; + + // + // Line operations + // + Double_t Distance(const BrVector3D&) const; + BrVector3D ClosestPoint(const BrVector3D&) const; + BrLine3D GetShortestLineBetween(const BrLine3D &line) const; + Double_t GetShortestDistanceBetween(const BrLine3D &line) const; + void List() const; + + + + private: + + BrVector3D fOrigin; // Vector for line start + BrVector3D fDirection; // Unit direction vector + + + ClassDef(BrLine3D,1) + + }; + + // + // Related Global functions + // + + ostream& operator<<(ostream& str, const BrLine3D&); + #endif diff -c -r -N VER-1-2/include/BrLocalTrack.h VER-1-2-1/include/BrLocalTrack.h *** VER-1-2/include/BrLocalTrack.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrLocalTrack.h Fri Nov 5 18:26:09 1999 *************** *** 0 **** --- 1,126 ---- + #ifndef BRAT_BrLocalTrack + #define BRAT_BrLocalTrack + + // $Id: BrLocalTrack.h,v 1.9 1999/04/28 15:31:48 hagel Exp $ + // + // $Log: BrLocalTrack.h,v $ + // Revision 1.9 1999/04/28 15:31:48 hagel + // Change destructor to clear fDetectorHits and fTraHit + // + // Revision 1.8 1999/03/07 22:37:38 videbaek + // Added DetectorHit and BrLocalTrackingModule as a more general way to + // deal with local tracks and hits. Initial insertion. Not fully debugged. + // + // Revision 1.7 1999/02/25 22:14:28 hagel + // Add SetID + // + // Revision 1.6 1999/01/21 23:23:27 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 didnt 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 + // + // + // + /////////////////////////////////////////////////////////////////////// + // // + // BrLocalTrack // + // // + // BRAHMS Track class // + // // + // Author : Kris Hagel (hagel@comp.tamu.edu) // + // Created : 10/Mar/1998 // + // Version : 1.0 // + // Changed : // + // // + /////////////////////////////////////////////////////////////////////// + + // Root Classes + #ifndef ROOT_TObject + #include "TObject.h" + #endif + + // Brahms Classes + #ifndef BRAT_BrDataTable + #include "BrDataTable.h" + #endif + + #ifndef BRAT_BrTrackHit + #include "BrTrackHit.h" + #endif + + class BrVirtualTrack; + class BrDetectorHit; + class BrLocalTrack: public TObject { + + public: + BrLocalTrack(); + BrLocalTrack(BrLocalTrack* loctra_p); + + virtual ~BrLocalTrack(); + + virtual const Float_t *GetPos() const {return fPos;} + virtual const Float_t *GetVec() const {return fVec;} + virtual Int_t GetNhit() const {return fNhit;} + virtual Int_t GetID() const {return fID;} + virtual Int_t GetFlg() const {return fFlg;} + virtual Int_t GetStat() const {return fStat;} + virtual Float_t GetChisq() const {return fChisq;} + + virtual Int_t GetTrackEntries() const {return fTrahit.GetEntries();} + virtual void RemoveTrackHit(BrTrackHit* trahit) {fTrahit.Remove(trahit);fTrahit.Compress();} + virtual BrTrackHit *GetTrackHitAt(Int_t i) const {return (BrTrackHit*)fTrahit.At(i);} + virtual BrDetectorHit *GetDetectorHitAt(Int_t i) const {return (BrDetectorHit*)fDetectorHits.At(i);} + virtual BrVirtualTrack *GetVtrack() const {return fVtrack;} + virtual TObjArray* GetHitList(){return (TObjArray*)&fDetectorHits;} + + virtual BrTrackHit2D *GetTr1() const {return fTr1;} + virtual BrTrackHit2D *GetTr2() const {return fTr2;} + + virtual void SetPos(const Float_t pos[3]) {for(Int_t i=0;i<3;i++) fPos[i] = pos[i];} + virtual void SetVec(const Float_t vec[3]) {for(Int_t i=0;i<3;i++) fVec[i] = vec[i];} + virtual void SetNhit(Int_t i) {fNhit = i;} + virtual void SetID(Int_t i) {fID = i;} + virtual void SetFlg(Int_t i) {fFlg = i;} + virtual void SetStat(Int_t i) {fStat = i;} + virtual void SetChisq(Float_t x) {fChisq = x;} + virtual void SetVtrack(BrVirtualTrack* vtrack) {fVtrack = vtrack;} + virtual void AddVec(const Float_t vec[3]) {for(Int_t i=0;i<3;i++) fVec[i] += vec[i];} + virtual void AddDetectorHit(BrDetectorHit* hitp) + {fDetectorHits.Add((TObject*)hitp);fNhit++;} + + virtual void SetTr1(BrTrackHit2D *tra2d) {fTr1 = tra2d;} + virtual void SetTr2(BrTrackHit2D *tra2d) {fTr2 = tra2d;} + virtual void AddTrackHit(BrTrackHit *trahit_p) {fTrahit.Add(trahit_p);} + virtual void IncNhit() {fNhit++;} + + private: + Int_t fID; // Id for this local track. + Float_t fPos[3]; // position for local track + Float_t fVec[3]; // direction of track + Int_t fNhit; // #hits associated with the track + Int_t fFlg; // local variable used during track finding. + Float_t fChisq; // Chisq of Track Fit + TObjArray fDetectorHits; //! container for DetectorHits map entries. Used locally + BrVirtualTrack* fVtrack; //!pointer to track candidate group + + BrTrackHit2D *fTr1; //! + BrTrackHit2D *fTr2; //! + Int_t fStat; + + TObjArray fTrahit; //! container for TraHit map entries. Used locally + + + public: + friend ostream& operator<< (ostream& os,BrLocalTrack* loctra); + + public: + + ClassDef(BrLocalTrack,1) // Brahms Local track class + + }; + + #endif diff -c -r -N VER-1-2/include/BrLocalTrackDC.h VER-1-2-1/include/BrLocalTrackDC.h *** VER-1-2/include/BrLocalTrackDC.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrLocalTrackDC.h Fri Nov 5 18:26:19 1999 *************** *** 0 **** --- 1,188 ---- + #ifndef BRAT_BrLocalTrackDC + #define BRAT_BrLocalTrackDC + + // $Id: BrLocalTrackDC.h,v 1.15 1999/04/29 14:03:21 hagel Exp $ + // + // $Log: BrLocalTrackDC.h,v $ + // Revision 1.15 1999/04/29 14:03:21 hagel + // Add fUseShrink to decide whether to shrink clones arrays when they become + // too large. Also getter and setter methods for it. + // + // Revision 1.14 1999/04/07 21:04:22 hagel + // Add DCTrio + make things modular + // + // Revision 1.13 1999/03/16 21:04:11 hagel + // 1. Make BrDCPlane inherit from BrPlane3D. BrDCPlane how has information about + // where it is located. + // 2. Change BrDigitizeDC and BrLocalTrackDC to make use of new BrDCPlane information. + // 3. Move Decode(...) from BrDigitizeDC to BrLocalTrackDC. + // 4. Change cut parameters to be member data with defaults rather than hardwired. + // + // Revision 1.12 1999/02/24 16:36:03 hagel + // Implemented BrParameterDbManager + // + // Revision 1.11 1999/01/21 23:23:22 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.10 1999/01/15 15:35:39 videbaek + // Changes from merging fv and kh files. should be cosmetic only + // + // Revision 1.9 1998/12/18 19:50:30 hagel + // Move SetDetectorVolume() to private + // + // Revision 1.8 1998/12/14 23:37:53 hagel + // cleanup of Initial version of Event Display stuff for DC's + // + // Revision 1.7 1998/08/27 21:50:09 hagel + // Add ListDetectorVolume + // + // Revision 1.6 1998/07/20 17:44:54 videbaek + // hanged 0 return to NULL + // + // + /////////////////////////////////////////////////////////////////////// + // // + // BrLocalTrackDC // + // // + // Author : Kris Hagel (hagel@comp.tamu.edu) // + // Created : 11-Mar-1998 // + // Version : 1.0 // + // Changed : // + // // + /////////////////////////////////////////////////////////////////////// + + //ROOT Includes + #ifndef ROOT_TH1 + #include "TH1.h" + #endif + + //BRAT Includes + #ifndef BRAT_BrLocalTrackModule + #include "BrLocalTrackModule.h" + #endif + + //Definitions for fClusterMode + const Int_t kPairsWhenTogether = 0; + const Int_t kAllSinglePlanes = 1; + + class BrDetectorParamsDC; + class BrDetectorVolume; + class BrTrackHit2D; + class BrDetectorDC; + + class BrLocalTrackDC : public BrLocalTrackModule { + + public: + BrLocalTrackDC(); + BrLocalTrackDC(Char_t *Name,Char_t *Title); + + virtual ~BrLocalTrackDC(); + + void Init(); + void Event(BrEventNode* InputTable,BrEventNode* OutputTable); + + virtual BrDetectorParamsDC* GetDetectorParamsDC(){return fParams_p;} + virtual BrDetectorVolume* GetDetectorVolume(const Char_t *name); + virtual void ListDetectorVolume(); + + + void SetUseShrink(Bool_t val) {fUseShrink = val;} + void SetMainView(Int_t mainview) {fMainView = mainview;} + void SetSubView (Int_t subview ) {fSubView = subview;} + void SetAsigma(Float_t sigma) {fAsigma = sigma;} + void SetClusDx(Float_t dx) {fClusDx = dx;} + void SetClusDy(Float_t dy) {fClusDy = dy;} + void SetDCCutMatchDx(Float_t dx) {fDCCutMatchDx = dx;} + void SetDCCutMatchDy(Float_t dy) {fDCCutMatchDy = dy;} + void SetDCCutMaxMissMain (Int_t miss) {fDCCutMaxMissMain = miss;} + void SetDCCutMaxMissSub (Int_t miss) {fDCCutMaxMissSub = miss;} + void SetDCCutMaxMissOther(Int_t miss) {fDCCutMaxMissOther = miss;} + void SetPlaneCombineMode(Int_t mode) {fPlaneCombineMode = mode;} + Int_t GetMainView() {return fMainView;} + Int_t GetSubView() {return fSubView;} + Bool_t GetUseShrink() {return fUseShrink;} + + void ListDetectorParameters(); + + void DrawLocalTracks(); + BrDetectorDC *fDetectorNode; + + private: + + void SetDetectorParamsDC(BrDetectorParamsDC* par); + void SetDetectorParamsDC(const BrDetectorParamsDC& par); + + void CreateDCClonesArrays(); + void Decode(BrDataTable* DigitizedHits); + void DCCluster(BrDataTable* DigitizedHits); //,Float_t clusdx, Float_t clusdy); + void DCSingle(BrDataTable *DigitizedHits,Int_t idet,Int_t ipl,Int_t iview); + void DCPair (BrDataTable *DigitizedHits,Int_t idet,Int_t ipl,Int_t iview);//,Float_t ddx,Float_t ddy); + void DCTrio (BrDataTable *DigitizedHits,Int_t idet,Int_t ipl,Int_t iview);//,Float_t ddx,Float_t ddy); + void GenerateInitial2DTracks(BrDataTable HitCMBMod[maxview], + const Int_t *xvlist[2],const Int_t *nxv[2]); + void CheckIntermediatePositions(BrDataTable HitCMBMod[maxview], + const Int_t *xvlist[2],const Int_t *nxv[2]); + void CombineViews(BrDataTable HitCMBMod[maxview],Int_t ovlist[maxview],Int_t nov); + void CombineViews(BrDataTable HitCMBMod[maxview], + Int_t vlist[maxview],Int_t ovlist[maxview],Int_t nov); + + void GetDigHitMod(Int_t idet,Int_t imod,Int_t wire,Int_t time, + BrDataTable *DigitizedHits,BrDataTable *DigHitMod); + Int_t TrackLocalElement(); + void InsertTrahit(BrCombinedHit* hitcmb,BrTrackHit2D* tra2d); + void CopyTrahit1(BrTrackHit2D *OldTr,BrTrackHit2D *NewTr); + void CopyTrahit1(BrLocalTrack *OldTr,BrLocalTrack *NewTr); + void RemoveTrack(BrTrackHit2D *tra2d); + void GetTra2DMod(Int_t stat,Int_t flg,BrDataTable* tra2DMod); + void FitLocalDCTrack(BrDataTable *HitCMBSel,BrLocalTrack* loctra_p, + Int_t vlist[maxview],Int_t vlistID[5][maxview],Int_t nview,Float_t *sol, + Float_t *covar, Float_t &chisq, Int_t &ifail); + void DeleteBadTrack(); + + virtual void SetDetectorVolume(BrDetectorVolume *vol); + + BrClonesArray *DCHits; + BrClonesArray *TrackHits2D; + + Bool_t fUseShrink; //Turn on/off expansion of clones arrays + BrDetectorParamsDC *fParams_p; + BrDetectorVolume *fVolumeParams_p[4]; + Int_t fNumVol; //Need for sub volumes etc. + + Int_t fMainView; //main view parameter; usually 0 + Int_t fSubView; //sub view parameter, default to -90 + Int_t fPlaneCombineMode; //Specifies how BrCombinedHits generated. + Float_t fClusDx; //Cluster x matching parameter + Float_t fClusDy; //Cluster y matching parameter + Float_t fDCCutMatchDx; //DC Cut x matching parameter + Float_t fDCCutMatchDy; //DC Cut y matching parameter + Int_t fDCCutMaxMissMain; //Maximum number of misses in main view planes + Int_t fDCCutMaxMissSub; //Maximum number of misses in sub view planes + Int_t fDCCutMaxMissOther; //Maximum number of misses in other view planes. + Float_t fAsigma; //Sigma for cuts in intermediate plane matching. + Float_t fUVDx; //Dx for cuts in intermediate plane matching + Float_t fUVDy; //Dy for cuts in intermediate plane matching + Float_t fTrioChisqWin; //chisq window for cluster matching in DCTrio + + // Diagnostic histograms + TH1F *h_NumTra2DInit; + TH1F *h_NumTra2DInter; + TH1F *h_NumLoctraInit; + TH1F *h_Ddu; + TH1F *h_Duc; + TH1F *h_Chisq; + + + public: + + ClassDef(BrLocalTrackDC,0) // BRAHMS Local Track interface + + }; + + #endif diff -c -r -N VER-1-2/include/BrLocalTrackModule.h VER-1-2-1/include/BrLocalTrackModule.h *** VER-1-2/include/BrLocalTrackModule.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrLocalTrackModule.h Fri Nov 5 18:26:09 1999 *************** *** 0 **** --- 1,102 ---- + #ifndef BRAT_BrLocalTrackModule + #define BRAT_BrLocalTrackModule + // $Id: BrLocalTrackModule.h,v 1.7 1999/03/07 22:37:38 videbaek Exp $ + // $Log: BrLocalTrackModule.h,v $ + // Revision 1.7 1999/03/07 22:37:38 videbaek + // Added DetectorHit and BrLocalTrackingModule as a more general way to + // deal with local tracks and hits. Initial insertion. Not fully debugged. + // + // Revision 1.6 1999/01/21 23:23:27 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.5 1998/12/14 23:37:53 hagel + // cleanup of Initial version of Event Display stuff for DC's + // + // Revision 1.4 1998/12/04 21:35:36 videbaek + // Started updating structures for tracking. Using BrVector3D + // in many places where double* or float* was used before. + // Fix type SHLIB->$(SHLIB) .. + // + // Revision 1.3 1998/09/04 15:35:41 hagel + // Debug BrCombineTrack + // + // Revision 1.2 1998/04/06 21:12:17 videbaek + // Clean up and additions for Win95 + // + // + + /////////////////////////////////////////////////////////////////////// + // // + // BrLocalTrackModule // + // // + // Brat Modules for local tracking in detectors; // + // Presently only implemented for TPC and DritChambers. // + // // + // detector geometry // + // // + // Author : Kris Hagel (hagel@comp.tamu.edu) // + // Created : 10/Mar/1998 // + // Changed : // + // // + /////////////////////////////////////////////////////////////////////// + + // BRAHMS classes + + #ifndef BRAT_BrModule + # include "BrModule.h" + #endif + + #ifndef BRAT_BrTrackDefines + # include "BrTrackDefines.h" + #endif + + #ifndef BRAT_BrClonesArray + # include "BrClonesArray.h" + #endif + + #ifndef BRAT_BrLocalTrack + #include "BrLocalTrack.h" + #endif + + class BrDataTable; + + class BrLocalTrackModule : public BrModule { + + public: + BrLocalTrackModule(); + BrLocalTrackModule(Char_t *Name,Char_t *Title); + + virtual ~BrLocalTrackModule(); + + private: + + protected: + void CreateClonesArrays(); + void GetHitCMBMod(Int_t imod, BrDataTable* HitCMBMod); + void InsertTrahit(BrCombinedHit* hitcmb_p, BrLocalTrack *loctra_p); + void RemoveTrack(BrLocalTrack *loctra_p); + void DeleteBadTrack(); + void FillVTracks(Int_t nrow); + void FillHitCMBSelector(BrLocalTrack* loctra, BrDataTable* HitCMBSel); + void FillLocalTracks(BrEventNode* OutputTable); + void FillDetectorTracks(BrEventNode* OutputNode); + + + BrClonesArray *fDetectorHits; // Detector Hit list + BrClonesArray *CombinedHits; // DetectorHits will replace this list!! + BrClonesArray *LocalTracks; + BrClonesArray *TrackHits; + BrClonesArray *VirtualTracks; + BrDataTable *fDetectorTracks; // Detector Track list + + ClassDef(BrLocalTrackModule,1) // BRAHMS Local Tracking Module Interface + + }; + + #endif diff -c -r -N VER-1-2/include/BrLocalTrackingModule.h VER-1-2-1/include/BrLocalTrackingModule.h *** VER-1-2/include/BrLocalTrackingModule.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrLocalTrackingModule.h Fri Nov 5 18:26:09 1999 *************** *** 0 **** --- 1,80 ---- + #ifndef BRAT_BrLocalTrackingModule + #define BRAT_BrLocalTrackingModule + // $Id: BrLocalTrackingModule.h,v 1.1 1999/03/07 22:37:38 videbaek Exp $ + // $Log: BrLocalTrackingModule.h,v $ + // Revision 1.1 1999/03/07 22:37:38 videbaek + // Added DetectorHit and BrLocalTrackingModule as a more general way to + // deal with local tracks and hits. Initial insertion. Not fully debugged. + // + + /////////////////////////////////////////////////////////////////////// + // // + // BrLocalTrackingModule // + // // + // Brat Modules for local tracking in detectors; // + // Presently only implemented for TPC and DriftChambers. // + // // + // detector geometry // + // // + // Author : F.Videbaek videbaek@bnl.gov // + // Created : 02/Mar/1999 // + // Changed : // + // // + /////////////////////////////////////////////////////////////////////// + + // BRAHMS classes + + #ifndef BRAT_BrModule + # include "BrModule.h" + #endif + + #ifndef BRAT_BrTrackDefines + # include "BrTrackDefines.h" + #endif + + #ifndef BRAT_BrClonesArray + # include "BrClonesArray.h" + #endif + + #ifndef BRAT_BrLocalTrack + # include "BrLocalTrack.h" + #endif + + class BrDataTable; + + class BrLocalTrackingModule : public BrModule { + + public: + BrLocalTrackingModule(); + BrLocalTrackingModule(Char_t *Name,Char_t *Title); + + virtual ~BrLocalTrackingModule(); + + private: + + protected: + void CreateClonesArrays(); + void FillHitContainer(Int_t imod, TObjArray *SelectedHits); + + // void InsertTrahit(BrCombinedHit* hitcmb_p, BrLocalTrack *loctra_p); + void RemoveTrack(BrLocalTrack *loctra_p); + void DeleteBadTrack(); + void FitLocalTrack(BrLocalTrack* localtrack, + Float_t *sol, Float_t *covar, Float_t &chisq, Int_t &ifail); + void FillTrackGroups(Int_t nrow); + + void FillDetectorTracks(BrEventNode* OutputNode); + void FillLocalTracks(BrEventNode* OutputNode); + + + BrClonesArray *fDetectorHits; // Detector Hit list + BrClonesArray *fLocalTracks; // + BrClonesArray *fTrackHitAsco; // Associated array between Detectortracks and detectorHits. + BrClonesArray *fTrackGroups; + BrDataTable *fDetectorTracks; // Detector Track list + + ClassDef(BrLocalTrackingModule,1) // BRAHMS Local Tracking Module Interface + + }; + + #endif diff -c -r -N VER-1-2/include/BrMRSTrackingModule.h VER-1-2-1/include/BrMRSTrackingModule.h *** VER-1-2/include/BrMRSTrackingModule.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrMRSTrackingModule.h Fri Nov 5 18:26:09 1999 *************** *** 0 **** --- 1,103 ---- + #ifndef BRAT_BrMRSTrackingModule + #define BRAT_BrMRSTrackingModule + + // $Id: BrMRSTrackingModule.h,v 1.5 1999/04/22 17:23:44 videbaek Exp $ + // + // $Log: BrMRSTrackingModule.h,v $ + // Revision 1.5 1999/04/22 17:23:44 videbaek + // Add Clear method + // + // Revision 1.4 1999/01/21 23:23:27 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 didnt 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.3 1999/01/15 16:37:03 videbaek + // Working version of MRS tracking of mtp1,mtp2 and new general track + // classes. Changes also added to BrModuleMatchTrack for this reason. + // + // Revision 1.2 1998/12/21 20:23:12 videbaek + // Included MRS tracking, and track combine module as part of a more + // generalized set of Methods and classes. + // + // Revision 1.1 1998/12/04 21:35:37 videbaek + // Started updating structures for tracking. Using BrVector3D + // in many places where double* or float* was used before. + // Fix type SHLIB->$(SHLIB) .. + // + // + // + // + // ROOT Classes + // + #ifndef ROOT_TObject + #include "TObject.h" + #endif + + #ifndef ROOT_TObjArray + #include "TObjArray.h" + #endif + + class TH1F; + + // + //Brat Classes + // + + #ifndef BRAT_BrModule + #include "BrModule.h" + #endif + + #ifndef BRAT_BrDetectorVolume + #include "BrDetectorVolume.h" + #endif + + #ifndef BRAT_BrModuleMatchTrack + #include "BrModuleMatchTrack.h" + #endif + + class BrEventNode; + + + class BrMRSTrackingModule : public BrModule { + + public: + + BrMRSTrackingModule(); + BrMRSTrackingModule(Char_t *Name, Char_t *Title); + + ~BrMRSTrackingModule(); + + void Clear(); + void Event(BrEventNode*, BrEventNode*); + void TrackToVertex(); + void DefineHistograms(); + private: + + BrModuleMatchTrack* fCombineModule; // Module that combines front/back track. + BrDetectorVolume* fFrontVolume; // Pointer to front volume + BrDetectorVolume* fBackVolume; // Pointer to back detector volume + BrMagnetVolume* fMagnetVolume; // Pointer to magnet volume + TObjArray* fTracksFrontBack; // Container of matched tracks + TObjArray* fMRSTracks; // Container of MRS tracks + + TH1F* hTargetTx; //! Target X image histograms in MRS system + TH1F* hTargetTy; //! Target Y image histograms in MRS system + TH1F* hP; //! Momentum distribution for accepted tracks + + + public: + ClassDef(BrMRSTrackingModule, 1) // BRAHMS MRS Tracking Module Interface + }; + + #endif + + + + + + diff -c -r -N VER-1-2/include/BrMagnetVolume.h VER-1-2-1/include/BrMagnetVolume.h *** VER-1-2/include/BrMagnetVolume.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrMagnetVolume.h Fri Nov 5 18:26:04 1999 *************** *** 0 **** --- 1,179 ---- + #ifndef BRAT_BrMagnetVolume + #define BRAT_BrMagnetVolume + // + // $Id: BrMagnetVolume.h,v 1.6 1999/04/22 21:35:34 hagel Exp $ + // + // $Log: BrMagnetVolume.h,v $ + // Revision 1.6 1999/04/22 21:35:34 hagel + // Improvements in SwimBack() + // + // Revision 1.5 1999/03/07 00:00:41 hagel + // 1. Implemented BrFSTrackingModule. Started with BrMRSTrackingModule and made + // appropriate changes to handle the forward spectrometer. It uses the new + // track classes as well as extensively using geometry classes. It also uses + // new methods and functionality as described below. + // 2. Changed BrMagnetVolume + // a. Added method SwimBack(BrLine3D &,Double_t momentum): takes a + // track at the exit of magnet and given the momentum, calculates + // where the track would come into the front of the magnet. + // b. Added method GlobalToLocal(BrLine3D &): does a combination of + // GlobalToLocal(BrVector3D &,BrVector3D&,0) and + // GlobalToLocal(BrVector3D &,BrVector3D&,1) + // c. Added method LocalToGlobal(BrLine3D &): does a combination of + // LocalToGlobal(BrVector3D &,BrVector3D&,0) and + // LocalToGlobal(BrVector3D &,BrVector3D&,1) + // d. Changed BrDetectorVolume: same additions of methods GlobalToLocal + // and LocalToGlobal as in BrMagnetVolume + // 2. Added a parameter base class BrDetectorParamsBase: helps when reading + // in database files. Declared ASCII reading routines to be virtual. + // Has main ReadASCIIFile which decodes the ASCII parameter files, then + // calls the detector specific methods SetASCIIParameter + // 3. Implemented SetASCIIParameter in BrDetectorParamsDC, BrDetectorParamsTPC, + // BrDetectorParamsTof, BrDetectorParamsBB + // 4. Implemented BrParameterDbManager. It currently works similarly to + // BrGeometryDbManager and creates the BrDetectorParamsXXX objects when + // called. These objects then read in ASCII parameter files with a currently + // "well defined" format using the above implemented routines using a constructor: + // BrDetectorParamsXXX(Char_t *name, Char_t *title,Char_t *ASCIIFileName); + // 5. If no parameter file is specified, it executes the constructor we + // have been using so far, namely BrDetectorParamsXXX(Char_t *name,Char_t *title). + // These constructors generate default parameters and are semi-intelligent + // which means they generate approximately appropriate parameters depending + // upon which detector they are. I should say that the parameters were + // deemed appropriate at the time of writing the SetDefaultParams routine. + // a. It is used in the same way as BrGeometryDbManager, that is: + // BrParameterDbManager *gParamDb = BrParameterDbManager::Instance(); + // gParamDb->SetDbParameterFileName("DetectorParameters.txt"); + // 6. Added a new directory, params, in BRAT. This directory has the file + // DetectorParameters.txt in it. If the BrParameterDbManager is started + // and the DetectorParameter.txt file is specified, it will look in the + // $BRATSYS/params directory if it cannot find the file in the directory + // that the user has set default to. + // 7. Implemented BrParameterDbManager in DC digitize and tracking code. The + // SetDetectorParams methods have been moved to private and can no longer be + // used from the macro or program. + // 8. Implemented BrParameterDbManager in TPC digitize and tracking code. + // 9. Implemented BrParameterDbManager in Tof Calibrate and GeneratePid code. + // 10 Changed the GetEntries() in BrDataTable to use the GetLast()+1 method in + // TObjArray. This should be much faster, but has the caveat that it assumes + // that all slots in TObjArray are full. That seems to me to be the case + // in how we use TObjArray at least in BrDataTable, but if problems arise due + // to this change, it can always be easily changed back. It has been used a + // fair amount before checking in and no problems were found. + // + // Modified Files: + // base/inc/BrBase_LinkDef.h base/inc/BrDataTable.h + // base/inc/BrDetectorVolume.h base/inc/BrMagnetVolume.h + // base/inc/LinkDefBratBaseINC.h base/src/BrDataTable.cxx + // base/src/BrDetectorVolume.cxx base/src/BrEventNode.cxx + // base/src/BrMagnetVolume.cxx base/src/BrTableManager.cxx + // base/src/Makefile bb/inc/BrDetectorParamsBB.h + // bb/src/BrDetectorParamsBB.cxx db/inc/BrParameterDbManager.h + // db/src/BrParameterDbManager.cxx dc/inc/BrDetectorParamsDC.h + // dc/src/BrDetectorDC.cxx dc/src/BrDetectorParamsDC.cxx + // dc/src/BrDigitizeDC.cxx dc/src/BrLocalTrackDC.cxx + // geometry/inc/BrPlane3D.h geometry/src/BrPlane3D.cxx + // params/DetectorParameters.txt tof/inc/BrDetectorParamsTof.h + // tof/src/BrDetectorParamsTof.cxx tof/src/BrGeneratePid.cxx + // tpc/inc/BrDetectorParamsTPC.h tpc/src/BrDetectorParamsTPC.cxx + // tpc/src/BrDetectorTPC.cxx tpc/src/BrDigitizeTPC.cxx + // tpc/src/BrLocalTrackTPC.cxx track/inc/BrDetectorTrack.h + // track/inc/BrFSTrackingModule.h + // track/inc/BrSpectrometerTracks.h track/src/BrDetectorTrack.cxx + // track/src/BrFSTrackingModule.cxx + // track/src/BrSpectrometerTracks.cxx + // + // Revision 1.4 1999/02/11 15:09:53 hagel + // Changes to get to compile under Solaris + // + // Revision 1.3 1999/01/21 23:23:19 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.2 1999/01/15 15:32:13 videbaek + // Updates to volume files. + // Added member histon to BrModule, and member function HistOn(). + // Added BrMath as standard math library. + // + // Revision 1.1 1998/12/18 19:59:24 videbaek + // new module + // + // + + // Root Classes + #ifndef ROOT_TNamed + #include "TNamed.h" + #endif + + // BRAHMS Classes + #ifndef BRAT_BrVector3D + #include "BrVector3D.h" + #endif + + #ifndef BRAT_BrLine3D + #include "BrLine3D.h" + #endif + + #ifndef BRAT_BrPlane3D + #include "BrPlane3D.h" + #endif + + #ifndef BRAT_BrCoordinateSystem + #include "BrCoordinateSystem.h" + #endif + + + class BrMagnetVolume : public TNamed { + + public: + BrMagnetVolume(); + BrMagnetVolume(Char_t *name, Char_t *title); + BrMagnetVolume(Char_t *name,Char_t *title, Char_t *FileName); + virtual ~BrMagnetVolume(); + + void ReadFile(Char_t *FileName, Char_t *name); + void ListParameters(); + + virtual Double_t *GetSize() {return fSize;} + virtual Double_t GetField() { return fField;} + virtual Double_t GetBdl() { return fBdl;} + virtual void GlobalToLocal(const BrVector3D&, BrVector3D& ,Int_t iflag); + virtual void LocalToGlobal(const BrVector3D&, BrVector3D& ,Int_t iflag); + virtual BrLine3D GlobalToLocal(const BrLine3D& line); + virtual BrLine3D LocalToGlobal(const BrLine3D& line); + virtual void SetCoordinateSystem(BrCoordinateSystem& system) + {fSystem = system;} + virtual BrCoordinateSystem* GetCoordinateSystem(){return &fSystem;} + virtual BrRotMatrix* GetRotMatrix() {return fSystem.GetRotMatrix();} + BrLine3D SwimBack(const BrLine3D& line,const Double_t momentum); + BrPlane3D GetEffectiveEdgeEntrancePlane(); + BrPlane3D GetEffectiveEdgeExitPlane(); + + + protected: + Double_t fSize[3]; // Detector size (x,y,z) + Double_t fField; // Nominal field value + Double_t fBdl; // Nominal integrated field + Char_t fFieldType[8]; // Field type similar to Geant + + BrCoordinateSystem fSystem; // Coordinate system definition. + + + void SetVolumeParameters(float xl, float yl, float zl, + float angle, + float xl_center, float yl_center, float zl_center); + + public: + friend ostream& operator<< (ostream& os,BrMagnetVolume*); + + ClassDef(BrMagnetVolume,1) // BRAHMS detector volume class + + }; + + + #endif diff -c -r -N VER-1-2/include/BrMath.h VER-1-2-1/include/BrMath.h *** VER-1-2/include/BrMath.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrMath.h Fri Nov 5 18:26:04 1999 *************** *** 0 **** --- 1,323 ---- + #ifndef BRAT_BrMath + #define BRAT_BrMath + + // $Id: BrMath.h,v 1.5 1999/01/21 17:54:32 hagel Exp $ + + // $Log: BrMath.h,v $ + // Revision 1.5 1999/01/21 17:54:32 hagel + // Test log change + // + // Revision 1.4 1999/01/21 17:49:36 hagel + // Test log change + // + // Revision 1.3 1999/01/21 17:48:06 hagel + // Change #ifndef's + // + + // Copyright (C) 1994 CodeCERN. All rights reserved. + // Copyrigth (C) 1998 TAMU / BNL + + /////////////////////////////////////////////////////////////////////////// + // // + // BrMath // + // // + // Encapsulate math routines. For the time being avoid templates. // + // Not so happy with ROOT implementation. Edited for more uniform access // // + // // + /////////////////////////////////////////////////////////////////////////// + + typedef unsigned char Bool_t; + + class BrMath { + public: + static const double Pi, E; + + // Trigo + static double Sin(double); + static double Cos(double); + static double Tan(double); + static double ASin(double); + static double ACos(double); + static double ATan(double); + static double ATan2(double, double); + static double Hypot(double x, double y); + static void Sincos(double a, double *sin, double *cos); + + // Misc + static double Sqrt(double x); + static double Ceil(double x); + static double Floor(double x); + static double Exp(double); + static double Power(double x, double y); + static double Log(double x); + static double Log2(double x); + static double Log10(double x); + static int Nint(float x); + static int Nint(double x); + static int Int(float x); + static int Int(double x); + + // Some integer math + static long NextPrime(long x); // least prime number greater than x + static long Sqrt(long x); + static long Hypot(long x, long y); // sqrt(px*px + py*py) + + // Abs + static short Abs(short d); + static int Abs(int d); + static long Abs(long d); + static float Abs(float d); + static double Abs(double d); + + // Even/Odd + static Bool_t Even(long a); + static Bool_t Odd(long a); + + // Signum + static short Sign(short a); + static int Sign(int a); + static long Sign(long a); + static double Sign(double a); + + // Min + static short Min(short a, short b); + static unsigned short Min(unsigned short a, unsigned short b); + static int Min(int a, int b); + static unsigned int Min(unsigned int a, unsigned int b); + static long Min(long a, long b); + static unsigned long Min(unsigned long a, unsigned long b); + static float Min(float a, float b); + static double Min(double a, double b); + + // Max + static short Max(short a, short b); + static unsigned short Max(unsigned short a, unsigned short b); + static int Max(int a, int b); + static unsigned int Max(unsigned int a, unsigned int b); + static long Max(long a, long b); + static unsigned long Max(unsigned long a, unsigned long b); + static float Max(float a, float b); + static double Max(double a, double b); + + // Range + static short Range(short lb, short ub, short x); + static int Range(int lb, int ub, int x); + static long Range(long lb, long ub, long x); + static unsigned long Range(unsigned long lb, unsigned long ub, unsigned long x); + static double Range(double lb, double ub, double x); + + static float Erf(float x); + static double Erf(double x); + + static float FGauss(); + static int MOD(int dividend,int divisor); + + static void vzero(int *arr,int len); + + static void DEQINV(int n,double **a,int idim,float *r,int &ifail,int k,double **b); + static void DFACT(int n,double **a,int idim,float *r,int &ifail, double &det,int &jfail); + static void DFEQN(int n,double **a,int idim,float *r,int k,double **b); + static void DFINV(int n,double **a,int idim,float *r); + + static Bool_t BTWN(float a,float b,float c); + static Bool_t BTWN(int a,int b,int c); + + }; + + //---- Misc -------------------------------------------------------------------- + + inline int BrMath::Nint(float x) + { + int i = int(x + 0.5); + if (x + 0.5 == float(i) && i & 1) i--; + return i; + } + + inline int BrMath::Nint(double x) + { + int i = int(x + 0.5); + if (x + 0.5 == double(i) && i & 1) i--; + return i; + } + + //__________________________________________ + inline int BrMath::Int(float x) + { + int i; + if( x > 0 ) { + i = int(x + 0.5); + if (x + 0.5 == float(i) && i & 1) i--; + } + else { + i = int(x - 0.5); + if (x - 0.5 == float(i) && i & 1) i++; + } + return i; + } + + inline int BrMath::Int(double x) + { + int i; + if( x > 0 ) { + i = int(x + 0.5); + if (x + 0.5 == double(i) && i & 1) i--; + } + else { + i = int(x - 0.5); + if (x - 0.5 == double(i) && i & 1) i++; + } + return i; + } + + //---- Sign -------------------------------------------------------------------- + + inline short BrMath::Sign(short a) + { return (a == 0) ? 0 : ( (a > 0) ? 1 : -1 ); } + + inline int BrMath::Sign(int a) + { return (a == 0) ? 0 : ( (a > 0) ? 1 : -1 ); } + + inline long BrMath::Sign(long a) + { return (a == 0) ? 0 : ( (a > 0) ? 1 : -1 ); } + + inline double BrMath::Sign(double a) + { return (a == 0.0) ? 0 : ( (a > 0.0) ? 1 : -1 ); } + + //---- Even/odd ---------------------------------------------------------------- + + inline Bool_t BrMath::Even(long a) + { return ! (a & 1); } + + inline Bool_t BrMath::Odd(long a) + { return (a & 1); } + + //---- Abs --------------------------------------------------------------------- + + inline short BrMath::Abs(short d) + { return (d > 0) ? d : -d; } + + inline int BrMath::Abs(int d) + { return (d > 0) ? d : -d; } + + inline long BrMath::Abs(long d) + { return (d > 0) ? d : -d; } + + inline float BrMath::Abs(float d) + { return (d > 0) ? d : -d; } + + inline double BrMath::Abs(double d) + { return (d > 0) ? d : -d; } + + //---- Min --------------------------------------------------------------------- + + inline short BrMath::Min(short a, short b) + { return a <= b ? a : b; } + + inline unsigned short BrMath::Min(unsigned short a, unsigned short b) + { return a <= b ? a : b; } + + inline int BrMath::Min(int a, int b) + { return a <= b ? a : b; } + + inline unsigned int BrMath::Min(unsigned int a, unsigned int b) + { return a <= b ? a : b; } + + inline long BrMath::Min(long a, long b) + { return a <= b ? a : b; } + + inline unsigned long BrMath::Min(unsigned long a, unsigned long b) + { return a <= b ? a : b; } + + inline float BrMath::Min(float a, float b) + { return a <= b ? a : b; } + + inline double BrMath::Min(double a, double b) + { return a <= b ? a : b; } + + //---- Max --------------------------------------------------------------------- + + inline short BrMath::Max(short a, short b) + { return a >= b ? a : b; } + + inline unsigned short BrMath::Max(unsigned short a, unsigned short b) + { return a >= b ? a : b; } + + inline int BrMath::Max(int a, int b) + { return a >= b ? a : b; } + + inline unsigned int BrMath::Max(unsigned int a, unsigned int b) + { return a >= b ? a : b; } + + inline long BrMath::Max(long a, long b) + { return a >= b ? a : b; } + + inline unsigned long BrMath::Max(unsigned long a, unsigned long b) + { return a >= b ? a : b; } + + inline float BrMath::Max(float a, float b) + { return a >= b ? a : b; } + + inline double BrMath::Max(double a, double b) + { return a >= b ? a : b; } + + //---- Range ------------------------------------------------------------------- + + inline short BrMath::Range(short lb, short ub, short x) + { return x < lb ? lb : (x > ub ? ub : x); } + + inline int BrMath::Range(int lb, int ub, int x) + { return x < lb ? lb : (x > ub ? ub : x); } + + inline long BrMath::Range(long lb, long ub, long x) + { return x < lb ? lb : (x > ub ? ub : x); } + + inline unsigned long BrMath::Range(unsigned long lb, unsigned long ub, unsigned long x) + { return x < lb ? lb : (x > ub ? ub : x); } + + inline double BrMath::Range(double lb, double ub, double x) + { return x < lb ? lb : (x > ub ? ub : x); } + + //---- Trig and other functions ------------------------------------------------ + + #if defined(AIX) || defined(MAC) + // in AIX and MAC math functions are defined inline so we have to include them here + # include + #else + // donot want to include complete + extern "C" { + extern double sin(double); + extern double cos(double); + extern double tan(double); + extern double sqrt(double); + extern double exp(double); + extern double pow(double, double); + extern double log(double); + extern double log10(double); + } + #endif + + inline double BrMath::Sin(double x) + { return sin(x); } + + inline double BrMath::Cos(double x) + { return cos(x); } + + inline double BrMath::Tan(double x) + { return tan(x); } + + inline double BrMath::Sqrt(double x) + { return sqrt(x); } + + inline double BrMath::Exp(double x) + { return exp(x); } + + inline double BrMath::Power(double x, double y) + { return pow(x, y); } + + inline double BrMath::Log(double x) + { return log(x); } + + inline double BrMath::Log10(double x) + { return log10(x); } + + #endif diff -c -r -N VER-1-2/include/BrModule.h VER-1-2-1/include/BrModule.h *** VER-1-2/include/BrModule.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrModule.h Fri Nov 5 18:26:04 1999 *************** *** 0 **** --- 1,161 ---- + #ifndef BRAT_BrModule + #define BRAT_BrModule + // $Id: BrModule.h,v 1.12 1999/04/21 14:47:40 videbaek Exp $ + // + // $Log: BrModule.h,v $ + // Revision 1.12 1999/04/21 14:47:40 videbaek + // Added Methods SetHistOn() .. see comments + // + // Revision 1.11 1999/04/09 19:36:25 videbaek + // Clean up code; add ListStatistics to container class + // + // Revision 1.10 1999/02/25 15:01:30 videbaek + // Add a memeber function Warning at the BrModule level. This has a buildin limit counter + // such that Warning will not go on for all events. + // The code is copied for the TObject::Warning. + // + // Revision 1.9 1999/01/21 23:23:20 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 didnt 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 15:32:14 videbaek + // Updates to volume files. + // Added member histon to BrModule, and member function HistOn(). + // Added BrMath as standard math library. + // + // Revision 1.7 1998/12/21 20:17:59 videbaek + // Added magnet volumes. Additional features for Modules. + // + // Revision 1.6 1998/09/08 15:21:15 alv + // Deleted {} after Book to have a declaration. The definition is in BrModule.cxx + // + // Revision 1.5 1998/08/28 20:00:50 videbaek + // Added Book and DefineHistograms + // + // Revision 1.4 1998/04/06 21:11:48 videbaek + // Clean up and additions for Win95 + // + // + /////////////////////////////////////////////////////////// + // + // BrModule + // + // BRAHMS Analysis Module Class + // + // Author : Flemming Videbaek + // Created: 27/12/97 + // Version: 1.0 + // + // some memberdata are defined using the nomenclature + // d_ to see how this will work out compared to the + // ROOT default of f + // + /////////////////////////////////////////////////////////// + + // ROOT classes + #ifndef ROOT_TNamed + #include "TNamed.h" + #endif + + #ifndef ROOT_TList + #include "TList.h" + #endif + + #ifndef ROOT_TStopwatch + #include "TStopwatch.h" + #endif + + // System and ROOT include files + // + + // BRAHMS classes + // + + class BrEventNode; + class BrModule : public TNamed { + + public: + + BrModule(); + BrModule(Char_t *name, Char_t *title); + virtual ~BrModule(); + + virtual void Init(){}; + virtual void Begin(){}; + virtual void Event(); + virtual void Event(BrEventNode* inev, BrEventNode *outev); + virtual void End(){}; + virtual void Info() const; + virtual void Book(); + void DisableHistograms(); + void EnableHistograms(); + Bool_t HistOn() const {return fHistOn;} + Bool_t HistBooked() const {return fHistBooked;} + void SetHistOn(){fHistOn=kTRUE;} + void SetHistOff(){fHistOn=kFALSE;} + void SetHistBooked(){fHistBooked=kTRUE;} + + // protected: + virtual void DefineHistograms(){}; + + // Required tables + virtual void AddRequiredTable(TObject *tablename) + {fRequiredTableList->Add(tablename);}; // Add a table to the list of + // Required tables + virtual TList* GetRequiredTableList() {return fRequiredTableList;} //Get the list of Required Tables + + //Statistics + virtual void EventStatisticsStart(); //To be called by asp + virtual void EventStatisticsEnd(); //To be called by asp + virtual void ListEventStatistics(); //To be called by asp + + //---- error handling + // + virtual void Warning(const char *method, const char *msgfmt, ...); + + TList *HistogramList() const {return d_HistogramList_p;} + void SetDebugLevel(const Int_t level){d_DebugLevel=level;} + void SetRequiredData(Char_t* name); + Int_t DebugLevel(){return d_DebugLevel;} //Debuglevel value + void SetVerbose(Int_t Verbose){d_Verbose = Verbose;}; + + private: + + Int_t d_DebugLevel; //Level for amount of debug information + // output during execution of the module entries + // The application programmer should use the + // member functions DebugLevel() for decision to + // output information + TList* d_HistogramList_p; //List of histograms associated with + //the module. Once added to this list they + //should be considerd owned by Module. + // + Int_t d_Verbose; //Option flag + TList* fRequiredTableList; + + //Statistics + + TStopwatch fTimer; + Double_t fCpuTime; + Int_t fEventCalled; // Counter times Event is called. + Int_t fWarningCount; // Counter for Warning Output + Int_t fErrorCount; // Counter for Error Output + Int_t fWarningLimit; // Limit for Warning Count + Int_t fErrorLimit; // Limit for Error Count + protected: + Bool_t fHistOn; // Histogramming enabled + Bool_t fHistBooked; // Histogrammed Booked + + public: + + ClassDef(BrModule,1) // BRAHMS Module definitions + }; + + #endif + + diff -c -r -N VER-1-2/include/BrModuleContainer.h VER-1-2-1/include/BrModuleContainer.h *** VER-1-2/include/BrModuleContainer.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrModuleContainer.h Fri Nov 5 18:26:04 1999 *************** *** 0 **** --- 1,101 ---- + #ifndef BRAT_BrModuleContainer + #define BRAT_BrModuleContainer + // $Id: BrModuleContainer.h,v 1.7 1999/04/09 19:36:26 videbaek Exp $ + // + // $Log: BrModuleContainer.h,v $ + // Revision 1.7 1999/04/09 19:36:26 videbaek + // Clean up code; add ListStatistics to container class + // + // Revision 1.6 1999/01/21 23:23:20 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.5 1999/01/15 15:32:14 videbaek + // Updates to volume files. + // Added member histon to BrModule, and member function HistOn(). + // Added BrMath as standard math library. + // + // Revision 1.4 1998/12/21 20:17:59 videbaek + // Added magnet voluems. Additional features for Modules. + // + // Revision 1.3 1998/08/26 16:47:31 hagel + // Added Documentation for HTML facility + // + // Revision 1.2 1998/04/06 21:11:49 videbaek + // Clean up and additions for Win95 + // + // + /////////////////////////////////////////////////////////// + // + // BRModuleContainer + // + // BRAHMS Container Class for Analysis Modules + // + // A standard Physics analysis Module should be derived from + // this base class. This ensure that the general framework + // is capable of accessing these in a common and general way. + // The methods (member functions) consists of a general set for + // all modules; but the user if free to add specific ones for + // specific needs. Ideas for this has been taken from both the + // PHOBOS tool set as well as from the BABAR framework. The initial version + // is derived from the ROOT base classes, + // + // Author : Flemming Videbaek + // Created: 27/12/97 + // Version: 1.0 + // + /////////////////////////////////////////////////////////// + + // ROOT classes + #if !defined ROOT_TNamed + # include "TNamed.h" + #endif + + #if !defined ROOT_TObjArray + # include "TObjArray.h" + #endif + + // System and ROOT include files + // + #include + + // BRAHMS classes + // + class BrModule; + class BrEventNode; + + + class BrModuleContainer : public TNamed { + + private: + TObjArray* fModuleList ; // List of Analysis Modules + Int_t fVerbose; // Option flag + public: + // constructors & descructors + BrModuleContainer(); + BrModuleContainer(Char_t *name, Char_t *title); + ~BrModuleContainer(); + + virtual void SetVerbose(Int_t Verbose); + virtual Int_t AddModule(BrModule* Module); + virtual void ListModules(); + virtual void Begin(){}; + virtual void Event(BrEventNode* indat, BrEventNode* outdat=0); + virtual void Event(); + virtual void Book(); + virtual void Init(); + virtual void End(){}; + virtual void ListEventStatistics(); + + ClassDef(BrModuleContainer,1) //BRAHMS Analysis Module Container + }; + + + #endif + + diff -c -r -N VER-1-2/include/BrModuleMatchTrack.h VER-1-2-1/include/BrModuleMatchTrack.h *** VER-1-2/include/BrModuleMatchTrack.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrModuleMatchTrack.h Fri Nov 5 18:26:09 1999 *************** *** 0 **** --- 1,154 ---- + #ifndef BRAT_BrModuleMatchTrack + #define BRAT_BrModuleMatchTrack + + // $Id: BrModuleMatchTrack.h,v 1.6 1999/09/08 13:43:18 videbaek Exp $ + // + // $Log: BrModuleMatchTrack.h,v $ + // Revision 1.6 1999/09/08 13:43:18 videbaek + // Include exlicit reference to TH1.h otherwise + // rootcint fails because there is no other ref to the TH1F class in + // the generated streamer method. + // + // Revision 1.5 1999/04/22 17:24:41 videbaek + // Change include guards. Add Clear method + // + // Revision 1.4 1999/01/21 23:23:27 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 didnt 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.3 1999/01/15 16:37:03 videbaek + // Working version of MRS tracking of mtp1,mtp2 and new general track + // classes. Changes also added to BrModuleMatchTrack for this reason. + // + // Revision 1.2 1998/12/21 20:23:12 videbaek + // Included MRS tracking, and track combine module as part of a more + // generalized set of Methods and classes. + // + // + /////////////////////////////////////////////////////////////////////// + // // + // BrModuleMatchTrack // + // // + // BRAHMS Track Match Class // + // // + // Author : F.Videbaek (videbaek@bnl.gov) // + // Created : 23/Sep/1998 // + // Version : 1.0 // + // Changed : November 98. + // Modified naming using vector classes. // + // // + /////////////////////////////////////////////////////////////////////// + + //ROOT Classes + + + //Brat Classes + // + #if !defined BRAT_BrModule + # include "BrModule.h" + #endif + + #if !defined BRAT_BrClonesArray + # include "BrClonesArray.h" + #endif + + #if !defined BRAT_BrSpectrometerTracks + # include "BrSpectrometerTracks.h" + #endif + + #if !defined ROOT_TH1 + #include "TH1.h" + #endif + class BrGeometryDbManager; + class BrDetectorVolume; + class BrMagnetVolume; + class BrDetectorTrack; + + class BrModuleMatchTrack : public BrModule { + + public: + BrModuleMatchTrack(); + BrModuleMatchTrack(Char_t *Name,Char_t *Title); + BrModuleMatchTrack(Char_t *Name,Char_t *title, + Char_t *tfront, Char_t *tback , Char_t *magnet); + + virtual ~BrModuleMatchTrack(); + + void Event(BrEventNode* InputEventNode, BrEventNode* OutputEventNode); + void CombineFrontBack(BrEventNode* InputEventNode); + + void Clear(); + BrClonesArray * GetMatchedTracks() const {return fTracksFrontBack;} + + void ListMatchingParameters(); + + BrDetectorVolume* GetFrontVolume() {return fFrontVolume;} + BrDetectorVolume* GetBackVolume() {return fBackVolume;} + BrMagnetVolume* GetMagnetVolume() {return fMagnetVolume;} + + Double_t GetMatchDang(){return fMatchDang;} + Double_t GetMatchDaly(){return fMatchDaly;} + Double_t GetMatchDy() {return fMatchDy;} + + void SetMatchDang(Double_t value){fMatchDang=value;} + void SetMatchDaly(Double_t value){fMatchDaly=value;} + void SetMatchDy(Double_t value) {fMatchDy=value;} + void SetFiducialCutDx(Double_t value){fFiducialCutdx=value;} + void SetFiducialCutDy(Double_t value){fFiducialCutdy=value;} + + void SetDefaultParameters(); + void DefineHistograms(); + + private: + + BrGeometryDbManager* fGeomDb; //! Database descriptor + + BrDetectorVolume *fFrontVolume; // Volume Descriptor for Front Tracking Chamber + BrDetectorVolume *fBackVolume; // Volume Descriptor for Back Tracking Chamber + BrMagnetVolume *fMagnetVolume; // Volume Descriptor for Magnet + + Double_t fMatchDang; // Effective edge matching angle cut + Double_t fMatchDaly; // Effective edge matching cosine alpha y cut + Double_t fMatchDy; // Effective edge matching vertia cut + Double_t fFiducialCutdx; // Fiducal volume cut X (from edge of magnet at entrance/exit) + Double_t fFiducialCutdy; // Fiducal volume cut Y + + void CreateClonesArrays(); + void ClearClonesArrays(); + + BrClonesArray *fTracksFrontBack; // Results of track matching + + // + // Histograms + // + TH1F* hFrontTracks; + TH1F* hBackTracks; + TH1F* hMatchDyAll; + TH1F* hMatchDxAll; + TH1F* hMatchDalyAll; + TH1F* hMatchDangAll; + TH1F* hMatchDyAcpt; + TH1F* hMatchDxAcpt; + TH1F* hMatchDangAcpt; + TH1F* hMatchDalyAcpt; + // + // Field Parameters + // + Float_t fMagnetField; + // + // Simulations parameter access + // + Bool_t fFieldParametersRead; + + public: + + ClassDef(BrModuleMatchTrack,1) // BRAHMS Track Matching Class + + }; + + #endif diff -c -r -N VER-1-2/include/BrMonitorBB.h VER-1-2-1/include/BrMonitorBB.h *** VER-1-2/include/BrMonitorBB.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrMonitorBB.h Fri Nov 5 18:26:21 1999 *************** *** 0 **** --- 1,87 ---- + #ifndef BRAT_BrMonitorBB + #define BRAT_BrMonitorBB + // $Id: BrMonitorBB.h,v 1.1 1999/07/29 00:02:16 hagel Exp $ + // + // $Log: BrMonitorBB.h,v $ + // Revision 1.1 1999/07/29 00:02:16 hagel + // Initial revision + // + // + // + /////////////////////////////////////////////////////////////////////// + // // + // BrMonitorBB // + // // + // BRAHMS BB Monitor // + // // + // Manages information and operations related to the // + // monitoring the BB counters online // + // // + // copyright (C) BRAHMS exp. RHIC/BNL // + // Use of this software is granted for non-commerical application // + // upon addition of this note in all source code. // + // // + // Author : K. Hagel // + // Created : 6/19/99 // + // Version : 1.0 // + // Changed : // + // // + /////////////////////////////////////////////////////////////////////// + + // ROOT Classes + // + + #ifndef BRAT_BrBaseMonitor + #include "BrBaseMonitor.h" + #endif + + const Int_t kNumLeftTubes = 44; + const Int_t kNumRightTubes = 44; + + class BrMonitorBB : public BrBaseMonitor { + + public: + // constructors and destructors + // + BrMonitorBB(); + BrMonitorBB(Text_t *Name, Char_t *Title); + BrMonitorBB(Text_t *Name, Char_t *Title,Char_t *filename, Char_t *options="") + :BrBaseMonitor(Name,Title,filename,options) {Init();} + + virtual ~BrMonitorBB(); + // + // Methods + // + virtual void Init(); + virtual void Event(BrEventNode* InputTable); + + virtual void SetLeftAdcThreshold(Int_t itube,Int_t thresh) + {fLeftAdcThreshold[itube] = thresh;} + virtual void SetRightAdcThreshold(Int_t itube,Int_t thresh) + {fRightAdcThreshold[itube] = thresh;} + + virtual void Info() const; + + private: + + TH1F *fLeftAdc[kNumLeftTubes]; //! ADC tile histograms + TH1F *fLeftTdc[kNumRightTubes]; //! TDC tile histograms + TH1F *fRightAdc[kNumRightTubes]; //! ADC si histograms + TH1F *fRightTdc[kNumRightTubes]; //! TDC si histograms + TH1F *fLeftMultiplicity; //! Histogram of hits + TH1F *fRightMultiplicity; //! Histogram of hits + TH1F *fLeftTubeNo; //! Histogram of tube dist + TH1F *fRightTubeNo; //! Histogram of tube dist + + Int_t fLeftAdcThreshold[kNumLeftTubes]; //! Threshold for tile mult + Int_t fRightAdcThreshold[kNumRightTubes]; //! Threshold for tile mult + + // TDirectory *fHistogramDir; //! histogram directory + public: + + ClassDef(BrMonitorBB,1) // BRAHMS Beam Beam digitization routine + + }; + + #endif + diff -c -r -N VER-1-2/include/BrMonitorC1.h VER-1-2-1/include/BrMonitorC1.h *** VER-1-2/include/BrMonitorC1.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrMonitorC1.h Fri Nov 5 18:26:34 1999 *************** *** 0 **** --- 1,83 ---- + #ifndef BRAT_BrMonitorC1 + #define BRAT_BrMonitorC1 + // $Id: BrMonitorC1.h,v 1.1 1999/06/22 00:06:38 hagel Exp $ + // + // $Log: BrMonitorC1.h,v $ + // Revision 1.1 1999/06/22 00:06:38 hagel + // Initial revision of C1 structures and monitoring code + // + // Revision 1.1 1999/06/20 22:38:50 hagel + // Implemented BrMonitorC1 + // + // Revision 1.1 1999/06/19 22:22:39 hagel + // Initial trial of online monitor + // + // + /////////////////////////////////////////////////////////////////////// + // // + // BrMonitorC1 // + // // + // BRAHMS C1 Online Monitor // + // // + // Manages information and operations related to the // + // monitoring the c1 detector online // + // // + // copyright (C) BRAHMS exp. RHIC/BNL // + // Use of this software is granted for non-commerical application // + // upon addition of this note in all source code. // + // // + // Author : K. Hagel // + // Created : 6/19/99 // + // Version : 1.0 // + // Changed : // + // // + /////////////////////////////////////////////////////////////////////// + + // ROOT Classes + // + + #ifndef ROOT_TH2 + #include "TH2.h" + #endif + + // BRAT Classes + + #ifndef BRAT_BrBaseMonitor + #include "BrBaseMonitor.h" + #endif + + #ifndef BRAT_BrDigC1 + #include "BrDigC1.h" + #endif + + class BrMonitorC1 : public BrBaseMonitor { + + public: + // constructors and destructors + // + BrMonitorC1(); + BrMonitorC1(Text_t *Name, Char_t *Title); + BrMonitorC1(Text_t *Name, Char_t *Title,Char_t *filename, Char_t *options) + :BrBaseMonitor(Name,Title,filename,options){Init();} + virtual ~BrMonitorC1(); + // + // Methods + // + virtual void Init(); + virtual void Event(BrEventNode* InputTable); + virtual void Draw(const Char_t *canvas=""); + + virtual void Info() const; + + private: + TH1F *fAdc[kNumC1Chan]; //! ADC histograms + TH2F *fAdcVTube; //! ADC vs tube histogram; + + public: + + ClassDef(BrMonitorC1,1) // BRAHMS C1 Monitor routine + + }; + + #endif + diff -c -r -N VER-1-2/include/BrMonitorMult.h VER-1-2-1/include/BrMonitorMult.h *** VER-1-2/include/BrMonitorMult.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrMonitorMult.h Fri Nov 5 18:26:33 1999 *************** *** 0 **** --- 1,114 ---- + #ifndef BRAT_BrMonitorMult + #define BRAT_BrMonitorMult + // $Id: BrMonitorMult.h,v 1.5 1999/07/29 00:03:58 hagel Exp $ + // + // $Log: BrMonitorMult.h,v $ + // Revision 1.5 1999/07/29 00:03:58 hagel + // Miscelaneous improvements mostly with monitoring + // + // Revision 1.4 1999/07/27 22:41:08 hagel + // Added ylog capability to BrMonitorPicture + // + // Revision 1.3 1999/06/22 00:07:39 hagel + // Streamline monitor code with base class + // + // Revision 1.2 1999/06/20 22:43:29 hagel + // Made to inherit from BrBaseMonitor + // + // Revision 1.1 1999/06/19 22:22:39 hagel + // Initial trial of online monitor + // + // + /////////////////////////////////////////////////////////////////////// + // // + // BrMonitorMult // + // // + // BRAHMS Mult Monitor // + // // + // Manages information and operations related to the // + // monitoring the mult array online // + // // + // copyright (C) BRAHMS exp. RHIC/BNL // + // Use of this software is granted for non-commerical application // + // upon addition of this note in all source code. // + // // + // Author : K. Hagel // + // Created : 6/19/99 // + // Version : 1.0 // + // Changed : // + // // + /////////////////////////////////////////////////////////////////////// + + // ROOT Classes + // + /* + #ifndef ROOT_TCanvas + #include "TCanvas.h" + #endif + + #ifndef ROOT_TH1 + #include "TH1.h" + #endif + + #ifndef ROOT_TDirectory + #include "TDirectory.h" + #endif + + // Brat Classes + + class BrEventNode; + class BrDetectorVolume; + + #ifndef BRAT_BrModule + # include "BrModule.h" + #endif + */ + + #ifndef BRAT_BrBaseMonitor + #include "BrBaseMonitor.h" + #endif + + const Int_t kNumMultTiles = 40; + const Int_t kNumMultSi = 40; + + class BrMonitorMult : public BrBaseMonitor { + + public: + // constructors and destructors + // + BrMonitorMult(); + BrMonitorMult(Text_t *Name, Char_t *Title); + BrMonitorMult(Text_t *Name, Char_t *Title,Char_t *filename, Char_t *options="") + :BrBaseMonitor(Name,Title,filename,options) {Init();} + + virtual ~BrMonitorMult(); + // + // Methods + // + virtual void Init(); + virtual void Event(BrEventNode* InputTable); + virtual void Draw(const Char_t *canvas=""); + + virtual void SetTileThreshold(Int_t itile,Int_t thresh) + {fTileThreshold[itile] = thresh;} + + virtual void Info() const; + + private: + TH1F *fAdcTile[kNumMultTiles]; //! ADC tile histograms + TH1F *fTdcTile[kNumMultTiles]; //! TDC tile histograms + TH1F *fAdcSi[kNumMultSi]; //! ADC si histograms + TH1F *fTdcSi[kNumMultSi]; //! TDC si histograms + TH1F *fMultiplicity; //! Histogram of hits + + Int_t fTileThreshold[kNumMultTiles]; //! Threshold for tile mult + + // TDirectory *fHistogramDir; //! histogram directory + public: + + ClassDef(BrMonitorMult,1) // BRAHMS Beam Beam digitization routine + + }; + + #endif + diff -c -r -N VER-1-2/include/BrMonitorPicture.h VER-1-2-1/include/BrMonitorPicture.h *** VER-1-2/include/BrMonitorPicture.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrMonitorPicture.h Fri Nov 5 18:26:04 1999 *************** *** 0 **** --- 1,137 ---- + #ifndef BRAT_BrMonitorPicture + #define BRAT_BrMonitorPicture + // $Id: BrMonitorPicture.h,v 1.5 1999/09/17 15:02:29 hagel Exp $ + // + // $Log: BrMonitorPicture.h,v $ + // Revision 1.5 1999/09/17 15:02:29 hagel + // Change Name and Title to const char in constructor + // + // Revision 1.4 1999/07/30 23:29:59 hagel + // Enhancements to BrMonitor + // + // Revision 1.3 1999/07/28 14:59:04 hagel + // Added functionality to BrBaseMonitor + // + // Revision 1.2 1999/07/27 22:41:07 hagel + // Added ylog capability to BrMonitorPicture + // + // Revision 1.1 1999/07/23 02:41:54 hagel + // Initial revision + // + // Revision 1.2 1999/06/22 00:08:30 hagel + // Implement Analysis into BrMonitorPicture + // + // Revision 1.1 1999/06/20 22:40:33 hagel + // Implemented BrMonitorPicture + // + // + /////////////////////////////////////////////////////////////////////// + // // + // BrMonitorPicture // + // // + // BRAHMS Base Monitor // + // // + // This is a base class for Online (or offline perhaps) monitor // + // objects. It contains some useful information for anyone // + // wishig to build a class to monitor their detector. // + // // + // copyright (C) BRAHMS exp. RHIC/BNL // + // Use of this software is granted for non-commerical application // + // upon addition of this note in all source code. // + // // + // Author : K. Hagel // + // Created : 6/19/99 // + // Version : 1.0 // + // Changed : // + // // + /////////////////////////////////////////////////////////////////////// + + // ROOT Classes + // + #ifndef ROOT_TNamed + #include "TNamed.h" + #endif + + #ifndef ROOT_TObjArray + #include "TObjArray.h" + #endif + + #ifndef ROOT_TH1 + #include "TH1.h" + #endif + + // Brat Classes + + + + class BrMonitorPicture : public TNamed { + + public: + // constructors and destructors + // + BrMonitorPicture(); + BrMonitorPicture(const Text_t *Name, const Char_t *Title,const Int_t numhist); + virtual ~BrMonitorPicture(); + + enum NumberOfRows { + kMaxNumPictRows = 10, + kMaxNumHistograms = 100 + }; + // + // Methods + // + virtual void Init(); + virtual const TH1 *GetHistogramAt(const Int_t i); + virtual void AddHistogram(TH1 *hist); + virtual void AddHistogram(TH1 *hist,Option_t *opt); + virtual const Int_t GetNumHistograms(); + virtual const Int_t GetNumberOfRows() {return fNumRows;} + virtual const Int_t GetNumberOfColumns(const Int_t i) + {if(i > 0 && i <= fNumRows) return fNumColumns[i-1]; else return 0;} + virtual void DefinePictureSetup(const Int_t irow,const Int_t col1=0, + const Int_t col2=0,const Int_t col3=0,const Int_t col4=0, + const Int_t col5=0,const Int_t col6=0,const Int_t col7=0, + const Int_t col8=0,const Int_t col9=0,const Int_t col10=0); + + virtual void SetDefaults(Int_t ihist_entry); + virtual void Draw(const Option_t *opt=""); + virtual void Reset(const Option_t *opt=""); + + virtual void SetLogx(Int_t ihist,Bool_t mode) {fLogx[ihist] = mode;} + virtual void SetLogy(Int_t ihist,Bool_t mode) {fLogy[ihist] = mode;} + virtual void SetXmin(Int_t ihist,Float_t x) {fXmin[ihist] = x;} + virtual void SetXmax(Int_t ihist,Float_t x) {fXmax[ihist] = x;} + virtual void SetYmin(Int_t ihist,Float_t y) {fYmin[ihist] = y;} + virtual void SetYmax(Int_t ihist,Float_t y) {fYmax[ihist] = y;} + + virtual Float_t GetXmin(const Int_t ihist) {return fXmin[ihist];} + virtual Float_t GetXmax(const Int_t ihist) {return fXmax[ihist];} + virtual Float_t GetYmin(const Int_t ihist) {return fYmin[ihist];} + virtual Float_t GetYmax(const Int_t ihist) {return fYmax[ihist];} + virtual Bool_t GetLogx(const Int_t ihist) {return fLogx[ihist];} + virtual Bool_t GetLogy(const Int_t ihist) {return fLogy[ihist];} + + protected: + + private: + TObjArray *fHistogramList; //List of histograms in picture + Int_t fMaxNumHistograms; //Maximum number of hists in picture + Int_t fNumRows; //Number of rows for plotting + Int_t fNumColumns[kMaxNumPictRows]; //Number of columns in each row + Bool_t fLogx[kMaxNumHistograms]; + Bool_t fLogy[kMaxNumHistograms]; + Float_t fXmin[kMaxNumHistograms]; + Float_t fXmax[kMaxNumHistograms]; + Float_t fYmin[kMaxNumHistograms]; + Float_t fYmax[kMaxNumHistograms]; + + + public: + // + + ClassDef(BrMonitorPicture,1) // BRAHMS Picture routine + + }; + + #endif + diff -c -r -N VER-1-2/include/BrMonitorTof.h VER-1-2-1/include/BrMonitorTof.h *** VER-1-2/include/BrMonitorTof.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrMonitorTof.h Fri Nov 5 18:26:13 1999 *************** *** 0 **** --- 1,86 ---- + #ifndef BRAT_BrMonitorTof + #define BRAT_BrMonitorTof + // $Id: BrMonitorTof.h,v 1.2 1999/08/16 02:08:18 jhlee Exp $ + // + // $Log: BrMonitorTof.h,v $ + // Revision 1.2 1999/08/16 02:08:18 jhlee + // Delete Draw to use BrBaseMonitor::Draw instead + // + // Revision 1.1 1999/07/03 21:04:35 hagel + // Initial revision + // + // + /////////////////////////////////////////////////////////////////////// + // // + // BrMonitorTof // + // // + // BRAHMS C1 Online Monitor // + // // + // Manages information and operations related to the // + // monitoring the c1 detector online // + // // + // copyright (C) BRAHMS exp. RHIC/BNL // + // Use of this software is granted for non-commerical application // + // upon addition of this note in all source code. // + // // + // Author : K. Hagel // + // Created : 6/19/99 // + // Version : 1.0 // + // Changed : // + // // + /////////////////////////////////////////////////////////////////////// + + // ROOT Classes + // + + #ifndef ROOT_TH2 + #include "TH2.h" + #endif + + // BRAT Classes + + #ifndef BRAT_BrBaseMonitor + #include "BrBaseMonitor.h" + #endif + + class BrMonitorTof : public BrBaseMonitor { + + public: + // constructors and destructors + // + BrMonitorTof(); + BrMonitorTof(Text_t *Name, Char_t *Title); + BrMonitorTof(Text_t *Name, Char_t *Title,Char_t *filename, Char_t *options) + :BrBaseMonitor(Name,Title,filename,options){Init();} + virtual ~BrMonitorTof(); + // + // Methods + // + virtual void Init(); + virtual void Event(BrEventNode* InputTable); + + virtual void Info() const; + + private: + TH1F *fH1AdcDown[40]; //! ADC histograms for H1 Down + TH1F *fH2AdcDown[40]; //! ADC histograms for H2 Down + TH1F *fH1TdcDown[40]; //! ADC histograms for H1 Down + TH1F *fH2TdcDown[40]; //! ADC histograms for H2 Down + TH1F *fH1AdcUp[40]; //! ADC histograms for H1 Up + TH1F *fH2AdcUp[40]; //! ADC histograms for H2 Up + TH1F *fH1TdcUp[40]; //! ADC histograms for H1 Up + TH1F *fH2TdcUp[40]; //! ADC histograms for H2 Up + + TH1F *fH1SlatDist; + TH1F *fH2SlatDist; + TH1F *fH1MultDist; + TH1F *fH2MultDist; + + public: + + ClassDef(BrMonitorTof,1) // BRAHMS C1 Monitor routine + + }; + + #endif + diff -c -r -N VER-1-2/include/BrMonitorZDC.h VER-1-2-1/include/BrMonitorZDC.h *** VER-1-2/include/BrMonitorZDC.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrMonitorZDC.h Fri Nov 5 18:26:31 1999 *************** *** 0 **** --- 1,81 ---- + #ifndef BRAT_BrMonitorZDC + #define BRAT_BrMonitorZDC + // $Id: BrMonitorZDC.h,v 1.2 1999/06/22 00:07:25 hagel Exp $ + // + // $Log: BrMonitorZDC.h,v $ + // Revision 1.2 1999/06/22 00:07:25 hagel + // Streamline monitor code with base class + // + // Revision 1.1 1999/06/20 22:38:50 hagel + // Implemented BrMonitorZDC + // + // Revision 1.1 1999/06/19 22:22:39 hagel + // Initial trial of online monitor + // + // + /////////////////////////////////////////////////////////////////////// + // // + // BrMonitorZDC // + // // + // BRAHMS ZDC Online Monitor // + // // + // Manages information and operations related to the // + // monitoring the zdc detectors online // + // // + // copyright (C) BRAHMS exp. RHIC/BNL // + // Use of this software is granted for non-commerical application // + // upon addition of this note in all source code. // + // // + // Author : K. Hagel // + // Created : 6/19/99 // + // Version : 1.0 // + // Changed : // + // // + /////////////////////////////////////////////////////////////////////// + + // ROOT Classes + // + + #ifndef BRAT_BrBaseMonitor + #include "BrBaseMonitor.h" + #endif + + #ifndef BRAT_BrDigZDC + #include "BrDigZDC.h" + #endif + + class BrMonitorZDC : public BrBaseMonitor { + + public: + // constructors and destructors + // + BrMonitorZDC(); + BrMonitorZDC(Text_t *Name, Char_t *Title); + BrMonitorZDC(Text_t *Name, Char_t *Title,Char_t *filename, Char_t *options) + :BrBaseMonitor(Name,Title,filename,options){Init();} + virtual ~BrMonitorZDC(); + // + // Methods + // + virtual void Init(); + virtual void Event(BrEventNode* InputTable); + virtual void Draw(const Char_t *canvas=""); + + virtual void Info() const; + + private: + TH1F *fLeftAdc[kNumZDCChan]; //! Left ADC histograms + TH1F *fLeftTdc[kNumZDCChan]; //! Left TDC histograms + TH1F *fRightAdc[kNumZDCChan]; //! Right ADC histograms + TH1F *fRightTdc[kNumZDCChan]; //! Right TDC histograms + TH1F *fLeftAdcSum; //! Left Sum Adc histogram + TH1F *fRightAdcSum; //! Right Sum Adc histogram + + public: + + ClassDef(BrMonitorZDC,1) // BRAHMS ZDC Monitor routine + + }; + + #endif + diff -c -r -N VER-1-2/include/BrMult_LinkDef.h VER-1-2-1/include/BrMult_LinkDef.h *** VER-1-2/include/BrMult_LinkDef.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrMult_LinkDef.h Fri Nov 5 18:26:33 1999 *************** *** 0 **** --- 1,19 ---- + // $Id: BrMult_LinkDef.h,v 1.1 1999/06/19 22:22:49 hagel Exp $ + // + // $Log: BrMult_LinkDef.h,v $ + // Revision 1.1 1999/06/19 22:22:49 hagel + // Initial Revision + // + // + // + #ifdef __CINT__ + + #pragma link off all globals; + #pragma link off all classes; + #pragma link off all functions; + + #pragma link C++ class BrDigMultTile; + #pragma link C++ class BrDigMultSi; + #pragma link C++ class BrMonitorMult; + + #endif diff -c -r -N VER-1-2/include/BrParameterDbManager.h VER-1-2-1/include/BrParameterDbManager.h *** VER-1-2/include/BrParameterDbManager.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrParameterDbManager.h Fri Nov 5 18:26:07 1999 *************** *** 0 **** --- 1,150 ---- + #ifndef BRAT_BrParameterDbManager + #define BRAT_BrParameterDbManager + // + // $Id: BrParameterDbManager.h,v 1.4 1999/03/07 00:00:43 hagel Exp $ + // + // $Log: BrParameterDbManager.h,v $ + // Revision 1.4 1999/03/07 00:00:43 hagel + // 1. Implemented BrFSTrackingModule. Started with BrMRSTrackingModule and made + // appropriate changes to handle the forward spectrometer. It uses the new + // track classes as well as extensively using geometry classes. It also uses + // new methods and functionality as described below. + // 2. Changed BrMagnetVolume + // a. Added method SwimBack(BrLine3D &,Double_t momentum): takes a + // track at the exit of magnet and given the momentum, calculates + // where the track would come into the front of the magnet. + // b. Added method GlobalToLocal(BrLine3D &): does a combination of + // GlobalToLocal(BrVector3D &,BrVector3D&,0) and + // GlobalToLocal(BrVector3D &,BrVector3D&,1) + // c. Added method LocalToGlobal(BrLine3D &): does a combination of + // LocalToGlobal(BrVector3D &,BrVector3D&,0) and + // LocalToGlobal(BrVector3D &,BrVector3D&,1) + // d. Changed BrDetectorVolume: same additions of methods GlobalToLocal + // and LocalToGlobal as in BrMagnetVolume + // 2. Added a parameter base class BrDetectorParamsBase: helps when reading + // in database files. Declared ASCII reading routines to be virtual. + // Has main ReadASCIIFile which decodes the ASCII parameter files, then + // calls the detector specific methods SetASCIIParameter + // 3. Implemented SetASCIIParameter in BrDetectorParamsDC, BrDetectorParamsTPC, + // BrDetectorParamsTof, BrDetectorParamsBB + // 4. Implemented BrParameterDbManager. It currently works similarly to + // BrGeometryDbManager and creates the BrDetectorParamsXXX objects when + // called. These objects then read in ASCII parameter files with a currently + // "well defined" format using the above implemented routines using a constructor: + // BrDetectorParamsXXX(Char_t *name, Char_t *title,Char_t *ASCIIFileName); + // 5. If no parameter file is specified, it executes the constructor we + // have been using so far, namely BrDetectorParamsXXX(Char_t *name,Char_t *title). + // These constructors generate default parameters and are semi-intelligent + // which means they generate approximately appropriate parameters depending + // upon which detector they are. I should say that the parameters were + // deemed appropriate at the time of writing the SetDefaultParams routine. + // a. It is used in the same way as BrGeometryDbManager, that is: + // BrParameterDbManager *gParamDb = BrParameterDbManager::Instance(); + // gParamDb->SetDbParameterFileName("DetectorParameters.txt"); + // 6. Added a new directory, params, in BRAT. This directory has the file + // DetectorParameters.txt in it. If the BrParameterDbManager is started + // and the DetectorParameter.txt file is specified, it will look in the + // $BRATSYS/params directory if it cannot find the file in the directory + // that the user has set default to. + // 7. Implemented BrParameterDbManager in DC digitize and tracking code. The + // SetDetectorParams methods have been moved to private and can no longer be + // used from the macro or program. + // 8. Implemented BrParameterDbManager in TPC digitize and tracking code. + // 9. Implemented BrParameterDbManager in Tof Calibrate and GeneratePid code. + // 10 Changed the GetEntries() in BrDataTable to use the GetLast()+1 method in + // TObjArray. This should be much faster, but has the caveat that it assumes + // that all slots in TObjArray are full. That seems to me to be the case + // in how we use TObjArray at least in BrDataTable, but if problems arise due + // to this change, it can always be easily changed back. It has been used a + // fair amount before checking in and no problems were found. + // + // Modified Files: + // base/inc/BrBase_LinkDef.h base/inc/BrDataTable.h + // base/inc/BrDetectorVolume.h base/inc/BrMagnetVolume.h + // base/inc/LinkDefBratBaseINC.h base/src/BrDataTable.cxx + // base/src/BrDetectorVolume.cxx base/src/BrEventNode.cxx + // base/src/BrMagnetVolume.cxx base/src/BrTableManager.cxx + // base/src/Makefile bb/inc/BrDetectorParamsBB.h + // bb/src/BrDetectorParamsBB.cxx db/inc/BrParameterDbManager.h + // db/src/BrParameterDbManager.cxx dc/inc/BrDetectorParamsDC.h + // dc/src/BrDetectorDC.cxx dc/src/BrDetectorParamsDC.cxx + // dc/src/BrDigitizeDC.cxx dc/src/BrLocalTrackDC.cxx + // geometry/inc/BrPlane3D.h geometry/src/BrPlane3D.cxx + // params/DetectorParameters.txt tof/inc/BrDetectorParamsTof.h + // tof/src/BrDetectorParamsTof.cxx tof/src/BrGeneratePid.cxx + // tpc/inc/BrDetectorParamsTPC.h tpc/src/BrDetectorParamsTPC.cxx + // tpc/src/BrDetectorTPC.cxx tpc/src/BrDigitizeTPC.cxx + // tpc/src/BrLocalTrackTPC.cxx track/inc/BrDetectorTrack.h + // track/inc/BrFSTrackingModule.h + // track/inc/BrSpectrometerTracks.h track/src/BrDetectorTrack.cxx + // track/src/BrFSTrackingModule.cxx + // track/src/BrSpectrometerTracks.cxx + // + // Revision 1.3 1999/02/24 15:21:22 hagel + // Enforce const in arguments + // + // Revision 1.2 1999/02/17 21:26:01 hagel + // Removed cyclic dependencies from BrParameterDbManager. Now all references are + // indirect using ROOT infrastructure to get at the classes. If this works, it is + // general and should be considered for the other DbManager classes. Or perhaps + // in a base DbManager class. + // + // Revision 1.1 1999/02/04 20:43:31 hagel + // Initial revision + // See cvs log notes in BrParameterDbManager.cxx for more information + // + // + // + // Root Classes + #ifndef ROOT_TObject + #include "TObject.h" + #endif + + #ifndef ROOT_TObjArray + #include "TObjArray.h" + #endif + + + // BRAHMS Classes + + class BrDbObject; + + class BrParameterDbManager : public TObject { + + enum DbStatus_t { + INIT, OPEN, DEFAULT_PARAMETER_SET + }; + public: + + static BrParameterDbManager* Instance(); + + // Root is not happy with the protected for the constructor. + // i.e. one cannot invoke the TBrowser. The destructor also + // has be public otherwise CINT complains. + protected: + BrParameterDbManager(); + public: + ~BrParameterDbManager(); + public: + void SetDbParameterFileName(Char_t* filename); + void SetDebugLevel(Int_t level){fDebugLevel=level;} + Bool_t Open(Char_t *filename); + void SetOptionDefaultParameters() {fState = DEFAULT_PARAMETER_SET;} + TObject* BrParameterDbManager::GetDetectorParameters(const Char_t* classname, const Char_t* detector); + void List(); + + private: + BrDbObject* GetDbObject(const Char_t* classname, const Char_t* detector); + + TObjArray* fObjectlist; // List + DbStatus_t fState; // State of file + Char_t fFileName[132]; // Filename for parameters (fileopen) + Int_t fDebugLevel; // Debug Level + static BrParameterDbManager* fInstance; + + ClassDef(BrParameterDbManager,0) // BRAHMS Parameter Database Manager object + }; + + + + #endif diff -c -r -N VER-1-2/include/BrPlane3D.h VER-1-2-1/include/BrPlane3D.h *** VER-1-2/include/BrPlane3D.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrPlane3D.h Fri Nov 5 18:25:58 1999 *************** *** 0 **** --- 1,198 ---- + #ifndef BRAT_BrPlane3D + #define BRAT_BrPlane3D + // $Id: BrPlane3D.h,v 1.7 1999/03/07 00:00:44 hagel Exp $ + // + // $Log: BrPlane3D.h,v $ + // Revision 1.7 1999/03/07 00:00:44 hagel + // 1. Implemented BrFSTrackingModule. Started with BrMRSTrackingModule and made + // appropriate changes to handle the forward spectrometer. It uses the new + // track classes as well as extensively using geometry classes. It also uses + // new methods and functionality as described below. + // 2. Changed BrMagnetVolume + // a. Added method SwimBack(BrLine3D &,Double_t momentum): takes a + // track at the exit of magnet and given the momentum, calculates + // where the track would come into the front of the magnet. + // b. Added method GlobalToLocal(BrLine3D &): does a combination of + // GlobalToLocal(BrVector3D &,BrVector3D&,0) and + // GlobalToLocal(BrVector3D &,BrVector3D&,1) + // c. Added method LocalToGlobal(BrLine3D &): does a combination of + // LocalToGlobal(BrVector3D &,BrVector3D&,0) and + // LocalToGlobal(BrVector3D &,BrVector3D&,1) + // d. Changed BrDetectorVolume: same additions of methods GlobalToLocal + // and LocalToGlobal as in BrMagnetVolume + // 2. Added a parameter base class BrDetectorParamsBase: helps when reading + // in database files. Declared ASCII reading routines to be virtual. + // Has main ReadASCIIFile which decodes the ASCII parameter files, then + // calls the detector specific methods SetASCIIParameter + // 3. Implemented SetASCIIParameter in BrDetectorParamsDC, BrDetectorParamsTPC, + // BrDetectorParamsTof, BrDetectorParamsBB + // 4. Implemented BrParameterDbManager. It currently works similarly to + // BrGeometryDbManager and creates the BrDetectorParamsXXX objects when + // called. These objects then read in ASCII parameter files with a currently + // "well defined" format using the above implemented routines using a constructor: + // BrDetectorParamsXXX(Char_t *name, Char_t *title,Char_t *ASCIIFileName); + // 5. If no parameter file is specified, it executes the constructor we + // have been using so far, namely BrDetectorParamsXXX(Char_t *name,Char_t *title). + // These constructors generate default parameters and are semi-intelligent + // which means they generate approximately appropriate parameters depending + // upon which detector they are. I should say that the parameters were + // deemed appropriate at the time of writing the SetDefaultParams routine. + // a. It is used in the same way as BrGeometryDbManager, that is: + // BrParameterDbManager *gParamDb = BrParameterDbManager::Instance(); + // gParamDb->SetDbParameterFileName("DetectorParameters.txt"); + // 6. Added a new directory, params, in BRAT. This directory has the file + // DetectorParameters.txt in it. If the BrParameterDbManager is started + // and the DetectorParameter.txt file is specified, it will look in the + // $BRATSYS/params directory if it cannot find the file in the directory + // that the user has set default to. + // 7. Implemented BrParameterDbManager in DC digitize and tracking code. The + // SetDetectorParams methods have been moved to private and can no longer be + // used from the macro or program. + // 8. Implemented BrParameterDbManager in TPC digitize and tracking code. + // 9. Implemented BrParameterDbManager in Tof Calibrate and GeneratePid code. + // 10 Changed the GetEntries() in BrDataTable to use the GetLast()+1 method in + // TObjArray. This should be much faster, but has the caveat that it assumes + // that all slots in TObjArray are full. That seems to me to be the case + // in how we use TObjArray at least in BrDataTable, but if problems arise due + // to this change, it can always be easily changed back. It has been used a + // fair amount before checking in and no problems were found. + // + // Modified Files: + // base/inc/BrBase_LinkDef.h base/inc/BrDataTable.h + // base/inc/BrDetectorVolume.h base/inc/BrMagnetVolume.h + // base/inc/LinkDefBratBaseINC.h base/src/BrDataTable.cxx + // base/src/BrDetectorVolume.cxx base/src/BrEventNode.cxx + // base/src/BrMagnetVolume.cxx base/src/BrTableManager.cxx + // base/src/Makefile bb/inc/BrDetectorParamsBB.h + // bb/src/BrDetectorParamsBB.cxx db/inc/BrParameterDbManager.h + // db/src/BrParameterDbManager.cxx dc/inc/BrDetectorParamsDC.h + // dc/src/BrDetectorDC.cxx dc/src/BrDetectorParamsDC.cxx + // dc/src/BrDigitizeDC.cxx dc/src/BrLocalTrackDC.cxx + // geometry/inc/BrPlane3D.h geometry/src/BrPlane3D.cxx + // params/DetectorParameters.txt tof/inc/BrDetectorParamsTof.h + // tof/src/BrDetectorParamsTof.cxx tof/src/BrGeneratePid.cxx + // tpc/inc/BrDetectorParamsTPC.h tpc/src/BrDetectorParamsTPC.cxx + // tpc/src/BrDetectorTPC.cxx tpc/src/BrDigitizeTPC.cxx + // tpc/src/BrLocalTrackTPC.cxx track/inc/BrDetectorTrack.h + // track/inc/BrFSTrackingModule.h + // track/inc/BrSpectrometerTracks.h track/src/BrDetectorTrack.cxx + // track/src/BrFSTrackingModule.cxx + // track/src/BrSpectrometerTracks.cxx + // + // Revision 1.6 1999/01/21 23:23:24 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.5 1998/12/18 19:37:14 hagel + // Implement UnitNormal + // + // Revision 1.4 1998/12/18 17:21:55 hagel + // Implement minimum distance from point to plane plus add comments + // + // Revision 1.3 1998/12/17 21:16:12 hagel + // Add CVS comments + // + ////////////////////////////////////////////////////////////////////////////// + // // + // BrPlane3D // + // // + // 3D Plane. Part of the Geometry classes Points, Vector, Lines, Planes. // + // // + // Author: K. Hagel // + // Created: December 1998 // + // // + // // + ////////////////////////////////////////////////////////////////////////////// + + // + // ROOT classes + // + #include + #ifndef ROOT_TObject + #include "TObject.h" + #endif + + class BrVector3D; + class BrLine3D; + + class BrPlane3D : public TObject { + + public: + + // constructors and destructors + // + BrPlane3D(const Double_t a=0.0, const Double_t b =0.0 , const Double_t c=0.0 , const Double_t d=0.0) : + fA(a), fB(b), fC(c), fD(d) {}; + + BrPlane3D(const BrVector3D &p1, const BrVector3D &p2, const BrVector3D &p3); + BrPlane3D(const Double_t x1, const Double_t y1, const Double_t z1, + const Double_t x2, const Double_t y2, const Double_t z2, + const Double_t x3, const Double_t y3, const Double_t z3 ); + + virtual ~BrPlane3D(){}; + + BrPlane3D(const BrPlane3D& plane) : + fA(plane.fA), fB(plane.fB), fC(plane.fC), fD(plane.fD) {}; + + BrPlane3D& operator = (const BrPlane3D&); + // + // general field operators + BrPlane3D& operator +=(const BrPlane3D&); + BrPlane3D& operator -=(const BrPlane3D&); + BrPlane3D operator - () const; + BrPlane3D operator + () const; + const Double_t& operator [] (size_t) const; + Double_t& operator [] (size_t); + + const Double_t& operator () (size_t) const; + Double_t& operator () (size_t); + + Bool_t operator == (const BrPlane3D&) const; + Bool_t operator != (const BrPlane3D&) const; + + // access methods + Double_t GetA() const {return fA;}; + Double_t GetB() const {return fB;}; + Double_t GetC() const {return fC;}; + Double_t GetD() const {return fD;}; + + //Setter methods + void SetA(Double_t value) { fA = value;}; + void SetB(Double_t value) { fB = value;}; + void SetC(Double_t value) { fC = value;}; + void SetD(Double_t value) { fD = value;}; + + BrVector3D UnitNormal(); + BrVector3D GetIntersectionWithLine(const BrLine3D &line); + Double_t GetMinimumDistanceFromPlane(const BrVector3D &point); + + private: + + //Coefficients for the planes + Double_t fA; // 1. Plane Coefficient + Double_t fB; // 2. Plane Coefficient + Double_t fC; // 3. Plane Coefficient + Double_t fD; // 4. Plane Coefficient + + friend BrPlane3D operator+(const BrPlane3D& v1, const BrPlane3D& v2); + friend BrPlane3D operator-(const BrPlane3D& v1, const BrPlane3D& v2); + friend BrPlane3D operator*(Double_t a, const BrPlane3D& v2); + friend BrPlane3D operator*(const BrPlane3D& v1, Double_t a); + friend BrPlane3D operator/(const BrPlane3D& v1, Double_t a); + ClassDef(BrPlane3D,1) + + }; + + // + // Related Global functions + // + + ostream& operator<<(ostream& str, const BrPlane3D&); + istream& operator>>(istream& str, BrPlane3D&); + + #endif diff -c -r -N VER-1-2/include/BrRawDataInput.h VER-1-2-1/include/BrRawDataInput.h *** VER-1-2/include/BrRawDataInput.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrRawDataInput.h Mon Nov 8 14:01:06 1999 *************** *** 0 **** --- 1,370 ---- + #ifndef BRAT_BrRawDataInput + #define BRAT_BrRawDataInput + + // $Id: BrRawDataInput.h,v 1.12 1999/08/14 17:01:57 videbaek Exp $ + // + // $Log: BrRawDataInput.h,v $ + // Revision 1.12 1999/08/14 17:01:57 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.11 1999/07/28 14:59:04 hagel + // Added functionality to BrBaseMonitor + // + // Revision 1.10 1999/07/18 21:25:07 videbaek + // Added code to deal with trigger words. This applies to raw data, as well as the + // EventHeader. + // + // Revision 1.9 1999/07/02 16:50:50 hagel + // Added C1 unpacking + // + // Revision 1.8 1999/06/29 14:55:23 videbaek + // fix simple mistake in setting status variable + // + // Revision 1.7 1999/06/22 00:08:59 hagel + // Impement beginning of C1 + // + // Revision 1.6 1999/06/20 20:56:03 hagel + // Remove bottleneck with reading from Event Builder + // + // Revision 1.5 1999/06/19 22:25:29 hagel + // Add support for MULT + // + // Revision 1.4 1999/06/18 22:37:13 hagel + // Various modifications to make read raw data + // + // Revision 1.3 1999/06/16 14:00:48 hagel + // Intermediate step for simple reason to save and have backup. + // Works with ZDC. + // Started implementation of reading from event builder + // + // Revision 1.2 1999/06/11 23:32:38 hagel + // Closer to real thing + // + // Revision 1.1 1999/06/02 15:00:23 hagel + // First version. This doesn't work; only put in to get into repository for backup. + // Many things will change; perhaps even the philosophy + // + // + // Brat raw data + // + // + /////////////////////////////////////////////////////////////////////// + // // + // BrGeantData // + // // + // BRAHMS raw data class // + // // + // BrRawDataInput read raw data with BrRawEvent // + // // + // the class is derived from the BrIOModule class // + // // + // Author : K. Hagel // + // Created : April 99 // + // Version : 1.0 // + // Changed : // + // + // June 23,1999 FV - the fGlobalOn was set as default + // in the SetGlobal member function + // + // August 6, 1999 Fv - Start adding Trigger TDC + // + /////////////////////////////////////////////////////////////////////// + + #ifndef BRAT_BrIOModule + #include "BrIOModule.h" + #endif + + #ifndef ROOT_TObject + #include "TObject.h" + #endif + + #ifndef BRAT_BrRawEvent + #include "BrRawEvent.h" + #endif + + #ifndef BrRawIOProxyH + #include "BrRawIOProxy.h" + #endif + + #ifndef BrDisIProxyOH + #include "BrDisIOProxy.h" + #endif + + #ifndef BRAT_BrEventNode + #include "BrEventNode.h" + #endif + + /* + #ifndef BrRawUnpackH + #include "BrRawUnpack.h" + #endif + */ + + #include + + //ZDC Left 3-4 ADC L2249 x ? ADC+TDC 10010 + //ZDC Right 3-4 ADC L2249 x ? ADC+TDC 10011 + //BBC Left 45 ADC L1885F x x ADC+TDC 10012 + // TDC P7186 + //BBC Right 36 ADC L1885F x x ADC+TDC 10013 + // TDC P7186 + //MultSI 192 ADC L4300 x - ADCBLK 10014 + //MultTiles 40 ADC L1885F x ? ADC+TDC 10015 + //----------------------------------------------------------- + // Mid-Rapidity Spectrometer (MRS) + //----------------------------------------------------------- + //MTP1 (tpc) + //MTP2 (tpc) + //WM1 320 TDC L1879 - x TDC 111xx + //WM2 320 TDC L1879 - x TDC 112xx + //TOFW 240 TDC P7186 x x ADC+TDC 113xx + // ADC L1885F + //TOFW-2 240 TDC P7186 x x ADC+TDC 114xx + // ADC L1885F + //----------------------------------------------------------- + // Forward Spectrometer (FFS and BFS) + //----------------------------------------------------------- + //T1 (tpc) + //T2 (tpc) + //WF1 280 TDC L1879 - x TDC 121xx + //WF2 280 TDC L1879 - x TDC 122xx + //H1 80 ADC L1885F x x ADC+TDC 12612 + // TDC P7186 + //H2 64 ADC L1885F x x ADC+TDC 12613 + // TDC P7186 + //C1 32 ADC L1885F x ? ADC+TDC 12614 + //T3 (D.C.) TDC L1877S - x TDC 123xx + //T4 (D.C.) TDC L1877S - x TDC 124xx + //T5 (D.C.) TDC L1877S - x TDC 125xx + //RICH 320 ADC L1885F x ? ADCBLK 12615 + enum ERawMagic { + kEventHeader = 1, + kEventTrigger = 3, + kEventScaler = 4, + kZDCLeft = 10010, + kZDCRight = 10011, + kBBCLeft = 10012, + kBBCRight = 10013, + kMultSI = 10014, + kMultTiles = 10015, + kTriggerBBL = 10018, + kTriggerBBR = 10019, + kH1 = 12612, + kH2 = 12613, + kC1 = 12614, + kMTP1 = 11100, + kMTP2 = 11101 + }; + + enum ESpecID { + kGlobal = 10, + kMRS = 11, + kFS = 12 + }; + + //Definitions for fReadMode + const Int_t kNULLMode = 0; + const Int_t kDiskFile = 1; + const Int_t kEventBuilder = 2; + + class BrRawDataInput : public BrIOModule { + + public: + BrRawDataInput(); + BrRawDataInput(Char_t *filename); + + virtual ~BrRawDataInput(); + + virtual Bool_t Open(Char_t *fname, Option_t *option=""); + virtual Bool_t Close(); + virtual void Event(BrEvent* event); + virtual void SkipEvent(Int_t numevt); + virtual void SetDataState(Bool_t state) {fDataState = state;} + virtual Bool_t GetDataState() {return fDataState;} + + //Methods to control which parts of the event are unpacked + //Unpack everything + virtual void SetAllOn(const Bool_t val=kTRUE){ + fAllOn = val; + SetFSOn(val); + SetMRSOn(val); + SetGlobalOn(val); + } + //Unpack nothing (except header) + virtual void SetAllOff() {SetAllOn(kFALSE);} + + //Unpack FS + virtual void SetFSOn(const Bool_t val=kTRUE){ + fFSOn = val; + SetFFSOn(val); + SetBFSOn(val); + } + //Don't unpack FS + virtual void SetFSOff(){SetFSOn(kFALSE);} + + //Unpack FFS + virtual void SetFFSOn(const Bool_t val=kTRUE) { + fFFSOn = val; + SetT1On(val); + SetT2On(val); + SetC1On(val); + SetH1On(val); + } + virtual void SetT1On(const Bool_t val=kTRUE) {fT1On = val;} + virtual void SetT2On(const Bool_t val=kTRUE) {fT2On = val;} + virtual void SetC1On(const Bool_t val=kTRUE) {fC1On = val;} + virtual void SetH1On(const Bool_t val=kTRUE) {fH1On = val;} + + //Don't unpack FFS + virtual void SetFFSOff(){SetFFSOn(kFALSE);} + virtual void SetT1Off() {SetT1On(kFALSE);} + virtual void SetT2Off() {SetT2On(kFALSE);} + virtual void SetC1Off() {SetC1On(kFALSE);} + virtual void SetH1Off() {SetH1On(kFALSE);} + + //Unpack BFS + virtual void SetBFSOn(const Bool_t val=kTRUE) { + fBFSOn = val; + SetT3On(val); + SetT4On(val); + SetT5On(val); + SetH2On(val); + } + virtual void SetT3On(const Bool_t val=kTRUE) {fT3On = val;} + virtual void SetT4On(const Bool_t val=kTRUE) {fT4On = val;} + virtual void SetT5On(const Bool_t val=kTRUE) {fT5On = val;} + virtual void SetH2On(const Bool_t val=kTRUE) {fH2On = val;} + + //Don't unpack BFS + virtual void SetBFSOff(){SetBFSOn(kFALSE);} + virtual void SetT3Off() {SetT3On(kFALSE);} + virtual void SetT4Off() {SetT4On(kFALSE);} + virtual void SetT5Off() {SetT5On(kFALSE);} + virtual void SetH2Off() {SetH2On(kFALSE);} + + //Unpack MRS + virtual void SetMRSOn(const Bool_t val=kTRUE){ + fMRSOn = val; + SetMTP1On(val); + SetMTP2On(val); + SetTOFWOn(val); + } + virtual void SetMTP1On(const Bool_t val=kTRUE) {fMTP1On = val;} + virtual void SetMTP2On(const Bool_t val=kTRUE) {fMTP2On = val;} + virtual void SetTOFWOn(const Bool_t val=kTRUE) {fTOFWOn = val;} + + //Don't unpack MRS + virtual void SetMRSOff(){SetMRSOn(kFALSE);} + virtual void SetMTP1Off() {SetMTP1On(kFALSE);} + virtual void SetMTP2Off() {SetMTP2On(kFALSE);} + virtual void SetTOFWOff() {SetTOFWOn(kFALSE);} + + //Unpack Global + virtual void SetGlobalOn(const Bool_t val=kTRUE) { + fGlobalOn = val; + SetMultOn(val); + SetBBOn(val); + SetZDCOn(val); + } + virtual void SetMultOn(const Bool_t val=kTRUE) {fMultOn = val;} + virtual void SetBBOn(const Bool_t val=kTRUE) {fBBOn = val;} + virtual void SetZDCOn(const Bool_t val=kTRUE) {fZDCOn = val;} + + //Don't unpack Global + virtual void SetGlobalOff(){SetGlobalOn(kFALSE);} + virtual void SetMultOff() {SetMultOn(kFALSE);} + virtual void SetBBOff() {SetBBOn(kFALSE);} + virtual void SetZDCOff() {SetZDCOn(kFALSE);} + + private: + Int_t fEventCounter; //! Event counter + Char_t fFileName[256]; //! File name raw event file + BrRawIOProxy *fFileDescriptor; //! file descriptor + BrDisIOProxy *fDispatcher; //! pointer to dispatcher + BrRawEvent *fRawEvent; //! Pointer to raw BRAHMS event + Int_t fRecordFormat; //! Record format, used internally + Int_t fReadMode; //! Read mode; disk file, or event builder + Int_t fReqBatch; //! Number of events requested at a time + Int_t fBatchNumber; //! Counter to keep track of where it is + Bool_t fDataState; //! Flag to tell if we got event from EVB + + //Event Nodes + BrEventNode *fGlobalNode; //!Global node + BrEventNode *fMRSNode; //!MRS node + BrEventNode *fFSNode; //!FS node + BrEventNode *fFFSNode; //!FFS node + BrEventNode *fBFSNode; //!BFS node + + //Data Tables + BrDataTable *fZDCTable; //!ZDC table + BrDataTable *fBBLeftTable; //!BB Left + BrDataTable *fBBRightTable; //!BB Left + BrDataTable *fBBLeftTriggerTable; //!BB Left (Trigger TDC) + BrDataTable *fBBRightTriggerTable; //!BB Right (Trigger TDC) + BrDataTable *fMultTilesTable; //!Mult Tiles + BrDataTable *fMultSiTable; //!MultSi + BrDataTable *fH1Table; //!H1 table + BrDataTable *fH2Table; //!H2 table + BrDataTable *fC1Table; //!C1 table + BrDataTable *fT1Table; //!T1 table + BrDataTable *fT2Table; //!T2 table + BrDataTable *fT3Table; //!T3 table + BrDataTable *fT4Table; //!T4 table + BrDataTable *fT5Table; //!T5 table + + //Switches to turn on/off unpacking of different elements + //Everything + Bool_t fAllOn; + //FS + Bool_t fFSOn; + //FFS + Bool_t fFFSOn; + + Bool_t fT1On; + Bool_t fT2On; + Bool_t fC1On; + Bool_t fH1On; + //BFS + Bool_t fBFSOn; + Bool_t fT3On; + Bool_t fT4On; + Bool_t fT5On; + Bool_t fH2On; + //MRS + Bool_t fMRSOn; + Bool_t fMTP1On; + Bool_t fMTP2On; + Bool_t fTOFWOn; + //Global + Bool_t fGlobalOn; + Bool_t fMultOn; + Bool_t fBBOn; + Bool_t fZDCOn; + + virtual void Init(); + virtual Bool_t OpenDiskFile(Char_t *fname); + virtual Bool_t OpenEventBuilder(Char_t *fname); + + virtual void ZeroNodesAndTables(); + virtual void BuildEvent(BrEvent *event); + virtual void BuildEventHeader(const Int_t recordId,BrEvent *event); + virtual void AddTriggerWord(BrEvent *event); + virtual void DecodeFS(const Int_t recordId,BrEvent *event); + virtual void DecodeBFS(const Int_t recordId); + virtual void DecodeFFS(const Int_t recordId); + virtual void DecodeMRS(const Int_t recordId,BrEvent *event); + virtual void DecodeGlobal(const Int_t recordId,BrEvent *event); + + public: + + ClassDef(BrRawDataInput,0) // Interface to Raw Event files + + }; + + + #endif + diff -c -r -N VER-1-2/include/BrRawDataOutput.h VER-1-2-1/include/BrRawDataOutput.h *** VER-1-2/include/BrRawDataOutput.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrRawDataOutput.h Mon Nov 8 14:01:06 1999 *************** *** 0 **** --- 1,321 ---- + #ifndef BRAT_BrRawDataOutput + #define BRAT_BrRawDataOutput + + // $Id: BrRawDataOutput.h,v 1.3 1999/10/26 15:35:29 videbaek Exp $ + // + // $Log: BrRawDataOutput.h,v $ + // Revision 1.3 1999/10/26 15:35:29 videbaek + // Fix -maybe temporary for missing constant + // + // Revision 1.2 1999/10/21 22:11:21 hagel + // Changes to make compile on Linux + // + // Revision 1.1 1999/10/15 20:26:27 hagel + // Modifications to make BrRawDataOutput compile + // + // + // Brat raw data + // + // + /////////////////////////////////////////////////////////////////////// + // // + // BRAHMS raw data class // + // // + // BrRawDataOutput Generate and write BrRawEvent using digitized // + // data // + // // + // the class is derived from the BrIOModule class // + // // + // Author : K. Hagel // + // Created : Oct 1999 // + // Version : 1.0 // + // Changed : // + // + /////////////////////////////////////////////////////////////////////// + + #ifndef BRAT_BrIOModule + #include "BrIOModule.h" + #endif + + #ifndef ROOT_TObject + #include "TObject.h" + #endif + + #ifndef ROOT_BrRawDataInput + #include "BrRawDataInput.h" + #endif + + #ifndef BRAT_BrRawEvent + #include "BrRawEvent.h" + #endif + + #ifndef BrRawIOProxyH + #include "BrRawIOProxy.h" + #endif + + #ifndef BrDisIProxyOH + #include "BrDisIOProxy.h" + #endif + + #ifndef BRAT_BrEventNode + #include "BrEventNode.h" + #endif + + #include + + //ZDC Left 3-4 ADC L2249 x ? ADC+TDC 10010 + //ZDC Right 3-4 ADC L2249 x ? ADC+TDC 10011 + //BBC Left 45 ADC L1885F x x ADC+TDC 10012 + // TDC P7186 + //BBC Right 36 ADC L1885F x x ADC+TDC 10013 + // TDC P7186 + //MultSI 192 ADC L4300 x - ADCBLK 10014 + //MultTiles 40 ADC L1885F x ? ADC+TDC 10015 + //----------------------------------------------------------- + // Mid-Rapidity Spectrometer (MRS) + //----------------------------------------------------------- + //MTP1 (tpc) + //MTP2 (tpc) + //WM1 320 TDC L1879 - x TDC 111xx + //WM2 320 TDC L1879 - x TDC 112xx + //TOFW 240 TDC P7186 x x ADC+TDC 113xx + // ADC L1885F + //TOFW-2 240 TDC P7186 x x ADC+TDC 114xx + // ADC L1885F + //----------------------------------------------------------- + // Forward Spectrometer (FFS and BFS) + //----------------------------------------------------------- + //T1 (tpc) + //T2 (tpc) + //WF1 280 TDC L1879 - x TDC 121xx + //WF2 280 TDC L1879 - x TDC 122xx + //H1 80 ADC L1885F x x ADC+TDC 12612 + // TDC P7186 + //H2 64 ADC L1885F x x ADC+TDC 12613 + // TDC P7186 + //C1 32 ADC L1885F x ? ADC+TDC 12614 + //T3 (D.C.) TDC L1877S - x TDC 123xx + //T4 (D.C.) TDC L1877S - x TDC 124xx + //T5 (D.C.) TDC L1877S - x TDC 125xx + //RICH 320 ADC L1885F x ? ADCBLK 12615 + /* + enum ERawMagic { + kEventHeader = 1, + kZDCLeft = 10010, + kZDCRight = 10011, + kBBCLeft = 10012, + kBBCRight = 10013, + kMultSI = 10014, + kMultTiles = 10015, + kH1 = 12612, + kH2 = 12613, + kC1 = 12614, + kMTP1 = 11100, + kMTP2 = 11101 + }; + + enum ESpecID { + kGlobal = 10, + kMRS = 11, + kFS = 12 + }; + + //Definitions for fReadMode + const Int_t kNULLMode = 0; + const Int_t kDiskFile = 1; + const Int_t kEventBuilder = 2; + */ + + + class BrEventIO; + + class BrRawDataOutput : public BrIOModule { + + public: + BrRawDataOutput(); + BrRawDataOutput(Char_t *filename); + + virtual ~BrRawDataOutput(); + + virtual Bool_t Open(const Char_t *fname, Option_t *option=""); + virtual Bool_t Close(); + virtual void Event(BrEvent* event); + virtual void SkipEvent(Int_t numevt); + + //Methods to control which parts of the event are unpacked + //Unpack everything + virtual void SetAllOn(const Bool_t val=kTRUE){ + fAllOn = val; + SetFSOn(val); + SetMRSOn(val); + SetGlobalOn(val); + } + //Unpack nothing (except header) + virtual void SetAllOff() {SetAllOn(kFALSE);} + + //Unpack FS + virtual void SetFSOn(const Bool_t val=kTRUE){ + fFSOn = val; + SetFFSOn(val); + SetBFSOn(val); + } + //Don't unpack FS + virtual void SetFSOff(){SetFSOn(kFALSE);} + + //Unpack FFS + virtual void SetFFSOn(const Bool_t val=kTRUE) { + fFFSOn = val; + SetT1On(val); + SetT2On(val); + SetC1On(val); + SetH1On(val); + } + virtual void SetT1On(const Bool_t val=kTRUE) {fT1On = val;} + virtual void SetT2On(const Bool_t val=kTRUE) {fT2On = val;} + virtual void SetC1On(const Bool_t val=kTRUE) {fC1On = val;} + virtual void SetH1On(const Bool_t val=kTRUE) {fH1On = val;} + + //Don't unpack FFS + virtual void SetFFSOff(){SetFFSOn(kFALSE);} + virtual void SetT1Off() {SetT1On(kFALSE);} + virtual void SetT2Off() {SetT2On(kFALSE);} + virtual void SetC1Off() {SetC1On(kFALSE);} + virtual void SetH1Off() {SetH1On(kFALSE);} + + //Unpack BFS + virtual void SetBFSOn(const Bool_t val=kTRUE) { + fBFSOn = val; + SetT3On(val); + SetT4On(val); + SetT5On(val); + SetH2On(val); + } + virtual void SetT3On(const Bool_t val=kTRUE) {fT3On = val;} + virtual void SetT4On(const Bool_t val=kTRUE) {fT4On = val;} + virtual void SetT5On(const Bool_t val=kTRUE) {fT5On = val;} + virtual void SetH2On(const Bool_t val=kTRUE) {fH2On = val;} + + //Don't unpack BFS + virtual void SetBFSOff(){SetBFSOn(kFALSE);} + virtual void SetT3Off() {SetT3On(kFALSE);} + virtual void SetT4Off() {SetT4On(kFALSE);} + virtual void SetT5Off() {SetT5On(kFALSE);} + virtual void SetH2Off() {SetH2On(kFALSE);} + + //Unpack MRS + virtual void SetMRSOn(const Bool_t val=kTRUE){ + fMRSOn = val; + SetMTP1On(val); + SetMTP2On(val); + SetTOFWOn(val); + } + virtual void SetMTP1On(const Bool_t val=kTRUE) {fMTP1On = val;} + virtual void SetMTP2On(const Bool_t val=kTRUE) {fMTP2On = val;} + virtual void SetTOFWOn(const Bool_t val=kTRUE) {fTOFWOn = val;} + + //Don't unpack MRS + virtual void SetMRSOff(){SetMRSOn(kFALSE);} + virtual void SetMTP1Off() {SetMTP1On(kFALSE);} + virtual void SetMTP2Off() {SetMTP2On(kFALSE);} + virtual void SetTOFWOff() {SetTOFWOn(kFALSE);} + + //Unpack Global + virtual void SetGlobalOn(const Bool_t val=kTRUE) { + fGlobalOn = val; + SetMultOn(val); + SetBBOn(val); + SetZDCOn(val); + } + virtual void SetMultOn(const Bool_t val=kTRUE) {fMultOn = val;} + virtual void SetBBOn(const Bool_t val=kTRUE) {fBBOn = val;} + virtual void SetZDCOn(const Bool_t val=kTRUE) {fZDCOn = val;} + + //Don't unpack Global + virtual void SetGlobalOff(){SetGlobalOn(kFALSE);} + virtual void SetMultOff() {SetMultOn(kFALSE);} + virtual void SetBBOff() {SetBBOn(kFALSE);} + virtual void SetZDCOff() {SetZDCOn(kFALSE);} + + private: + Int_t fEventCounter; //! Event counter + Char_t fFileName[256]; //! File name raw event file + BrRawIOProxy *fFileDescriptor; //! file descriptor + BrDisIOProxy *fDispatcher; //! pointer to dispatcher + BrRawEvent *fRawEvent; //! Pointer to raw BRAHMS event + BrEventIO *fDigitizedEventIO; //! Pointer to digitized event + Int_t fRecordFormat; //! Record format, used internally + Int_t fReadMode; //! Read mode; disk file, or event builder + Int_t fReqBatch; //! Number of events requested at a time + Int_t fBatchNumber; //! Counter to keep track of where it is + + //Event Nodes + BrEventNode *fGlobalNode; //!Global node + BrEventNode *fMRSNode; //!MRS node + BrEventNode *fFSNode; //!FS node + BrEventNode *fFFSNode; //!FFS node + BrEventNode *fBFSNode; //!BFS node + + //Data Tables + BrDataTable *fZDCTable; //!ZDC table + BrDataTable *fBBLeftTable; //!BB Left + BrDataTable *fBBRightTable; //!BB Left + BrDataTable *fMultTilesTable; //!Mult Tiles + BrDataTable *fMultSiTable; //!MultSi + BrDataTable *fH1Table; //!H1 table + BrDataTable *fH2Table; //!H2 table + BrDataTable *fC1Table; //!C1 table + BrDataTable *fT1Table; //!T1 table + BrDataTable *fT2Table; //!T2 table + BrDataTable *fT3Table; //!T3 table + BrDataTable *fT4Table; //!T4 table + BrDataTable *fT5Table; //!T5 table + + //Switches to turn on/off unpacking of different elements + //Everything + Bool_t fAllOn; + //FS + Bool_t fFSOn; + //FFS + Bool_t fFFSOn; + + Bool_t fT1On; + Bool_t fT2On; + Bool_t fC1On; + Bool_t fH1On; + //BFS + Bool_t fBFSOn; + Bool_t fT3On; + Bool_t fT4On; + Bool_t fT5On; + Bool_t fH2On; + //MRS + Bool_t fMRSOn; + Bool_t fMTP1On; + Bool_t fMTP2On; + Bool_t fTOFWOn; + //Global + Bool_t fGlobalOn; + Bool_t fMultOn; + Bool_t fBBOn; + Bool_t fZDCOn; + + virtual void Init(); + + virtual void ZeroNodesAndTables(); + virtual void BuildRawEvent(BrEvent *event); + virtual void BuildEventHeader(const Int_t recordId,BrEvent *event); + virtual void DecodeFS(const Int_t recordId,BrEvent *event); + virtual void DecodeBFS(const Int_t recordId); + virtual void DecodeFFS(const Int_t recordId); + virtual void DecodeMRS(const Int_t recordId,BrEvent *event); + virtual void DecodeGlobal(const Int_t recordId,BrEvent *event); + + public: + + ClassDef(BrRawDataOutput,0) // Interface to Raw Event files + + }; + + + #endif + diff -c -r -N VER-1-2/include/BrRawEvent.h VER-1-2-1/include/BrRawEvent.h *** VER-1-2/include/BrRawEvent.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrRawEvent.h Mon Nov 8 14:01:06 1999 *************** *** 0 **** --- 1,365 ---- + // + // Name: BrRawEvent.h + // Date: 15 Dec 1998 + // Author: K.Olchanski + // Description: BRAHMS Raw Data handling functions + // + // $Id: BrRawEvent.h,v 1.5 1999/07/21 20:32:17 hagel Exp $ + // + + #ifndef BrRawEventH + #define BrRawEventH + + class BrRawEvent + { + public: // public data types + + // + // Operation status return values + // + typedef enum + { + kOk = 0, + kError = (-1), + kFormat = (-3), + kNotFound = (-4), + kNoRoom = (-5), + kCrcError = (-6) + } Status; + + // + // Basic data types: uint32 and uint16. + // + typedef unsigned int uint32; + typedef unsigned short uint16; + typedef unsigned char uint8; + + // + // Definition for magic numbers. + // + + // + // Define the trigger types + // + + typedef enum TriggerType + { + kUnused = 0, + kBeginRun = 1, + kEndRun = 2, + kPauseRun = 3, + kResumeRun = 4, + kInitRun = 5, + kTapeHeader = 6, + kTrigger1 = 101, + kTrigger2 = 102, // and so forth + kExternal1 = 201, // and so forth + kExternal2 = 202 + }; + + // + // Maximum event size + // + + typedef enum MaxEvent + { + kMaxEventSize = 10*1024*1024 // 10 Mbytes + }; + + // + // Define the event header magic numbers + // + + typedef enum Magic + { + kMagicData = 0xffffff50, + kMagicCommand = 0xffffff70 + }; + + // + // Define the data record formats + // + + typedef enum Format + { + kFormatUint32 = 0, + kFormatUint16 = 1, + kFormatUint8 = 15, + kFormatEventHeader = 16, + kFormatTapeHeader = 17, + kFormatFastbus = 129, + kFormatKS2917 = 130, + kFormatSBE = 131, + kFormatTdc = 201, + kFormatAdcBlk = 202, + kFormatAdcTdc = 203, + kFormatATBlk = 204 + }; + + // + // Define the data record IDs + // + + typedef enum RecordID + { + kRecordEventHeader = 1, + kRecordTapeHeader = 2, + kRecordTrigLatch = 3, + kRecordScalers = 4, + kRecordCA1 = 100, + kRecordCA2 = 200, + kRecordCA3 = 300, + kRecordCA4 = 400, + kRecordCA5 = 500, + kRecordCA6 = 600, + kRecordReserved = 0 // this entry should be last. + }; + + // + // Definitions for the common data types. + // + + // + // Event Header + // + + struct EventHeader + { + uint32 fRunNo; + uint32 fEventNo; + uint32 fTrigger; + uint32 fEventEvbTime; + uint32 fEventType; + uint32 fError; + }; + + // + // Tape Header + // + + struct TapeHeader + { + uint32 fTapeNo; + uint32 fLabelTime; + uint8 fDevName[128]; + uint8 fComment[128]; + }; + + // + // Mapped raw data types + // + + typedef struct + { + uint8 channel; + uint8 tdcWidth; + uint16 tdcLeadingEdge; + } mappedTdcHit_t; + + typedef struct + { + uint16 channel; + uint16 tdcWidth; + uint16 tdcLeadingEdge; + uint16 adc; + } mappedAdcTdcHit_t; + + typedef uint16 mappedAdcBlkHit_t; + + typedef struct + { + uint16 adc; + uint16 tdc; + } mappedATBlkHit_t; + + // + // Define the Record Header + // + + typedef struct + { + uint32 recordLength; + uint32 recordId; + uint32 recordFlags; + } RecordHeader; + + // + // Define data types for internal use. + // + + // + // Define a memory segment + // + + struct Segment + { + bool segDelSeg; // should the segment record be deleted? + bool segDelData; // should the data be deleted? + uint32 segNumRec; // number of records in the segment + uint32 segLength; // number of allocated bytes + uint32 segUsed; // number of bytes actually used + uint8* segData; // pointer to segment data + Segment* next; // pointer to next segment + }; + + public: // public methods + + // + // Constructors and destructors + // + + BrRawEvent(); // ctor + BrRawEvent(const BrRawEvent&); // ctor: copy-constructor + BrRawEvent& operator=(const BrRawEvent&); // assignement operator + ~BrRawEvent(); // dtor + + // + // Methods getting data records from an event. + // + + Status getRecordHeader(uint32 recordId,RecordHeader& header); + Status getRecordData (uint32 recordId,RecordHeader& header, + void*& dataPtr,int& numBytes); + + Status getTapeHeader(TapeHeader*& tapeHeader, + int& tapeHeaderSize); + + Status getEventHeader(EventHeader*& eventHeader, + int& eventHeaderSize); + + Status getRecordUint32(uint32 recordId, + uint32*& dataPtr, + int& numEntries); + + Status getRecordUint16(uint32 recordId, + uint16*& dataPtr, + int& numEntries); + + Status getRecordMappedTdc(uint32 recordId, + mappedTdcHit_t*& dataPtr, + int& numHits); + + Status getRecordMappedAdcTdc(uint32 recordId, + mappedAdcTdcHit_t*& dataPtr, + int& numHits); + + Status getRecordMappedAdcBlk(uint32 recordId, + mappedAdcBlkHit_t*& dataPtr, + int& numHits); + + Status getRecordMappedATBlk(uint32 recordId, + mappedATBlkHit_t*& dataPtr, + int& numHits); + + // + // Methods for adding data records to an event + // + + Status addRecord(uint32 recordId, + uint32 recordFormat, + uint32 dataLength, + const void* dataPtr); + + // + // Methods for deleting data records + // + + Status deleteRecord(uint32 recordId); + + // + // Methods for getting information about the event + // + + uint32 getEventLength() const; + uint32 getNumSegments() const; + uint32 getNumRecords() const; + + Status getRecordList(int* numRecords,RecordHeader* recordList[]); + + static void hexDump(const Segment* dataPtr); + + bool getRecordIsBE (const RecordHeader& header); + void setRecordIsBE (RecordHeader& header,bool isBE); + int getRecordFormat(const RecordHeader& header); + + static const char* TriggerTypeToString(uint32 trigger); + + // + // Memory allocation + // + + static Segment* newSegment(uint32 size,bool doDelete); + static void deleteSegment(Segment* &seg); + + // + // Input/Output methods + // + + Status setData(void* buffer,uint32 bufferSize,bool doDelete); + Status setData(Segment* seg); + + Status deleteData(); + + void appendSegment(Segment* seg); + + Segment* getDataPtr(); + + Status validateEvent(); + Status addCRC(); + + // + // Debugging methods + // + + void dump(); + void printSegment(const Segment* seg); + + // + // Error reporting methods + // + + Status getError(); + const char* getErrorString(); + + // + // Endian conversion methods + // + static void NativeToLE32(uint8* dest,uint32 value); + static void NativeToLE16(uint8* dest,uint16 value); + static uint32 BE32toNative(const uint8* src); + static uint32 LE32toNative(const uint8* src); + static uint16 LE16toNative(const uint8* src); + + private: // private methods + + Status setError(Status errorCode,const char* errorString); + Status setOk(); + + uint32 incEventLength(int increment); + uint32 incNumRecords(int increment); + Status getFirstRecordIndex(Segment* &seg,uint32& index); + Status getNextRecordIndex( Segment* &seg,uint32& index); + Status getRecordPosition(uint32 recordId,Segment* &seg,uint32 &index); + void readRecordHeader(Segment*seg,uint32 index,RecordHeader& header); + void writeRecordHeader(Segment*seg,uint32 index,const RecordHeader& header); + uint32 countRecords(Segment* seg); + + Status endianConvertData(RecordHeader& header, + void* recPtr,uint32 recLength); + + uint32 computeCRC32() const; + uint32 getCRC32() const; + + private: // private data + + Status fError; + const char* fErrorString; + + Segment* fData; + + static bool fHostIsBE; + static bool fHostIsLE; + }; + + #endif + // end file diff -c -r -N VER-1-2/include/BrRawIO.h VER-1-2-1/include/BrRawIO.h *** VER-1-2/include/BrRawIO.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrRawIO.h Mon Nov 8 14:01:06 1999 *************** *** 0 **** --- 1,79 ---- + // + // Name: BrRawIO.h + // Author: K.Olchanski + // Date: 21 Apr 1999 + // Descrition: BRAHMS Raw Data Input and Output class. + // + // $Id: BrRawIO.h,v 1.3 1999/07/21 20:32:17 hagel Exp $ + // + // $Log: BrRawIO.h,v $ + // Revision 1.3 1999/07/21 20:32:17 hagel + // Folding in Konstantin's updates + // + // Revision 1.4 1999/05/30 01:58:53 olchansk + // Added code for handling Filemark-vs-EOD errors + // + // Revision 1.3 1999/05/27 16:22:22 olchansk + // Removed all use of std::string from BrRawIO. + // Corrected the affected example programs. + // + // Revision 1.2 1999/05/21 20:00:55 olchansk + // Intergrate BrRawEvent into the event builder. + // + // Revision 1.1 1999/05/14 23:31:51 olchansk + // New versions for data IO and record access libraries. + // This is new, untested code. + // + // + #ifndef BrRawIOH + #define BrRawIOH + + #include "BrRawEvent.h" + + class BrRawIO + { + public: // public definitions + + typedef enum + { + kOk = 0, + kError = 1, + kEof = 2, + kNotOpen = 3, + kCrcError = 4, + kFilemark = 5 + } Status; + + public: // public methods + + BrRawIO(); // ctor + ~BrRawIO(); // dtor + + Status readopen(const char* filename); + Status writeopen(const char* filename); + Status fdopen(int fd); + Status read(BrRawEvent& event); + Status write(BrRawEvent& event); + Status findFilemark(int count); + Status flush(); + Status close(); + + Status getError() const; + const char* getErrorString() const; + + private: // private data + + Status fError; + char fErrorString[256]; + + bool fIsOpen; + int fFile; + + private: // private methods + + Status setOk(); + Status setError(Status error,const char*fmt,...); + }; + + #endif + // end file diff -c -r -N VER-1-2/include/BrRawIOProxy.h VER-1-2-1/include/BrRawIOProxy.h *** VER-1-2/include/BrRawIOProxy.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrRawIOProxy.h Mon Nov 8 14:01:06 1999 *************** *** 0 **** --- 1,42 ---- + // + // Name: BrRawIOProxy.h + // Author: K.Hagel + // Date: 18 June 1999 + // Description: proxy object to import BrRawIO into ROOT + // + // $Id: BrRawIOProxy.h,v 1.2 1999/10/15 20:26:29 hagel Exp $ + // + #ifndef BrRawIOProxyH + #define BrRawIOProxyH + + #include "BrRawEvent.h" + + class BrRawIOProxy + { + public: + void* fRealObject; + + BrRawIOProxy(); // ctor + ~BrRawIOProxy(); // dtor + + int create(); + int destroy(); + + // Note: all methods return "0" if success, + // error code if failure. + + int readopen(const char* filename); + int writeopen(const char* filename); + int fdopen(int fd); + int read(BrRawEvent& event); + int write(BrRawEvent& event); + int findFilemark(int count); + int flush(); + int close(); + + int getError() const; + const char* getErrorString() const; + }; + + #endif + // end file diff -c -r -N VER-1-2/include/BrRawUnpack.h VER-1-2-1/include/BrRawUnpack.h *** VER-1-2/include/BrRawUnpack.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrRawUnpack.h Mon Nov 8 14:01:06 1999 *************** *** 0 **** --- 1,200 ---- + // + // Name: BrRawUnpack.h + // Date: 15 Apr 1999 + // Author: K.Olchanski + // Description: BRAHMS Raw Data Unpacking codes + // + // $Id: BrRawUnpack.h,v 1.2 1999/07/21 20:32:17 hagel Exp $ + // + #ifndef BrRawUnpackH + #define BrRawUnpackH + + #include + #include + + #include "BrRawEvent.h" + #include "TextTable.h" + + typedef BrRawEvent::uint32 uint32; + typedef BrRawEvent::uint16 uint16; + + class BrDaqUnitMap + { + public: + const char* fUnitType; + uint32 fRecordId; + uint32 fSlot; + + public: + std::string toString() const; + + virtual bool match(uint32 recordId, + uint32 readSlot, + uint32 slot) = 0; + + virtual void mergeMaps(const char* connector, + const char* mapString) = 0; + + virtual void print() const = 0; + }; + + class BrDaqTdcUnitMap + : public BrDaqUnitMap + { + public: + virtual void unpack(BrRawEvent& event, + uint32 maxHits, + uint32& nhits, + BrRawEvent::mappedTdcHit_t tdcData[], + BrRawEvent::mappedATBlkHit_t blkData[]) = 0; + }; + + class BrDaqAdcUnitMap + : public BrDaqUnitMap + { + public: + virtual void unpack(BrRawEvent& event, + uint32 numChannels, + BrRawEvent::mappedAdcBlkHit_t adcData[], + BrRawEvent::mappedATBlkHit_t blkData[]) = 0; + }; + + class BrDaqUint32UnitMap + : public BrDaqUnitMap + { + public: + virtual void unpack(BrRawEvent& event, + uint32 numChannels, + BrRawEvent::uint32 blkData[]) = 0; + }; + + typedef std::vector BrDaqAdcUnitMapArray; + typedef std::vector BrDaqTdcUnitMapArray; + typedef std::vector BrDaqUint32UnitMapArray; + typedef std::vector BrDaqStringArray; + + class BrDaqRecordMapBase + { + public: + std::string fMapName; + std::string fMapType; + uint32 fRecordId; + uint32 fTableStartRow; + uint32 fTriggerList[16]; + + bool fHadErrors; + BrDaqStringArray fErrors; + + public: + BrDaqRecordMapBase(const TextTable& table,int tableStartRow); // ctor + virtual ~BrDaqRecordMapBase(); // dtor + + void printBase(); + bool addBase(const TextTable& table,int row); + + void clearErrors(); + void addError(const std::string& errorText); + + bool checkEvent(BrRawEvent& event); + virtual void map(BrRawEvent& event) = 0; + virtual void printMap() = 0; + }; + + class BrDaqRecordMapTDC : public BrDaqRecordMapBase + { + public: + BrDaqTdcUnitMapArray fUnits; + + public: + BrDaqRecordMapTDC(const TextTable& table,int tableStartRow); // ctor + ~BrDaqRecordMapTDC(); // dtor + + void unpack(BrRawEvent& event, + uint32 maxTdcHits, + uint32& numTdcHits, + BrRawEvent::mappedTdcHit_t tdcHits[]); + + void map(BrRawEvent& event); + void printMap(); + + protected: + uint32 fMaxTdcHits; + BrRawEvent::mappedTdcHit_t *fTdcHits; + }; + + class BrDaqRecordMapADCBLK : public BrDaqRecordMapBase + { + public: + BrDaqAdcUnitMapArray fUnits; + uint32 fNumChannels; + BrRawEvent::uint16* fAdcData; + + public: + BrDaqRecordMapADCBLK(const TextTable& table,int tableStartRow); // ctor + ~BrDaqRecordMapADCBLK(); // dtor + + void unpack(BrRawEvent& event, + uint32 numChannels, + BrRawEvent::mappedAdcBlkHit_t adcData[]); + + void map(BrRawEvent& event); + void printMap(); + }; + + class BrDaqRecordMapATBLK : public BrDaqRecordMapBase + { + public: + BrDaqAdcUnitMapArray fAdcUnits; + BrDaqTdcUnitMapArray fTdcUnits; + uint32 fNumChannels; + BrRawEvent::mappedATBlkHit_t* fData; + + public: + BrDaqRecordMapATBLK(const TextTable& table,int tableStartRow); // ctor + ~BrDaqRecordMapATBLK(); // dtor + + void unpack(BrRawEvent& event, + uint32 numChannels, + BrRawEvent::mappedATBlkHit_t data[]); + + void map(BrRawEvent& event); + void printMap(); + }; + + class BrDaqRecordMapUINT32 : public BrDaqRecordMapBase + { + public: + BrDaqUint32UnitMapArray fUnits; + uint32 fNumChannels; + BrRawEvent::uint32 *fData; + + public: + BrDaqRecordMapUINT32(const TextTable& table,int tableStartRow); // ctor + ~BrDaqRecordMapUINT32(); // dtor + + void unpack(BrRawEvent& event, + uint32 numChannels, + BrRawEvent::uint32 data[]); + + void map(BrRawEvent& event); + void printMap(); + }; + + class BrDaqGlobalMap + { + public: + std::string fConfigFileName; + TextTable fConfigTable; + + std::vector fMaps; + + public: + BrDaqGlobalMap(const char* configFile); + ~BrDaqGlobalMap(); + + void map(BrRawEvent& event); + void printMap(); + }; + + #endif + // end file diff -c -r -N VER-1-2/include/BrRawUnpackProxy.h VER-1-2-1/include/BrRawUnpackProxy.h *** VER-1-2/include/BrRawUnpackProxy.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrRawUnpackProxy.h Mon Nov 8 14:01:06 1999 *************** *** 0 **** --- 1,32 ---- + // + // Name: BrRawUnpackProxy.h + // Author: K.Olchanski + // Date: 18 June 1999 + // Description: proxy object to import BrRawUnpack into ROOT + // + // $Id: BrRawUnpackProxy.h,v 1.1 1999/06/18 22:37:13 hagel Exp $ + // + #ifndef BrRawUnpackProxyH + + #include "BrRawEvent.h" + + class BrRawUnpackProxy + { + public: + void* fRealObject; + + BrRawUnpackProxy(); // ctor + ~BrRawUnpackProxy(); // dtor + + // Note: all methods return "0" if success, + // error code if failure. + + int create(const char* configFile); + int destroy(); + + int map(BrRawEvent& event); + int printMap(); + }; + + #endif + // end file diff -c -r -N VER-1-2/include/BrRaw_LinkDef.h VER-1-2-1/include/BrRaw_LinkDef.h *** VER-1-2/include/BrRaw_LinkDef.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrRaw_LinkDef.h Mon Nov 8 14:01:06 1999 *************** *** 0 **** --- 1,20 ---- + // $Id: BrRaw_LinkDef.h,v 1.2 1999/10/15 20:26:29 hagel Exp $ + // + // $Log: BrRaw_LinkDef.h,v $ + // Revision 1.2 1999/10/15 20:26:29 hagel + // Modifications to make BrRawDataOutput compile + // + // Revision 1.1 1999/06/14 18:21:14 hagel + // Initial revision for testing + // + // + #ifdef __CINT__ + + #pragma link off all globals; + #pragma link off all classes; + #pragma link off all functions; + + #pragma link C++ class BrRawDataInput; + #pragma link C++ class BrRawDataOutput; + + #endif diff -c -r -N VER-1-2/include/BrRdoBB.h VER-1-2-1/include/BrRdoBB.h *** VER-1-2/include/BrRdoBB.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrRdoBB.h Fri Nov 5 18:26:21 1999 *************** *** 0 **** --- 1,95 ---- + #ifndef BRAT_BrRdoBB + #define BRAT_BrRdoBB + + // $Id: BrRdoBB.h,v 1.3 1999/04/14 20:12:34 videbaek Exp $ + // + // $Log: BrRdoBB.h,v $ + // Revision 1.3 1999/04/14 20:12:34 videbaek + // Use DbManager methods to access parameters. + // + // Revision 1.2 1999/01/21 23:23:21 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 didnt 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.1 1998/10/09 19:21:22 videbaek + // Add the BrRdoBB and BrRdoModule classes + // + // + /////////////////////////////////////////////////////////////////////// + // // + // BrRdoBB // + // // + // BRAHMS Reconstructed Data Element for Beam-Beam counters // + // // + // Author : F.Videbaek // + // Created : September 98 // + // Version : 1.0 // + // Changed : // + // // + /////////////////////////////////////////////////////////////////////// + + // Root Classes + + #ifndef BRAT_BrDataObject + #include "BrDataObject.h" + #endif + + // Brahms Classes + // + class BrRdoBB: public BrDataObject { + + + private: + Int_t fLeftHits; // Number of tubes hit in left array + Int_t fRightHits; // Number of tubes hit in light array + Int_t fLeftMult; // Estimated Multiplicity in left Array + Int_t fRightMult; // Estimated Multiplicity in right Array + Double_t fLeftTime; // Time estimated from left array + Double_t fRightTime; // Time estimated from right array + Double_t fZ0; // Esmated vertex from BB counters + Double_t fTime0; // Start time for event + Int_t fPatternLeft[4]; // Internal rep for hits in left array + Int_t fPatternRight[4];// Internal rep for hits in right array + + public: + // Class is implemented as a concrete class thus no virtual for + // methods + BrRdoBB(); + BrRdoBB(Char_t* Name, Char_t* Title); + ~BrRdoBB() { }; + + Bool_t IsSortable() const {return kFALSE;} + + Int_t GetLeftHits() const {return fLeftHits;} + Int_t GetRightHits() const {return fRightHits;} + Int_t GetLeftMult() const {return fLeftMult;} + Int_t GetRightMult() const {return fRightMult;} + Double_t GetZ0() const {return fZ0;} + Double_t GetTime0() const {return fTime0;} + Double_t GetLeftTime() const {return fLeftTime;} + Double_t GetRightTime() const {return fRightTime;} + + void SetLeftHits(Int_t i) {fLeftHits= i;} + void SetRightHits(Int_t i) {fRightHits= i;} + void SetLeftMult(Int_t i) {fLeftMult= i;} + void SetRightMult(Int_t i) {fRightMult= i;} + void SetLeftTime(Double_t time) {fLeftTime = time;} + void SetRightTime(Double_t time) {fRightTime = time;} + void SetLeftHitTube(Int_t); + void SetRightHitTube(Int_t); + Bool_t IsLeftTubeHit(Int_t); + Bool_t IsRightTubeHit(Int_t); + void SetTime0(Double_t time) {fTime0 = time;} + void SetZ0(Double_t pos) {fZ0 = pos;} + + + ClassDef(BrRdoBB,1) // BRAHMS Beam Beam Counters Reconstructed Data Objects + + }; + + #endif diff -c -r -N VER-1-2/include/BrRdoModuleBB.h VER-1-2-1/include/BrRdoModuleBB.h *** VER-1-2/include/BrRdoModuleBB.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrRdoModuleBB.h Fri Nov 5 18:26:21 1999 *************** *** 0 **** --- 1,73 ---- + #ifndef BRAT_BrRdoModuleBB + #define BRAT_BrRdoModuleBB + + // $Id: BrRdoModuleBB.h,v 1.4 1999/04/14 20:12:35 videbaek Exp $ + // + // $Log: BrRdoModuleBB.h,v $ + // Revision 1.4 1999/04/14 20:12:35 videbaek + // Use DbManager methods to access parameters. + // + // Revision 1.3 1999/01/21 23:23:21 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 didnot 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.2 1999/01/15 15:33:24 videbaek + // Small updates for digitize + // Made BrRdoModule functional. + // + // Revision 1.1 1998/10/09 19:21:32 videbaek + // Add the BrRdoBB and BrRdoModule classes + // + // + + class TDirectory; + class TH1F; + class BrEventNode; + class BrDetectorParamsBB; + + #if !defined BRAT_BrModule + # include "BrModule.h" + #endif + + class BrRdoModuleBB : public BrModule { + + private: + BrRdoModuleBB(const BrRdoModuleBB&){}; + void operator=(const BrRdoModuleBB&){}; + void SetDetectorParamsBB(BrDetectorParamsBB *par); + + public: + + + BrRdoModuleBB(); + BrRdoModuleBB(Text_t *Name, Char_t *Title); + virtual ~BrRdoModuleBB(); + + + virtual void DefineHistograms(); + virtual void Event(BrEventNode*, BrEventNode*); + virtual void Info(); + virtual void SetInputMode(Int_t mode); + + private: + + TDirectory* hdir; // Histogram directory + TH1F *hTime0; // time 0 distribtion + TH1F *hZ0; // vertex distribution + + BrDetectorParamsBB *fParams_p; + + Int_t fInputMode; // Defines objects expected as input + // Mode = 0 ; uses digiitized data. + // 1 ; uses calibrated data. + Double_t fNominalT0; // Nominal flight time to Left/right + + ClassDef(BrRdoModuleBB,0) // BRAHMS RDO module for Beam Beam Counters + + }; + #endif diff -c -r -N VER-1-2/include/BrRint.h VER-1-2-1/include/BrRint.h *** VER-1-2/include/BrRint.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrRint.h Mon Nov 8 10:03:35 1999 *************** *** 0 **** --- 1,25 ---- + // -*- mode: c++ -*- + #ifndef _BRAT_BRRINT_H + #define _BRAT_BRRINT_H + + #include + + + class BrRint : public TRint + { + private: + char* fBratPrompt; + int fBratMajorVersion; + int fBratMinorVersion; + public: + BrRint(char* appClassName, + int* argc, + char** argv); + + virtual void PrintLogo(); + + ClassDef(BrRint,0) // BRAT Interactive Application Interface + } + ; + #endif // _BRAT_BRRINT_H + diff -c -r -N VER-1-2/include/BrRotMatrix.h VER-1-2-1/include/BrRotMatrix.h *** VER-1-2/include/BrRotMatrix.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrRotMatrix.h Fri Nov 5 18:25:58 1999 *************** *** 0 **** --- 1,86 ---- + #ifndef BRAT_BrRotMatrix + #define BRAT_BrRotMatrix + + // $Id: BrRotMatrix.h,v 1.4 1999/01/21 23:23:24 hagel Exp $ + // $Log: BrRotMatrix.h,v $ + // Revision 1.4 1999/01/21 23:23:24 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.3 1998/12/21 20:32:04 videbaek + // coordinate system changes mainly + // + // Revision 1.2 1998/12/08 20:44:08 hagel + // Change kReflection to kBrReflection to avoid conflicts with TRotMatrix in TNode + // + // Revision 1.1 1998/12/01 20:49:58 videbaek + // Added several classes to Geometry. Updated source and makefile(s) + // - BrLine3D + // - BrCoordinateSystem + // - BrRotMatrix + // + // + ////////////////////////////////////////////////////////////////////////// + // // + // BrRotMatrix // + // // + // Rotation Matrix for 3-D geometry objects. // + // Copied from ROOT source but modified to make simpler. See R.Brun // + // copyright notice in BrRotMatrix.cxx source code. // + // // + ////////////////////////////////////////////////////////////////////////// + + #ifndef ROOT_TObject + #include "TObject.h" + #endif + #include + + enum { + kBrReflection = BIT(23) // "Reflection" bit + }; + + + class BrRotMatrix : public TObject { + private: + void SetReflection(); // Set the "reflection" flag if det < 0 + + private: + Int_t fType; //Type of matrix (0=identity, 1=reflexion, 2=otherwise) + Double_t fTheta; // theta angle + Double_t fPhi; // phi angle + Double_t fPsi; // psi angle + Double_t fMatrix[9]; // Rotation matrix + + public: + BrRotMatrix(); + BrRotMatrix( Double_t *matrix); + BrRotMatrix( Double_t theta, Double_t phi, Double_t psi); + BrRotMatrix( Double_t theta1, Double_t phi1, + Double_t theta2, Double_t phi2, + Double_t theta3, Double_t phi3); + virtual ~BrRotMatrix(); + Double_t Determinant(); // returns the determinant of this matrix + Double_t* GetRotMatrix() {return &fMatrix[0];} + Int_t GetType() {return fType;} + Double_t GetTheta() {return fTheta;} + Double_t GetPhi() {return fPhi;} + Double_t GetPsi() {return fPsi;} + Bool_t IsReflection(){return TestBit(kBrReflection);} // Return kTRUE if this matrix defines the reflection + void SetMatrix(const Double_t *matrix); + + friend ostream& operator<< (ostream & ,BrRotMatrix*); + + ClassDef(BrRotMatrix,1) //Rotation Matrix for 3-D geometry objects + }; + + + + + #endif + + diff -c -r -N VER-1-2/include/BrSelectGeantTracks.h VER-1-2-1/include/BrSelectGeantTracks.h *** VER-1-2/include/BrSelectGeantTracks.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrSelectGeantTracks.h Fri Nov 5 18:26:15 1999 *************** *** 0 **** --- 1,74 ---- + #ifndef BRAT_BrSelectGeantTracks + #define BRAT_BrSelectGeantTracks + + // $Id: BrSelectGeantTracks.h,v 1.2 1999/01/21 23:23:23 hagel Exp $ + // + // $Log: BrSelectGeantTracks.h,v $ + // Revision 1.2 1999/01/21 23:23:23 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.1 1998/09/27 17:27:12 alv + // *** empty log message *** + // + // + /////////////////////////////////////////////////////////////////////// + // // + // BrSelectGeantTracks // + // // + // BRAHMS GEANT track selection class // + // // + // the class is derived from the BrModule class // + // // + // Author : Alv Kjetil Holme // + // Created : September 98 // + // Version : 1.0 // + // Changed : // + // // + /////////////////////////////////////////////////////////////////////// + + #ifndef ROOT_Rtypes + #include "Rtypes.h" + #endif + #ifndef BRAT_BrModule + #include "BrModule.h" + #endif + #ifndef BRAT_BrGeantInput + #include "BrGeantInput.h" + #endif + + class BrEventNode; + + const Int_t kMAXMASKS = 20; + + class BrSelectGeantTracks : public BrModule { + + BrSelectGeantTracks(const BrSelectGeantTracks&); + BrSelectGeantTracks& operator=(const BrSelectGeantTracks&); + + public: + BrSelectGeantTracks() + : BrModule(), fNumMasks(0), fModule(0){} + BrSelectGeantTracks(Text_t *name, Text_t *title=0) + : BrModule(name, title && *title ? title : name), fNumMasks(0), fModule(0){} + + virtual ~BrSelectGeantTracks() { } + + virtual void SetInputModule(const BrGeantInput *input) { fModule = input; } + virtual Bool_t AddConfig(const Text_t *config); + virtual void ListConfigs(); + virtual void Event(BrEventNode* inev, BrEventNode* outev); + + private: + UInt_t fMask[kMAXMASKS]; // Detector bit masks + Int_t fNumMasks; // Number of bit masks defined + const BrGeantInput *fModule; // Input module that read tracks + + ClassDef(BrSelectGeantTracks,0) // GEANT track selection class + }; + #endif diff -c -r -N VER-1-2/include/BrSimulationDatabase.h VER-1-2-1/include/BrSimulationDatabase.h *** VER-1-2/include/BrSimulationDatabase.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrSimulationDatabase.h Fri Nov 5 18:26:22 1999 *************** *** 0 **** --- 1,123 ---- + #ifndef BRAT_BrSimulationDatabase + #define BRAT_BrSimulationDatabase + // $Id: BrSimulationDatabase.h,v 1.2 1999/01/21 23:23:25 hagel Exp $ + // + // $Log: BrSimulationDatabase.h,v $ + // Revision 1.2 1999/01/21 23:23:25 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 + // + // + /////////////////////////////////////////////////////////////////////// + // // + // BrSimulationDatabase // + // // + // BRAHMS Simulation Database Class // + // // + // Author : K. Hagel // + // Created: 9/7/98 // + // Version: 1.0 // + // // + /////////////////////////////////////////////////////////////////////// + + // ROOT classes + #ifndef ROOT_TNamed + #include "TNamed.h" + #endif + + #ifndef ROOT_TObjArray + #include "TObjArray.h" + #endif + + // System and ROOT include files + // + + // BRAHMS classes + // + + class BrSimulationDatabase : public TNamed { + + public: + BrSimulationDatabase(); + BrSimulationDatabase(Char_t *name, Char_t *title,Char_t *filename); + virtual ~BrSimulationDatabase(); + void ReadASCIIFile(Char_t *filename); + void Print(); + + Bool_t SelectOnRun(Int_t run); + Bool_t SelectOnD1D2D3D4(Float_t bd1,Float_t bd2,Float_t bd3,Float_t bd4); + Bool_t SelectOnThetaFS1(Float_t theta); + Bool_t SelectOnThetaFS2(Float_t theta); + Bool_t SelectOnThetaMids(Float_t theta); + Bool_t SelectOnThetaFS1FS2(Float_t theta_fs1,Float_t theta_fs2); + + Char_t *GetGBRAHMSFile(); + + + private: + + TObjArray *fDatabaseEntryList; + Int_t fDatabaseEntrySelected; + public: + + ClassDef(BrSimulationDatabase,1) // BRAHMS Simulation Database + }; + + class BrSimulationDatabaseEntry : public TObject { + public: + BrSimulationDatabaseEntry(); + BrSimulationDatabaseEntry(Char_t *name, Char_t *title); + BrSimulationDatabaseEntry(Char_t *name, Char_t *title, + Int_t run, Char_t *genfile, Char_t *gbrfile, + Char_t *fms1stat,Char_t *fms2stat,Char_t *c1stat, Char_t *midsstat, Char_t *shldstat, + Float_t bd1, Float_t bd2, Float_t bd3, Float_t bd4, Float_t bm0, + Float_t thetamids, Float_t thetafs1, Float_t thetafs2, + Int_t numevts, Float_t rotang, Float_t delrotang, Int_t norotang); + virtual ~BrSimulationDatabaseEntry(); + + virtual void InitializeParameters(); + virtual void Print(); + virtual Int_t GetRunNumber() {return fRunNumber;} + virtual Float_t GetBd1() {return fBd1;} + virtual Float_t GetBd2() {return fBd2;} + virtual Float_t GetBd3() {return fBd3;} + virtual Float_t GetBd4() {return fBd4;} + virtual Float_t GetThetaMids() {return fThetaMids;} + virtual Float_t GetThetaFS1() {return fThetaFS1;} + virtual Float_t GetThetaFS2() {return fThetaFS2;} + virtual Int_t GetNumEvents() {return fNumEvents;} + virtual Int_t GetNoRotang() {return fNoRotang;} + virtual Char_t *GetGBRAHMSFile() {return fGBRAHMSFile;} + + private: + Int_t fRunNumber; //Run Number + Char_t fEventGeneratorFile[128]; //File name of event generator + Char_t fGBRAHMSFile[128]; //GBRAHMS output file + Char_t fFms1Status[4]; //Status of FMS1 + Char_t fFms2Status[4]; //Status of FMS2 + Char_t fC1Status[4]; //Status of C1 + Char_t fMidsStatus[4]; //Status of MIDS + Char_t fShldStatus[4]; //Status of Shld + Float_t fBd1; //Field setting of D1 + Float_t fBd2; //Field setting of D2 + Float_t fBd3; //Field setting of D3 + Float_t fBd4; //Field setting of D4 + Float_t fBm0; //Field setting of M0 + Float_t fThetaMids; //Angle of MIDS + Float_t fThetaFS1; //Angle of FS1 + Float_t fThetaFS2; //Angle of FS2 + Int_t fNumEvents; //Number of events in this run + Float_t fRotang; + Float_t fDelRotang; + Int_t fNoRotang; //Number of time angle rotated + + public: + ClassDef(BrSimulationDatabaseEntry,1) //Simulation Database entry + }; + + #endif diff -c -r -N VER-1-2/include/BrSpectrometerTracks.h VER-1-2-1/include/BrSpectrometerTracks.h *** VER-1-2/include/BrSpectrometerTracks.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrSpectrometerTracks.h Fri Nov 5 18:26:09 1999 *************** *** 0 **** --- 1,435 ---- + #ifndef BRAT_BrSpectrometerTracks + #define BRAT_BrSpectrometerTracks + + // $Id: BrSpectrometerTracks.h,v 1.9 1999/06/09 17:24:44 videbaek Exp $ + // + // $Log: BrSpectrometerTracks.h,v $ + // Revision 1.9 1999/06/09 17:24:44 videbaek + // remove apost. from comment lines + // + // Revision 1.8 1999/04/12 19:20:50 hagel + // Added GetTtr(Int_t i) + // + // Revision 1.7 1999/03/07 00:00:46 hagel + // 1. Implemented BrFSTrackingModule. Started with BrMRSTrackingModule and made + // appropriate changes to handle the forward spectrometer. It uses the new + // track classes as well as extensively using geometry classes. It also uses + // new methods and functionality as described below. + // 2. Changed BrMagnetVolume + // a. Added method SwimBack(BrLine3D &,Double_t momentum): takes a + // track at the exit of magnet and given the momentum, calculates + // where the track would come into the front of the magnet. + // b. Added method GlobalToLocal(BrLine3D &): does a combination of + // GlobalToLocal(BrVector3D &,BrVector3D&,0) and + // GlobalToLocal(BrVector3D &,BrVector3D&,1) + // c. Added method LocalToGlobal(BrLine3D &): does a combination of + // LocalToGlobal(BrVector3D &,BrVector3D&,0) and + // LocalToGlobal(BrVector3D &,BrVector3D&,1) + // d. Changed BrDetectorVolume: same additions of methods GlobalToLocal + // and LocalToGlobal as in BrMagnetVolume + // 2. Added a parameter base class BrDetectorParamsBase: helps when reading + // in database files. Declared ASCII reading routines to be virtual. + // Has main ReadASCIIFile which decodes the ASCII parameter files, then + // calls the detector specific methods SetASCIIParameter + // 3. Implemented SetASCIIParameter in BrDetectorParamsDC, BrDetectorParamsTPC, + // BrDetectorParamsTof, BrDetectorParamsBB + // 4. Implemented BrParameterDbManager. It currently works similarly to + // BrGeometryDbManager and creates the BrDetectorParamsXXX objects when + // called. These objects then read in ASCII parameter files with a currently + // "well defined" format using the above implemented routines using a constructor: + // BrDetectorParamsXXX(Char_t *name, Char_t *title,Char_t *ASCIIFileName); + // 5. If no parameter file is specified, it executes the constructor we + // have been using so far, namely BrDetectorParamsXXX(Char_t *name,Char_t *title). + // These constructors generate default parameters and are semi-intelligent + // which means they generate approximately appropriate parameters depending + // upon which detector they are. I should say that the parameters were + // deemed appropriate at the time of writing the SetDefaultParams routine. + // a. It is used in the same way as BrGeometryDbManager, that is: + // BrParameterDbManager *gParamDb = BrParameterDbManager::Instance(); + // gParamDb->SetDbParameterFileName("DetectorParameters.txt"); + // 6. Added a new directory, params, in BRAT. This directory has the file + // DetectorParameters.txt in it. If the BrParameterDbManager is started + // and the DetectorParameter.txt file is specified, it will look in the + // $BRATSYS/params directory if it cannot find the file in the directory + // that the user has set default to. + // 7. Implemented BrParameterDbManager in DC digitize and tracking code. The + // SetDetectorParams methods have been moved to private and can no longer be + // used from the macro or program. + // 8. Implemented BrParameterDbManager in TPC digitize and tracking code. + // 9. Implemented BrParameterDbManager in Tof Calibrate and GeneratePid code. + // 10 Changed the GetEntries() in BrDataTable to use the GetLast()+1 method in + // TObjArray. This should be much faster, but has the caveat that it assumes + // that all slots in TObjArray are full. That seems to me to be the case + // in how we use TObjArray at least in BrDataTable, but if problems arise due + // to this change, it can always be easily changed back. It has been used a + // fair amount before checking in and no problems were found. + // + // Modified Files: + // base/inc/BrBase_LinkDef.h base/inc/BrDataTable.h + // base/inc/BrDetectorVolume.h base/inc/BrMagnetVolume.h + // base/inc/LinkDefBratBaseINC.h base/src/BrDataTable.cxx + // base/src/BrDetectorVolume.cxx base/src/BrEventNode.cxx + // base/src/BrMagnetVolume.cxx base/src/BrTableManager.cxx + // base/src/Makefile bb/inc/BrDetectorParamsBB.h + // bb/src/BrDetectorParamsBB.cxx db/inc/BrParameterDbManager.h + // db/src/BrParameterDbManager.cxx dc/inc/BrDetectorParamsDC.h + // dc/src/BrDetectorDC.cxx dc/src/BrDetectorParamsDC.cxx + // dc/src/BrDigitizeDC.cxx dc/src/BrLocalTrackDC.cxx + // geometry/inc/BrPlane3D.h geometry/src/BrPlane3D.cxx + // params/DetectorParameters.txt tof/inc/BrDetectorParamsTof.h + // tof/src/BrDetectorParamsTof.cxx tof/src/BrGeneratePid.cxx + // tpc/inc/BrDetectorParamsTPC.h tpc/src/BrDetectorParamsTPC.cxx + // tpc/src/BrDetectorTPC.cxx tpc/src/BrDigitizeTPC.cxx + // tpc/src/BrLocalTrackTPC.cxx track/inc/BrDetectorTrack.h + // track/inc/BrFSTrackingModule.h + // track/inc/BrSpectrometerTracks.h track/src/BrDetectorTrack.cxx + // track/src/BrFSTrackingModule.cxx + // track/src/BrSpectrometerTracks.cxx + // + // Revision 1.6 1999/02/26 21:14:40 hagel + // Minor changes to make compatible with BrFSTrackingModule + // + // Revision 1.5 1999/02/23 23:18:17 jhlee + // add GetTheta and GetPhi for MRS + // + // Revision 1.4 1999/01/21 23:23:28 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 didnt 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.3 1999/01/15 16:37:03 videbaek + // Working version of MRS tracking of mtp1,mtp2 and new general track + // classes. Changes also added to BrModuleMatchTrack for this reason. + // + // Revision 1.2 1998/12/21 20:23:12 videbaek + // Included MRS tracking, and track combine module as part of a more + // generalized set of Methods and classes. + // + // + #define NOTYET + ////////////////////////////////////////////////////////////////////// + // // + // BrSpectrometerTracks // + // // + // BRAHMS Spectrometer Track class // + // These track are the final result from the combine track and // + // matching algorithms. The only contain members of the classes // + // BrMatchedTrack and BrDetectorTrack. The BrDetectorTrack is in // + // fact the local tracks from the various detectors. // + // // + // Author : F.Videbaek videbaek@bnl.gov // + // Created : 24-Oct-1998 // + // Version : 1.0 // + // Changed : 07-Nov-1998 // + // // + ////////////////////////////////////////////////////////////////////// + + // Root Classes + #ifndef ROOT_TObject + #include "TObject.h" + #endif + // + // Brat classes + // + #ifndef BRAT_BrDetectorTrack + #include "BrDetectorTrack.h" + #endif + + + //---------------------------------------------------------- + // + + class BrMatchedTrack : public TObject { + public: + BrMatchedTrack(); + virtual ~BrMatchedTrack(); + + //Setter functions + void SetID(Int_t i) {fID = i;} + void SetP(Double_t p){fMomentum= p;} + void SetMomentum(Double_t p){fMomentum= p;} + void SetExitX(Double_t x){fExitX=x;} + void SetExitY(Double_t y){fExitY=y;} + void SetEntranceX(Double_t x){fEntranceX=x;} + void SetEntranceY(Double_t y){fEntranceY=y;} + void SetDang(Double_t a){fDang = a;} + void SetDaly(Double_t a){fDaly = a;} + void SetDy(Double_t a){fDy = a;} + void SetFrontTrackId(Int_t i){fFrontTrackId = i;} + void SetBackTrackId(Int_t i){fBackTrackId = i;} + void SetFrontTrack(BrDetectorTrack* trackp){fFrontTrack = trackp;} + void SetBackTrack(BrDetectorTrack* trackp){fBackTrack = trackp;} + void SetStatus(Int_t i){fFrontTrackId = i;} + + //Getter functions + Int_t GetID() {return fID;} + BrDetectorTrack* GetFrontTrack() {return fFrontTrack;} + BrDetectorTrack* GetBackTrack() {return fBackTrack;} + Int_t GetFrontTrackID() {return fFrontTrackId;} + Int_t GetBackTrackID() {return fBackTrackId;} + Double_t GetP() {return fMomentum;} + Double_t GetMomentum() {return fMomentum;} + Int_t GetStatus() {return fStatus;} + + Double_t GetDang() {return fDang;} + Double_t GetDaly() {return fDaly;} + Double_t GetDy() {return fDy;} + Double_t GetEntranceX() {return fEntranceX;} + Double_t GetEntranceY() {return fEntranceX;} + Double_t GetExitX() {return fEntranceX;} + Double_t GetExitY() {return fEntranceX;} + private: + Int_t fID; // unique Id for this matching combination + BrDetectorTrack* fFrontTrack; //! pointer to front track + Int_t fFrontTrackId; // Unique Id for front track + BrDetectorTrack* fBackTrack; //! pointer to back track + Int_t fBackTrackId; // Unique Id for back track + Double_t fMomentum; // Momentum through this magnet + Double_t fDang; // Actual value for match in angle + Double_t fDaly; // Actual value for match in dy/dz + Double_t fDy; // Actual difference for match in vertical position + Double_t fEntranceX; // Horizontal Position at magnet entrance ( Gap ) + Double_t fEntranceY; // Vertical Position at magnet entrance ( Gap ) + Double_t fExitX; // Horizontal Position at magnet exit ( Gap ) + Double_t fExitY; // Vertical Position at magnet exit ( Gap ) + Int_t fStatus; // Status Flag + + ClassDef(BrMatchedTrack,1) // BRAHMS Matched tracks trhough one magnet class + }; + + #ifndef NOTYET + //---------------------------------------------------------- + // + //---------------------------------------------------------- + // + class BrFSShortTrack : public TObject { + public: + BrFSShortTrack(); + virtual ~BrFSShortTrack(); + + private: + + // I first thought to keep both a pointer as well as a unique ID of local tracks + // After a while my suggestion is to imbed the actual best track into the structure + // This will make analysis tasks later on much simpler. Will have to implement + // proper copy constructors. + // + BrMatchedTrack fTrack12; // Matched track + BrDetectorTrack fTrackT2; // Actual track in T2 + BrDetectorTrack fTrackT1; // Actual track in T1 (may/ may not be filled properly! or empty) + // This is q question how to do. + Double_t fMomentum; // Momentum as derived from D3,D4; + Double_t fPhi; // Azimuth angle of track + Double_t fTheta; // Polar angle of Track + Int_t fStatus; // Status variables (to be defined...) + Double_t fQuality; // Quality factor (to be defined) + Double_t fEntranceD1X; + Double_t fEntranceD1Y; + Double_t fExitD1X; + Double_t fExitD1Y; + Double_t fVx; // projected nominal vertex (x) (at z=0 in spectrometer system) + Double_t fVy; // projected nominal vertex (y) (at z=0 in spectrometer system) + + + ClassDef(BrFSShortTrack,1) // BRAHMS Frward Spectrometer Class (Front Section) + + + }; + + #endif + + + //Moved out of NOTYET 2/24/1999 + class BrFSTrack : public TObject { + public: + BrFSTrack(); + virtual ~BrFSTrack(); + + //Setter functions + + virtual void SetId(Int_t id) {fId = id;} + + virtual void SetTrack12(BrMatchedTrack *track) {fTrack12 = *track;} + virtual void SetTrack34(BrMatchedTrack *track) {fTrack34 = *track;} + virtual void SetTrack45(BrMatchedTrack *track) {fTrack45 = *track;} + virtual void SetTrackT2(BrDetectorTrack *track) {fTrackT2 = *track;} + virtual void SetTrackT3(BrDetectorTrack *track) {fTrackT3 = *track;} + virtual void SetTrackT4(BrDetectorTrack *track) {fTrackT4 = *track;} + virtual void SetTrackT5(BrDetectorTrack *track) {fTrackT5 = *track;} + virtual void SetTrackT1(BrDetectorTrack *track) {fTrackT1 = *track;} + + virtual void SetMomentum(Double_t p) {fMomentum = p;} + virtual void SetP(Double_t p) {fMomentum = p;} + virtual void SetPhi(Double_t phi) {fPhi = phi;} + virtual void SetTheta(Double_t theta) {fTheta = theta;} + virtual void SetStatus(Int_t status) {fStatus = status;} + virtual void SetQuality(Double_t quality) {fQuality = quality;} + virtual void SetTx(Double_t tx) {fTx = tx;} + virtual void SetTy(Double_t ty) {fTy = ty;} + virtual void SetDxT2(Double_t dxt2) {fDxT2 = dxt2;} + virtual void SetDyT2(Double_t dyt2) {fDyT2 = dyt2;} + virtual void SetDaxT2(Double_t daxt2) {fDaxT2 = daxt2;} + virtual void SetDayT2(Double_t dayt2) {fDayT2 = dayt2;} + virtual void SetEntranceD1X(Double_t x) {fEntranceD1X = x;} + virtual void SetEntranceD1Y(Double_t y) {fEntranceD1Y = y;} + virtual void SetExitD1X(Double_t x) {fExitD1X = x;} + virtual void SetExitD1Y(Double_t y) {fExitD1Y = y;} + virtual void SetEntranceD2X(Double_t x) {fEntranceD2X = x;} + virtual void SetEntranceD2Y(Double_t y) {fEntranceD2Y = y;} + virtual void SetExitD2X(Double_t x) {fExitD2X = x;} + virtual void SetExitD2Y(Double_t y) {fExitD2Y = y;} + virtual void SetVx(Double_t x) {fVx = x;} + virtual void SetVy(Double_t y) {fVy = y;} + + //Getter functions + Int_t GetId() {return fId;} + + BrMatchedTrack* GetTrack12() {return &fTrack12;} + BrMatchedTrack* GetTrack34() {return &fTrack34;} + BrMatchedTrack* GetTrack45() {return &fTrack45;} + BrDetectorTrack* GetTrackT2() {return &fTrackT2;} + BrDetectorTrack* GetTrackT3() {return &fTrackT3;} + BrDetectorTrack* GetTrackT4() {return &fTrackT4;} + BrDetectorTrack* GetTrackT5() {return &fTrackT5;} + BrDetectorTrack* GetTrackT1() {return &fTrackT1;} + + const BrDetectorTrack* GetTtr(int i) const; + + Double_t GetMomentum() {return fMomentum;} + Double_t GetP() {return fMomentum;} + Double_t GetPhi() {return fPhi;} + Double_t GetTheta() {return fTheta;} + Int_t GetStatus() {return fStatus;} + Double_t GetQuality() {return fQuality;} + Double_t GetTx() {return fTx;} + Double_t GetTy() {return fTy;} + Double_t GetDxT2() {return fDxT2;} + Double_t GetDyT2() {return fDyT2;} + Double_t GetDaxT2() {return fDaxT2;} + Double_t GetDayT2() {return fDayT2;} + Double_t GetEntranceD1X() {return fEntranceD1X;} + Double_t GetEntranceD1Y() {return fEntranceD1Y;} + Double_t GetExitD1X() {return fExitD1X;} + Double_t GetExitD1Y() {return fExitD1Y;} + Double_t GetEntranceD2X() {return fEntranceD2X;} + Double_t GetEntranceD2Y() {return fEntranceD2Y;} + Double_t GetExitD2X() {return fExitD2X;} + Double_t GetExitD2Y() {return fExitD2Y;} + Double_t GetVx() {return fVx;} + Double_t GetVy() {return fVy;} + + private: + + // I first thought to keep both a pointer as well as a unique ID of local tracks + // After a while my suggestion is to imbed the actual best track into the structure + // This will make analysis tasks later on much simpler. Will have to implement + // proper copy constructors. + // + // The matched tracks do not contain the detector traks only two ID's so it there + // is only little redundancy here. + // + // Estimated size + // 2*36 bytes + 4*20 bytes (needs update) + + Int_t fId; + + BrMatchedTrack fTrack12; // Matched track in D2 + BrMatchedTrack fTrack34; // Matched track in D3 + BrMatchedTrack fTrack45; // Matched track in D4 + BrDetectorTrack fTrackT2; // Matched Detector track in T2 + BrDetectorTrack fTrackT3; // Actual track in T3 + BrDetectorTrack fTrackT4; // Actual track in T4 + BrDetectorTrack fTrackT5; // Actual track in T5 + BrDetectorTrack fTrackT1; // Actual track in T1 (may/ may not be filled properly! or empty) + // This is q question how to do. + Double_t fMomentum; // Momentum as derived from D3,D4; + Double_t fPhi; // Azimuth angle of track + Double_t fTheta; // Polar angle of Track + Int_t fStatus; // Status variables (to be defined...) + Double_t fQuality; // Quality factor (to be defined) + Double_t fTx; // projected vertex position (at nominal z=0 plane in spec systeM) + Double_t fTy; // as above but for Y. + Double_t fDxT2; // Matching deviation in T2; horizontal position + Double_t fDyT2; // Matching deviation in T2; vertical position + Double_t fDaxT2; // Matching deviation in T2; slope dx/dz + Double_t fDayT2; // Matching deviation in T2; slope dy/dz + Double_t fEntranceD1X; // Entrance position for track in D1 + Double_t fEntranceD1Y; // Note that the positions for the other magnets + Double_t fExitD1X; // are given in the matched tracks + Double_t fExitD1Y; + Double_t fEntranceD2X; + Double_t fEntranceD2Y; + Double_t fExitD2X; + Double_t fExitD2Y; + Double_t fVx; // projected nominal vertex (x) (at z=0 in spectrometer system) + Double_t fVy; // projected nominal vertex (y) (at z=0 in spectrometer system) + + ClassDef(BrFSTrack,1) // BRAHMS Frward Spectrometer Class + + }; + + //---------------------------------------------------------- + // + class BrMRSTrack : public TObject { + public: + BrMRSTrack(); + virtual ~BrMRSTrack(); + + void SetTheta(Double_t theta){fTheta=theta;} + void SetPhi(Double_t phi){fPhi=phi;} + void SetTx(Double_t tx){fTx=tx;} + void SetTy(Double_t ty){fTy=ty;} + void SetMomentum(Double_t p){fMomentum=p;} + void SetStatus(Int_t status){fStatus=status;} + void SetId(Int_t id){fId=id;} + + void FillFrontTrack(BrDetectorTrack* trackp){fFrontTrack = *trackp;}; + void FillBackTrack(BrDetectorTrack* trackp) {fBackTrack = *trackp;}; + + Int_t GetStatus() {return fStatus;} + Int_t GetId() const {return fId;} + Double_t GetTheta() const {return fTheta;} + Double_t GetPhi() const {return fPhi;} + Double_t GetTx() const {return fTx;} + Double_t GetTy() const {return fTy;} + Double_t GetMomentum() const{return fMomentum;} + BrDetectorTrack* GetFrontTrack()const{return (BrDetectorTrack*) &fFrontTrack;} + BrDetectorTrack* GetBackTrack()const{return (BrDetectorTrack*) &fBackTrack;} + BrMatchedTrack* GetMatchedTrack()const{return (BrMatchedTrack*) &fTrackT12;} + + + private: + + // I first thought to keep both a pointer as well as a unique ID of local tracks + // After a while, my suggestion is to imbed the actual best track into the structure + // This will make analysis tasks later on much simpler. Will have to implement + // proper copy constructors if not already present for BrDectorTrack.. + // + + Int_t fId; // Unique Id + BrDetectorTrack fFrontTrack; // Actual track in MTP1 + BrDetectorTrack fBackTrack; // Actual track in MTP2 + BrMatchedTrack fTrackT12; // + + Double_t fMomentum; // Momentum as derived from MTP1, MTP2 (also i fTrackT12 ?!) + Double_t fPhi; // Azimuth angle of track + Double_t fTheta; // Polar angle of Track + Int_t fStatus; // Status variables (to be defined...) + Double_t fQuality; // Quality factor (to be defined) + Double_t fEntranceD5X; + Double_t fEntranceD5Y; + Double_t fExitD5X; + Double_t fExitD5Y; + Double_t fTx; // projected nominal vertex (x) (at z=0 in spectrometer system) + Double_t fTy; // projected nominal vertex (y) (at z=0 in spectrometer system) + + ClassDef(BrMRSTrack,1) // BRAHMS MRS Spectrometer Class + + }; + + #endif + diff -c -r -N VER-1-2/include/BrSrc_LinkDef.h VER-1-2-1/include/BrSrc_LinkDef.h *** VER-1-2/include/BrSrc_LinkDef.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrSrc_LinkDef.h Mon Nov 8 10:03:35 1999 *************** *** 0 **** --- 1,11 ---- + #ifdef __CINT__ + + #pragma link off all globals; + #pragma link off all classes; + #pragma link off all functions; + + #pragma link C++ class BrRint; + + #endif + + diff -c -r -N VER-1-2/include/BrTPCCluster.h VER-1-2-1/include/BrTPCCluster.h *** VER-1-2/include/BrTPCCluster.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrTPCCluster.h Fri Nov 5 18:26:17 1999 *************** *** 0 **** --- 1,103 ---- + #ifndef BRAT_BrTPCCluster + #define BRAT_BrTPCCluster + + // $Id: BrTPCCluster.h,v 1.5 1999/02/25 14:52:53 videbaek Exp $ + // + // $Log: BrTPCCluster.h,v $ + // Revision 1.5 1999/02/25 14:52:53 videbaek + // Inserted code for using BrTPCSequnece instead of BrDigTPC for both + // TPC digitization and the TPC local track reconstruction. + // + // Revision 1.4 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.3 1999/01/15 16:35:36 videbaek + // Changes included using clonesarrays in digitizations. + // Localtracking added cuts for type 4 clusters + // + // + /////////////////////////////////////////////////////////////////////// + // // + // BrTPCCluster // + // // + // BRAHMS TPC Cluster class // + // // + // Author : Kris Hagel (hagel@comp.tamu.edu // + // Created : 11-Mar-1998 // + // Version : 1.0 // + // Changed : // + // // + /////////////////////////////////////////////////////////////////////// + + // Root Classes + #ifndef ROOT_TObject + #include "TObject.h" + #endif + + // Brahms Classes + // + class BrDigTPC; + + class BrTPCCluster: public TObject { + + public: + BrTPCCluster(){ }; + + virtual ~BrTPCCluster() { }; + + Bool_t IsSortable() const {return kTRUE;} + Int_t Compare(TObject *digtpc); + + void SetID(Int_t i) {fID = i;} + void SetRow(Int_t i) {fRow = i;} + void SetStat(Int_t i) {fStat = i;} + void SetPav(Float_t x) {fPav = x;} + void SetTav(Float_t x) {fTav = x;} + void SetPsig(Float_t x){fPsig = x;} + void SetTsig(Float_t x){fTsig = x;} + void SetDedx(Float_t x){fDedx = x;} + void SetNpix(Int_t i) {fNpix = i;} + + void SetSubcl(Int_t i) {fSubcl = i;} + // void SetDigtpc(BrDigTPC* x) {fDigtpc = x;} + + + Int_t GetID() {return fID;} + Int_t GetRow() {return fRow;} + Int_t GetStat() {return fStat;} + Float_t GetPav() {return fPav;} + Float_t GetTav() {return fTav;} + Float_t GetPsig(){return fPsig;} + Float_t GetTsig(){return fTsig;} + Float_t GetDedx(){return fDedx;} + Int_t GetNpix() {return fNpix;} + + Int_t GetSubcl() {return fSubcl;} + + private: + + Int_t fID; // Unique Id (for this TPC) + Int_t fRow; // Padrow number + Int_t fStat; // + Float_t fPav; // Pad position (in terms of pad rows) + Float_t fTav; // time bin average + Float_t fPsig; // Pad(RMS) + Float_t fTsig; // Time(RMS) + Float_t fDedx; // Dedx (summed adc value for this cluster) + Int_t fNpix; // Number of pixels (time bins, pad bins) + + Int_t fSubcl; // Id for mother cluster (multicluster only) + + public: + + ClassDef(BrTPCCluster,1) // BRAHMS TPC Cluster Class + + }; + + #endif diff -c -r -N VER-1-2/include/BrTPCSequence.h VER-1-2-1/include/BrTPCSequence.h *** VER-1-2/include/BrTPCSequence.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrTPCSequence.h Fri Nov 5 18:26:17 1999 *************** *** 0 **** --- 1,62 ---- + #ifndef BRAT_TPCSequence + #define BRAT_TPCSequence + // $Id: BrTPCSequence.h,v 1.3 1999/02/25 14:52:54 videbaek Exp $ + // + // $Log: BrTPCSequence.h,v $ + // Revision 1.3 1999/02/25 14:52:54 videbaek + // Inserted code for using BrTPCSequnece instead of BrDigTPC for both + // TPC digitization and the TPC local track reconstruction. + // + // Revision 1.2 1999/02/11 15:19:26 hagel + // Changes to make compile under Solaris + // + // Revision 1.1 1999/01/28 21:27:31 videbaek + // Added BrTPSSqquences to libraries. Not yet in use, though. Expected to + // replace BrDigTPC objects + // Added cvs flags + // + // + // ROOT defines + // + #ifndef ROOT__TObject + # include "TObject.h" + #endif + + + // + // Brat Includes + // + + class BrTPCSequence : public TObject { + + public: + + BrTPCSequence(); + BrTPCSequence(int); + virtual ~BrTPCSequence(); + + Short_t* GetSequence() {return fAdc;} + Int_t GetAdc(int i); + + Int_t GetRow() const {return (Int_t) fRow;} + Int_t GetPad() const {return (Int_t) fPad;} + Int_t GetTime() const {return (Int_t) fTime;} + void SetPad(Short_t value) { fPad = value;} + void SetRow(Short_t value) { fRow = value;} + void SetTime(Short_t value) { fTime = value;} + Int_t GetNseq(){return (Int_t) fNseq;} + + private: + + Short_t fNseq; // number of time bins in the sequence + Short_t fRow; // padrow number for this sequence + Short_t fPad; // pad number for this sequence + Short_t fTime; // time bin for first adc value + Short_t* fAdc; // array of ADC values. + + public: + ClassDef(BrTPCSequence,1) // BRAHMS TPC digitized time sequence object + + }; + + #endif diff -c -r -N VER-1-2/include/BrTPCTrackingModule.h VER-1-2-1/include/BrTPCTrackingModule.h *** VER-1-2/include/BrTPCTrackingModule.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrTPCTrackingModule.h Fri Nov 5 18:26:17 1999 *************** *** 0 **** --- 1,167 ---- + #ifndef BRAT_BrTPCTrackingModule + #define BRAT_BrTPCTrackingModule + // + // $Id: BrTPCTrackingModule.h,v 1.4 1999/09/08 13:20:52 videbaek Exp $ + // + // $Log: BrTPCTrackingModule.h,v $ + // Revision 1.4 1999/09/08 13:20:52 videbaek + // Addede getter methods for parameters. + // + // Revision 1.3 1999/06/09 17:23:45 videbaek + // Add Clear methid + // + // Revision 1.2 1999/03/09 18:37:46 videbaek + // Minor fixes. Now a proper working version + // + // Revision 1.1 1999/03/07 22:38:50 videbaek + // Added TPCTrackingModule that uses DetectorHit for tracking. + // It essentailly works. + // + + /////////////////////////////////////////////////////////////////////// + // // + // BrTPCTrackingModule // + // // + // BRAHMS TPC Local Tracking Class // + // // + // Author : F.Videbaek (videbaek@bnl.gov) ) // + // Created : 9/MAR/99 // + // Version : 1.0 // + // Changed : // + // // + /////////////////////////////////////////////////////////////////////// + + #define TPCSEQUENCE + #define DETECTORHIT + + //ROOT Classes + #ifndef ROOT_TH1 + # include "TH1.h" + #endif + + #ifndef ROOT_TH2 + # include "TH2.h" + #endif + + //Brat Classes + + # ifndef BRAT_BrLocalTrackingModule + # include "BrLocalTrackingModule.h" + # endif + + # ifndef BRAT_BrTPCSequence + # include "BrTPCSequence.h" + # endif + + + class BrDetectorParamsTPC; + class BrDetectorVolume; + class BrDetectorTPC; + class TObjArray; + + class BrTPCTrackingModule : public BrLocalTrackingModule { + + public: + BrTPCTrackingModule(); + BrTPCTrackingModule(Char_t *Name,Char_t *Title); + + virtual ~BrTPCTrackingModule(); + + void Clear(); + void Event(BrEventNode* InputNode, BrEventNode* OutputNode); + + BrDetectorParamsTPC* GetDetectorParamsTPC(){ + return fParams_p;} + BrDetectorVolume* GetDetectorVolume() { + return fVolume_p;} + void Init(); + void DefineHistograms(); + + void ListParameters(); + void SetPsigLow(Double_t val) {psig_lowlimit = val;} + void SetPsigHigh(Double_t val) {psig_highlimit = val;} + void SetTsigLow(Double_t val) {tsig_lowlimit = val;} + void SetTsigHigh(Double_t val) {tsig_highlimit = val;} + void SetSearchWidthX(Double_t val) {fSearchWidthX=val;} + void SetSearchWidthY(Double_t val) {fSearchWidthY=val;} + void SetMaxRowsMissed(int val) {fMaxRowsMissed = val;} + + Double_t GetPsigLow(Double_t val) const { return psig_lowlimit;} + Double_t GetPsigHigh(Double_t val) {return psig_highlimit;} + Double_t GetTsigLow(Double_t val) {return tsig_lowlimit;} + Double_t GetTsigHigh(Double_t val) {return tsig_highlimit;} + Double_t GetSearchWidthX(Double_t val) {return fSearchWidthX;} + Double_t GetSearchWidthY(Double_t val) {return fSearchWidthY;} + Int_t GetMaxRowsMissed(int val) {return fMaxRowsMissed;} + + void ListRowHits(Int_t rownumber); + void DrawLocalTracks(); + BrDataTable* GetTPCClusters(){return &TPCCluster;} + + private: + Float_t psig_lowlimit; // Cut parameters for determining good clusters + Float_t psig_highlimit; // + Float_t tsig_lowlimit; // + Float_t tsig_highlimit; // + Float_t adc_threshold; // Internal lower limit for keeping adc values before summing. + Float_t fSearchWidthX; // Normalized search width (X) in track finding algorithm (cm) + Float_t fSearchWidthY; // Normalized search width (Y) in track finding algorithm (cm) + Int_t fMaxRowsMissed; // Track finding algorithm parameter. + + + Bool_t FindClusters(BrEventNode* InputNode); + void InitCluster(); + Int_t GetFreeCluster(); + void ScanMultiHitClusters(Int_t rownumber); + // BrDataTable* DigitizedTPC, BrDataTable* TPCCluster); + void ClustersToDetectorHits(); + Int_t GetMaxPixel(BrTPCCluster* cluster_ID, Int_t& ixm, Int_t& iym); + + + Int_t FindTracks(Int_t maxmiss, Float_t dx,Float_t dy); + void FillClusterSelector(Int_t irow,Int_t stat, TObjArray *ClusTPCMod); + Int_t TPCPadRecon(Int_t istart, + Int_t ilast,Int_t idir,Int_t maxmiss,Float_t dx,Float_t dy); + + BrDetectorParamsTPC *fParams_p; + BrDetectorVolume *fVolume_p; + + //For event display + BrDetectorTPC *fDetectorNode; + + //Histograms to monitor TPC tracking + TH1F *h_TPCpsig; + TH1F *h_TPCtsig; + TH2F *h_TPCpsig_tsig; + TH1F *h_TPCadc; + TH1F *h_TPCtime; + TH1F *h_TPCpixels; + TH2F *hTPCpadtime; + + + void FindHitsNextRow(TObjArray *HitList, Int_t irow, + Float_t *proj, Float_t dx, Float_t dy, + TObjArray &FoundHits); + + BrDataTable TPCCluster; + + struct { + int head; + int tail; + } cluster[max_cluster]; //! + + //record for sub-clusters + struct { + short adcval; // ADC value from dig data + short ID; // Cluster unique ID + short subID; // Id to which a sub cluster belongs + } pixels[maxpad][maxtime]; //! + + Int_t fUniqueClusterID; //! ID counter used for TPCCluster generation and bookkeeping + + public: + + ClassDef(BrTPCTrackingModule,0) // BRAHMS Local Tracking Interface + }; + + #endif diff -c -r -N VER-1-2/include/BrTPC_LinkDef.h VER-1-2-1/include/BrTPC_LinkDef.h *** VER-1-2/include/BrTPC_LinkDef.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrTPC_LinkDef.h Fri Nov 5 18:26:17 1999 *************** *** 0 **** --- 1,18 ---- + #ifdef __CINT__ + // $Id: BrTPC_LinkDef.h,v 1.7 1999/08/14 17:01:59 videbaek Exp $ + // + // $log$ + // + + #pragma link off all globals; + #pragma link off all classes; + #pragma link off all functions; + + #pragma link C++ class BrDetectorParamsTPC; + #pragma link C++ class BrDigitizeTPC; + #pragma link C++ class BrTPCSequence-; + #pragma link C++ class BrTPCCluster; + #pragma link C++ class BrTPCTrackingModule; + #pragma link C++ class BrDetectorTPC; + + #endif diff -c -r -N VER-1-2/include/BrTRACK_LinkDef.h VER-1-2-1/include/BrTRACK_LinkDef.h *** VER-1-2/include/BrTRACK_LinkDef.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrTRACK_LinkDef.h Fri Nov 5 18:26:09 1999 *************** *** 0 **** --- 1,64 ---- + // $Id: BrTRACK_LinkDef.h,v 1.12 1999/10/12 20:34:19 videbaek Exp $ + // + // $Log: BrTRACK_LinkDef.h,v $ + // Revision 1.12 1999/10/12 20:34:19 videbaek + // Modifications with uniform Makefiles for all source directories. + // + // Revision 1.11 1999/09/07 21:36:57 hagel + // Remove obsolete files and references to them + // + // Revision 1.10 1999/03/07 22:37:38 videbaek + // Added DetectorHit and BrLocalTrackingModule as a more general way to + // deal with local tracks and hits. Initial insertion. Not fully debugged. + // + // Revision 1.9 1999/02/26 23:17:50 hagel + // Add support for BrFSTrackingModule in Makefiles and Linkdefs + // + // Revision 1.8 1998/12/21 20:23:13 videbaek + // Included MRS tracking, and track combine module as part of a more + // generalized set of Methods and classes. + // + // Revision 1.7 1998/09/21 02:28:20 hagel + // Add BrBaseTrack as well as clean up BrCombineTrack + // + // Revision 1.6 1998/09/04 15:35:42 hagel + // Debug BrCombineTrack + // + // Revision 1.5 1998/04/29 02:27:16 hagel + // Correct errors + // + // Revision 1.4 1998/04/29 02:24:48 hagel + // Additions for BrCombineTrack + // + // Revision 1.3 1998/04/28 22:59:55 hagel + // Added BrCombineTrack + // + // Revision 1.2 1998/04/06 21:12:18 videbaek + // Clean up and additions for Win95 + // + // + #ifdef __CINT__ + + #pragma link off all globals; + #pragma link off all classes; + #pragma link off all functions; + + #pragma link C++ class BrLocalTrackingModule; + #pragma link C++ class BrLocalTrackModule; + #pragma link C++ class BrCombinedHit; + #pragma link C++ class BrDetectorHit; + #pragma link C++ class BrDetectorTrack; + #pragma link C++ class BrLocalTrack; + + #pragma link C++ class BrTrackHit2D; + #pragma link C++ class BrTrackHit; + #pragma link C++ class BrVirtualTrack; + + #pragma link C++ class BrMRSTrackingModule; + #pragma link C++ class BrModuleMatchTrack; + #pragma link C++ class BrMatchedTrack; + #pragma link C++ class BrMRSTrack; + #pragma link C++ class BrFSTrack; + #pragma link C++ class BrFSTrackingModule; + + #endif diff -c -r -N VER-1-2/include/BrTableManager.h VER-1-2-1/include/BrTableManager.h *** VER-1-2/include/BrTableManager.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrTableManager.h Fri Nov 5 18:26:04 1999 *************** *** 0 **** --- 1,72 ---- + #ifndef BRAT_BrTableManager + #define BRAT_BrTableManager + // $Id: BrTableManager.h,v 1.1 1999/02/06 02:39:02 hagel Exp $ + // + // $Log: BrTableManager.h,v $ + // Revision 1.1 1999/02/06 02:39:02 hagel + // Initial revision + // + // + // + /////////////////////////////////////////////////////////// + // + // BrTableManager + // + // BRAHMS Container Class for Tables + // + // Author : Kris Hagel + // Created: 25-Jan-1999 + // Version: 1.0 + // + /////////////////////////////////////////////////////////// + + // ROOT classes + #ifndef ROOT_TNamed + #include "TNamed.h" + #endif + + #ifndef ROOT_TObjArray + #include "TObjArray.h" + #endif + + // System and ROOT include files + // + #include + + class BrEventNode; + class BrEvent; + + const Int_t MaxNumTables = 100; + const Int_t TABLE_TYPE_EVENT_NODE = 1; + const Int_t TABLE_TYPE_EVENT = 2; + + class BrTableManager : public TNamed { + + private: + //Hopefully this can be done with container classes, but I don't know how right now + BrEventNode **fEventNodeList[MaxNumTables] ; // List of EventNode Tables + BrEvent **fEventList[MaxNumTables] ; // List of Event Tables + Char_t *fTableNames[MaxNumTables]; // List of table names + Int_t fTableType[MaxNumTables]; // Type of table, BrEvent or BrEventNode + Int_t fNumTables; + Int_t fVerbose; // Option flag + public: + // constructors & descructors + BrTableManager(); + BrTableManager(Char_t *name, Char_t *title); + ~BrTableManager(); + + virtual void SetVerbose(Int_t Verbose); + virtual void AddTable(Char_t *name,BrEventNode **table); + virtual void AddTable(Char_t *name,BrEvent **table); + virtual void ListTables(); + virtual void Create(); + virtual void Clear(); + + ClassDef(BrTableManager,0) //BRAHMS Analysis Module Container + }; + + + #endif + + diff -c -r -N VER-1-2/include/BrTableNames.h VER-1-2-1/include/BrTableNames.h *** VER-1-2/include/BrTableNames.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrTableNames.h Fri Nov 5 18:26:04 1999 *************** *** 0 **** --- 1,55 ---- + #ifndef BRAT_BrTableNames + #define BRAT_BrTableNames + + // $Id: BrTableNames.h,v 1.1 1999/07/27 01:41:59 hagel Exp $ + // + // $Log: BrTableNames.h,v $ + // Revision 1.1 1999/07/27 01:41:59 hagel + // Initial revision + // + + //These are table names to be used when generating and accessing + //tables in BRAT. If these defininitons are used, one can always + //assure themselves and everyone else that they are accessing a table + //consistently. + + #ifndef ROOT_Rtypes + #include "Rtypes.h" + #endif + + //Geant tables + const Char_t kGeantTracksTable[] = {"GeantTracks"}; + const Char_t kGeantHitsTable[] = {"GeantHits"}; + + //General tracking tables + const Char_t kCombinedHitsTable[] = {"CombinedHits"}; + const Char_t kDetectorTrack[] = {"DetectorTrack"}; + + //TPC tables + const Char_t kDigTPCTable[] = {"DigTPC"}; + const Char_t kTPCSequence[] = {"TPCSequence"}; + + //DC tables + const Char_t kDigHit[] = {"DigHit"}; + const Char_t kDigitizedDC[] = {"DigitizedDC"}; + + //TOF tables + const Char_t kDigTof[] = {"DigTof"}; + const Char_t kCalibratedTof[] = {"CalibratedTof"}; + const Char_t kPid[] = {"BrPid"}; + + //BB tables + const Char_t kDigBB[] = {"DigBB"}; + const Char_t kRdoBB[] = {"Rdo Data"}; + + //C1 tables + const Char_t kDigC1[] = {"DigC1"}; + + //MULT tables + const Char_t kMultTiles[] = {"MultTiles"}; + const Char_t kMultSi[] = {"MultSi"}; + + //ZDC tables + const Char_t kDigZDC[] = {"DigZDC"}; + + #endif diff -c -r -N VER-1-2/include/BrTof_LinkDef.h VER-1-2-1/include/BrTof_LinkDef.h *** VER-1-2/include/BrTof_LinkDef.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrTof_LinkDef.h Fri Nov 5 18:26:13 1999 *************** *** 0 **** --- 1,15 ---- + #ifdef __CINT__ + + #pragma link off all globals; + #pragma link off all classes; + #pragma link off all functions; + + #pragma link C++ class BrDetectorParamsTof; + #pragma link C++ class BrDigTof; + #pragma link C++ class BrDigitizeTof; + #pragma link C++ class BrCalibrateTof; + #pragma link C++ class BrGeneratePid; + #pragma link C++ class BrCalTof; + #pragma link C++ class BrMonitorTof; + + #endif diff -c -r -N VER-1-2/include/BrTrack.h VER-1-2-1/include/BrTrack.h *** VER-1-2/include/BrTrack.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrTrack.h Fri Nov 5 18:26:10 1999 *************** *** 0 **** --- 1,137 ---- + // $Id: BrTrack.h,v 1.6 1999/02/25 17:26:05 videbaek Exp $ + // + // $Log: BrTrack.h,v $ + // Revision 1.6 1999/02/25 17:26:05 videbaek + // Add CVS Id and Log flags. Removed commented code + // + // + #ifndef BRAT_BrTrack + #define BRAT_BrTrack + + // $Id: BrTrack.h,v 1.6 1999/02/25 17:26:05 videbaek Exp $ + // + // $Log: BrTrack.h,v $ + // Revision 1.6 1999/02/25 17:26:05 videbaek + // Add CVS Id and Log flags. Removed commented code + // + // Revision 1.5 1999/01/21 23:23:28 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 + // + // + // + ////////////////////////////////////////////////////////////////////// + // // + // BrTrack // + // // + // BRAHMS Detector Track class // + // // + // Author : Kris Hagel (hagel@comp.tamu.edu) // + // Created : 7-Apr-1998 // + // Version : 1.0 // + // Changed : // + // // + ////////////////////////////////////////////////////////////////////// + + // BRAT Classes + #ifndef BRAT_BrBaseTrack + #include "BrBaseTrack.h" + #endif + + class BrDetectorTrack; + + class BrTrack: public BrBaseTrack { + + public: + BrTrack(); + + virtual ~BrTrack(); + + virtual Float_t GetP12() const {return fP12;} + virtual Float_t GetP34() const {return fP34;} + virtual Float_t GetP45() const {return fP45;} + virtual Float_t GetP345() const {return fP345;} + virtual Float_t GetTheta() const {return fTheta;} + virtual Float_t GetPhi() const {return fPhi;} + virtual BrDetectorTrack *GetT1tr() const {return fT1tr;} + virtual BrDetectorTrack *GetT2tr() const {return fT2tr;} + virtual BrDetectorTrack *GetT3tr() const {return fT3tr;} + virtual BrDetectorTrack *GetT4tr() const {return fT4tr;} + virtual BrDetectorTrack *GetT5tr() const {return fT5tr;} + virtual const BrDetectorTrack *GetTtr(int i) const; + + virtual void SetP12(Float_t x) {fP12 = x;} + virtual void SetP34(Float_t x) {fP34 = x;} + virtual void SetP45(Float_t x) {fP45 = x;} + virtual void SetP345(Float_t x) {fP345 = x;} + virtual void SetTheta(Float_t x) {fTheta = x;} + virtual void SetPhi(Float_t x) {fPhi = x;} + virtual void SetT1tr(BrDetectorTrack *titr) {fT1tr = titr;} + virtual void SetT2tr(BrDetectorTrack *titr) {fT2tr = titr;} + virtual void SetT3tr(BrDetectorTrack *titr) {fT3tr = titr;} + virtual void SetT4tr(BrDetectorTrack *titr) {fT4tr = titr;} + virtual void SetT5tr(BrDetectorTrack *titr) {fT5tr = titr;} + + private: + + Float_t fP12; //momentum derived from T1 and T2 + Float_t fP34; //momentum derived from T3 and T4 + Float_t fP45; //momentum derived from T4 and T5 + Float_t fP345; //momentum derived from T3, T4 and T5 + Float_t fTheta; //Theta of the track + Float_t fPhi; //Phi of the track + + BrDetectorTrack *fT1tr; //Pointer to T1tr + BrDetectorTrack *fT2tr; //Pointer to T2tr + BrDetectorTrack *fT3tr; //Pointer to T3tr + BrDetectorTrack *fT4tr; //Pointer to T4tr + BrDetectorTrack *fT5tr; //Pointer to T5tr + + public: + + ClassDef(BrTrack,1) // BRAHMS Main Track Class + }; + + /* + NA49 track definitions + Char_t fCharge from track_t qpxz + Char_t fNPoint from rtrack_t n_point + Char_t fNFitPoint from track_t n_fit_point + Char_t fNDedxPoint from rtrack_t n_dedx_point + Char_t fNMaxPoint from rtrack_t n_max_point + Char_t fIdDet from track_t id_det + Int_t fIflag from track_t iflag + Char_t fTofIdDet from track_tof_t id_det + Char_t fTofIflag from track_tof_t iflag + Char_t fTofX from track_tof_t x + Float_t fPx from track_t px + Float_t fPy from track_t py + Float_t fPz from track_t pz + Float_t fSigPx from track_t sig_px + Float_t fSigPy from track_t sig_py + Float_t fSigPz from track_t sig_pz + Float_t fMass2 from track_tof_t mass2 + Float_t fSigMass2 from track_tof_t sig_mass2 + Float_t fBx from track_t bx + Float_t fBy from track_t by + Float_t fPchi2 from track_t pchi2; + Float_t fTmeanCharge from rtrack_t tmean_charge + Float_t fXFirst from rtrack_t x_first + Float_t fYFirst from rtrack_t y_first + Float_t fZFirst from rtrack_t z_first + Float_t fXLast from rtrack_t x_last + Float_t fYLast from rtrack_t y_last + Float_t fZLast from rtrack_t z_last + Float_t fWeight weight factor for future use + Float_t fRandom random track identifier for sample splitting + Int_t fLabel track label insise T49Event + Int_t fPointIndex Index into the event's fPointList + */ + + #endif + diff -c -r -N VER-1-2/include/BrTrackDefines.h VER-1-2-1/include/BrTrackDefines.h *** VER-1-2/include/BrTrackDefines.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrTrackDefines.h Fri Nov 5 18:26:10 1999 *************** *** 0 **** --- 1,15 ---- + #define max_cluster 200 + #define maxdcplanes 20 + #define maxpad 196 + #define maxtime 160 + #define maxcand 20 + #define maxview 30 + + #define IANY -2147483647 + #define INULL 0 + #define NULL_CLUSTER -1 + #define NULL_SEGMENT -1 + + #define degrad 0.01745329222 + #define raddeg 57.2957795131 + diff -c -r -N VER-1-2/include/BrTrackHit.h VER-1-2-1/include/BrTrackHit.h *** VER-1-2/include/BrTrackHit.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrTrackHit.h Fri Nov 5 18:26:10 1999 *************** *** 0 **** --- 1,84 ---- + #ifndef BRAT_BrTrackHit + #define BRAT_BrTrackHit + + // $Id: BrTrackHit.h,v 1.3 1999/01/21 23:23:28 hagel Exp $ + // + // $Log: BrTrackHit.h,v $ + // Revision 1.3 1999/01/21 23:23:28 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.2 1998/12/04 21:35:40 videbaek + // Started updating structures for tracking. Using BrVector3D + // in many places where double* or float* was used before. + // Fix type SHLIB->$(SHLIB) .. + // + // + /////////////////////////////////////////////////////////////////////// + // // + // BrTrackHit // + // // + // BRAHMS Track Hit class // + // // + // Author : Kris Hagel (hagel@comp.tamu.edu) // + // Created : 9/Mar/1998 // + // Version : 1.0 // + // Changed : // + // // + /////////////////////////////////////////////////////////////////////// + + // Root Classes + #ifndef ROOT_TObject + #include "TObject.h" + #endif + + // Brahms Classes + #ifndef BRAT_BrCombinedHit + #include "BrCombinedHit.h" + #endif + + class BrLocalTrack; + class BrTrackHit2D; + + class BrTrackHit: public TObject { + + public: + BrTrackHit(); + + virtual ~BrTrackHit() { }; + + virtual Int_t GetImod() {return fImod;} + virtual Int_t GetTrackID() {return fTrackID;} + virtual Int_t GetHitID() {return fHitID;} + virtual BrCombinedHit *GetHitcmb() {return fHitcmb;} + virtual BrLocalTrack *GetLocalTrack() {return fLoctra;} + virtual BrTrackHit2D *GetTra2d() {return fTra2d;} + + virtual void SetImod(Int_t i) {fImod = i;} + virtual void SetTrackID(Int_t trid) {fTrackID = trid;} + virtual void SetHitID(Int_t trid) {fHitID = trid;} + virtual void SetHitcmb(BrCombinedHit* hitcmb) {fHitcmb = hitcmb;} + virtual void SetLoctra(BrLocalTrack* loctra) {fLoctra = loctra;} + virtual void SetTra2d(BrTrackHit2D* tra2d) {fTra2d = tra2d;} + + private: + + Int_t fImod; // Rownumber, rownumber,plane id + Int_t fTrackID; // Unique Id for local track + Int_t fHitID; // Unique HitId + BrCombinedHit* fHitcmb; //! pointer to hit + BrLocalTrack* fLoctra; //! pointer to local track + BrTrackHit2D* fTra2d; //! pointer to 2D track (DC only) + + public: + + ClassDef(BrTrackHit,1) // BRAHMS track hit association class + + }; + + #endif diff -c -r -N VER-1-2/include/BrTrackHit2D.h VER-1-2-1/include/BrTrackHit2D.h *** VER-1-2/include/BrTrackHit2D.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrTrackHit2D.h Fri Nov 5 18:26:10 1999 *************** *** 0 **** --- 1,98 ---- + // $Id: BrTrackHit2D.h,v 1.3 1999/02/25 17:26:06 videbaek Exp $ + // + // $Log: BrTrackHit2D.h,v $ + // Revision 1.3 1999/02/25 17:26:06 videbaek + // Add CVS Id and Log flags. Removed commented code + // + // + #ifndef BRAT_BrTrackHit2D + #define BRAT_BrTrackHit2D + + // $Id: BrTrackHit2D.h,v 1.3 1999/02/25 17:26:06 videbaek Exp $ + // + // $Log: BrTrackHit2D.h,v $ + // Revision 1.3 1999/02/25 17:26:06 videbaek + // Add CVS Id and Log flags. Removed commented code + // + // Revision 1.2 1999/01/21 23:23:28 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 + // + // + // + /////////////////////////////////////////////////////////////////////// + // // + // TBrTrackHit2Ds // + // // + // BRAHMS Hit class // + // // + // Author : Kris Hagel (hagel@comp.tamu.edu) // + // Created : 13-Mar-1998 // + // Version : 1.0 // + // Changed : // + // // + /////////////////////////////////////////////////////////////////////// + + // Root Classes + #ifndef ROOT_TObject + #include "TObject.h" + #endif + + // Brahms Classes + #ifndef BRAT_BrDataTable + #include "BrDataTable.h" + #endif + + class BrTrackHit; + + class BrTrackHit2D: public TObject { + + public: + BrTrackHit2D(); + BrTrackHit2D(BrTrackHit2D* tra2d); + + virtual ~BrTrackHit2D() {fTrahit.Clear();}; + + virtual Float_t *GetPos() {return fPos;} + virtual Float_t GetVec() {return fVec;} + virtual Float_t GetDpos() {return fDpos;} + virtual Float_t GetDvec() {return fDvec;} + virtual Int_t GetNhit() {return fNhit;} + virtual Int_t GetFlg() {return fFlg;} + virtual Int_t GetStat() {return fStat;} + virtual Int_t GetTrackHitEntries() {return fTrahit.GetEntries();} + BrTrackHit* GetTrackHitAt(Int_t i) {return (BrTrackHit*)fTrahit.At(i);} + + virtual void SetPos(Float_t pos[2]) {for(Int_t i=0;i<2;i++) fPos[i] = pos[i];} + virtual void SetVec(Float_t vec) {fVec = vec;} + virtual void SetDpos(Float_t dpos) {fDpos = dpos;} + virtual void SetDvec(Float_t dvec) {fDvec = dvec;} + virtual void SetNhit(Int_t i) {fNhit = i;} + virtual void SetFlg(Int_t i) {fFlg = i;} + virtual void SetStat(Int_t i) {fStat = i;} + virtual void IncNhit() {fNhit++;} + virtual void AddTrackHit(BrTrackHit *trahit) {fTrahit.Add((TObject*)trahit);} + + private: + + Float_t fPos[2]; + Float_t fVec; + Float_t fDpos; + Float_t fDvec; + Int_t fNhit; + Int_t fFlg; + Int_t fStat; + BrDataTable fTrahit; + + public: + + ClassDef(BrTrackHit2D,1) // BRAHMS Track data class + + }; + + #endif diff -c -r -N VER-1-2/include/BrTrigBB.h VER-1-2-1/include/BrTrigBB.h *** VER-1-2/include/BrTrigBB.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrTrigBB.h Fri Nov 5 18:26:21 1999 *************** *** 0 **** --- 1,55 ---- + #ifndef BRAT_BrTrigBB + #define BRAT_BrTrigBB + + // $Id: BrTrigBB.h,v 1.1 1999/08/14 17:59:07 videbaek Exp $ + // $Log: BrTrigBB.h,v $ + // Revision 1.1 1999/08/14 17:59:07 videbaek + // Initial version + // + // + // Root Classes + + #ifndef ROOT_TObject + #include "TObject.h" + #endif + + // Brahms Classes + // + class BrTrigBB: public TObject { + + + private: + Int_t fId; // Reference ID in table. + Int_t fTubeNo; // Tube Number (either left or right) + Int_t fTdc; // Tdc value for PMT + Int_t fWidth; // Pulse width (in bins) + + public: + BrTrigBB(){ }; + + virtual ~BrTrigBB() { }; + + Bool_t IsSortable() const {return kTRUE;} + Int_t Compare(TObject *BrTrigBB); + + virtual Int_t GetTubeNo() const {return fTubeNo;} + virtual Int_t GetTdc() const {return fTdc;} + virtual Int_t GetWidth() const {return fWidth;} + virtual Int_t GetId() {return fId;} + + + virtual void SetTubeNo(Int_t i) {fTubeNo = i;} + virtual void SetTdc(Int_t time) {fTdc = time;} + virtual void SetWidth(Int_t time) {fWidth = time;} + virtual void SetId(Int_t i) {fId = i;} + + virtual void List(); + + + public: + + ClassDef(BrTrigBB,1) // BRAHMS Tof Digitized data class + + }; + + #endif diff -c -r -N VER-1-2/include/BrUnits.h VER-1-2-1/include/BrUnits.h *** VER-1-2/include/BrUnits.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrUnits.h Fri Nov 5 18:26:05 1999 *************** *** 0 **** --- 1,285 ---- + #ifndef BRAT_BrUnits + #define BRAT_BrUnits + // $Id: BrUnits.h,v 1.2 1999/01/21 23:23:20 hagel Exp $ + // + // $Log: BrUnits.h,v $ + // Revision 1.2 1999/01/21 23:23:20 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.1 1998/07/21 16:26:32 videbaek + // Units constants added + // + // + + #ifndef ROOT_Rtypes + #include "Rtypes.h" + #endif + + #include + // + // This could in fact be put in a proper namespace rather than + // in a class. Do not know how to do this with ROOT and CINT at this + // point + // + class BrUnits { + + public: + static const Double_t pi; // from + static const Double_t twopi; + static const Double_t halfpi; + static const Double_t pi2; + // + // Length [L] + // + static const Double_t millimeter; + static const Double_t millimeter2; + static const Double_t millimeter3; + + static const Double_t centimeter; + static const Double_t centimeter2; + static const Double_t centimeter3; + + static const Double_t meter; + static const Double_t meter2; + static const Double_t meter3; + + static const Double_t kilometer; + static const Double_t kilometer2; + static const Double_t kilometer3; + + static const Double_t micrometer; + static const Double_t nanometer; + static const Double_t femtometer; + static const Double_t Fermi; + + static const Double_t barn; + static const Double_t millibarn; + static const Double_t microbarn; + static const Double_t nanobarn; + + // + // Angle + // + static const Double_t radian; + static const Double_t milliradian; + static const Double_t degree; + + static const Double_t steradian; + + // + // Time [T] + // + static const Double_t nanosecond; + static const Double_t second; + static const Double_t millisecond; + + static const Double_t Hertz; + static const Double_t kiloHertz; + static const Double_t MegaHertz; + + // but these are also unambiguous and unlikely to be used as variable! + static const Double_t Hz; + static const Double_t kHz; + static const Double_t MHz; + + // + // Electric charge [Q] + // + static const Double_t eplus; // electron posiitron charge + static const Double_t e_SI; // positron charge in coulomb + static const Double_t Coulomb; + + // + // Energy [E] + // + static const Double_t MegaelectronVolt; + static const Double_t electronVolt; + static const Double_t kiloelectronVolt; + static const Double_t GigaelectronVolt; + static const Double_t TeraelectronVolt; + + // but these are also unambiguous and unlikely to be used as variables + static const Double_t MeV; + static const Double_t eV; + static const Double_t keV; + static const Double_t GeV; + static const Double_t TeV; + + static const Double_t Joule; + + // + // Mass [E][T^2][L^-2] + // + static const Double_t kilogram; + static const Double_t gram; + static const Double_t milligram; + + // + // Power [E][T^-1] + // + static const Double_t Watt; + + // + // Force [E][L^-1] + // + static const Double_t Newton; + + // + // Pressure [E][L^-3] + // + // #define Pascal hep_pascal // a trick to avoid warnings + static const Double_t Pascal; + static const Double_t bar; + static const Double_t atmosphere; + + // + // Electric current [Q][T^-1] + // + static const Double_t Ampere; + + // + // Electric potential [E][Q^-1] + // + static const Double_t MegaVolt; + static const Double_t kiloVolt; + static const Double_t Volt; + + // + // Electric resistance [E][T][Q^-2] + // + static const Double_t Ohm; + + // + // Electric capacitance [Q^2][E^-1] + // + static const Double_t Farad; + static const Double_t milliFarad; + static const Double_t microFarad; + static const Double_t nanoFarad; + static const Double_t picoFarad; + + // + // Magnetic Flux [T][E][Q^-1] + // + static const Double_t Weber; + + // + // Magnetic Field [T][E][Q^-1][L^-2] + // + static const Double_t Tesla; + + static const Double_t Gauss; + static const Double_t kiloGauss; + + // + // Inductance [T^2][E][Q^-2] + // + static const Double_t Henry; + + // + // Temperature + // + static const Double_t Kelvin; // 1.; + + // + // Amount of substance + // + static const Double_t mole; // 1.; + + // + // Activity [T^-1] + // + static const Double_t Becquerel; // 1./second; + static const Double_t Curie; // 3.7e+10 * Becquerel; + + // + // Absorbed dose [L^2][T^-2] + // + static const Double_t Gray; // Joule/kilogram ; + + // + // Miscellaneous + // + static const Double_t perCent ; // 0.01 ; + static const Double_t perThousand; // 0.001; + static const Double_t perMillion ; // 0.000001; + + // + // c = 299.792458 mm/ns + // c^2 = 898.7404 (mm/ns)^2 + // + static const Double_t c_light ; //2.99792458e+8 * m/s; + static const Double_t c_squared ; //c_light * c_light; + + // + // h ; //4.13566e-12 MeV*ns + // hbar ; //6.58212e-13 MeV*ns + // hbarc ; //197.32705e-12 MeV*mm + // + static const Double_t h_Planck ; //6.6260755e-34 * joule*s; + static const Double_t hbar_Planck ; //h_Planck/twopi; + static const Double_t hbarc ; //hbar_Planck * c_light; + static const Double_t hbarc_squared ; //hbarc * hbarc; + + // + // + // + static const Double_t electron_charge ; //- eplus; // see SystemOfUnits.h + static const Double_t e_squared ; //eplus * eplus; + + // + // amu_c2 - atomic equivalent mass unit + // amu - atomic mass unit + // + static const Double_t electron_mass_c2 ; //0.51099906 * MeV; + static const Double_t proton_mass_c2 ; //938.27231 * MeV; + static const Double_t neutron_mass_c2 ; //939.56563 * MeV; + static const Double_t amu_c2 ; //931.49432 * MeV; + static const Double_t amu ; //amu_c2/c_squared; + + // + // permeability of free space mu0 = 2.01334e-16 Mev*(ns*eplus)^2/mm + // permittivity of free space epsil0 = 5.52636e+10 eplus^2/(MeV*mm) + // + static const Double_t mu0 ; //4*pi*1.e-7 * henry/m; + static const Double_t epsilon0 ; //1./(c_squared*mu0); + + // + // electromagnetic coupling = 1.43996e-12 MeV*mm/(eplus^2) + // + static const Double_t elm_coupling ; //e_squared/(4*pi*epsilon0); + static const Double_t fine_structure_const ; //elm_coupling/hbarc; + static const Double_t classic_electr_radius ; //elm_coupling/electron_mass_c2; + static const Double_t electron_Compton_length ; //hbarc/electron_mass_c2; + static const Double_t Bohr_radius ; //electron_Compton_length/fine_structure_const; + + static const Double_t alpha_rcl2 ; //fine_structure_const + //*classic_electr_radius + //*classic_electr_radius; + + static const Double_t twopi_mc2_rcl2 ; //twopi*electron_mass_c2 + //*classic_electr_radius + //*classic_electr_radius; + // + // + // + static const Double_t k_Boltzmann ; //8.617385e-11 * MeV/kelvin; + + // + // + // + static const Double_t STP_Temperature ; //273.15*kelvin; + static const Double_t STP_Pressure ; //1.*atmosphere; + static const Double_t kGasThreshold ; //1.e-2*g/cm3; + + + }; + + #endif + diff -c -r -N VER-1-2/include/BrVTX_LinkDef.h VER-1-2-1/include/BrVTX_LinkDef.h *** VER-1-2/include/BrVTX_LinkDef.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrVTX_LinkDef.h Fri Nov 5 18:26:24 1999 *************** *** 0 **** --- 1,12 ---- + // + // + // + #ifdef __CINT__ + + #pragma link off all globals; + #pragma link off all classes; + #pragma link off all functions; + + #pragma link C++ class BrVertex; + + #endif diff -c -r -N VER-1-2/include/BrVector3D.h VER-1-2-1/include/BrVector3D.h *** VER-1-2/include/BrVector3D.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrVector3D.h Fri Nov 5 18:25:58 1999 *************** *** 0 **** --- 1,162 ---- + #ifndef BRAT_BrVector3D + #define BRAT_BrVector3D + // $Id: BrVector3D.h,v 1.13 1999/01/27 22:59:42 hagel Exp $ + // + // + // $Log: BrVector3D.h,v $ + // Revision 1.13 1999/01/27 22:59:42 hagel + // Added Distance() + // + // Revision 1.12 1999/01/27 22:41:57 hagel + // Added yet another constructor to BrVector3D + // + // Revision 1.11 1999/01/27 22:38:48 hagel + // Added another constructor to BrVector3D + // + // Revision 1.10 1999/01/21 23:23:24 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.9 1998/12/01 20:49:58 videbaek + // Added several classes to Geometry. Updated source and makefile(s) + // - BrLine3D + // - BrCoordinateSystem + // - BrRotMatrix + // + // Revision 1.8 1998/11/13 19:28:01 videbaek + // Added operators for setting vector elements by index; i.e. + // vector[2]=x; and vector(i)=cv[i]; as example. + // + // Revision 1.7 1998/09/18 15:44:50 videbaek + // Removed BrPoint3D class + // Added iostream operator to BrVector3Dn + // + // Revision 1.6 1998/09/15 13:08:33 videbaek + // Id and Log had disappeared from header + // + // Revision 1.4 1998/07/28 21:30:12 videbaek + // Added Theta() and Phi() members + // + // Revision 1.3 1998/07/27 14:41:41 videbaek + // small fixes to vector class + // + // Revision 1.2 1998/07/24 13:18:21 videbaek + // Added many functions to vector and point + // + // Revision 1.1 1998/07/20 17:35:49 videbaek + // simple geometry class + // + // + // + + ////////////////////////////////////////////////////////////////////////////// + // + // BrVector3D + // + // 3D Vector. Part of the Geometry classes Points, Vector, Lines, Planes. + // + // Author: F.Videbaek + // Created: July 1998 + // + // + ///////////////////////////////////////////////////////////////////////////// + + // + // ROOT classes + // + #include + #ifndef ROOT_TObject + #include "TObject.h" + #endif + + + class BrVector3D : public TObject { + + public: + + // constructors and destructors + // + BrVector3D(Double_t x=0.0, Double_t y =0.0 , const Double_t z=0.0) : + fX(x), fY(y), fZ(z) {}; + + BrVector3D(Double_t *pos) : fX(pos[0]), fY(pos[1]), fZ(pos[2]) {}; + BrVector3D(Float_t *pos) {fX=pos[0];fY=pos[1];fZ=pos[2];}; + + ~BrVector3D(){}; + + BrVector3D(const BrVector3D& vec) : + fX(vec.fX), fY(vec.fY), fZ(vec.fZ) {}; + + BrVector3D& operator = (const BrVector3D&); + // + // general field operators + BrVector3D& operator +=(const BrVector3D&); + BrVector3D& operator -=(const BrVector3D&); + BrVector3D operator - () const; + BrVector3D operator + () const; + const Double_t& operator [] (size_t) const; + Double_t& operator [] (size_t); + + const Double_t& operator () (size_t) const; + Double_t& operator () (size_t); + + Bool_t operator == (const BrVector3D&) const; + Bool_t operator != (const BrVector3D&) const; + + // access methods + Double_t GetX() const {return fX;}; + Double_t GetY() const {return fY;}; + Double_t GetZ() const {return fZ;}; + + Double_t X() const {return fX;}; + Double_t Y() const {return fY;}; + Double_t Z() const {return fZ;}; + + void SetX(Double_t value) { fX = value;}; + void SetY(Double_t value) { fY = value;}; + void SetZ(Double_t value) { fZ = value;}; + // + // vector operations + Double_t Norm() const; + Double_t NormSq() const; + Double_t Dot(const BrVector3D&) const; + BrVector3D Cross(const BrVector3D&) const; + BrVector3D Unit() const; + Double_t Theta() const; + Double_t Phi() const; + + //Distance between points + Double_t Distance(const BrVector3D &vect) const; + + + private: + + Double_t fX; // 1. Vector Element + Double_t fY; // 2. Vector Element + Double_t fZ; // 3. Vector Element + + friend BrVector3D operator+(const BrVector3D& v1, const BrVector3D& v2); + friend BrVector3D operator-(const BrVector3D& v1, const BrVector3D& v2); + friend BrVector3D operator*(Double_t a, const BrVector3D& v2); + friend BrVector3D operator*(const BrVector3D& v1, Double_t a); + friend BrVector3D operator/(const BrVector3D& v1, Double_t a); + ClassDef(BrVector3D,1) + + }; + + // + // Related Global functions + // + + ostream& operator<<(ostream& str, const BrVector3D&); + istream& operator>>(istream& str, BrVector3D&); + + BrVector3D Cross(const BrVector3D&, const BrVector3D&); + + + #endif diff -c -r -N VER-1-2/include/BrVertex.h VER-1-2-1/include/BrVertex.h *** VER-1-2/include/BrVertex.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrVertex.h Fri Nov 5 18:26:24 1999 *************** *** 0 **** --- 1,120 ---- + #ifndef BRAT_BrVertex + #define BRAT_BrVertex + /////////////////////////////////////////////////////////////////////// + // // + // BrVertex // + // // + // BRAHMS Vertexing Class // + // calculate vertex from x0 and y0 (x and y positions at z=0) // + // and vectors dx/dz and dy/dz // + // currently it assumes that there is only one vertex. // + // // + // Author : JH Lee // + // Created : 2/June/99 // + // Version : 1.0 // + // Changed : // + // // + /////////////////////////////////////////////////////////////////////// + //ROOT Classes + #ifndef ROOT_TH1 + #include "TH1.h" + #endif + #ifndef ROOT_TH2 + #include "TH2.h" + #endif + #ifndef ROOT_TProfile + #include "TProfile.h" + #endif + //Brat Classes + #ifndef BRAT_BrModule + #include "BrModule.h" + #endif + #ifndef BRAT_BrVector3D + #include "BrVector3D.h" + #endif + //#ifndef BRAT_BrPlane3D + //#include "BrPlane3D.h" + //#endif + #ifndef BRAT_BrEventNode + #include "BrEventNode.h" + #endif + #ifndef BRAT_BrDataTable + #include "BrDataTable.h" + #endif + #ifndef BRAT_BrDetectorTrack + #include "BrDetectorTrack.h" + #endif + //#ifndef BRAT_BrSpectrometerTracks + //#include "BrSpectrometerTracks.h" + //#endif + #ifndef BRAT_BrGeometryDbManager + #include "BrGeometryDbManager.h" + #endif + + class BrDetectorVolume; + class BrMagnetVolume; + + + class BrVertex : public BrModule { + + + public: + + BrVertex(); + BrVertex(Char_t *Name,Char_t *Title); + BrVertex(Char_t *Name,Char_t *Title, Char_t *input); + virtual ~BrVertex(); + + void Event(BrEventNode* InputTable,BrEventNode* OutputTable); + void FindVertex(BrEventNode* InputTable); + void ListVertexParameters(); + void ListEventStatistics(); + + Float_t *GetVertex(){return fVertex;} + Float_t GetVertex_chisq(){return fVertex_chisq;} + Float_t *GetVertex_ca(){return fVertex_ca;} + Int_t GetVertex_number_of_tracks(){return fVertex_number_of_tracks;} + + //Should we return selected track table or just index + //Instead of returning index, look up chisq: if not used for vertexing chisq= -100. + // Int_t *GetVertex_track_index(){return fVertex_track_index;} + + void SetVertex_dist_cut(Float_t value) {fVertex_dist_cut=value;} + void SetVertex_chisq_cut(Float_t value){fVertex_chisq_cut=value;} + + private: + // const Int_t max_track_for_vtx=100; + + BrGeometryDbManager *fGeomDb; // Database descriptor + BrDetectorVolume *fFrontVolume; // Volume Descriptor for Front Tracking Chamber + // BrDetectorVolume *fBackVolume; // Volume Descriptor for Back Tracking Chamber + // BrMagnetVolume *fMagnetVolume; // Volume Descriptor for Magnet + + + Float_t fVertex[3]; // Vertex x y z(cm) + Float_t fVertex_chisq; // Vertex chisq + Float_t fVertex_ca[100]; // Closest distance of approach from the vertex + Int_t fVertex_number_of_tracks; // Number of tracks used in vertex + // Int_t fVertex_track_index[max_track_for_vtx]; // Index of the tracks used for vertex + Float_t fVertex_dist_cut; // closest approach cut for the vertex (for the iteration) + Float_t fVertex_chisq_cut; // chi-sq cut for the vertex (for the iteration) + + TH1F *hVertex_x; + TH1F *hVertex_y; + TH2F *hVertex_y_vs_x; + TH2F *hVertex_x_vs_z; + TProfile *hVertex_x_vs_z_prof; + TH1F *hVertex_z; + TH1F *hVertex_z_wide; + TH1F *hVertex_ca; + TH1F *hVertex_chisq; + + void SetDefaultParameters(); + void DefineHistograms(); + + public: + + ClassDef(BrVertex,1) + }; + + #endif diff -c -r -N VER-1-2/include/BrVirtualTrack.h VER-1-2-1/include/BrVirtualTrack.h *** VER-1-2/include/BrVirtualTrack.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrVirtualTrack.h Fri Nov 5 18:26:11 1999 *************** *** 0 **** --- 1,74 ---- + // $Id: BrVirtualTrack.h,v 1.4 1999/02/25 17:26:07 videbaek Exp $ + // + // $Log: BrVirtualTrack.h,v $ + // Revision 1.4 1999/02/25 17:26:07 videbaek + // Add CVS Id and Log flags. Removed commented code + // + // + #ifndef BRAT_BrVirtualTrack + #define BRAT_BrVirtualTrack + + // $Id: BrVirtualTrack.h,v 1.4 1999/02/25 17:26:07 videbaek Exp $ + // + // $Log: BrVirtualTrack.h,v $ + // Revision 1.4 1999/02/25 17:26:07 videbaek + // Add CVS Id and Log flags. Removed commented code + // + // Revision 1.3 1999/01/21 23:23:28 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 + // + // + // + ////////////////////////////////////////////////////////////////////// + // // + // TBrVirtualTrack // + // // + // BRAHMS Virtual Hit class // + // // + // Author : Kris Hagel (hagel@comp.tamu.edu) // + // Created : 9-Mar-1998 // + // Version : 1.0 // + // Changed : // + // // + ////////////////////////////////////////////////////////////////////// + + // Root Classes + #ifndef ROOT_TObject + #include "TObject.h" + #endif + + #ifndef ROOT_TObjArray + #include "TObjArray.h" + #endif + + class BrLocalTrack; + + class BrVirtualTrack: public TObject { + + public: + BrVirtualTrack(); + + virtual ~BrVirtualTrack() {fLoctra.Clear(); }; + virtual BrLocalTrack *GetLoctraAt(Int_t i) {return (BrLocalTrack*)fLoctra.At(i);} + virtual Int_t GetLoctraEntries() {return fLoctra.GetEntries();} + virtual void AddLoctra(BrLocalTrack *loctra_p) {fLoctra.Add((TObject*)loctra_p);} + virtual Int_t GetID() const {return fID;} + virtual void SetID(Int_t i) {fID=i;} + + private: + Int_t fID; // ID for this group of track candidates. + TObjArray fLoctra; + + public: + + ClassDef(BrVirtualTrack,1) // BRAHMS Local Track Group class + + }; + + #endif diff -c -r -N VER-1-2/include/BrZDC_LinkDef.h VER-1-2-1/include/BrZDC_LinkDef.h *** VER-1-2/include/BrZDC_LinkDef.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/BrZDC_LinkDef.h Fri Nov 5 18:26:32 1999 *************** *** 0 **** --- 1,20 ---- + // $Id: BrZDC_LinkDef.h,v 1.2 1999/06/20 22:38:50 hagel Exp $ + // + // $Log: BrZDC_LinkDef.h,v $ + // Revision 1.2 1999/06/20 22:38:50 hagel + // Implemented BrMonitorZDC + // + // Revision 1.1 1999/06/09 02:49:26 hagel + // Initial revision + // + // + #ifdef __CINT__ + + #pragma link off all globals; + #pragma link off all classes; + #pragma link off all functions; + + #pragma link C++ class BrDigZDC; + #pragma link C++ class BrMonitorZDC; + + #endif diff -c -r -N VER-1-2/include/DisIO.h VER-1-2-1/include/DisIO.h *** VER-1-2/include/DisIO.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/DisIO.h Mon Nov 8 14:01:06 1999 *************** *** 0 **** --- 1,87 ---- + // + // Name: DisIO.h + // Author: K.Olchanski + // Date: 13 Dec 1998 + // Description: BRAHMS Dispatcher I/O library + // + // $Id: DisIO.h,v 1.3 1999/07/21 20:32:17 hagel Exp $ + // + + #ifndef DisIOH + #define DisIOH + + #include + #include "BrRawEvent.h" + + class DisIO + { + public: // public definitions + + enum Status + { + kOk = 0, + kCommand = 1, + kData = 2, + kNoRoom = 3, + kNotConnected = 4, + kDataError = 5, + kNoData = 6 + }; + + public: // public methods + + // + // Connection management. + // + + int connect(const char* destination); + int disconnect(); + + // + // High-level I/O methods + // + + int sendCommand(const std::string& command); + int readEvent(BrRawEvent& event,bool waitForever=true); + int readCommand(bool waitForever=true); + const char* getCommandString(); + + // + // error handling methods + // + + int getError() const; + const char* getErrorString() const; + + // + // constructor and destructor + // + + DisIO(); // ctor; + ~DisIO(); // dtor + + // + // low-level I/O methods + // + + int readReply(BrRawEvent::Segment **seg, + bool waitForever=true); + + private: // private methods and data + + // hide the copy-constructor + DisIO(DisIO&) { abort(); }; + // hide the assignement operator + DisIO& operator=(DisIO&) { abort(); }; + + int setError(int err,const std::string& errString); + int setOk(); + + int fError; + std::string fErrorString; + void* fSocket; + char* fCommandString; + }; + + #endif + // end file diff -c -r -N VER-1-2/include/KOexception.h VER-1-2-1/include/KOexception.h *** VER-1-2/include/KOexception.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/KOexception.h Mon Nov 8 14:01:06 1999 *************** *** 0 **** --- 1,25 ---- + // + // Name: KOexception.h + // Description: K.O.'s very own exception class + // Date: 11 Aug 1998 + // Author: K.Olchanski + // + // $Id: KOexception.h,v 1.3 1999/07/21 20:32:18 hagel Exp $ + // + + #ifndef KOexceptionH + #define KOexceptionH + + #include + + class KOexception + { + public: + KOexception(std::string s) { message = s; }; + std::string toString() const { return message; }; + private: + std::string message; + }; + + #endif + // end file diff -c -r -N VER-1-2/include/KOsocket.h VER-1-2-1/include/KOsocket.h *** VER-1-2/include/KOsocket.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/KOsocket.h Mon Nov 8 14:01:06 1999 *************** *** 0 **** --- 1,128 ---- + // + // Name: KOsocket.h + // Description: K.O.'s very own socket library + // Author: K.Olchanski + // Date: 11 Aug 1998 + // + // $Id: KOsocket.h,v 1.3 1999/07/21 20:32:18 hagel Exp $ + // + + #ifndef KOsocketH + #define KOsocketH + + #include "KOexception.h" + + #ifdef ONL_winnt + #include + typedef SOCKET KOsocketType; + #endif + #if defined(ONL_unix) || defined(__osf__) + #include + #include + typedef int KOsocketType; + #endif + + class KOsocketException + : public KOexception + { + public: + KOsocketException(std::string s) + : KOexception(s) { }; + }; + + class KOsocketAddr + { + public: // public data members + std::string fProtocol; + std::string fHostname; + int fPort; + + public: // public methods + KOsocketAddr(); // ctor + std::string toString() const; + + private: // private data members + }; + + class KOsocketBase + { + public: + KOsocketBase(); // ctor + virtual ~KOsocketBase(); // dtor + + // socket operations + void setSockopt(int opt,int value); + + // socket shutdown + void shutdown(); + + // socket error reporting + int getErrorCode() const; + std::string getErrorString() const; + + // socket information reporting + const KOsocketAddr& getLocalAddr() const; + const KOsocketAddr& getRemoteAddr() const; + + protected: + KOsocketAddr fLocalAddr; + KOsocketAddr fRemoteAddr; + int fError; + KOsocketType fSocket; + + private: // hide the assignment and copy constructor operators + KOsocketBase(const KOsocketBase&s) { abort(); }; + KOsocketBase& operator=(const KOsocketBase&s) { abort(); return *this; }; + }; + + class KOsocket; + + class KOserverSocket + : public KOsocketBase + { + public: // public methods + + // create listener socket + KOserverSocket(int iport,int backlog = 1); // ctor + + // accept a connection + KOsocket* accept(); + + private: + KOserverSocket(const KOserverSocket&s) { abort(); }; + }; + + class KOsocket + : public KOsocketBase + { + friend KOserverSocket; + + public: + // open a connection to remote host + KOsocket(const std::string& remoteHost, + int remotePort); // ctor + + // send as many bytes as socket send() would send + int writeSomeBytes(const char*buffer,int bufferSize); + + // Java-style write() + void write(const char*buffer,int bufferSize); + + // Java-style read() + int read(char*buffer,int bufferSize); + + // Java-style readFully(), throws exception if failure. + void readFully(char*buffer,int bufferSize); + + // Java-style "java.net.Socket->InputStream.available()" + int available(); + + private: + // these constructors are used + // by KOserverSocket::accept(). + KOsocket(KOsocketType fd, + const KOsocketAddr& remoteAddr); // ctor + }; + + #endif + // end file diff -c -r -N VER-1-2/include/KOsprintf.h VER-1-2-1/include/KOsprintf.h *** VER-1-2/include/KOsprintf.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/KOsprintf.h Mon Nov 8 14:01:06 1999 *************** *** 0 **** --- 1,53 ---- + // + // Name: KOsprintf.h + // Description: provide an sprintf() for std::string + // Author: K.Olchanski + // Date: 18 Apr 1999 + // + // $Id: KOsprintf.h,v 1.3 1999/07/21 20:32:18 hagel Exp $ + // + // $Log: KOsprintf.h,v $ + // Revision 1.3 1999/07/21 20:32:18 hagel + // Folding in Konstantin's updates + // + // Revision 1.3 1999/05/21 20:01:48 olchansk + // Added missing include + // + // Revision 1.2 1999/04/30 16:23:13 olchansk + // Fixed problem with vsnprintf() diff between Unix and NT + // + // Revision 1.1 1999/04/19 01:47:26 olchansk + // almost complete mapping for TDC mapped data + // + // + + #ifndef KOsprintfH + #define KOsprintfH + + #include + #include + #include + + #ifdef __osf__ + #include + #endif + + static std::string KOsprintf(const char* format,...) + { + const int kBufsize = 1024; + char buf[kBufsize]; + va_list args; + va_start (args, format); + #ifdef ONL_winnt + _vsnprintf(buf,kBufsize,format,args); + #elif defined(__osf__) + _IO_vsnprintf(buf,kBufsize,format,args); + #else + vsnprintf(buf,kBufsize,format,args); + #endif + va_end (args); + return buf; + } + + #endif + // end file diff -c -r -N VER-1-2/include/LinkDefBratAnaINC.h VER-1-2-1/include/LinkDefBratAnaINC.h *** VER-1-2/include/LinkDefBratAnaINC.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/LinkDefBratAnaINC.h Fri Nov 5 18:26:26 1999 *************** *** 0 **** --- 1,26 ---- + // $Id: LinkDefBratAnaINC.h,v 1.3 1999/01/21 23:23:18 hagel Exp $ + // + // $Log: LinkDefBratAnaINC.h,v $ + // Revision 1.3 1999/01/21 23:23:18 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.2 1999/01/15 15:27:20 videbaek + // Mixed include protector- not right yet + // + // Revision 1.1 1998/09/27 17:40:21 alv + // *** empty log message *** + // + // + // + #ifndef BRAT_LinkDefBratAnaINC + #define BRAT_LinkDefBratAnaINC + + #include "BrAnaDigBB.h" + + #endif diff -c -r -N VER-1-2/include/LinkDefBratBBINC.h VER-1-2-1/include/LinkDefBratBBINC.h *** VER-1-2/include/LinkDefBratBBINC.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/LinkDefBratBBINC.h Fri Nov 5 18:26:21 1999 *************** *** 0 **** --- 1,76 ---- + // + // $Id: LinkDefBratBBINC.h,v 1.6 1999/08/14 17:01:57 videbaek Exp $ + // + // $Log: LinkDefBratBBINC.h,v $ + // Revision 1.6 1999/08/14 17:01:57 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.5 1999/07/29 00:02:40 hagel + // Implemented Initial revision of BrMonitorBB + // + // Revision 1.4 1999/01/21 23:23:21 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.3 1998/10/09 19:20:12 videbaek + // Add the BrRdoBB and BrRdoModule classes + // + // Revision 1.2 1998/07/27 16:27:01 videbaek + // Stat on modifiing BB - not complete + // + // Revision 1.1 1998/07/02 19:40:35 videbaek + // Preliminary version of BB + // $Id: LinkDefBratBBINC.h,v 1.6 1999/08/14 17:01:57 videbaek Exp $ + // + // $Log: LinkDefBratBBINC.h,v $ + // Revision 1.6 1999/08/14 17:01:57 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.5 1999/07/29 00:02:40 hagel + // Implemented Initial revision of BrMonitorBB + // + // Revision 1.4 1999/01/21 23:23:21 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.3 1998/10/09 19:20:12 videbaek + // Add the BrRdoBB and BrRdoModule classes + // + // + #ifndef BRAT_LinkDefBratBBINC + #define BRAT_LinkDefBratBBINC + + + #include "BrDigBB.h" + #include "BrTrigBB.h" + #include "BrRdoBB.h" + #include "BrDetectorParamsBB.h" + #include "BrDigitizeBB.h" + #include "BrRdoModuleBB.h" + #include "BrEventNode.h" + #include "BrDetectorVolume.h" + #include "BrMonitorBB.h" + + #endif + + + + diff -c -r -N VER-1-2/include/LinkDefBratBaseINC.h VER-1-2-1/include/LinkDefBratBaseINC.h *** VER-1-2/include/LinkDefBratBaseINC.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/LinkDefBratBaseINC.h Fri Nov 5 18:26:05 1999 *************** *** 0 **** --- 1,115 ---- + #ifndef BRAT_BrLinkDefBratBaseINC + #define BRAT_BrLinkDefBratBaseINC + // + // $Id: LinkDefBratBaseINC.h,v 1.16 1999/09/22 15:05:07 videbaek Exp $ + // + // $Log: LinkDefBratBaseINC.h,v $ + // Revision 1.16 1999/09/22 15:05:07 videbaek + // Add class BrMath to be accesibel form interactive ROOT. + // + // Revision 1.15 1999/07/22 22:50:45 hagel + // Implement BrMonitorPicture + // + // Revision 1.14 1999/06/20 22:40:33 hagel + // Implemented BrBaseMonitor + // + // Revision 1.13 1999/03/07 00:00:41 hagel + // 1. Implemented BrFSTrackingModule. Started with BrMRSTrackingModule and made + // appropriate changes to handle the forward spectrometer. It uses the new + // track classes as well as extensively using geometry classes. It also uses + // new methods and functionality as described below. + // 2. Changed BrMagnetVolume + // a. Added method SwimBack(BrLine3D &,Double_t momentum): takes a + // track at the exit of magnet and given the momentum, calculates + // where the track would come into the front of the magnet. + // b. Added method GlobalToLocal(BrLine3D &): does a combination of + // GlobalToLocal(BrVector3D &,BrVector3D&,0) and + // GlobalToLocal(BrVector3D &,BrVector3D&,1) + // c. Added method LocalToGlobal(BrLine3D &): does a combination of + // LocalToGlobal(BrVector3D &,BrVector3D&,0) and + // LocalToGlobal(BrVector3D &,BrVector3D&,1) + // d. Changed BrDetectorVolume: same additions of methods GlobalToLocal + // and LocalToGlobal as in BrMagnetVolume + // 2. Added a parameter base class BrDetectorParamsBase: helps when reading + // in database files. Declared ASCII reading routines to be virtual. + // Has main ReadASCIIFile which decodes the ASCII parameter files, then + // calls the detector specific methods SetASCIIParameter + // 3. Implemented SetASCIIParameter in BrDetectorParamsDC, BrDetectorParamsTPC, + // BrDetectorParamsTof, BrDetectorParamsBB + // 4. Implemented BrParameterDbManager. It currently works similarly to + // BrGeometryDbManager and creates the BrDetectorParamsXXX objects when + // called. These objects then read in ASCII parameter files with a currently + // "well defined" format using the above implemented routines using a constructor: + // BrDetectorParamsXXX(Char_t *name, Char_t *title,Char_t *ASCIIFileName); + // 5. If no parameter file is specified, it executes the constructor we + // have been using so far, namely BrDetectorParamsXXX(Char_t *name,Char_t *title). + // These constructors generate default parameters and are semi-intelligent + // which means they generate approximately appropriate parameters depending + // upon which detector they are. I should say that the parameters were + // deemed appropriate at the time of writing the SetDefaultParams routine. + // a. It is used in the same way as BrGeometryDbManager, that is: + // BrParameterDbManager *gParamDb = BrParameterDbManager::Instance(); + // gParamDb->SetDbParameterFileName("DetectorParameters.txt"); + // 6. Added a new directory, params, in BRAT. This directory has the file + // DetectorParameters.txt in it. If the BrParameterDbManager is started + // and the DetectorParameter.txt file is specified, it will look in the + // $BRATSYS/params directory if it cannot find the file in the directory + // that the user has set default to. + // 7. Implemented BrParameterDbManager in DC digitize and tracking code. The + // SetDetectorParams methods have been moved to private and can no longer be + // used from the macro or program. + // 8. Implemented BrParameterDbManager in TPC digitize and tracking code. + // 9. Implemented BrParameterDbManager in Tof Calibrate and GeneratePid code. + // 10 Changed the GetEntries() in BrDataTable to use the GetLast()+1 method in + // TObjArray. This should be much faster, but has the caveat that it assumes + // that all slots in TObjArray are full. That seems to me to be the case + // in how we use TObjArray at least in BrDataTable, but if problems arise due + // to this change, it can always be easily changed back. It has been used a + // fair amount before checking in and no problems were found. + // + // Revision 1.12 1999/02/11 15:09:54 hagel + // Changes to get to compile under Solaris + // + // Revision 1.11 1999/02/06 02:39:45 hagel + // Include support for BrTableManager + // + // Revision 1.10 1999/01/21 23:23:20 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 didnt 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.9 1999/01/15 15:32:14 videbaek + // Updates to volume files. + // Added member histon to BrModule, and member function HistOn(). + // Added BrMath as standard math library. + // + // Revision 1.8 1998/12/21 20:18:00 videbaek + // Added magnet voluems. Additional features for Modules. + // + // + #include "BrMagnetVolume.h" //this must remain last for some reason to + //keep solaris compiler happy. + // Not understood at this time kh 2/11/99 + #include "BrClonesArray.h" + #include "BrEvent.h" + #include "BrEventIO.h" + #include "BrEventNode.h" + #include "BrDataTable.h" + #include "BrDataObject.h" + #include "BrCreationID.h" + #include "BrModuleContainer.h" + #include "BrModule.h" + #include "BrIOModule.h" + #include "BrDetectorVolume.h" + #include "BrUnits.h" + #include "BrMath.h" + #include "BrTableManager.h" + #include "BrBaseDetector.h" + #include "BrDetectorParamsBase.h" + #include "BrBaseMonitor.h" + #include "BrMonitorPicture.h" + #endif diff -c -r -N VER-1-2/include/LinkDefBratC1INC.h VER-1-2-1/include/LinkDefBratC1INC.h *** VER-1-2/include/LinkDefBratC1INC.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/LinkDefBratC1INC.h Fri Nov 5 18:26:34 1999 *************** *** 0 **** --- 1,25 ---- + // + // $Id: LinkDefBratC1INC.h,v 1.1 1999/06/22 00:06:38 hagel Exp $ + // + // $Log: LinkDefBratC1INC.h,v $ + // Revision 1.1 1999/06/22 00:06:38 hagel + // Initial revision of C1 structures and monitoring code + // + // Revision 1.2 1999/06/20 22:38:50 hagel + // Implemented BrMonitorZDC + // + // Revision 1.1 1999/06/09 02:49:38 hagel + // Initial revision + // + // + #ifndef BRAT_LinkDefBratRawINC + #define BRAT_LinkDefBratRawINC + + #include "BrDigC1.h" + #include "BrMonitorC1.h" + + #endif + + + + diff -c -r -N VER-1-2/include/LinkDefBratDCINC.h VER-1-2-1/include/LinkDefBratDCINC.h *** VER-1-2/include/LinkDefBratDCINC.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/LinkDefBratDCINC.h Fri Nov 5 18:26:20 1999 *************** *** 0 **** --- 1,13 ---- + #ifndef BRAT_LinkDefBratDCINC + #define BRAT_LinkDefBratDCINC + + #include "BrDigHit.h" + #include "BrDetectorParamsDC.h" + #include "BrDigitizeDC.h" + #include "BrLocalTrackDC.h" + #include "BrDCHit.h" + #include "BrDCHitPosition.h" + #include "BrDCPlane.h" + #include "BrDetectorDC.h" + + #endif diff -c -r -N VER-1-2/include/LinkDefBratDbINC.h VER-1-2-1/include/LinkDefBratDbINC.h *** VER-1-2/include/LinkDefBratDbINC.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/LinkDefBratDbINC.h Fri Nov 5 18:26:07 1999 *************** *** 0 **** --- 1,31 ---- + // + // $Id: LinkDefBratDbINC.h,v 1.3 1999/02/06 02:32:09 hagel Exp $ + // + // $Log: LinkDefBratDbINC.h,v $ + // Revision 1.3 1999/02/06 02:32:09 hagel + // Added BrParameterDbManager + // + // Revision 1.2 1999/01/21 23:23:21 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.1 1998/12/09 17:01:38 videbaek + // Add new db manager class. It has been checked out for + // the simple BrDetectorVolume class. + // + #ifndef BRAT_LinkDefBratDbINC + #define BRAT_LinkDefBratDbINC + + #include "BrGeometryDbManager.h" + #include "BrParameterDbManager.h" + + #endif + + + + diff -c -r -N VER-1-2/include/LinkDefBratGeantINC.h VER-1-2-1/include/LinkDefBratGeantINC.h *** VER-1-2/include/LinkDefBratGeantINC.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/LinkDefBratGeantINC.h Fri Nov 5 18:26:15 1999 *************** *** 0 **** --- 1,28 ---- + #ifndef BRAT_LinkDefBratGeantINC + #define BRAT_LinkDefBratGeantINC + // $Id: LinkDefBratGeantINC.h,v 1.7 1999/08/18 19:50:55 hagel Exp $ + // + // $Log: LinkDefBratGeantINC.h,v $ + // Revision 1.7 1999/08/18 19:50:55 hagel + // Remove deleted files + // + // Revision 1.6 1999/01/21 23:23:23 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.5 1999/01/15 16:32:06 videbaek + // Added new class BrGeantHeader to take care of additional gbrahms functionality + // + + #include "BrGeantInput.h" + #include "BrGeantHit.h" + #include "BrGeantTrack.h" + #include "BrGeantHeader.h" + #include "BrSelectGeantTracks.h" + + #endif diff -c -r -N VER-1-2/include/LinkDefBratGeometryINC.h VER-1-2-1/include/LinkDefBratGeometryINC.h *** VER-1-2/include/LinkDefBratGeometryINC.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/LinkDefBratGeometryINC.h Fri Nov 5 18:25:58 1999 *************** *** 0 **** --- 1,44 ---- + #ifndef BRAT_LinkDefBratGeometryINC + #define BRAT_LinkDefBratGeometryINC + // + // $Id: LinkDefBratGeometryINC.h,v 1.6 1999/01/21 23:23:24 hagel Exp $ + // + // $Log: LinkDefBratGeometryINC.h,v $ + // Revision 1.6 1999/01/21 23:23:24 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.5 1998/12/17 21:04:38 hagel + // Add Support for BrPlane3D. Class was generated essentially for the purpose of using + // to find intersections of track vectors with planes. First instance of use is in + // BrDetectorDC::DrawLocalTracks(). Class was started by copying BrVector3D. Many + // of the methods were simply changed to BrPlane3D and might not make sense for planes. + // Eg. Adding and multiplying planes. They can be deleted once it is obvious they are + // not necessary. + // + // Revision 1.4 1998/12/01 20:49:58 videbaek + // Added several classes to Geometry. Updated source and makefile(s) + // - BrLine3D + // - BrCoordinateSystem + // - BrRotMatrix + // + // Revision 1.3 1998/09/15 13:08:34 videbaek + // Id and Log had disappeared from header + // + // Revision 1.1 1998/07/20 17:35:50 videbaek + // simple geometry class + // + // + + #include "BrVector3D.h" + #include "BrLine3D.h" + #include "BrPlane3D.h" + #include "BrRotMatrix.h" + #include "BrCoordinateSystem.h" + + #endif diff -c -r -N VER-1-2/include/LinkDefBratIOINC.h VER-1-2-1/include/LinkDefBratIOINC.h *** VER-1-2/include/LinkDefBratIOINC.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/LinkDefBratIOINC.h Fri Nov 5 18:26:22 1999 *************** *** 0 **** --- 1,29 ---- + // $Id: LinkDefBratIOINC.h,v 1.5 1999/08/18 19:48:38 hagel Exp $ + // $Log: LinkDefBratIOINC.h,v $ + // Revision 1.5 1999/08/18 19:48:38 hagel + // Take out deleted files + // + // Revision 1.4 1999/01/21 23:23:25 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.3 1998/09/08 22:19:19 hagel + // Add BrSimulationDatabase + // + // Revision 1.2 1998/08/21 13:54:16 videbaek + // Simple modification to BrDigitizeIo pdates of comments. + // + // Simple modifications to + // + // + #ifndef BRAT_LinkDefBratIOINC + #define BRAT_LinkDefBratIOINC + + #include "BrSimulationDatabase.h" + + #endif diff -c -r -N VER-1-2/include/LinkDefBratMultINC.h VER-1-2-1/include/LinkDefBratMultINC.h *** VER-1-2/include/LinkDefBratMultINC.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/LinkDefBratMultINC.h Fri Nov 5 18:26:33 1999 *************** *** 0 **** --- 1,21 ---- + // + // $Id: LinkDefBratMultINC.h,v 1.1 1999/06/19 22:22:50 hagel Exp $ + // + // $Log: LinkDefBratMultINC.h,v $ + // Revision 1.1 1999/06/19 22:22:50 hagel + // Initial Revision + // + // + // + #ifndef BRAT_LinkDefBratMultINC + #define BRAT_LinkDefBratMultINC + + #include "BrDigMultTile.h" + #include "BrDigMultSi.h" + #include "BrMonitorMult.h" + + #endif + + + + diff -c -r -N VER-1-2/include/LinkDefBratRawINC.h VER-1-2-1/include/LinkDefBratRawINC.h *** VER-1-2/include/LinkDefBratRawINC.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/LinkDefBratRawINC.h Mon Nov 8 14:01:06 1999 *************** *** 0 **** --- 1,22 ---- + // + // $Id: LinkDefBratRawINC.h,v 1.2 1999/10/15 20:26:29 hagel Exp $ + // + // $Log: LinkDefBratRawINC.h,v $ + // Revision 1.2 1999/10/15 20:26:29 hagel + // Modifications to make BrRawDataOutput compile + // + // Revision 1.1 1999/06/14 18:21:14 hagel + // Initial revision for testing + // + // + #ifndef BRAT_LinkDefBratRawINC + #define BRAT_LinkDefBratRawINC + + #include "BrRawDataInput.h" + #include "BrRawDataOutput.h" + + #endif + + + + diff -c -r -N VER-1-2/include/LinkDefBratSrcINC.h VER-1-2-1/include/LinkDefBratSrcINC.h *** VER-1-2/include/LinkDefBratSrcINC.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/LinkDefBratSrcINC.h Mon Nov 8 10:03:35 1999 *************** *** 0 **** --- 1,5 ---- + #ifndef BRAT_BrLinkDefBratBaseINC + #define BRAT_BrLinkDefBratBaseINC + + #include "BrRint.h" + #endif diff -c -r -N VER-1-2/include/LinkDefBratTPCINC.h VER-1-2-1/include/LinkDefBratTPCINC.h *** VER-1-2/include/LinkDefBratTPCINC.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/LinkDefBratTPCINC.h Fri Nov 5 18:26:17 1999 *************** *** 0 **** --- 1,33 ---- + #ifndef BRAT_BrLinkDefBratTPCINC + #define BRAT_BrLinkDefBratTPCINC + + // $Id: LinkDefBratTPCINC.h,v 1.7 1999/08/14 17:01:59 videbaek Exp $ + // + // $Log: LinkDefBratTPCINC.h,v $ + // Revision 1.7 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.6 1999/03/07 22:38:50 videbaek + // Added TPCTrackingModule that uses DetectorHit for tracking. + // It essentailly works. + // + // Revision 1.5 1999/01/28 21:27:32 videbaek + // Added BrTPSSqquences to libraries. Not yet in use, though. Expected to + // replace BrDigTPC objects + // Added cvs flags + // + + #include "BrTPCSequence.h" + #include "BrDetectorParamsTPC.h" + #include "BrDigitizeTPC.h" + #include "TH1.h" + #include "BrDetectorVolume.h" + #include "BrTPCTrackingModule.h" + #include "BrTPCCluster.h" + #include "BrDetectorTPC.h" + + #endif diff -c -r -N VER-1-2/include/LinkDefBratTRACKINC.h VER-1-2-1/include/LinkDefBratTRACKINC.h *** VER-1-2/include/LinkDefBratTRACKINC.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/LinkDefBratTRACKINC.h Fri Nov 5 18:26:11 1999 *************** *** 0 **** --- 1,71 ---- + // $Id: LinkDefBratTRACKINC.h,v 1.12 1999/09/07 21:36:57 hagel Exp $ + // $Log: LinkDefBratTRACKINC.h,v $ + // Revision 1.12 1999/09/07 21:36:57 hagel + // Remove obsolete files and references to them + // + // Revision 1.11 1999/03/07 22:37:38 videbaek + // Added DetectorHit and BrLocalTrackingModule as a more general way to + // deal with local tracks and hits. Initial insertion. Not fully debugged. + // + // Revision 1.10 1999/02/26 23:17:50 hagel + // Add support for BrFSTrackingModule in Makefiles and Linkdef's + // + // Revision 1.9 1999/01/21 23:23:28 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 1998/12/21 20:23:13 videbaek + // Included MRS tracking, and track combine module as part of a more + // generalized set of Methods and classes. + // + // Revision 1.7 1998/12/04 21:35:42 videbaek + // Started updating structures for tracking. Using BrVector3D + // in many places where double* or float* was used before. + // Fix type SHLIB->$(SHLIB) .. + // + // Revision 1.6 1998/09/21 02:28:21 hagel + // Add BrBaseTrack as well as clean up BrCombineTrack + // + // Revision 1.5 1998/09/04 15:35:43 hagel + // Debug BrCombineTrack + // + // Revision 1.4 1998/04/29 02:24:49 hagel + // Additions for BrCombineTrack + // + // Revision 1.3 1998/04/28 22:59:56 hagel + // Added BrCombineTrack + // + // Revision 1.2 1998/04/06 21:12:18 videbaek + // Clean up and additions for Win95 + // + // + #ifndef BRAT_LinkDefBratTRACKINC + #define BRAT_LinkDefBratTRACKINC + + #include "BrLocalTrackModule.h" + #include "BrDetectorTrack.h" + #include "BrCombinedHit.h" + #include "BrDetectorHit.h" + #include "BrLocalTrack.h" + #include "BrLocalTrackingModule.h" + #include "BrTrackHit2D.h" + #include "BrTrackHit.h" + #include "BrVirtualTrack.h" + //#include "BrCombineTrack.h" + //#include "BrBaseTrack.h" + //#include "BrDetectorSetTracks.h" + //#include "BrTrack.h" + + #include "BrMagnetVolume.h" + #include "BrModuleMatchTrack.h" + #include "BrMRSTrackingModule.h" + #include "BrFSTrackingModule.h" + #include "BrSpectrometerTracks.h" + + + #endif diff -c -r -N VER-1-2/include/LinkDefBratTofINC.h VER-1-2-1/include/LinkDefBratTofINC.h *** VER-1-2/include/LinkDefBratTofINC.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/LinkDefBratTofINC.h Fri Nov 5 18:26:13 1999 *************** *** 0 **** --- 1,15 ---- + #ifndef BRAT_LinkDefBratTofINC + #define BRAT_LinkDefBratTofINC + + + #include "BrDigTof.h" + #include "BrCalTof.h" + #include "BrCalibrateTof.h" + #include "BrDetectorParamsTof.h" + #include "BrDigitizeTof.h" + #include "BrGeneratePid.h" + #include "BrEventNode.h" + #include "BrDetectorVolume.h" + #include "BrMonitorTof.h" + + #endif diff -c -r -N VER-1-2/include/LinkDefBratVTXINC.h VER-1-2-1/include/LinkDefBratVTXINC.h *** VER-1-2/include/LinkDefBratVTXINC.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/LinkDefBratVTXINC.h Fri Nov 5 18:26:24 1999 *************** *** 0 **** --- 1,10 ---- + // LinkDefBratVTXINC.h + // + #ifndef BRAT_LinkDefBratVTXINC + #define BRAT_LinkDefBratVTXINC + + #include "BrVertex.h" + #include "BrDetectorVolume.h" + #include "BrMagnetVolume.h" + + #endif diff -c -r -N VER-1-2/include/LinkDefBratZDCINC.h VER-1-2-1/include/LinkDefBratZDCINC.h *** VER-1-2/include/LinkDefBratZDCINC.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/LinkDefBratZDCINC.h Fri Nov 5 18:26:32 1999 *************** *** 0 **** --- 1,22 ---- + // + // $Id: LinkDefBratZDCINC.h,v 1.2 1999/06/20 22:38:50 hagel Exp $ + // + // $Log: LinkDefBratZDCINC.h,v $ + // Revision 1.2 1999/06/20 22:38:50 hagel + // Implemented BrMonitorZDC + // + // Revision 1.1 1999/06/09 02:49:38 hagel + // Initial revision + // + // + #ifndef BRAT_LinkDefBratRawINC + #define BRAT_LinkDefBratRawINC + + #include "BrDigZDC.h" + #include "BrMonitorZDC.h" + + #endif + + + + diff -c -r -N VER-1-2/include/TextTable.h VER-1-2-1/include/TextTable.h *** VER-1-2/include/TextTable.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/TextTable.h Mon Nov 8 14:01:06 1999 *************** *** 0 **** --- 1,64 ---- + // + // Name: TextTable.h + // Author: K.Olchansk + // Date: 4 Dec 1998 + // Description: Parse text into a table + // + // $Id: TextTable.h,v 1.2 1999/07/21 20:32:18 hagel Exp $ + // + + #ifndef TextTableH + #define TextTableH + + class TextTable + { + public: // public methods + + TextTable(); // ctor + ~TextTable(); // dtor + + int parseFile(const char*filename); + int parseText(const char*text); + int getNumRows() const; + int getNumColumns() const; + + int getMaxColumns() const; + void setMaxColumns(int); + + int cmpString(int row, + int column, + const char* value) const; + + const char* getString(int row, + int column, + const char* defaultValue) const; + + int getInt(int row, + int column, + int defaultValue) const; + + unsigned long getUlong(int row, + int column, + unsigned long defaultValue) const; + + private: // private methods + + void skipSpaces(char*&s1,char*&s2); + char* skipWord(char* &start); + + private: // private data + + int fMaxColumns; + + int fTextLen; + char *fBuffer; + + int fNumLines; + char **fLines; + + int fNumColumns; + char **fColumns; + }; + + #endif + // end file diff -c -r -N VER-1-2/include/tapeIO.h VER-1-2-1/include/tapeIO.h *** VER-1-2/include/tapeIO.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/include/tapeIO.h Mon Nov 8 14:01:06 1999 *************** *** 0 **** --- 1,38 ---- + /* + * tapeIO.h + * + */ + + #ifndef TAPEIOH_INCLUDED + + #define TAPEIO_OK 0 + #define TAPEIO_ERROR (-1) + #define TAPEIO_EOT (-2) /* end of data (End Of Tape) */ + + #define TAPEIO_STREAM 1 /* file descriptor is not a tape device */ + #define TAPEIO_FIXED 2 /* it's a tape device in fixed block mode */ + #define TAPEIO_VARIABLE 3 /* it's a tape device in variable block mode */ + #define TAPEIO_PIPE 4 /* pipe or TCP socket */ + + int tape_devType(int fd); /* returns one of the TAPEIO_xxxx or (-1) if error */ + + int tape_write(int fd,const void*buffer,int len); + int tape_read(int fd,void*buffer,int len); + int tape_flush(int fd); + int tape_writeFM(int fd); + + int tape_getBlockSize(int fd,unsigned long*minSize,unsigned long*maxSize,unsigned long*recSize); + int tape_getState(int fd); /* returns bits defined in mtio.h: MT_BOT, etc... */ + unsigned long tape_getPosition(int fd); /* returns current tape block number (does not work for jag tapes) */ + + int tape_setBlockSize(int fd,unsigned long newBlockSize); + + int tape_senseEOD(int fd); + int tape_rewind(int fd); + int tape_unload(int fd); + int tape_findFM(int fd,int count); /* count > 0 seeks forward, count < 0 seeks backwards */ + + extern int tape_enablePipeIO; /* enable the special handing of PIPEs */ + + #endif + /* end file */ diff -c -r -N VER-1-2/mkconfig.osf1 VER-1-2-1/mkconfig.osf1 *** VER-1-2/mkconfig.osf1 Thu Jan 1 01:00:00 1970 --- VER-1-2-1/mkconfig.osf1 Mon Nov 8 13:17:03 1999 *************** *** 0 **** --- 1,82 ---- + # -*- mode: makefile -*- + # mkconfig.osf1 + # version 0.1 + # Mon Nov 8 12:34:57 1999 + # Christian Holm + # + # Digital Unix version! + # + # Based on mkconfig.linux. Uses EGCS compiler. Experimental. + # + # Not a good thing to set in Makefiles! + #SHELL = /bin/sh + + ObjSuf = o + SrcSuf = cxx + ExeSuf = exe + DllSuf = so + LibSuf = a + OutPutOpt = -o + + # These are the different programs that make the executables + CC = g++ + SOMAKER = g++ + LD = g++ + # DON'T DO THIS - IT IS VERY DANGEROUS!!!!!!!! + #MAKE = gmake + AR = ar rc + MAKEDEPEND = g++ -MM + + # The different libraries can be found here + ROOTLIBS = $(shell root-config --libs) + ROOTGLIBS = $(shell root-config --glibs) + BRATLIB = $(BRATHOME)/lib/$(BRAHMS_ARCH) + LIBS = -L/usr/local/lib -lXpm -L/usr/shlib -lX11 \ + -lm -ltermcap + + # The compiler and shared library maker switches + # set: + # -pg for profiling + # -g for debugging + # -O3 for fast production + + CXXFLAGS = -g -Wall -mcpu=ev5 -D__osf__ -D__alpha \ + $(BRAT_INCLUDE) -o $(OBJDIR)/$(@F) + SOFLAGS = -Wl,-expect_unresolved,* -shared -g + LDFLAGS = -g + + # INCLUDE contains the path to the include files + # + + BRAT_INCLUDE = -I$(ROOT_INCL) -I$(BRATHOME_INCL) -I$(BRATSYS_INCL) + OBJDIR = ../obj/$(BRAHMS_ARCH) + + %.$(ObjSuf):%.$(SrcSuf) + $(CXX) $(CXXFLAGS) $(ADDFLAGS) -c $< + + %o:%cxx + $(CXX) $(CXXFLAGS) $(ADDFLAGS) -c $< + + #define check_lib_dir_arch + # @echo Checking library directory for Linux + # @if (! -d $(BRATHOME)/lib) mkdir ${BRATHOME}/lib ;endif; + # @if (! -d $(BRATHOME)/lib/$(BRAHMS_ARCH)) mkdir ${BRATHOME}/lib/${BRAHMS_ARCH} ;endif; + #endef + + #define check_obj_dir_arch + # @echo Checking object directory for Linux + # @if (! -d ../obj) mkdir ../obj ;endif; + # @if (! -d ../obj/$(BRAHMS_ARCH)) mkdir ../obj/${BRAHMS_ARCH} ;endif; + #endef + + define check_obj_dir_arch + @echo Checking object directory for Osf1 + @if (test ! -d ../obj) then mkdir ../obj ;fi; + @if (test ! -d ../obj/$(BRAHMS_ARCH)) then mkdir ../obj/${BRAHMS_ARCH} ;fi; + endef + + define check_lib_dir_arch + @echo Checking library directory for Osf1 + @if (test ! -d $(BRATHOME)/lib) then mkdir ${BRATHOME}/lib ;fi; + @if (test ! -d $(BRATHOME)/lib/$(BRAHMS_ARCH)) then mkdir ${BRATHOME}/lib/${BRAHMS_ARCH} ;fi; + endef diff -c -r -N VER-1-2/mkconfig.osf1~ VER-1-2-1/mkconfig.osf1~ *** VER-1-2/mkconfig.osf1~ Thu Jan 1 01:00:00 1970 --- VER-1-2-1/mkconfig.osf1~ Mon Nov 8 12:45:11 1999 *************** *** 0 **** --- 1,82 ---- + # -*- mode: makefile -*- + # mkconfig.osf1 + # version 0.1 + # Mon Nov 8 12:34:57 1999 + # Christian Holm + # + # Digital Unix version! + # + # Based on mkconfig.linux. Uses EGCS compiler. Experimental. + # + # Not a good thing to set in Makefiles! + #SHELL = /bin/sh + + ObjSuf = o + SrcSuf = cxx + ExeSuf = exe + DllSuf = so + LibSuf = a + OutPutOpt = -o + + # These are the different programs that make the executables + CC = g++ + SOMAKER = g++ + LD = g++ + # DON'T DO THIS - IT IS VERY DANGEROUS!!!!!!!! + #MAKE = gmake + AR = ar rc + MAKEDEPEND = g++ -MM + + # The different libraries can be found here + ROOTLIBS = $(shell root-config --libs) + ROOTGLIBS = $(shell root-config --glibs) + BRATLIB = $(BRATHOME)/lib/$(BRAHMS_ARCH) + LIBS = -L/usr/local/lib -lXpm -L/usr/shlib -lX11 \ + -lm -ltermcap -rdynamic + + # The compiler and shared library maker switches + # set: + # -pg for profiling + # -g for debugging + # -O3 for fast production + + CXXFLAGS = -g -Wall -mcpu=ev5 -D__osf__ -D__alpha \ + -DONL_unix $(BRAT_INCLUDE) -o $(OBJDIR)/$(@F) + SOFLAGS = -Wl,-expect_unresolved,* -shared -g + LDFLAGS = -g + + # INCLUDE contains the path to the include files + # + + BRAT_INCLUDE = -I$(ROOT_INCL) -I$(BRATHOME_INCL) -I$(BRATSYS_INCL) + OBJDIR = ../obj/$(BRAHMS_ARCH) + + %.$(ObjSuf):%.$(SrcSuf) + $(CXX) $(CXXFLAGS) $(ADDFLAGS) -c $< + + %o:%cxx + $(CXX) $(CXXFLAGS) $(ADDFLAGS) -c $< + + #define check_lib_dir_arch + # @echo Checking library directory for Linux + # @if (! -d $(BRATHOME)/lib) mkdir ${BRATHOME}/lib ;endif; + # @if (! -d $(BRATHOME)/lib/$(BRAHMS_ARCH)) mkdir ${BRATHOME}/lib/${BRAHMS_ARCH} ;endif; + #endef + + #define check_obj_dir_arch + # @echo Checking object directory for Linux + # @if (! -d ../obj) mkdir ../obj ;endif; + # @if (! -d ../obj/$(BRAHMS_ARCH)) mkdir ../obj/${BRAHMS_ARCH} ;endif; + #endef + + define check_obj_dir_arch + @echo Checking object directory for Linux + @if (test ! -d ../obj) then mkdir ../obj ;fi; + @if (test ! -d ../obj/$(BRAHMS_ARCH)) then mkdir ../obj/${BRAHMS_ARCH} ;fi; + endef + + define check_lib_dir_arch + @echo Checking library directory for Linux + @if (test ! -d $(BRATHOME)/lib) then mkdir ${BRATHOME}/lib ;fi; + @if (test ! -d $(BRATHOME)/lib/$(BRAHMS_ARCH)) then mkdir ${BRATHOME}/lib/${BRAHMS_ARCH} ;fi; + endef diff -c -r -N VER-1-2/mult/src/BrMonitorMult.cxx VER-1-2-1/mult/src/BrMonitorMult.cxx *** VER-1-2/mult/src/BrMonitorMult.cxx Thu Jul 29 02:03:58 1999 --- VER-1-2-1/mult/src/BrMonitorMult.cxx Fri Nov 5 18:16:47 1999 *************** *** 62,67 **** --- 62,68 ---- #include "BrDigMultSi.h" #endif + #include ClassImp(BrMonitorMult) diff -c -r -N VER-1-2/raw/inc/KOsocket.h VER-1-2-1/raw/inc/KOsocket.h *** VER-1-2/raw/inc/KOsocket.h Wed Jul 21 22:32:18 1999 --- VER-1-2-1/raw/inc/KOsocket.h Mon Nov 8 13:10:38 1999 *************** *** 16,22 **** #include typedef SOCKET KOsocketType; #endif ! #ifdef ONL_unix #include #include typedef int KOsocketType; --- 16,22 ---- #include typedef SOCKET KOsocketType; #endif ! #if defined(ONL_unix) || defined(__osf__) #include #include typedef int KOsocketType; diff -c -r -N VER-1-2/raw/inc/KOsprintf.h VER-1-2-1/raw/inc/KOsprintf.h *** VER-1-2/raw/inc/KOsprintf.h Wed Jul 21 22:32:18 1999 --- VER-1-2-1/raw/inc/KOsprintf.h Mon Nov 8 14:00:52 1999 *************** *** 28,33 **** --- 28,37 ---- #include #include + #ifdef __osf__ + #include + #endif + static std::string KOsprintf(const char* format,...) { const int kBufsize = 1024; *************** *** 36,41 **** --- 40,47 ---- va_start (args, format); #ifdef ONL_winnt _vsnprintf(buf,kBufsize,format,args); + #elif defined(__osf__) + _IO_vsnprintf(buf,kBufsize,format,args); #else vsnprintf(buf,kBufsize,format,args); #endif diff -c -r -N VER-1-2/raw/src/BrRawIO.cxx VER-1-2-1/raw/src/BrRawIO.cxx *** VER-1-2/raw/src/BrRawIO.cxx Wed Jul 21 22:32:19 1999 --- VER-1-2-1/raw/src/BrRawIO.cxx Mon Nov 8 14:03:07 1999 *************** *** 71,80 **** #ifdef ONL_winnt #include #endif ! #ifdef ONL_unix #include #endif #include #include #include --- 71,84 ---- #ifdef ONL_winnt #include #endif ! #if defined(ONL_unix) || defined(defined) #include #endif + #ifdef __osf__ + #include + #endif + #include #include #include *************** *** 350,355 **** --- 354,361 ---- va_start(args,fmt); #ifdef ONL_unix vsnprintf(fErrorString,sizeof(fErrorString)-1,fmt,args); + #elif defined(__osf__) + _IO_vsnprintf(fErrorString,sizeof(fErrorString)-1,fmt,args); #else _vsnprintf(fErrorString,sizeof(fErrorString)-1,fmt,args); #endif diff -c -r -N VER-1-2/raw/src/KOsocket.cxx VER-1-2-1/raw/src/KOsocket.cxx *** VER-1-2/raw/src/KOsocket.cxx Wed Jul 21 22:32:20 1999 --- VER-1-2-1/raw/src/KOsocket.cxx Mon Nov 8 13:12:48 1999 *************** *** 20,26 **** #include #include ! #ifdef ONL_unix #include #include #include --- 20,26 ---- #include #include ! #if defined(ONL_unix) || defined(__osf__) #include #include #include *************** *** 39,45 **** // // //////////////////////////////////////////////////////////// ! #ifdef ONL_unix int WSAGetLastError() { return errno; --- 39,45 ---- // // //////////////////////////////////////////////////////////// ! #if defined(ONL_unix) || defined(__osf__) int WSAGetLastError() { return errno; *************** *** 76,82 **** }; #endif ! #ifdef ONL_unix #include #include #define INVALID_SOCKET (-1) --- 76,82 ---- }; #endif ! #if defined(ONL_unix) || defined(__osf__) #include #include #define INVALID_SOCKET (-1) *************** *** 272,278 **** #ifdef ONL_unix size_t sockAddrLen; #endif ! #ifdef ONL_winnt int sockAddrLen; #endif sockAddrLen = sizeof(sockAddr); --- 272,278 ---- #ifdef ONL_unix size_t sockAddrLen; #endif ! #if defined(ONL_winnt) || defined(__alpha) int sockAddrLen; #endif sockAddrLen = sizeof(sockAddr); *************** *** 448,454 **** unsigned long value = 0; int ret = ::ioctlsocket(fSocket,FIONREAD,&value); #endif ! #ifdef ONL_unix int value = 0; int ret = ::ioctl(fSocket,FIONREAD,&value); #endif --- 448,454 ---- unsigned long value = 0; int ret = ::ioctlsocket(fSocket,FIONREAD,&value); #endif ! #if defined(ONL_unix) || defined(__osf__) int value = 0; int ret = ::ioctl(fSocket,FIONREAD,&value); #endif diff -c -r -N VER-1-2/raw/src/tapeIO.cxx VER-1-2-1/raw/src/tapeIO.cxx *** VER-1-2/raw/src/tapeIO.cxx Wed Jul 21 22:32:20 1999 --- VER-1-2-1/raw/src/tapeIO.cxx Mon Nov 8 13:34:14 1999 *************** *** 24,30 **** #include #include #include ! #ifdef ONL_unix #include #endif #ifdef ONL_winnt --- 24,30 ---- #include #include #include ! #if defined(ONL_unix) || defined(__osf__) #include #endif #ifdef ONL_winnt diff -c -r -N VER-1-2/src/inc/BrRint.h VER-1-2-1/src/inc/BrRint.h *** VER-1-2/src/inc/BrRint.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/src/inc/BrRint.h Mon Nov 8 09:33:38 1999 *************** *** 0 **** --- 1,25 ---- + // -*- mode: c++ -*- + #ifndef _BRAT_BRRINT_H + #define _BRAT_BRRINT_H + + #include + + + class BrRint : public TRint + { + private: + char* fBratPrompt; + int fBratMajorVersion; + int fBratMinorVersion; + public: + BrRint(char* appClassName, + int* argc, + char** argv); + + virtual void PrintLogo(); + + ClassDef(BrRint,0) // BRAT Interactive Application Interface + } + ; + #endif // _BRAT_BRRINT_H + diff -c -r -N VER-1-2/src/inc/BrSrc_LinkDef.h VER-1-2-1/src/inc/BrSrc_LinkDef.h *** VER-1-2/src/inc/BrSrc_LinkDef.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/src/inc/BrSrc_LinkDef.h Mon Nov 8 09:53:36 1999 *************** *** 0 **** --- 1,11 ---- + #ifdef __CINT__ + + #pragma link off all globals; + #pragma link off all classes; + #pragma link off all functions; + + #pragma link C++ class BrRint; + + #endif + + diff -c -r -N VER-1-2/src/inc/LinkDefBratSrcINC.h VER-1-2-1/src/inc/LinkDefBratSrcINC.h *** VER-1-2/src/inc/LinkDefBratSrcINC.h Thu Jan 1 01:00:00 1970 --- VER-1-2-1/src/inc/LinkDefBratSrcINC.h Mon Nov 8 09:54:06 1999 *************** *** 0 **** --- 1,5 ---- + #ifndef BRAT_BrLinkDefBratBaseINC + #define BRAT_BrLinkDefBratBaseINC + + #include "BrRint.h" + #endif diff -c -r -N VER-1-2/src/src/BrBrat.cxx VER-1-2-1/src/src/BrBrat.cxx *** VER-1-2/src/src/BrBrat.cxx Thu Jan 1 01:00:00 1970 --- VER-1-2-1/src/src/BrBrat.cxx Mon Nov 8 09:33:38 1999 *************** *** 0 **** --- 1,18 ---- + #include + #include + #include + + TROOT brat("BrRint", "The BRAT Intercative Interface"); + + int + main(int argc, char** argv) + { + BrRint *brint = new BrRint("BRAT", &argc, argv); + brint->PrintLogo(); + + brint->Run(); + + delete brint; + + return 0; + } diff -c -r -N VER-1-2/src/src/BrRint.cxx VER-1-2-1/src/src/BrRint.cxx *** VER-1-2/src/src/BrRint.cxx Thu Jan 1 01:00:00 1970 --- VER-1-2-1/src/src/BrRint.cxx Mon Nov 8 09:33:38 1999 *************** *** 0 **** --- 1,77 ---- + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + + #ifdef R__UNIX + #include + #endif + + #include + + ClassImp(BrRint); + + BrRint::BrRint(char* appClassName, + int* argc, + char** argv) + : TRint(appClassName,argc,argv) + { + // + // Initialize the interface + // + fBratPrompt = "brat [%d] "; + fBratMajorVersion = 1; + fBratMinorVersion = 2; + + gROOT->LoadClass("BrVector3D", "libBrat_Geometry"); + gROOT->LoadClass("BrEvent", "libBrat_Base"); + gROOT->LoadClass("BrGeometryDbManager", "libBrat_Db"); + gROOT->LoadClass("BrGeantTrack", "libBrat_Geant"); + gROOT->LoadClass("BrTrack", "libBrat_TRACK"); + gROOT->LoadClass("BrDigitizeDC", "libBrat_DC"); + gROOT->LoadClass("BrDigC1", "libBrat_C1"); + gROOT->LoadClass("BrDigitizeTof", "libBrat_Tof"); + gROOT->LoadClass("BrDigitizeTPC", "libBrat_TPC"); + gROOT->LoadClass("BrDigitizeBB", "libBrat_BB"); + gROOT->LoadClass("BrDigZDC", "libBrat_ZDC"); + gROOT->LoadClass("BrDigMultTile", "libBrat_Mult"); + gROOT->LoadClass("BrSimulationDatabase", "libBrat_IO"); + gROOT->LoadClass("BrRawEvent", "libBrat_Raw"); + + SetPrompt(fBratPrompt); + } + + void + BrRint::PrintLogo(void) + { + // Print BRAT logo on stdout. + + Printf(" ********************************************"); + Printf(" * *"); + Printf(" * W E L C O M E to B R A T *"); + Printf(" * Version %2d.%-2d *", + fBratMajorVersion, fBratMinorVersion); + Printf(" * *"); + Printf(" ********************************************"); + + } + + + diff -c -r -N VER-1-2/src/src/Makefile VER-1-2-1/src/src/Makefile *** VER-1-2/src/src/Makefile Thu Jan 1 01:00:00 1970 --- VER-1-2-1/src/src/Makefile Mon Nov 8 10:17:45 1999 *************** *** 0 **** --- 1,152 ---- + # Makefile for Brat source directory + # + # $Id: Makefile,v 1.29 1999/10/12 20:33:47 videbaek Exp $ + # + # + ########################################################################## + + + # Include standard defs. We need this for all the right compiler + # switches etc. + include $(BRATSYS)/mkconfig.common + include $(BRATSYS)/mkconfig.$(BRAHMS_ARCH) + + ## This is the name of the shared library, and programs + ## + PROG = Src + PROGDIR = src + PROGRAM = brat + + ## The names of all the user defined object files. + ## The dictionary file is excluded from this list. + ## For a given makefile in a subdirectory this is the only place that + ## actual files has to be inserted. In fact even this could be done + ## automatically by creating a list from the sources in the directory. + ## Only problem would be with not used .cxx files.!! + ## + + CODEOBJECTS = \ + BrRint.$(ObjSuf) \ + BrBrat.$(ObjSuf) + + + ## Overloading som variables, since the ones in the toplevel dir, is + ## based on ROOT 2.22, and we are using 2.23! + ROOTLIBS = $(shell root-config --libs) + ROOTGLIBS = $(shell root-config --glibs) + + + ## + ## + SHARED_LIB = libBrat_$(PROG).$(DllSuf) + SHLIB = $(BRATLIB)/$(SHARED_LIB) + SHLIB_DEP = $(SHLIB) + + ## Name of the static library + STATLIB = $(BRATLIB)/libBrat_$(PROG).a + + ifdef ExpSuf + ifeq ($(ExpSuf),Exp) + PROGEXP = $(basename $(SHARED_LIB)).$(ExpSuf) + WINLIBS = $(PROGEXP) $(LIBS) + SHLIB_DEP = $(SHARED_LIB) + endif + endif + + ## We can specify any additional compiler flags here + + ADDFLAGS = + + + OBJECTS = $(CODEOBJECTS) \ + Brat$(PROG)Cint.$(ObjSuf) + + SOURCES = $(CODEOBJECTS:.$(ObjSuf)=.cxx) + + ## The include files are located here + INCDIR = $(BRATHOME)/$(PROGDIR)/inc + + INCLUDES = $(wildcard $(INCDIR)/*.h) + + + vpath %.h $(INCDIR) + vpath %.h $(BRATHOME_INCL) + vpath %.h $(BRATSYS_INCL) + vpath %.$(ObjSuf) $(BRATHOME)/$(PROGDIR)/obj/$(BRAHMS_ARCH) + vpath %.$(DllSuf) $(BRATHOME)/lib/$(BRAHMS_ARCH) + vpath %.exp $(BRATHOME)/lib/$(BRAHMS_ARCH) + + ## + ## + ## Make the shared library + all: checkdir include $(PROGRAM) + + ## + ## Make the shared library + $(SHLIB_DEP): $(OBJECTS) $(PROGEXP) + cd $(OBJDIR); $(SOMAKER) $(SOFLAGS) $(OutPutOpt)$(SHLIB) $(OBJECTS) \ + $(WINLIBS) + ## + $(PROGRAM): $(OBJECTS) + cd $(OBJDIR); \ + $(LD) $(LDFLAGS) $(LIBS)\ + $(ROOTLIBS) $(ROOTGLIBS) -L$(BRATLIB) \ + $(OBJECTS) -o $(PROGRAM) ; \ + mv $(PROGRAM) $(BRATHOME)/bin/$(BRAHMS_ARCH) + + ## Make static version + static: $(OBJECTS) Brat$(PROG)Cint.$(ObjSuf) + $(AR) $(STATLIB) $(OBJECTS) Brat$(PROG)Cint.$(ObjSuf) + + ## + ## Clean everything + ## + clean: + @echo Cleaning $(PROG) + rm -f $(OBJECTS) $(SHLIB) $(STATLIB) Brat$(PROG)Cint.* + rm -f .include + rm -f .depend + rm -f ../obj/$(BRAHMS_ARCH)/* + + checkdir: + $(check_bin_dir_arch) + $(check_obj_dir_arch) + $(check_lib_dir_arch) + $(check_inc_dir) + ## + ## Make dependencies + ## + + include: .include + @touch .include + + .include: $(INCLUDES) + @cp ../inc/*.h $(BRATHOME)/include/. + @echo --Copied .h files + + depend: + $(MAKEDEPEND) -I $(BRATHOME_INCL) -I $(BRATSYS_INCL) -I $(ROOTSYS)/include $(SOURCES) > .depend + + ## + ## Make the dictionary. + ## + Brat$(PROG)Cint.$(SrcSuf): $(INCFILES) LinkDefBrat$(PROG)INC.h Br$(PROG)_LinkDef.h + @echo "generating $(PROG) CINT dependencies" + rootcint -f Brat$(PROG)Cint.cxx -c $(BRAT_INCLUDE) LinkDefBrat$(PROG)INC.h Br$(PROG)_LinkDef.h + + libBrat_$(PROG).Exp : $(OBJECTS) + @echo Creating $(basename $(@)).lib; + @cd $(OBJDIR); BINDEXPLIB $(basename $(@)) $(OBJECTS) > $(basename $(@)).def + @cd $(OBJDIR); lib /nologo /MACHINE:IX86 $(OBJECTS) /def:$(basename $(@)).def /out:$(BRATLIB)/$(basename $(@)).lib + + + define check_bin_dir_arch + @echo Checking binary directory for Linux + @if (test ! -d ../../bin) then mkdir ../../bin ;fi; + @if (test ! -d ../../bin/$(BRAHMS_ARCH)) then mkdir ../../bin/${BRAHMS_ARCH} ;fi; + endef + + + + # DO NOT DELETE + -include .depend diff -c -r -N VER-1-2/src/src/Makefile.tmp VER-1-2-1/src/src/Makefile.tmp *** VER-1-2/src/src/Makefile.tmp Thu Jan 1 01:00:00 1970 --- VER-1-2-1/src/src/Makefile.tmp Mon Nov 8 09:33:47 1999 *************** *** 0 **** --- 1,39 ---- + # + # + # + PROGRAM = brat + OBJECTS = BRAT_brat.o BRAT_Rint.o BRAT_G__BrRint.o + + ROOTLIBS = $(shell root-config --libs) + ROOTGLIBS = $(shell root-config --glibs) + ROOTINCLUDES = $(shell root-config --cflags) + + BRATLIBS = -L$(BRATHOME)/lib/$(BRAHMS_ARCH) \ + -lBrat_Db -lBrat_TRACK -lBrat_BB \ + -lBrat_DC -lBrat_Tof -lBrat_TPC \ + -lBrat_IO -lBrat_Geant -lBrat_Geometry \ + -lBrat_Base + BRATALIBS = -L$(BRATHOME)/lib/$(BRAHMS_ARCH) -lBrat_Ana + BRATINCLUDES = -I$(BRATHOME)/include + + SYSLIBS = -lm -ldl -rdynamic + + LIBS = $(SYSLIBS) $(ROOTLIBS) $(ROOTGLBS) $(ROOTGLIBS) + INCLUDES = -I./ $(ROOTINCLUDES) $(BRATINCLUDES) + + CXX = g++ + CXXFLAGS = -g -Wall -fPIC $(INCLUDES) + LD = g++ + LDFLAGS = -g $(LIBS) + + BRAT_G__%.cxx:%.h + rootcint -f $@ -c $(INCLUDES) $< + + %.o:%.cxx + $(CXX) $(CXXFLAGS) -c -o $@ $< + + $(PROGRAM):$(OBJECTS) + $(LD) $(LDFLAGS) -o $@ $^ + + clean: + rm -f $(OBJECTS) $(PROGRAM) *_G__* *~ diff -c -r -N VER-1-2/test/Makefile VER-1-2-1/test/Makefile *** VER-1-2/test/Makefile Fri Oct 22 20:31:42 1999 --- VER-1-2-1/test/Makefile Fri Nov 5 18:18:43 1999 *************** *** 18,24 **** # ifeq ($(BRAHMS_ARCH),sun4os5pc) CXX = CC ! CXXFLAGS = -w -O1 -g -KPIC -I$(ROOTSYS)/include LD = CC LDFLAGS = SOFLAGS = -G --- 18,25 ---- # ifeq ($(BRAHMS_ARCH),sun4os5pc) CXX = CC ! #CXXFLAGS = -w -O1 -g -KPIC -I$(ROOTSYS)/include ! CXXFLAGS = -w -O1 -g -KPIC $(shell root-config --cflags) LD = CC LDFLAGS = SOFLAGS = -G *************** *** 40,58 **** BRATLINKLIBS = -L$(BRATLIB) -lBrat_Db -lBrat_TRACK -lBrat_BB -lBrat_DC -lBrat_Tof -lBrat_TPC -lBrat_IO -lBrat_Geant -lBrat_Geometry -lBrat_Base BRATANALIBS = -L$(BRATLIB) -lBrat_Ana ! ifeq ($(BRAHMS_ARCH),linux) ! ROOTLIBS = -L$(ROOTSYS)/lib -lBase -lCint -lClib -lCont -lFunc -lGraf \ ! -lGraf3d -lHist -lHtml -lMeta -lMinuit -lNet -lPostscript \ ! -lProof -lTree -lUnix -lZip ! endif ! ifeq ($(BRAHMS_ARCH),sun4os5pc) ! ROOTLIBS = -L$(ROOTSYS)/lib -lBase -lCint -lClib -lCont -lFunc -lGraf \ ! -lGraf3d -lHist -lHtml -lMeta -lMinuit -lNet -lPostscript \ ! -lProof -lTree -lUnix -lZip ! endif ! ! ROOTGLIBS = -lGpad -lGui -lGX11 -lX3d ifeq ($(BRAHMS_ARCH),sun4os5pc) LIBS = $(ROOTLIBS) -lm -lsocket -lgen --- 41,61 ---- BRATLINKLIBS = -L$(BRATLIB) -lBrat_Db -lBrat_TRACK -lBrat_BB -lBrat_DC -lBrat_Tof -lBrat_TPC -lBrat_IO -lBrat_Geant -lBrat_Geometry -lBrat_Base BRATANALIBS = -L$(BRATLIB) -lBrat_Ana ! #ifeq ($(BRAHMS_ARCH),linux) ! #ROOTLIBS = -L$(ROOTSYS)/lib -lBase -lCint -lClib -lCont -lFunc -lGraf \ ! # -lGraf3d -lHist -lHtml -lMeta -lMinuit -lNet -lPostscript \ ! # -lProof -lTree -lUnix -lZip ! #endif ! #ifeq ($(BRAHMS_ARCH),sun4os5pc) ! #ROOTLIBS = -L$(ROOTSYS)/lib -lBase -lCint -lClib -lCont -lFunc -lGraf \ ! # -lGraf3d -lHist -lHtml -lMeta -lMinuit -lNet -lPostscript \ ! # -lProof -lTree -lUnix -lZip ! #endif ! # ! #ROOTGLIBS = -lGpad -lGui -lGX11 -lX3d + ROOTLIBS = $(shell root-config --libs) + ROOTGLIBS = $(shell root-config --glibs) ifeq ($(BRAHMS_ARCH),sun4os5pc) LIBS = $(ROOTLIBS) -lm -lsocket -lgen diff -c -r -N VER-1-2/test/Makefile~ VER-1-2-1/test/Makefile~ *** VER-1-2/test/Makefile~ Thu Jan 1 01:00:00 1970 --- VER-1-2-1/test/Makefile~ Fri Oct 22 20:31:42 1999 *************** *** 0 **** --- 1,214 ---- + # Makefile + # Solaris version + # + # This file is not complete !! + # dependencies are only partial- to ensure correct use the + # make -f Brat.mak clean + # make -f Brat.mak + # sequence of commands. + + ObjSuf = o + SrcSuf = C + ExeSuf = + DllSuf = so + LibSuf = a + OutPutOpt = -o + # + # Solaris + # + ifeq ($(BRAHMS_ARCH),sun4os5pc) + CXX = CC + CXXFLAGS = -w -O1 -g -KPIC -I$(ROOTSYS)/include + LD = CC + LDFLAGS = + SOFLAGS = -G + RM = rm + LIB = ar + LIBFLAGS = -rv + endif + + ifeq ($(BRAHMS_ARCH),linux) + CXX = g++ + CXXFLAGS = -g -Wall -fPIC -O $(INCLUDE) -I$(ROOTSYS)/include + SOFLAGS = -shared -Wl + LD = g++ + LDFLAGS = -g + SOFLAGS = -Wl -shared + endif + + BRATLIB = $(BRATHOME)/lib/$(BRAHMS_ARCH) + BRATLINKLIBS = -L$(BRATLIB) -lBrat_Db -lBrat_TRACK -lBrat_BB -lBrat_DC -lBrat_Tof -lBrat_TPC -lBrat_IO -lBrat_Geant -lBrat_Geometry -lBrat_Base + BRATANALIBS = -L$(BRATLIB) -lBrat_Ana + + ifeq ($(BRAHMS_ARCH),linux) + ROOTLIBS = -L$(ROOTSYS)/lib -lBase -lCint -lClib -lCont -lFunc -lGraf \ + -lGraf3d -lHist -lHtml -lMeta -lMinuit -lNet -lPostscript \ + -lProof -lTree -lUnix -lZip + endif + ifeq ($(BRAHMS_ARCH),sun4os5pc) + ROOTLIBS = -L$(ROOTSYS)/lib -lBase -lCint -lClib -lCont -lFunc -lGraf \ + -lGraf3d -lHist -lHtml -lMeta -lMinuit -lNet -lPostscript \ + -lProof -lTree -lUnix -lZip + endif + + ROOTGLIBS = -lGpad -lGui -lGX11 -lX3d + + + ifeq ($(BRAHMS_ARCH),sun4os5pc) + LIBS = $(ROOTLIBS) -lm -lsocket -lgen + GLIBS = $(ROOTLIBS) $(ROOTGLIBS) -L/usr/dt/lib -L/usr/openwin/lib \ + -L/usr/ccs/lib -lXm -lXt -lX11 -lm -lgen -ldl -lsocket + endif + + ifeq ($(BRAHMS_ARCH),linux) + LIBS = $(ROOTLIBS) -lm -ldl -rdynamic + GLIBS = $(ROOTLIBS) $(ROOTGLIBS) \ + -L/usr/X11R6/lib -lXpm -lX11 \ + -lm -ldl -rdynamic + endif + # + #---------------------------------------------------------------------------- + + BRAT = brat$(ExeSuf) + BRATTEST = testbrat$(ExeSuf) + BRATBASESO = libBrat_Base.$(DllSuf) + BRATBASELIB = libBrat_Base.$(LibSuf) + BRATGEANTSO = libBrat_Geant.$(DllSuf) + BRATGEANTLIB = libBrat_Geant.$(LibSuf) + BRATTPCSO = libBrat_TPC.$(DllSuf) + BRATTPCLIB = libBrat_TPC.$(LibSuf) + BRATTOFSO = libBrat_Tof.$(DllSuf) + BRATTOFLIB = libBrat_Tof.$(LibSuf) + BRATALLLIB = libBrat_All.$(LibSuf) + BRATALLSO = libBrat_All.$(DllSuf) + BRATGEOMETRYSO = libBrat_Geometry.$(DllSuf) + BRATGEOMETRYLIB = libBrat_Geometry.$(LibSuf) + BRATMAINO = brat.$(ObjSuf) + BRATTESTO = testbrat.$(ObjSuf) + GEOM = TestGeometry$(ExeSuf) + GEOMO = TestGeometry.$(ObjSuf) + BASE = TestBase$(ExeSuf) + BASEO = TestBase.$(ObjSuf) + UNITS = TestUnits$(ExeSuf) + UNITSO = TestUnits.$(ObjSuf) + + DIGBB = TestDigBB$(ExeSuf) + DIGBBO = TestDigBB.$(ObjSuf) + BRATDIG = BratDigitize$(ExeSuf) + BRATDIGO = BratDigitize.$(ObjSuf) + BRATDIGBB = BratDigitizeBB$(ExeSuf) + BRATDIGBBO = BratDigitizeBB.$(ObjSuf) + TESTIO = TestGeantIO$(ExeSuf) + TESTIOO = TestGeantIO.$(ObjSuf) + TOFW = ReadGeantTOFW$(ExeSuf) + TOFWO = ReadGeantTOFW.$(ObjSuf) + + INCL = -I$(BRATHOME)/include \ + -I$(BRATSYS)/include + + + PROGRAMS = $(GEOM) $(BASE) $(UNITS) $(TESTIO) + + MODULES = $(DIGBB) $(TOFW) $(BRATDIG) $(BRATDIGBB) + BRATLIBS = $(BRATBASELIB) $(BRATGEANTLIB) $(BRATTPCLIB) $(BRATTOFLIB) $(BRATGEOMETRYLIB) + + + + all : $(PROGRAMS) + + module : $(MODULES) + # + # On the windows system The shareable libraries are created + # using the root utility BINDEXPLIB. + # This is used to create the .def tables i.e. export tables + # This is more convoluted that on UNIX systems. + # + + $(BRATTEST) : $(BRATTESTO) + @echo LIBS = $(LIBS) + $(LD) $(LDFLAGS) $(BRATTESTO) $(BRATLINKLIBS) \ + $(LIBS) $(GLIBS) $(OutPutOpt)$(OutputSep)$(BRATTEST) + @echo "$(BRATEST) done" + + $(GEOM) : $(GEOMO) + @echo LIBS = $(LIBS) + $(LD) $(LDFLAGS) $(GEOMO) $(BRATLINKLIBS) \ + $(LIBS) $(GLIBS) $(OutPutOpt)$(OutputSep)$(GEOM) + @echo "$(GEOM) done" + + $(BASE) : $(BASEO) + @echo LIBS = $(LIBS) + $(LD) $(LDFLAGS) $(BASEO) $(BRATLINKLIBS) \ + $(LIBS) $(GLIBS) $(OutPutOpt)$(OutputSep)$(BASE) + @echo "$(BASE) done" + + $(UNITS) : $(UNITSO) + @echo LIBS = $(LIBS) + $(LD) $(LDFLAGS) $(UNITSO) $(BRATLINKLIBS) \ + $(LIBS) $(GLIBS) $(OutPutOpt)$(OutputSep)$(UNITS) + @echo "$(UNITS) done" + + $(DIGBB) : $(DIGBBO) + @echo LIBS = $(LIBS) + $(LD) $(LDFLAGS) $(DIGBBO) $(BRATLINKLIBS) \ + $(LIBS) $(GLIBS) $(OutPutOpt)$(OutputSep)$(DIGBB) + @echo "$(DIGBB) done" + + $(BRATDIG) : $(BRATDIGO) + @echo LIBS = $(LIBS) + $(LD) $(LDFLAGS) $(BRATDIGO) $(BRATANALIBS) $(BRATLINKLIBS) \ + $(LIBS) $(OutPutOpt)$(OutputSep)$(BRATDIG) + @echo "$(BRATDIG) done" + + $(BRATDIGBB) : $(BRATDIGBBO) + @echo LIBS = $(LIBS) + $(LD) $(LDFLAGS) $(BRATDIGBBO) $(BRATLINKLIBS) \ + $(LIBS) $(OutPutOpt)$(OutputSep)$(BRATDIGBB) + @echo "$(BRATDIGBB) done" + + $(TESTIO) : $(TESTIOO) + @echo LIBS = $(LIBS) + $(LD) $(LDFLAGS) $(TESTIOO) $(BRATLINKLIBS) \ + $(LIBS) $(GLIBS) $(OutPutOpt)$(OutputSep)$(TESTIO) + @echo "$(TESTIO) done" + + $(TOFW) : $(TOFWO) + @echo LIBS = $(LIBS) + $(LD) $(LDFLAGS) $(TOFWO) $(BRATLINKLIBS) \ + $(LIBS) $(GLIBS) $(OutPutOpt)$(OutputSep)$(TOFW) + @echo "$(TOFW) done" + + clean: + @echo "Cleaning up" + $(RM) -f *.$(ObjSuf) + $(RM) -f *.so + $(RM) -f *.a + $(RM) -f *.exe + $(RM) -f BratBaseCint.$(SrcSuf) + $(RM) -f BratAllCint.$(SrcSuf) + $(RM) -f BratGeantCint.$(SrcSuf) + $(RM) -f BratTPCCint.$(SrcSuf) + $(RM) -f BratTofCint.$(SrcSuf) + $(RM) -f BratAllCint.h + $(RM) -f BratGeantCint.h + $(RM) -f BratTPCCint.h + $(RM) -f BratTofCint.h + $(RM) -f BratBaseCint.h + + + .SUFFIXES: .$(SrcSuf).$(ObjSuf) + + ## User defined dependencies + + + + .$(SrcSuf).$(ObjSuf): + $(CXX) $(CXXFLAGS) $(INCL) -c $< + + %o:%cxx + $(CXX) $(CXXFLAGS) $(INCL)-c $< + + # Detector Class members + # + + diff -c -r -N VER-1-2/tof/src/BrMonitorTof.cxx VER-1-2-1/tof/src/BrMonitorTof.cxx *** VER-1-2/tof/src/BrMonitorTof.cxx Mon Aug 16 06:10:35 1999 --- VER-1-2-1/tof/src/BrMonitorTof.cxx Fri Nov 5 18:19:10 1999 *************** *** 56,61 **** --- 56,62 ---- #include "BrDigTof.h" #endif + #include ClassImp(BrMonitorTof) Binary files VER-1-2/tof/src/a.out and VER-1-2-1/tof/src/a.out differ Binary files VER-1-2/track/src/a.out and VER-1-2-1/track/src/a.out differ diff -c -r -N VER-1-2/zdc/src/BrMonitorZDC.cxx VER-1-2-1/zdc/src/BrMonitorZDC.cxx *** VER-1-2/zdc/src/BrMonitorZDC.cxx Wed Jul 28 00:41:08 1999 --- VER-1-2-1/zdc/src/BrMonitorZDC.cxx Fri Nov 5 18:19:30 1999 *************** *** 57,62 **** --- 57,63 ---- #include "BrDigZDC.h" #endif + #include ClassImp(BrMonitorZDC)