#ifndef STNTUPLE_TStnPhotonBlock #define STNTUPLE_TStnPhotonBlock //----------------------------------------------------------------------------- // definition of the STNTUPLE photon block // Author: Pasha Murat (CDF/FNAL) // Date: Oct 31 2000 // // the implementation is a trade-off between the performance in split and // non-split modes. I'm assuming that on a long term time scale TStnPhotonBlock // will be written in split mode, however the TClonesArray itself may not // be split (if one needs tracks, he normally needs all the tracks, not only // track Pt) // Also one wants to control the streamer of the class, having a wrapper // around TClonesArray seems to be a reasonable compromise here //----------------------------------------------------------------------------- // Required by KCC4.0 to fix minor scope injection problems in root v2.24 #include "TClonesArray.h" #include "TStnDataBlock.hh" #include "TStnPhoton.hh" class TStnEvent; class TStnLinkBlock; class TStnPhotonBlock: public TStnDataBlock { friend Int_t StnRun1InitPhotonBlock (TStnDataBlock*, TStnEvent*, int); public: //------------------------------------------------------------------------------ // data members //------------------------------------------------------------------------------ Int_t fNPhotons; // # of photons Int_t fNcencl; // # of the central clusters Int_t fNphoidl; Int_t fNphoisol; Int_t fNphoid; Int_t fNphoiso; // # of isolated photons TClonesArray* fPhotonList; TStnLinkBlock* fTowerLinkList; // || links to the towers //------------------------------------------------------------------------------ // functions //------------------------------------------------------------------------------ public: // ****** constructors and destructor TStnPhotonBlock(); virtual ~TStnPhotonBlock(); // ****** accessors Int_t NPhotons () const { return fNPhotons; } Int_t NCentralClusters() const { return fNcencl; } TClonesArray* PhotonList () const { return fPhotonList; } TStnPhoton* Photon(int i) const { return (TStnPhoton*) fPhotonList->UncheckedAt(i); } // ****** modifiers TStnPhoton* NewPhoton() { return new ((*fPhotonList)[fNPhotons++]) TStnPhoton(); } TStnLinkBlock* TowerLinkList() { return fTowerLinkList; } // ****** overloaded functions of // TObject void Clear(Option_t* opt=""); void Print(Option_t* opt="") const ; ClassDef(TStnPhotonBlock,2) }; #endif