ParticlesAna Class Reference

#include <ParticlesAna.h>

List of all members.

Public Member Functions

 ParticlesAna ()
 ~ParticlesAna ()
void ana (ParticleObjectHolder *poh, Particles *e)

Static Public Attributes

static TH1F * rhist = 0
static TH1F * viewTheta = 0
static TH1F * viewPhi = 0

Detailed Description

Definition at line 9 of file ParticlesAna.h.


Constructor & Destructor Documentation

ParticlesAna::ParticlesAna (  ) 

Definition at line 11 of file ParticlesAna.cxx.

References rhist, viewPhi, and viewTheta.

00012 {
00013         if(!rhist)rhist=new TH1F("rhist","rhist",1000,0,8);
00014         
00015         if(!viewTheta)viewTheta = new TH1F("viewTheta","Theta",100,0,2*3.141592);
00016         if(!viewPhi)viewPhi = new TH1F("viewPhi","Phi", 100,0,3.141592);
00017 }

ParticlesAna::~ParticlesAna (  ) 

Definition at line 19 of file ParticlesAna.cxx.

00020 {
00021 //      if(rhist){
00022 //              delete rhist;
00023 //              rhist=0;
00024 //      }
00025 }


Member Function Documentation

void ParticlesAna::ana ( ParticleObjectHolder poh,
Particles e 
)

right now its normalized!

Definition at line 28 of file ParticlesAna.cxx.

References Particle3D::avg_rms_t, Particle3D::calibrated_energy, Particle3D::cmp_chisq, Particle3D::cmp_ndf, Particle3D::e, Particles::elec_muon_asym, Particles::elec_muon_asym_cale_weight, Particles::elec_muon_asym_vise_weight, Particles::elec_other_asym, Particles::elec_other_asym_cale_weight, Particles::elec_other_asym_vise_weight, Particles::elec_vise, Particle3D::electron, Particle3D::emfit_a, Particle3D::emfit_a_err, Particle3D::emfit_b, Particle3D::emfit_b_err, Particle3D::emfit_chisq, Particle3D::emfit_e0, Particle3D::emfit_e0_err, Particle3D::emfit_ndf, Particle3D::emfit_prob, Particles::emfrac, Particle3D::end_u, Particle3D::end_v, Particle3D::end_z, Particle3D::entries, ParticleObjectHolder::event, Particles::frac_particle_2, Particles::largest_particle_avg_e, Particles::largest_particle_avg_rms, Particles::largest_particle_cal_e, Particles::largest_particle_cmp_chisq, Particles::largest_particle_cmp_ndf, Particles::largest_particle_e, Particles::largest_particle_par_a, Particles::largest_particle_par_a_err, Particles::largest_particle_par_b, Particles::largest_particle_par_b_err, Particles::largest_particle_par_chisq, Particles::largest_particle_par_e0, Particles::largest_particle_par_e0_err, Particles::largest_particle_par_ndf, Particles::largest_particle_par_prob, Particles::largest_particle_peakdiff, Particles::largest_particle_s, Particles::largest_particle_type, Particles::largest_particle_z, Particles::length_mean, Particles::length_rms, Particles::length_weighted_mean, Particles::length_weighted_rms, Particles::longest_particle_avg_rms, Particles::longest_particle_type, Particles::longest_particle_vise, Particles::longest_s_long_e, Particles::longest_s_particle_avg_e, Particles::longest_s_particle_avg_rms, Particles::longest_s_particle_cal_e, Particles::longest_s_particle_cmp_chisq, Particles::longest_s_particle_cmp_ndf, Particles::longest_s_particle_e, Particles::longest_s_particle_par_a, Particles::longest_s_particle_par_a_err, Particles::longest_s_particle_par_b, Particles::longest_s_particle_par_b_err, Particles::longest_s_particle_par_chisq, Particles::longest_s_particle_par_e0, Particles::longest_s_particle_par_e0_err, Particles::longest_s_particle_par_ndf, Particles::longest_s_particle_par_prob, Particles::longest_s_particle_peakdiff, Particles::longest_s_particle_s, Particles::longest_s_particle_type, Particles::longest_s_particle_z, Particles::longest_z, Particles::maxe_phi, Particles::maxe_phi_rms, Particles::maxe_theta, Particles::maxe_theta_rms, Particles::mol_rad_r, Particle3D::muon, Particles::muon_vise, Particles::nelec, Particles::neut_vise, Particle3D::neutron, Particles::nlong, Particles::nmed, Particles::nmuon, Particles::nneut, Particles::nother, Particles::nprot, Particles::nshort, Particles::ntot, Particle3D::other, Particles::other_vise, ParticleObjectHolder::particles3d, Particle3D::particletype, Particle3D::peakdiff, Particle3D::phi, Particles::pointing_phi, Particles::pointing_r, Particles::pointing_theta, Particles::pointing_u, Particles::pointing_v, Particles::pointing_z, Particle3D::post_over, Particle3D::post_under, Particle3D::pp_chisq, Particle3D::pp_igood, Particle3D::pp_ndf, Particle3D::pp_p, Particle3D::pre_over, Particle3D::pre_under, Particle3D::pred_b, Particle3D::pred_e0, Particle3D::pred_e_a, Particle3D::pred_e_chisq, Particle3D::pred_e_ndf, Particle3D::pred_g_a, Particle3D::pred_g_chisq, Particle3D::pred_g_ndf, Particles::prim_cmp_chisq, Particles::prim_cmp_ndf, Particles::prim_par_a, Particles::prim_par_a_err, Particles::prim_par_b, Particles::prim_par_b_err, Particles::prim_par_chisq, Particles::prim_par_e0, Particles::prim_par_e0_err, Particles::prim_par_ndf, Particles::prim_par_prob, Particles::prim_peakdiff, Particles::prim_pp_chisq, Particles::prim_pp_igood, Particles::prim_pp_ndf, Particles::prim_pp_p, Particles::prim_pred_b, Particles::prim_pred_e0, Particles::prim_pred_e_a, Particles::prim_pred_e_chisq, Particles::prim_pred_e_ndf, Particles::prim_pred_g_a, Particles::prim_pred_g_chisq, Particles::prim_pred_g_ndf, Particles::prim_pred_post_over, Particles::prim_pred_post_under, Particles::prim_pred_pre_over, Particles::prim_pred_pre_under, Particles::prim_vise, Particles::primary_long_e, Particles::primary_phi, Particles::primary_theta, Particles::prot_vise, Particle3D::proton, rhist, Particles::rms_r, Particles::rough_primary_theta_z, Particle3D::start_u, Particle3D::start_v, Particle3D::start_z, Particle3D::sum_e, Particle3D::theta, Particles::total_long_e, Particles::total_long_e_frac, Particles::totcale, Particles::totvise, Particle3D::u, Particle3D::v, viewPhi, viewTheta, ParticleEvent::vtx_u, ParticleEvent::vtx_v, ParticleEvent::vtx_z, Particles::weighted_phi, Particles::weighted_theta, and Particle3D::z.

Referenced by PRecordAna::ana(), and ViewParticle3D::DrawEvent().

00029 {
00030 
00031         rhist->Reset();
00032         viewTheta->Reset();
00033         viewPhi->Reset();
00034 
00035 
00036 //      printf("------------------\nParticlesAna\n");
00037 
00038         
00039 
00040         int ntot = (int)poh->particles3d.size();//1->GetEntries();
00041 //      int ntot = poh->particles3d.size();
00042         if(ntot==0)return;
00043 
00044         e->ntot=ntot;
00045         
00046         double largest_e=0;
00047         int largest_e_idx=-1;
00048         int largest_electron_idx=-1;
00049         double largest_elec_e=0;
00050         int second_largest_e_idx=-1;
00051         double second_largest_e=0;
00052         
00053         double sum_extheta=0;
00054         double sum_exphi=0;
00055         double sum_e=0;
00056         
00057         double pointing_u=0;
00058         double pointing_v=0;
00059         double pointing_z=0;
00060         
00061         double emvise=0;
00062         double emcale=0;
00063         
00064         double largest_s=0;
00065         
00066         //printf("\n\ntot %d\n",ntot);
00067         
00068         
00069         for(unsigned int i=0;i<poh->particles3d.size();i++)
00070         {
00071                 
00072                 Particle3D * p = (Particle3D *)&(poh->particles3d[i]);//1->At(i);
00073                 if(!p)continue;
00074                 
00075                 if(p->entries <1)continue;
00076         
00077                 //printf("particle %d with e %f\n",i,p->sum_e); 
00078                 
00079                 if(p->particletype==Particle3D::neutron)//neutrons mess it up... they are only 2d
00080                 {
00081                         e->nneut++;
00082                         e->totcale+=p->calibrated_energy;
00083                         e->totvise+=p->sum_e;
00084                         e->neut_vise+=sum_e;
00085                         
00086 
00087                         //but do allow neutrons to be second largest energy particle
00088                         if(p->sum_e < largest_e && p->sum_e > second_largest_e)
00089                         {
00090                                 second_largest_e_idx=i;
00091                                 second_largest_e=p->sum_e;
00092                                 //printf("neut\n");
00093                         }
00094 
00095                 
00096                         continue;
00097                 }else if(p->particletype==Particle3D::electron)
00098                 {
00099                         e->nelec++;
00100                         e->elec_vise+=p->sum_e;
00101                         
00102                         if(p->sum_e>largest_elec_e)
00103                         {
00104                                 largest_elec_e=p->sum_e;
00105                                 largest_electron_idx=i;
00106                         
00107                         }
00108                         
00109                 }else if(p->particletype==Particle3D::muon) 
00110                 {
00111                         e->nmuon++;
00112                         e->muon_vise+=p->sum_e;
00113                 }else if(p->particletype==Particle3D::proton)
00114                 {
00115                         e->nprot++;
00116                         e->prot_vise+=p->sum_e;
00117                 }
00118                 else if(p->particletype==Particle3D::other)
00119                 {
00120                         e->other_vise+=p->sum_e;
00121                         e->nother++;
00122                         
00123                         
00124                         //for now... consider it an electron
00125                         if(p->sum_e>largest_elec_e)
00126                         {
00127                                 largest_elec_e=p->sum_e;
00128                                 largest_electron_idx=i;
00129                         
00130                         }
00131                         
00132                 }else
00133                 {
00134                         std::cout<<"particle of unknown type! "<<p->particletype<<"\n";
00135                         continue;
00136                 }
00137                 
00138                 double plen = p->end_z-p->start_z;
00139                 plen=plen<0?-plen:plen;
00140                 
00141                 
00142                 e->length_mean+=plen;
00143                 e->length_weighted_mean+=plen*p->sum_e;
00144                 
00145                 if( e->longest_z < plen)
00146                 {
00147                         e->longest_z = plen;
00148                         e->longest_particle_type=p->particletype;
00149                         e->longest_particle_vise=p->sum_e;
00150                         e->longest_particle_avg_rms=p->avg_rms_t; 
00151                 }
00152                 
00153 
00154                                 
00155                 double particle_s=0;            
00156                 for(int j=0;j<p->entries;j++)
00157                 {
00158                         double u=p->u[j]-poh->event.vtx_u;
00159                         double v=p->v[j]-poh->event.vtx_v;
00160                         
00161                 //      printf(" ??? %f %f %f\n",u,v,p->e[j]);
00162                         
00163                         if(p->e[j]>0 && p->e[j]<1000000)
00164                         rhist->Fill(TMath::Sqrt(u*u+v*v), p->e[j]);             
00165                         
00166                                         
00167                         e->rms_r += u*u+v*v;
00168                         
00169                         if(j>0)
00170                         {
00171                                 double du = p->u[j]-p->u[j-1];
00172                                 double dv = p->v[j]-p->v[j-1];
00173                                 double dz = p->z[j]-p->z[j-1];
00174                                 
00175                                 double dd=sqrt(du*du+dv*dv+dz*dz);
00176                                 if(dd<100)particle_s+=dd; //in case we have a single bogus value, we will skip it
00177                         }
00178                 
00179                 }
00180                 
00181                 
00182                 
00183                 if(p->particletype == Particle3D::electron || p->particletype==Particle3D::muon)
00184                 {
00185                         e->elec_muon_asym += (p->particletype==Particle3D::electron?+1:-1);
00186                         e->elec_muon_asym_cale_weight+= (p->particletype==Particle3D::electron?+1:-1) * p->calibrated_energy;
00187                         e->elec_muon_asym_vise_weight+= (p->particletype==Particle3D::electron?+1:-1) * p->sum_e;
00188                         emvise+=p->sum_e;
00189                         emcale+=p->calibrated_energy;
00190                         
00191                 }
00192                 
00193                 e->elec_other_asym= (p->particletype==Particle3D::electron?+1:-1);
00194                 e->elec_other_asym_cale_weight= (p->particletype==Particle3D::electron?+1:-1) * p->calibrated_energy;
00195                 e->elec_other_asym_vise_weight= (p->particletype==Particle3D::electron?+1:-1) * p->sum_e;
00196 
00197                 
00198                 
00199                 
00200                 
00201                 
00202                 
00203                 e->totcale+=p->calibrated_energy;
00204                 e->totvise+=p->sum_e;
00205                 
00206         //      printf("part %d sume %f\n", i,p->sum_e);
00207         //
00208         
00209                 double du = p->end_u-p->start_u;
00210                 double dv = p->end_v-p->start_v;
00211                 double dz = p->end_z-p->start_z;
00212                 double r = TMath::Sqrt(du*du + dv*dv+dz*dz);
00213         
00214                 if(r)
00215                 {       
00216                         pointing_u+=du/r*p->sum_e;
00217                         pointing_v+=dv/r*p->sum_e;
00218                         pointing_z+=dz/r*p->sum_e;
00219                 }
00220 
00221                 double longe = p->sum_e * TMath::Sin(p->phi);
00222         
00223                 e->total_long_e+=longe;
00224                 
00225                 if(p->calibrated_energy==0 && p->sum_e>0)p->calibrated_energy=p->sum_e*60;
00226                         
00227                 if(p->sum_e < largest_e && p->sum_e > second_largest_e)
00228                 {
00229                         second_largest_e_idx=i;
00230                         second_largest_e=p->sum_e;                      
00231                 }       
00232 
00233         
00234                 if(p->sum_e > largest_e)
00235                 {
00236 
00237                         second_largest_e_idx=largest_e_idx;
00238                         second_largest_e=largest_e;
00239                         largest_e_idx=i;
00240                         largest_e = p->sum_e;
00241                         e->largest_particle_avg_rms=p->avg_rms_t;
00242                         e->primary_long_e=longe;
00243         
00244                         e->largest_particle_s = particle_s;
00245                         e->largest_particle_z=p->end_z-p->start_z;
00246                         e->largest_particle_par_b = p->emfit_b;
00247                         e->largest_particle_par_a = p->emfit_a;
00248                         e->largest_particle_par_e0 = p->emfit_e0;
00249                         e->largest_particle_par_a_err = p->emfit_a_err;
00250                         e->largest_particle_par_b_err = p->emfit_b_err;
00251                         e->largest_particle_par_e0_err = p->emfit_e0_err;
00252                         e->largest_particle_par_prob = p->emfit_prob;
00253                         e->largest_particle_par_chisq = p->emfit_chisq;
00254                         e->largest_particle_par_ndf = p->emfit_ndf;
00255 
00256                         e->largest_particle_cmp_chisq = p->cmp_chisq;
00257                         e->largest_particle_cmp_ndf = p->cmp_ndf;
00258                         e->largest_particle_peakdiff = p->peakdiff;
00259 
00260 
00261                 }
00262         
00263 
00264                 //printf("largest %d %f 2nd %d %f\n",largest_e_idx,largest_e,second_largest_e_idx,second_largest_e);
00265 
00266         
00267                 
00268                 if(particle_s > largest_s)
00269                 {
00270                 
00271                         largest_s=particle_s;
00272                         
00273                         
00274                         e->longest_s_particle_s=particle_s;             
00275 
00276                         
00277                 
00278                         
00279                         e->longest_s_particle_e=p->sum_e;
00280                         e->longest_s_particle_cal_e=p->calibrated_energy;
00281                         e->longest_s_particle_type=p->particletype;
00282                         e->longest_s_particle_avg_e=p->sum_e/particle_s;
00283                 
00284 
00285 
00286                         e->longest_s_particle_avg_rms=p->avg_rms_t;
00287                         e->longest_s_long_e=longe;
00288 
00289                         e->longest_s_particle_z=p->end_z-p->start_z;
00290                         e->longest_s_particle_par_b = p->emfit_b;
00291                         e->longest_s_particle_par_a = p->emfit_a;
00292                         e->longest_s_particle_par_e0 = p->emfit_e0;
00293                         e->longest_s_particle_par_a_err = p->emfit_a_err;
00294                         e->longest_s_particle_par_b_err = p->emfit_b_err;
00295                         e->longest_s_particle_par_e0_err = p->emfit_e0_err;
00296                         e->longest_s_particle_par_prob = p->emfit_prob;
00297                         e->longest_s_particle_par_chisq = p->emfit_chisq;
00298                         e->longest_s_particle_par_ndf = p->emfit_ndf;           
00299 
00300 
00301                         e->longest_s_particle_cmp_chisq = p->cmp_chisq;
00302                         e->longest_s_particle_cmp_ndf = p->cmp_ndf;
00303                         e->longest_s_particle_peakdiff = p->peakdiff;
00304 
00305 
00306         
00307 
00308                 
00309                 }
00310 
00311 
00312                 
00313                 
00314                 if(p->entries < 10)e->nshort++;
00315                 if(p->entries >= 10 && p->entries < 20) e->nmed++;
00316                 if(p->entries >=20)e->nlong++;
00317         
00318         
00319                 sum_extheta+=p->sum_e * p->theta;
00320                 sum_exphi+=p->sum_e * p->phi;
00321                 sum_e+=p->sum_e;
00322         }
00323 
00324 
00325 
00326         e->pointing_u=pointing_u;
00327         e->pointing_v=pointing_v;
00328         e->pointing_z=pointing_z;
00329 
00330         if(emcale>0)e->elec_muon_asym_cale_weight/=emcale;else e->elec_muon_asym_cale_weight=0;
00331         if(emvise>0)e->elec_muon_asym_vise_weight/=emvise;else e->elec_muon_asym_vise_weight=0;
00332         
00333         if(e->totcale>0)e->elec_other_asym_cale_weight/=e->totcale; else e->elec_other_asym_cale_weight=0;
00334         if(e->totvise>0)e->elec_other_asym_vise_weight/=e->totvise; else e->elec_other_asym_vise_weight=0;
00335 
00336 
00337         if(e->totvise>0)e->length_weighted_mean/=e->totvise;else e->length_weighted_mean=0;
00338 
00339 
00340 
00341         int tcount=0;
00342         for(int i=0;i<ntot;i++)
00343         {
00344                 
00345                 Particle3D * p = (Particle3D *)&(poh->particles3d[i]);//1->At(i);
00346                 if(p <=0)continue;
00347                 
00348                 if(p->entries <1)continue;
00349                 if(p->particletype==Particle3D::neutron)continue;
00350                 double plen = p->end_z-p->start_z;
00351                                                         
00352                 e->length_weighted_rms+=(plen-e->length_weighted_mean)*(plen-e->length_weighted_mean);
00353                 e->length_rms+=plen*plen;
00354                 tcount++;
00355         }                               
00356                                         
00357         if(tcount>0)e->length_weighted_rms=sqrt(e->length_weighted_rms/tcount);else e->length_weighted_rms=0;
00358         if(tcount>0)e->length_rms=sqrt(e->length_rms/tcount);else e->length_rms=0;
00359 
00360 
00361 
00362         e->pointing_r=TMath::Sqrt(pointing_u*pointing_u*pointing_v*pointing_v*pointing_z*pointing_z);
00363         
00364         if(e->pointing_r>0)
00365         {
00366                 e->pointing_phi=TMath::ACos(pointing_z/e->pointing_r);
00367                 e->pointing_theta=TMath::ATan2(pointing_u,pointing_v);
00368         }
00369 
00370 
00371         if(e->totcale>0)
00372         e->total_long_e_frac = e->total_long_e/e->totcale;
00373 
00374         if(sum_e>0)
00375         {
00376                 e->weighted_phi=sum_exphi/sum_e;
00377                 e->weighted_theta=sum_extheta/sum_e;
00378         }
00379 
00380         if(largest_e_idx>-1)
00381         {
00382                 
00383                 Particle3D * p = (Particle3D *)&(poh->particles3d[largest_e_idx]);
00384                 if(p)
00385                 {
00386                         
00387                 e->largest_particle_e=p->sum_e;
00388                 e->largest_particle_cal_e=p->calibrated_energy;
00389                 e->largest_particle_type=p->particletype;
00390                 
00391                 
00392                 e->rough_primary_theta_z = p->start_z-p->end_z ? TMath::ATan(TMath::Sqrt((p->end_u-p->start_u)*(p->end_u-p->start_u)+(p->end_v-p->start_v)*(p->end_v-p->start_v))/TMath::Abs(p->start_z-p->end_z)) : 1.5707;//if its vertical, don't compute it
00393         e->primary_phi=p->phi;
00394         e->primary_theta=p->theta;
00395                 
00396                 
00397                 e->largest_particle_avg_e= p->end_z-p->start_z ? p->sum_e / (p->end_z-p->start_z) : p->sum_e;
00398                 
00399 
00400                 if(second_largest_e_idx>-1)
00401                 {
00402                         Particle3D * p2 = (Particle3D *)&(poh->particles3d[second_largest_e_idx]);
00403                         if(p2)
00404                         {
00405                                 if(e->largest_particle_e>0)
00406                                 e->frac_particle_2 =   p2->sum_e / e->largest_particle_e;
00407                 //              printf("fp2 %f from %f / %f\n",e->frac_particle_2,p2->sum_e ,e->largest_particle_e);
00408                         }
00409                 }
00410                 }
00411 
00412 
00413 
00414 
00415 
00416                 
00417                 for(unsigned int i=0;i<p->e.size();i++)
00418                 {
00419                         double u = p->u[i]-poh->event.vtx_u;
00420                         double v = p->v[i]-poh->event.vtx_v;
00421                         double z = p->z[i]-poh->event.vtx_z;
00422                         if(!u || !v || !z)continue;
00423         
00424                         double r = sqrt(u*u+v*v+z*z);
00425                         double theta = atan(u/v);
00426                         double phi = acos(z/r);
00427                         
00428                         phi=phi<0?phi+2*3.141592:phi;
00429                         theta=theta<0?theta+2*3.141592:theta;
00430                 
00431                         viewPhi->Fill(phi,p->e[i]);
00432                         viewTheta->Fill(theta,p->e[i]);
00433                 }
00434 
00435                 e->maxe_phi=viewPhi->GetMean();
00436                 e->maxe_theta=viewTheta->GetMean();
00437                 e->maxe_phi_rms=viewPhi->GetRMS();
00438                 e->maxe_theta_rms=viewTheta->GetRMS();
00439 
00440 
00441         }
00442         
00443         
00444         
00445         if(largest_electron_idx>-1)
00446         {
00447                 Particle3D * p = (Particle3D *)&(poh->particles3d[largest_e_idx]);
00448                 if(p)
00449                 {
00450                         e->emfrac = p->sum_e / e->totvise;
00451                         e->prim_par_a = p->emfit_a;
00452                         e->prim_par_b = p->emfit_b;
00453                         e->prim_par_e0 = p->emfit_e0;
00454                         e->prim_par_a_err = p->emfit_a_err;
00455                         e->prim_par_b_err = p->emfit_b_err;
00456                         e->prim_par_e0_err = p->emfit_e0_err;
00457                         e->prim_par_prob = p->emfit_prob;
00458                         e->prim_par_chisq=p->emfit_chisq;
00459                         e->prim_par_ndf=p->emfit_ndf;
00460                         e->prim_vise = p->sum_e;
00461                         
00462                         
00463                         e->prim_pred_e_a=p->pred_e_a;
00464                         e->prim_pred_g_a=p->pred_g_a;
00465                         e->prim_pred_b=p->pred_b;
00466                         e->prim_pred_e0=p->pred_e0;
00467                         e->prim_pred_e_chisq=p->pred_e_chisq;
00468                         e->prim_pred_e_ndf=p->pred_e_ndf;
00469                         e->prim_pred_g_chisq=p->pred_g_chisq;
00470                         e->prim_pred_g_ndf=p->pred_g_ndf;
00471                 
00472                         e->prim_pred_pre_over=p->pre_over;
00473                         e->prim_pred_pre_under=p->pre_under;
00474                         e->prim_pred_post_over=p->post_over;    
00475                         e->prim_pred_post_under=p->post_under;          
00476                         
00477                         e->prim_pp_chisq=p->pp_chisq;
00478                         e->prim_pp_ndf=p->pp_ndf;
00479                         e->prim_pp_igood=p->pp_igood;
00480                         e->prim_pp_p=p->pp_p;   
00481 
00482                         e->prim_cmp_chisq = p->cmp_chisq;
00483                         e->prim_cmp_ndf = p->cmp_ndf;
00484                         e->prim_peakdiff = p->peakdiff;
00485 
00486         //      printf("%f %d %f\n",p->cmp_chisq,p->cmp_ndf, p->peakdiff);
00487 
00488                 }
00489         }       
00490                 
00491         
00492 
00493         double rhist_e = rhist->Integral();
00494         double rhist_partial_e=0;
00495         
00496 //      printf("rhiste %f \n",rhist_e);
00497         
00498         if(rhist_e>0)
00499         for(int i=0;i<rhist->GetNbinsX();i++)
00500         {
00501                         if(rhist_partial_e/rhist_e < 0.9)
00502                         {
00503                                 rhist_partial_e+=rhist->GetBinContent(i);
00504                                 
00505         //                      printf ("-- %f %f -- %f\n",rhist_partial_e,rhist->GetBinContent(i),(double)i / (double) rhist->GetNbinsX());
00506                                 
00507                                 e->mol_rad_r=(double)i / (double) rhist->GetNbinsX(); 
00508                         }
00509 
00510         }
00511         
00512 
00513         e->rms_r = TMath::Sqrt(e->rms_r);
00514         
00515 }


Member Data Documentation

TH1F * ParticlesAna::rhist = 0 [static]

Definition at line 19 of file ParticlesAna.h.

Referenced by ana(), and ParticlesAna().

TH1F * ParticlesAna::viewPhi = 0 [static]

Definition at line 21 of file ParticlesAna.h.

Referenced by ana(), and ParticlesAna().

TH1F * ParticlesAna::viewTheta = 0 [static]

Definition at line 20 of file ParticlesAna.h.

Referenced by ana(), and ParticlesAna().


The documentation for this class was generated from the following files:

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1