#ifndef STNTUPLE_TSiIsectBlock #define STNTUPLE_TSiIsectBlock //----------------------------------------------------------------------------- // This is a collection of the intersections of tracks with silicon // halfladders. // // If you are looping over tracks, then you can use the // correspondance object, TStnTrackLinkBlock, to get access to all // intersections for a given track. You also have immediate access // to all silicon hits for this track for comparison. // To get all the intersections with a certain halfladder, use the ... // // Author: Aaron Dominguez (CDF/LBNL) // Date: June 19 2001 //----------------------------------------------------------------------------- #include "Stntuple/obj/TStnDataBlock.hh" #include "Stntuple/obj/TStnSiIsect.hh" #include "Stntuple/obj/TStnSiDigiCode.hh" #include "TClonesArray.h" #include "TArrayI.h" #include class TSiIsectBlock: public TStnDataBlock { friend Int_t StntupleInitSiIsectBlock(TStnDataBlock* block, AbsEvent* event, int mode); friend Int_t StntupleSiIsectBlockLinks(TStnDataBlock* block, AbsEvent* event, int mode); public: //------------------------------------------------------------------------------ // data members //------------------------------------------------------------------------------ Int_t fNSiIsects; // Total number of intersections. TClonesArray* fSiIsectList; // Flat array of intersections in // blocks of the same track. //----------------------------------------------------------------------------- // functions //----------------------------------------------------------------------------- public: // ****** constructors and destructor TSiIsectBlock(); virtual ~TSiIsectBlock(); // ****** init methods Int_t InitEvent(Int_t flag=0); // ****** accessors Int_t NSiIsects () { return fNSiIsects; } TClonesArray* SiIsectList() { return fSiIsectList; } TStnSiIsect* SiIsect(int i) const { return (TStnSiIsect*) fSiIsectList->UncheckedAt(i); } // ****** modifiers TStnSiIsect* NewSiIsect() { return new ((*fSiIsectList)[fNSiIsects++]) TStnSiIsect(); } // ****** overloaded methods of // TObject void Clear(Option_t* opt=""); #ifndef NO_ROOT_CONST void Print(Option_t* opt="") const; #else void Print(Option_t* opt=""); #endif ClassDef(TSiIsectBlock,2) }; #endif