//-*-mode:c++-*- // $Id: BrTpcCluster.h,v 1.5 2001/08/15 13:38:50 pchristi Exp $ // $Author: pchristi $ // $Date: 2001/08/15 13:38:50 $ // // /////////////////////////////////////////////////////////////////////// // // // BrTpcCluster // // // // BRAHMS TPC Cluster class // // // // Author : Kris Hagel (hagel@comp.tamu.edu // // Created : 11-Mar-1998 // // Version : 1.0 // // Changed : February 2000, // // // /////////////////////////////////////////////////////////////////////// #ifndef BRAT_BrTpcCluster #define BRAT_BrTpcCluster // Root Classes #ifndef ROOT_TObject #include "TObject.h" #endif #ifndef ROOT_TList #include "TList.h" #endif // Brahms Classes #ifndef BRAT_BrTpcSequence #include "BrTpcSequence.h" #endif class BrTpcCluster: public TObject { public: BrTpcCluster(); BrTpcCluster(Int_t, BrTpcSequence &); virtual ~BrTpcCluster(); void AddSeq(BrTpcSequence &, Bool_t copy = kTRUE); Bool_t IsSortable() const {return kTRUE;} Int_t Compare(TObject *digtpc); Int_t Compare(const TObject *digtpc) const; Int_t GetADCSum() {if( !fBuild ) Build(); return fEnergy;} Int_t GetFirstBin() {if( !fBuild ) Build(); return fFirstBin;} Int_t GetFirstPad() {if( !fBuild ) Build(); return fFirstPad;} Int_t GetID() const {return fID;} Int_t GetMaxADC() {if( !fBuild ) Build(); return fMaxADC;} Float_t GetMeanPad() {if( !fBuild ) Build(); return fMeanPad;} Float_t GetMeanTime() {if( !fBuild ) Build(); return fMeanTime;} Int_t GetNbins() {if( !fBuild ) Build(); return fNbins;} Int_t GetNpads() {if( !fBuild ) Build(); return fNpads;} Int_t GetNseqs() const {return fNseqs;} Int_t GetRow() const {return fRow;} BrTpcSequence* GetSeq(Int_t); TList* GetSeqList() {return fSeqList;} Int_t GetStatus() const {return fStatus;} Float_t GetVarPad() {if( !fBuild ) Build(); return fVarPad;} Float_t GetVarTime() {if( !fBuild ) Build(); return fVarTime;} void Print(Option_t* option="") const; //*MENU* void SetID(Int_t i) {fID = i;} void SetRow(Int_t i) {fRow = i;} void SetStatus(Int_t i) {fStatus = i;} typedef enum ClusterStatus { kNoiseHit = 3, kSingleHit = 1, kMultiHit = 2, kSingleHitDec =4, kMultiHitDec =5 }; private: Int_t fID; // Unique Id (for this TPC) Int_t fRow; // Padrow number Int_t fNpads; //! Number of Pads Float_t fMeanPad; //! Mean pad Float_t fVarPad; //! Mean pad Short_t fFirstPad;//! Number of first Pad Int_t fNbins; //! Number of timebins Float_t fMeanTime; //! Mean time Float_t fVarTime; //! Mean time Short_t fFirstBin;//! Number of first bin Int_t fNseqs; // Number of sequences. Int_t fStatus; // Status of cluster. Short_t fMaxADC; //! Maximum ADC value for cluster Int_t fEnergy; //! Sum of ADC values for cluster Bool_t fBuild; //! Has the above values been calculated TList *fSeqList; // List of BrTpcSequences for this cluster. void Build( void ); public: ClassDef(BrTpcCluster, 3) // BRAHMS TPC Cluster Class }; #endif ////////////////////////////////////////////////////////////////////////////// // // $Log: BrTpcCluster.h,v $ // Revision 1.5 2001/08/15 13:38:50 pchristi // Fixed memory leak because of TList being created in Default constructer, // so that when clusters were read in for files an extra TList was created for // each cluster // // Revision 1.4 2001/07/10 11:18:13 cholm // Changed member kBuild to fBuild. This was a direct violation of the // coding standard in BRAT/ROOT, since kBuild is not a constant. As a // consequnce, the class version was bumped to 3. // // Revision 1.3 2001/07/06 10:15:53 pchristi // Removed asserts and made warnings instead. Changed addseq so it does not always have to copy the sequence. // // Revision 1.2 2001/06/25 14:30:39 cholm // Made Print conform to TObject // // Revision 1.1 2001/06/22 17:36:26 cholm // Change names so that every data class has the same format so that // we have that down from the very beginning, so that we will not have to // worry about that later on. The affected classes are: // // // BrRdoBB -> BrBbRdo // BrRdoZDC -> BrZdcRdo // BrTPCCluster -> BrTpcCluster // BrTPCClusterTable -> BrTpcClusterTable // // Revision 1.1.1.1 2001/06/21 14:55:03 hagel // Initial revision of brat2 // // Revision 1.11 2001/06/17 17:20:23 pchristi // Added print method, comments, and changed fBuild to non-persistent in cluster. // GetAdc() in sequence now returns Short_t. // // Revision 1.10 2001/04/14 22:19:43 videbaek // added const methods for Compare, Isequal // // Revision 1.9 2000/10/02 17:07:31 pchristi // Cleaned up headers and source files in the tpc dir // // Revision 1.8 2000/10/02 12:34:54 pchristi // Update of the clustering algorithm and related classes. // // Revision 1.7 2000/08/28 00:17:43 videbaek // Mostly moved CVS log information to end of header files. Other changes // documenter in message to listserver August 26. // // Revision 1.6 2000/03/08 20:17:54 videbaek // Change clustering algorithms by adding a new method. BrTpcCluster is redefined. // Tracking reorganized with updates by Alv, Peter and Flemming // // //