emcClusterContent.C

Go to the documentation of this file.
00001 #include "emcClusterContent.h"
00002 
00003 ClassImp(emcClusterContent)
00004 
00005   using namespace std;
00006 
00007 static int shutup = 0;
00008 
00009 //_____________________________________________________________________________
00010 emcClusterContent&
00011 emcClusterContent::operator=(const emcClusterContent&)
00012 {
00013   return * this;
00014 }
00015 
00016 //_____________________________________________________________________________
00017 void
00018 emcClusterContent::identify(std::ostream& os) const
00019 {
00020   warning("identify(std::ostream& os)");
00021 }
00022 
00023 //_____________________________________________________________________________
00024 int
00025 emcClusterContent::isValid() const
00026 {
00027   warning("isValid()");
00028   return 0;
00029 }
00030 
00031 //_____________________________________________________________________________
00032 void
00033 emcClusterContent::print(std::ostream& out) const
00034 {
00035   warning("print(std::ostream& out)");
00036 }
00037 
00038 void
00039 emcClusterContent::warning(const char *field) const
00040 {
00041   if (!shutup)
00042     {
00043       cout << PHWHERE << "using virtual function, doing nothing" << endl;
00044       cout << "Offending field == " << field << endl;
00045     }
00046   return ;
00047 }
00048 
00049 void
00050 emcClusterContent::ShutUp(const int i)
00051 {
00052   shutup = i;
00053 }
00054 
00055 void
00056 emcClusterContent::Copy(const emcClusterContent &src)
00057 {
00058   ShutUp();
00059   set_arm(src.arm());
00060   set_chi2(src.chi2());
00061   set_corrdisp(src.corrdispy(), src.corrdispz());
00062   set_cutword(src.cutword());
00063   set_disp(src.dispy(), src.dispz());
00064   set_dxyz(src.dx(), src.dy(), src.dz());
00065   set_e(src.e());
00066   set_e9(src.e9());
00067   set_ecore(src.ecore());
00068   set_ecent(src.ecent());
00069   set_etofmin(src.etofmin());
00070   set_etofmax(src.etofmax());
00071   set_id(src.id());
00072   set_ipos(src. iypos(), src.izpos());
00073   set_quality(src.quality());
00074   set_maps(src.deadmap(), src.warnmap());
00075   set_multiplicity(src.multiplicity());
00076   set_padisp(src. padispy(), src.padispz());
00077   set_prob_photon(src.prob_photon());
00078   set_phi(src.phi());
00079   set_pid(src.pid());
00080   set_rawtdc(src.rawtdc());
00081   set_sector(src.sector());
00082   set_simfrac(src.simfrac());
00083   set_tof(src.tof());
00084   set_tofhad(src.tofhad());
00085   set_tofdisp(src.tofdisp());
00086   set_tofmin(src.tofmin());
00087   set_tofmax(src.tofmax());
00088   set_tofcorr(src.tofcorr());
00089   set_tofcorrmin(src.tofcorrmin());
00090   set_tofcorrmax(src.tofcorrmax());
00091   set_theta(src.theta());
00092   set_type(src.type());
00093   set_xyz(src.x(), src.y(), src.z());
00094   set_yz_cg(src.ycg(), src.zcg());
00095 
00096   //  Extra variables for vetoes of charged particles...
00097   set_emcpc3(src.emcpc3());
00098   set_emcpc3neartrk(src.emcpc3neartrk());
00099   set_emcpc3dz(src.emcpc3dz());
00100   set_emcpc3dphi(src.emcpc3dphi());
00101   set_emctrk(src.emctrk());
00102   set_emctrkdz(src.emctrkdz());
00103   set_emctrkdphi(src.emctrkdphi());
00104   set_pemctrk(src.pemctrk());
00105   set_emctrkquality(src.emctrkquality());
00106   for (int i = 0; i < src.multiplicity(); i++)
00107     {
00108       set_towerid(i, src.towerid(i));
00109       set_partesum(i, src.partesum(i));
00110     }
00111   ShutUp(0);
00112 }
00113 
00114 int
00115 emcClusterContent::isValid(const int i) const
00116 {
00117   if (i == -1)
00118     {
00119       return 0;
00120     }
00121   return 1;
00122 }
00123 
00124 int
00125 emcClusterContent::isValid(const unsigned int i) const
00126 {
00127   if (i == 0)
00128     {
00129       return 0;
00130     }
00131   return 1;
00132 }
00133 
00134 int
00135 emcClusterContent::isValid(const float f) const
00136 {
00137   if (isnan(f))
00138     {
00139       return 0;
00140     }
00141   return 1;
00142 }