#ifndef STNTUPLE_TStnSiStrip #define STNTUPLE_TStnSiStrip //----------------------------------------------------------------------------- // // This is an implementation of the CDF's SiStrip which packs things // quite tightly and should allow basic interactive browsing of the // raw silicon data. // // The persistant data members are all packed information and the // streamer's job is to unpack these words into the public data members. // // This class is designed to be used in a TClonesArray with no splitting // // Author: Aaron Dominguez (CDF/LBNL) // Date: Oct 18 2001 //----------------------------------------------------------------------------- #include "TObject.h" #include "TVector3.h" #include "Stntuple/obj/TStnSiDigiCode.hh" class TStnSiStrip: public TObject { public: //------------------------------------------------------------------------------ // Public data members which are NOT streamed out. // // Play a trick on root and do NOT put the "//!" marker on these data // members even though they aren't streamed out by my custom // streamer. This will allow you to make plots of these variables // with a command like STNTUPLE->Draw("fSiStripList.fADC") // For this to work, you HAVE TO USE SPLIT LEVEL 1 FOR TSiStripBlock, // and you HAVE TO CALL fSiStripList->BypassStreamer(kFALSE). //------------------------------------------------------------------------------ // Packed in fPack_NumChgPed Int_t fStrip; // Strip number Float_t fADC; // Pedestal subtracted ADC value Float_t fPed; // Pedestal // Packed in fPack_Noise Float_t fNoise; // RMS of pedestal // Packed in fPack_DNoise Float_t fDNoise; // RMS of difference between neighboring strips // Packed in fPack_Status Int_t fStatus; // Status of strip (good, bad, ugly) // Packed in fPack_OBSP Int_t fOBSP[3]; // Up to three particles can contribute // to a given strip private: //------------------------------------------------------------------------------ // Private data members which ARE streamed out. // NOTE THAT THESE MUST BE IN BLOCKS OF THE SAME DATA TYPE FOR FAST STREAMING!! // // Play a trick on root and stream these out with my custom streamer // but mark them as not streamed out with the "//!" marker. This // means they won't show up as plottable and commands like // STNTUPLE->Draw("fSiStripList.fPack_NumChgPed") won't work. //------------------------------------------------------------------------------ UInt_t fPack_NumChgPed; //! Strip num (0-895) bits 0-9 // Charge (-15 - 240.75 1/4 ADC count) bits 10-20 // Pedestal (-15 - 240.75 1/4 ADC count) bits 21-31 UInt_t fPack_OBSP; //! OBSP numbers of up to 3 mothers. // 10 bits/OBSP number. Max OBSP# of // 1023, bit 30-31 have number of mothers UChar_t fPack_Noise; //! RMS of pedestal (0-15 1/16 ADC count) 8 bits UChar_t fPack_DNoise; //! RMS of diff b/w neighbors (0-15 1/16 ADC count) 8 bits UChar_t fPack_Status; //! Status word from SiStrip. 0=Good, else=problems public: UShort_t fDigiCode; // Digicode of ladder segment for cross // checking TClonesArray bool fStreamGeometryInfo; //! If this is set, then geometry is streamed // in/out for the local and global position of // the strips. Use the unused highest // bit of fDigiCode to flag this. TVector3 fGlobal; // Global coords of strip Float_t fLocal; // Local coords of strip //------------------------------------------------------------------------------ // functions //------------------------------------------------------------------------------ public: // ****** constructors and destructor TStnSiStrip(); virtual ~TStnSiStrip(); void Unpack(); // Convert packed steamed data into public data void Pack(); // Convert public data into streamed data void Print(Option_t* option = "") const; ClassDef(TStnSiStrip,2) }; #endif