/[PAMELA software]/tof/flight/ToFNuclei/src/ToFNuclei.cpp
ViewVC logotype

Diff of /tof/flight/ToFNuclei/src/ToFNuclei.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7 by mocchiut, Thu Aug 6 12:06:18 2009 UTC revision 1.8 by mocchiut, Fri Jan 17 15:12:38 2014 UTC
# Line 401  Float_t  Layercharge[6] = {1005., 1005., Line 401  Float_t  Layercharge[6] = {1005., 1005.,
401    
402  Int_t  Layerinfo[6] = {0, 0, 0, 0, 0, 0 };  Int_t  Layerinfo[6] = {0, 0, 0, 0, 0, 0 };
403    
404  Float_t adc[48],adc_c[48],PMTcharge_arr[48];  //Float_t adc[48],adc_c[48],PMTcharge_arr[48];
405    Float_t adc[48],PMTcharge_arr[48];
406    
407  //------------------------------------------------------------------  //------------------------------------------------------------------
408    
# Line 427  Float_t charge_chi=1000.; Line 428  Float_t charge_chi=1000.;
428     Int_t ich,jj,kk;     Int_t ich,jj,kk;
429    
430     for (ich=0; ich<48; ich++)   adc[ich]   = 4095.;     for (ich=0; ich<48; ich++)   adc[ich]   = 4095.;
431     for (ich=0; ich<48; ich++)   adc_c[ich] = 1000.;     //   for (ich=0; ich<48; ich++)   adc_c[ich] = 1000.;
432     for (ich=0; ich<48; ich++)   PMTcharge_arr[ich] = 1000.;     for (ich=0; ich<48; ich++)   PMTcharge_arr[ich] = 1000.;
433    
434    
# Line 461  if ((beta_mean > 0.05)  && (beta_mean < Line 462  if ((beta_mean > 0.05)  && (beta_mean <
462            Float_t dEdx = track->GetToFTrack()->dedx[ipmt];            Float_t dEdx = track->GetToFTrack()->dedx[ipmt];
463            ym = dEdx*betahelp;            ym = dEdx*betahelp;
464            Int_t pmtadc = track->GetToFTrack()->pmtadc[ipmt];            Int_t pmtadc = track->GetToFTrack()->pmtadc[ipmt];
465            Int_t adcflag = track->GetToFTrack()->adcflag[ipmt];            //          Int_t adcflag = track->GetToFTrack()->adcflag[ipmt];
466            L2->GetToFLevel2()->GetPMTIndex(pmtadc,jj,kk);            L2->GetToFLevel2()->GetPMTIndex(pmtadc,jj,kk);
467            if (adcflag==0) adc_c[pmtadc] = dEdx;            //          if (adcflag==0) adc_c[pmtadc] = dEdx;
468    
469    
470           if (adc[pmtadc] == 4095) adc_c[pmtadc] = 0.;            //         if (adc[pmtadc] == 4095) adc_c[pmtadc] = 0.;
471           if (adc[pmtadc] == 4095) PMTcharge_arr[pmtadc] = 0.;           if (adc[pmtadc] == 4095) PMTcharge_arr[pmtadc] = 0.;
472    
473           if ((adc[pmtadc]>PMTsat[pmtadc]) && (adc[pmtadc]<4095)) adc_c[pmtadc] = 1000.;           //         if ((adc[pmtadc]>PMTsat[pmtadc]) && (adc[pmtadc]<4095)) adc_c[pmtadc] = 1000.;
474    
475           if (adc[pmtadc] < PMTsat[pmtadc]) {           if (adc[pmtadc] < PMTsat[pmtadc]) {
476  //----------------------------------------------------------------------------------------  //----------------------------------------------------------------------------------------
# Line 959  Float_t  Layercharge[6] = {1005., 1005., Line 960  Float_t  Layercharge[6] = {1005., 1005.,
960    
961  Int_t  Layerinfo[6] = {0, 0, 0, 0, 0, 0 };  Int_t  Layerinfo[6] = {0, 0, 0, 0, 0, 0 };
962    
963  Float_t adc[48],adc_c[48],PMTcharge_arr[48];  //Float_t adc[48],adc_c[48],PMTcharge_arr[48];
964    Float_t adc[48],PMTcharge_arr[48];
965    
966  Float_t beta_mean = fabs(track->beta[12]);  Float_t beta_mean = fabs(track->beta[12]);
967    
# Line 977  if (beta_in != 100.) beta_mean=beta_in; Line 979  if (beta_in != 100.) beta_mean=beta_in;
979     Int_t ich,jj,kk;     Int_t ich,jj,kk;
980    
981     for (ich=0; ich<48; ich++)   adc[ich]   = 4095.;     for (ich=0; ich<48; ich++)   adc[ich]   = 4095.;
982     for (ich=0; ich<48; ich++)   adc_c[ich] = 1000.;     //   for (ich=0; ich<48; ich++)   adc_c[ich] = 1000.;
983     for (ich=0; ich<48; ich++)   PMTcharge_arr[ich] = 1000.;     for (ich=0; ich<48; ich++)   PMTcharge_arr[ich] = 1000.;
984    
985    
# Line 1012  if ((beta_mean < 0.05)  || (beta_mean > Line 1014  if ((beta_mean < 0.05)  || (beta_mean >
1014            Float_t dEdx = track->dedx[ipmt];            Float_t dEdx = track->dedx[ipmt];
1015            ym = dEdx*betahelp;            ym = dEdx*betahelp;
1016            Int_t pmtadc = track->pmtadc[ipmt];            Int_t pmtadc = track->pmtadc[ipmt];
1017            Int_t adcflag = track->adcflag[ipmt];            //          Int_t adcflag = track->adcflag[ipmt];
1018            L2->GetToFLevel2()->GetPMTIndex(pmtadc,jj,kk);            L2->GetToFLevel2()->GetPMTIndex(pmtadc,jj,kk);
1019            if (adcflag==0) adc_c[pmtadc] = dEdx;            //          if (adcflag==0) adc_c[pmtadc] = dEdx;
1020    
1021           if (adc[pmtadc] == 4095) adc_c[pmtadc] = 0.;            //         if (adc[pmtadc] == 4095) adc_c[pmtadc] = 0.;
1022           if (adc[pmtadc] == 4095) PMTcharge_arr[pmtadc] = 0.;           if (adc[pmtadc] == 4095) PMTcharge_arr[pmtadc] = 0.;
1023    
1024           if ((adc[pmtadc]>PMTsat[pmtadc]) && (adc[pmtadc]<4095)) adc_c[pmtadc] = 1000.;           //         if ((adc[pmtadc]>PMTsat[pmtadc]) && (adc[pmtadc]<4095)) adc_c[pmtadc] = 1000.;
1025                                                                                    
1026           if (adc[pmtadc] < PMTsat[pmtadc]) {           if (adc[pmtadc] < PMTsat[pmtadc]) {
1027    

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.23