// $Id$ // // File: Event.cc // Created: Tue Oct 13 09:55:12 EDT 2009 // Creator: davidl (on Darwin harriet.jlab.org 9.8.0 i386) // #include using namespace std; #define _DBG_ cerr<<__FILE__<<":"<<__LINE__ #define _DBG__ _DBG_<Clear(); // delete entries in TClonesArray (without freeing memory) pim->Clear(); // delete entries in TClonesArray (without freeing memory) proton->Clear(); // delete entries in TClonesArray (without freeing memory) photon->Clear(); // delete entries in TClonesArray (without freeing memory) target.SetXYZT(0.0, 0.0, 0.0, 0.0); beam.SetXYZT(0.0, 0.0, 0.0, 0.0); vertex.SetXYZ(0.0, 0.0, 65.0); W.SetXYZT(0.0, 0.0, 0.0, 0.0); all_mesons_fiducial = false; all_photons_fiducial = false; all_protons_fiducial = false; } #if 0 //------------------ // AddRho //------------------ void Event::AddRho(TLorentzVector &pip, TLorentzVector &pim) { TClonesArray &rhos = *this->rho; rho_t *rho = new(rhos[Nrho++]) rho_t(); rho->m = (pip+pim).M(); rho->pip = pip; rho->pim = pim; rho->isfiducial = IsFiducial(pip) && IsFiducial(pim); } //------------------ // IsFiducial //------------------ bool Event::IsFiducial(TLorentzVector &pion) { double theta = pion.Theta()*TMath::RadToDeg(); if(theta<2.0 || theta>110.0)return false; if(pion.P()<0.500)return false; return true; } #endif