#ifndef STNTUPLE_TStnJetBlock #define STNTUPLE_TStnJetBlock //----------------------------------------------------------------------------- // 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 TStnJetBlock // 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 //----------------------------------------------------------------------------- #include "TClonesArray.h" #include "TStnDataBlock.hh" #include "TStnLinkBlock.hh" #include "TStnJet.hh" class TStnEvent; class TStnJetBlock: public TStnDataBlock { friend Int_t StnRun1InitJetBlock (TStnDataBlock*, TStnEvent*, int); friend Int_t StntupleInitJetBlock (TStnDataBlock*, AbsEvent* , int); public: // flag different algorithms (the list // can be extended...) enum { kJetClu = 1, kKt = 2 }; // lengths of sub-blocks for V2 enum { kNIntegersV2 = 5, kNFloatsV2 = 1 }; // lengths of sub-blocks for V3 enum { kNIntegersV3 = 5, kNFloatsV3 = 2 }; protected: //------------------------------------------------------------------------------ // data members //------------------------------------------------------------------------------ Int_t fNJets; // # of jets Int_t fNJet10; // # of jets with Et > 10 GeV Int_t fNJet15; // # of jets with Et > 15 GeV Int_t fNJet20; // ----------''------- 20 GeV Int_t fNJet25; // ----------''------- 25 GeV Float_t fConeSize; // JETCLU cone size Float_t fZVertex; // Z-coord of the clustering vertex TClonesArray* fListOfJets; // list of jets TStnLinkBlock* fTowerLinkList; // || links to the towers TStnLinkBlock* fTrackLinkList; // || links to the tracks //------------------------------------------------------------------------------ // functions //------------------------------------------------------------------------------ public: // ****** constructors and destructor TStnJetBlock(); virtual ~TStnJetBlock(); //----------------------------------------------------------------------------- // accessors //----------------------------------------------------------------------------- Int_t NJets () const { return fNJets; } Int_t NJet10 () const { return fNJet10; } Int_t NJet15 () const { return fNJet15; } Int_t NJet20 () const { return fNJet20; } Int_t NJet25 () const { return fNJet25; } TClonesArray* ListOfJets () const { return fListOfJets; } Float_t ConeSize () const { return fConeSize; } Float_t ZVertex () const { return fZVertex; } TStnJet* Jet(int i) const { return (TStnJet*) fListOfJets->UncheckedAt(i); } Int_t JetNumber(const CdfJet* Jet) const; TStnLinkBlock* TrackLinkList() { return fTrackLinkList; } TStnLinkBlock* TowerLinkList() { return fTowerLinkList; } Int_t NTracks (Int_t Jet) { return fTrackLinkList->NLinks(Jet); } Int_t NTowers (Int_t Jet) { return fTowerLinkList->NLinks(Jet); } Int_t TowerKey (Int_t Jet, Int_t I) { return fTowerLinkList->Index(Jet,I);} Int_t TrackNumber(Int_t Jet, Int_t I) { return fTrackLinkList->Index(Jet,I);} //----------------------------------------------------------------------------- // modifiers //----------------------------------------------------------------------------- void SetConeSize(Float_t cone) { fConeSize = cone; } void SetNJets (Int_t N ) { fNJets = N; } void SetNJets10 (Int_t N ) { fNJet10 = N; } void SetNJets15 (Int_t N ) { fNJet15 = N; } void SetNJets20 (Int_t N ) { fNJet20 = N; } void SetNJets25 (Int_t N ) { fNJet25 = N; } TStnJet* NewJet() { TStnJet* j = new ((*fListOfJets)[fNJets]) TStnJet(fNJets); fNJets++; return j; } //----------------------------------------------------------------------------- // schema evolution //----------------------------------------------------------------------------- void ReadV1(TBuffer& R__b); void ReadV2(TBuffer& R__b); //----------------------------------------------------------------------------- // overloaded methods of TObject //----------------------------------------------------------------------------- void Clear(Option_t* opt=""); void Print(Option_t* opt="") const ; ClassDef(TStnJetBlock,3) }; #endif