#ifndef STNTUPLE_TStnJet #define STNTUPLE_TStnJet #ifdef __GNUG__ #pragma interface #endif #include "TLorentzVector.h" #include "TArrayF.h" struct StnJetsBlock_t; class CdfJet; class TStnDataBlock; class AbsEvent; class TStnSecVtxTag; class TStnJet : public TObject { friend Int_t StntupleInitJet (TStnJet*, const CdfJet*); friend Int_t StnRun1InitJet (TStnJet*, StnJetsBlock_t*, Int_t); friend Int_t StntupleJetBlockLinks(TStnDataBlock*, AbsEvent*, Int_t); // lengths of the integer and float data blocks // of TStnJet (see TStnJet.cc) static const int fgNIntegers[20]; static const int fgNFloats [20]; protected: //------------------------------------------------------------------------------ // data members // store own number in the list in fUniqueID //------------------------------------------------------------------------------ TLorentzVector fMomentum; // ****** beginning of the integer block // filled by the analysis code: type of the object // associated with the jet (electron, photon etc) Int_t fNTrackWord; // novpt<<24+njtrk0<<16+ntrp<<8+ntrk Int_t fTypeWord; // type<<24+match<<16+seed_ieta<<8+seed_iphi Int_t fNTowerWord; // nextrk<<24+ivtx<<16+Ntrk(Lz>0)<<8+n(towers) Int_t fInteger[3]; // buffer for future development // ****** here the float sub-block starts Float_t fDetEta; Float_t fEmfr; Float_t fEp; // in reality - charge fraction (sumPt/Et) Float_t fSeedEt; // Et of a seed tower Float_t fEgrd; // energy in jet towers next to cracks Float_t fWord; // more bit-packed Run I matching info Float_t fCorfm; Float_t fCorfd; Float_t fCorfa; // run I tagging info - to be redone Float_t fTag; // unused Float_t fVbpb; // unused Float_t fPbpb; // unused Float_t fScbpb; // secvtx positive bg Float_t fScnpb; // secvtx negative bg Float_t fPppb; // unused Float_t fPnpb; // unused Float_t fTrackMass; // not defined yet Float_t fMaxTrackPt; // not defined in dev_240 Float_t fZvtx; // Z(vert) from tracks pointing to the jet Float_t fDz; // RMS of Z0's from tracks pointing at jet Float_t fPtout; // Sum(Pt) of tracks, associated to a jet // Variables added 9/27/2001 Matt Reece // Data from the accessors in HighLevelObjects/JetVariables.hh Float_t fEtaeta; // Eta-eta moment Float_t fEtaphi; // Eta-phi moment Float_t fPhiphi; // Phi-phi moment Float_t fVpt; // Sum Pt of tracks pointing at nearest vertex Float_t fNovpt; // Sum Pt of tracks not pointing at any vertex CdfJet* fCdfJet; // ! backward transient pointer to the CDF jet Float_t fTmp[10]; // ! temporary vars Int_t fPartType; //! temp parton type Int_t fGenp; //! temp genp index Int_t fRank; //! temp Et order Float_t fDrMin; //! temp dr to nearest jet Int_t fTagNumber; //! temp tag block index Int_t fIdwrd; //! user ID word TStnSecVtxTag* fSecVtxTag; //! pointer to tag itself Float_t fScbpbSig; //! secvtx positive bg sigma Float_t fScnpbSig; //! secvtx negative bg sigma Float_t fMistag; //! secvtx mistag bg Float_t fMistagSig; //! secvtx mistag bg sigma Float_t fCorr[7]; //! all levels of corrections TLorentzVector fCorrectedMomentum; // ! corrected momentum of the jet //------------------------------------------------------------------------------ // functions //------------------------------------------------------------------------------ public: // ****** constructors and destructor TStnJet(Int_t Num = 0); virtual ~TStnJet(); //------------------------------------------------------------------------------ // accessors //------------------------------------------------------------------------------ TLorentzVector* Momentum () { return &fMomentum; } Int_t Number () const { return GetUniqueID(); } Int_t NTowers () const { return (fNTowerWord ) & 0xff; } Int_t NTlzp () const { return (fNTowerWord >> 8) & 0xff; } Int_t VertexNumber() const { return (fNTowerWord >> 16) & 0xff; } Int_t Integer(Int_t I) const { return fInteger[I]; } // number of tracks hitting the CES/PEM face // (?) within the jet clustering cone Int_t NExTracks () const { return (fNTowerWord >> 24) & 0xff; } Int_t NTracks () const { return (fNTrackWord ) & 0xff; } Int_t NTrp () const { return (fNTrackWord >> 8) & 0xff; } Int_t NTrkj0 () const { return (fNTrackWord >> 16) & 0xff; } Int_t Novpt () const { return (fNTrackWord >> 24) & 0xff; } Int_t Type () const { return (fTypeWord >> 24) & 0xff; } Int_t ObjectType () const { return (fTypeWord >> 24) & 0xff; } Int_t ObjectNumber() const { return (fTypeWord >> 16) & 0xff; } Int_t SeedIEta () const { return (fTypeWord >> 8) & 0xff; } Int_t SeedIPhi () const { return (fTypeWord ) & 0xff; } Float_t EtaEta () const { return fEtaeta; } Float_t EtaPhi () const { return fEtaphi; } Float_t PhiPhi () const { return fPhiphi; } Double_t Et () const { return fMomentum.E()*fMomentum.Pt()/fMomentum.P(); } Double_t M () const { return fMomentum.M(); } Double_t Eta () const { return fMomentum.PseudoRapidity(); } Double_t Phi () const { return TVector2::Phi_0_2pi( fMomentum.Phi() ); } Float_t DetEta () const { return fDetEta; } Float_t EmFract () const { return fEmfr; } Float_t Emfr () const { return fEmfr; } Float_t EOverP () const { return fEp; } Float_t SeedEt () const { return fSeedEt; } Float_t TrackMass () const { return fTrackMass; } Float_t MaxTrackPt() const { return fMaxTrackPt; } Float_t Corfd () const { return fCorfd; } //level5 for Met Float_t Corfm () const { return fCorfm; } //level7 Float_t Corfa () const { return fCorfa; } //level7+bjet Float_t Tag () const { return fTag; } Float_t Scbpb () const { return fScbpb;} // secvtx positive bg Float_t Scnpb () const { return fScnpb;} // secvtx negative bg Float_t EtCorr () const { return fCorfd; } Float_t Vz () const { return fZvtx; } Float_t Dz () const { return fDz; } // lengths of the integer and float sub-blocks static Int_t NIntegers (Int_t Iv) { return TStnJet::fgNIntegers[Iv-1]; } static Int_t NFloats (Int_t Iv) { return TStnJet::fgNFloats [Iv-1]; } //----------------------------------------------------------------------------- // transient-only variables //----------------------------------------------------------------------------- const CdfJet* GetCdfJet() const { return (const CdfJet*) fCdfJet; } Float_t& Tmp (Int_t i){ return fTmp[i]; } Int_t PartType () const { return fPartType; } Int_t Genp () const { return fGenp; } Int_t Rank () const { return fRank; } Float_t DrMin () const { return fDrMin; } Int_t TagNumber() const { return fTagNumber;} Int_t IDWord () const { return fIdwrd; } TStnSecVtxTag* SecVtxTag() const { return fSecVtxTag; } Float_t ScbpbSig () const { return fScbpbSig; } Float_t ScnpbSig () const { return fScnpbSig; } Float_t Mistag () const { return fMistag; } Float_t MistagSig() const { return fMistagSig;} Float_t Corr(Int_t i) const { return fCorr[i]; } TLorentzVector* CorrectedMomentum() { return &fCorrectedMomentum; } //----------------------------------------------------------------------------- // setters //----------------------------------------------------------------------------- void SetNTrackWord(Int_t Ntr, Int_t Ntrp, Int_t Ntrkj0, Int_t Novpt) { fNTrackWord = (Novpt << 24) | (Ntrkj0 << 16) | (Ntrp << 8) | Ntr; } void SetNTowerWord(Int_t Ntow, Int_t Ntlzp, Int_t Iv, Int_t NExTracks) { fNTowerWord = (NExTracks << 24) | (Iv << 16) | (Ntlzp << 8) | Ntow; } void SetVertexNumber (Int_t Iv) { fNTowerWord = (fNTowerWord & 0xff00ffff) | ((Iv & 0xff) << 16); } void SetTypeWord(Int_t OType, Int_t ONum, Int_t IEta, Int_t IPhi) { fTypeWord = (OType << 24) | (ONum << 16) | (IEta << 8) | IPhi; } void SetObjectType(Int_t Type) { fTypeWord = (fTypeWord & 0x00ffffff) | (Type << 24); } void SetObjectNumber(Int_t Type) { fTypeWord = (fTypeWord & 0xff00ffff) | ((Type << 16) & 0x00ff0000); } void SetMomentum (TLorentzVector& m ) { fMomentum = m; } void SetDetEta (Float_t d) { fDetEta = d; } void SetNumber (Int_t Num ) { SetUniqueID(Num); } void SetVpt (Double_t Pt ) { fVpt = Pt; } void SetNovpt (Double_t Pt ) { fNovpt = Pt; } void SetEp (Double_t Ep ) { fEp = Ep; } void SetTrackMass (Double_t M ) { fTrackMass = M; } void SetMaxTrackPt(Double_t Pt ) { fMaxTrackPt = Pt; } void SetEtCorr (Double_t Corr) { fCorfd = Corr; } void SetEtCorrM (Double_t Corr) { fCorfm = Corr; } void SetEtCorrA (Double_t Corr) { fCorfa = Corr; } void SetPartType (Int_t Type) { fPartType = Type; } void SetGenp (Int_t Genp) { fGenp = Genp; } void SetRank (Int_t Rank) { fRank = Rank; } void SetDrMin (Float_t Dr ) { fDrMin = Dr; } void SetTag (Float_t Tag ) { fTag = Tag; } void SetTagNumber (Int_t TagN) { fTagNumber = TagN; } void SetScbpb (Float_t Pr ) { fScbpb = Pr; } void SetScnpb (Float_t Pr ) { fScnpb = Pr; } void SetIDWord (Int_t Word) { fIdwrd = Word; } void SetSecVtxTag (TStnSecVtxTag* t){fSecVtxTag = t; } void SetScbpbSig (Float_t s) { fScbpbSig = s; } void SetScnpbSig (Float_t s) { fScnpbSig = s; } void SetMistag (Float_t m) { fMistag = m; } void SetMistagSig (Float_t s) { fMistagSig = s; } void SetCorr(Float_t c, Int_t i) { fCorr[i] = c; } //----------------------------------------------------------------------------- // schema evolution //----------------------------------------------------------------------------- void ReadV1(TBuffer& R__b); void ReadV2(TBuffer& R__b); void ReadV3(TBuffer& R__b); void ReadV4(TBuffer& R__b); //----------------------------------------------------------------------------- // overloaded methods of TObject //----------------------------------------------------------------------------- void Clear(Option_t* Option = ""); void Print(Option_t* Option = "") const ; ClassDef(TStnJet,5) }; #endif