/data3/calcul/jacquem/working_dir/Micromegas/micromegasFrameWork/include/root/MTChannel.hh

Go to the documentation of this file.
00001 #ifndef ROOT_MTChannel
00002 #define ROOT_MTChannel
00003 
00004 //////////////////////////////////////////////////////////////////////////
00005 //                                                                      //
00006 // MTChannel  for MICROMEGAS GASSIPLEX READOUT                            //
00007 //                                                                      //
00008 // Description of thechannel parameters                      //
00009 //                                                                      //
00010 //////////////////////////////////////////////////////////////////////////
00011 
00012 
00013 #include "TObject.h"
00014 #include "TClonesArray.h"
00015 #include "TRefArray.h"
00016 #include "TRef.h"
00017 #include "TH1.h"
00018 #include "TMath.h"
00019 #include <vector>
00020 #include <map>
00021 
00022 #include "root/MTChannelSoftId.hh"
00023 
00024 class TDirectory;
00025 class ChannelHit;
00026 
00027 ////////////////////////////////////////////////////////////////////////////////////////
00028 ///     CLASS CHANNEL
00029 /// Represent ChannelHit and not physical Chip channel
00030 ///////////////////////////////////////////////////////////////////////////////////////
00031 class MTChannel : public TObject {
00032 
00033 private:
00034    Int_t         fAnalogValue;    // Analog Value of MTChannel for Gassiplex and Dirac
00035    Int_t         fDigitalValue;   // Digiatl Value of MTChannel for Hardroc and Dirac
00036    Float_t       fEnergy;         // Reconstructed Energy
00037    MTChannelSoftId fSoftId;     // unique Id of MTChannel for all Chambers a
00038    UInt_t        fHardId;     // Id of MTChannel for its chamber
00039    Int_t         fX;          // X coordinate of channel
00040    Int_t        fY;          // Y coordinate of channel
00041    Int_t        fZ;          // Z coordinate of channel
00042    UInt_t        fOrder;      // Order of MTChannel for its chamber
00043    // hardroc-specific data
00044    ULong64_t     timestamp;   // common unix timestamp
00045    UInt_t        bcId_Abs;    // t1: absolute BCID (BCID_abs)
00046    UInt_t        bcId_Dif;    // t2: BCID of the DIF (BCID_dif)
00047    UInt_t        bcId_Hit;    // t3: BCID of the hit (BCID_hit)
00048    UInt_t        bcId_Hit_Fine;    // t3: BCID of the hit (BCID_hit)
00049    UInt_t        memoryOrder   ; // Ordre de lecture dans la memoire du Chip pour un meme trigger
00050    bool          rejected;    //bad hit, hardware tagging
00051   
00052    UInt_t       rowInChamber; // row in Chamber alongside X axis
00053    UInt_t       colInChamber; // col in Chamber alongside Y axis
00054 
00055   
00056 
00057 
00058 public:
00059    MTChannel();
00060    MTChannel(const MTChannel& orig); // copy constructor
00061    MTChannel(const ChannelHit& hit, UInt_t order);
00062    virtual ~MTChannel() {Clear();}
00063     
00064    Int_t   GetAnalogValue(void) const { return fAnalogValue; }
00065    Int_t   GetDigitalValue(void) const { return fDigitalValue; }
00066    Float_t GetEnergy(void) const { return fEnergy; }
00067    const MTChannelSoftId&  GetSoftId() const { return fSoftId; }
00068    UInt_t  GetHardId(void) const { return fHardId; }
00069    Int_t GetX(void) const { return fX; }
00070    Int_t GetY(void) const { return fY; }
00071    Int_t GetZ(void) const { return fZ; }
00072    UInt_t  GetOrder(void) const { return fOrder; }
00073    UInt_t  GetChb(void) const { return GetChamberId();}
00074    UInt_t  GetChamberId(void) const;
00075    UInt_t  GetDifId(void) const;
00076    UInt_t  GetChipId(void) const;
00077          UInt_t  GetBoardId(void) const;
00078    UInt_t  GetRowInChip(void) const;
00079    UInt_t  GetColInChip(void) const;
00080    UInt_t  GetRowInChamber() const { return rowInChamber;}
00081    UInt_t  GetColInChamber() const { return colInChamber;}
00082 
00083    ULong64_t GetTimestamp(void) const { return(timestamp); };
00084    UInt_t  GetBcId_Abs(void) const { return(bcId_Abs); };
00085    UInt_t  SetBcId_Abs(UInt_t bcId) { bcId_Abs=bcId ; };
00086 
00087    UInt_t  GetBcId_Dif(void) const { return(bcId_Dif); };
00088    UInt_t  GetBcId_Hit(void) const { return(bcId_Hit); };
00089    UInt_t  GetBcId_Hit_Fine(void) const { return(bcId_Hit_Fine); };
00090 
00091    bool    GetRejected(void) const { return rejected;};
00092    void    SetRejected(bool aValue) { rejected = aValue; };
00093 
00094    void   SetMemoryOrder(const UInt_t order) { memoryOrder = order; };
00095    UInt_t GetMemoryOrder(void) const { return memoryOrder ;}  ;
00096 
00097 
00098    void   SetX(Int_t val)  {  fX = val; }
00099    void   SetY(Int_t val)  {  fY = val; }
00100    void   SetZ(Int_t val)  {  fZ = val; }
00101    void   SetEnergy(Float_t val) { fEnergy = val; }
00102    Int_t Compare(const TObject *obj) const;
00103 
00104 
00105 
00106    ClassDef(MTChannel, 30)
00107 
00108 };
00109 
00110 #endif

Generated on Mon Jun 11 16:55:45 2012 for MicromegasFramework by  doxygen 1.4.7