/[PAMELA software]/DarthVader/ToFLevel2/src/ToFLevel2.cpp
ViewVC logotype

Diff of /DarthVader/ToFLevel2/src/ToFLevel2.cpp

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

revision 1.44 by mocchiut, Thu Feb 26 14:35:01 2015 UTC revision 1.45 by pam-fi, Tue Mar 24 11:09:54 2015 UTC
# Line 319  Float_t ToFLevel2::GetdEdx(Int_t notrack Line 319  Float_t ToFLevel2::GetdEdx(Int_t notrack
319   * The method was modified for the "ToF-standalone" part in february 2015   * The method was modified for the "ToF-standalone" part in february 2015
320   * The "adcfl" option is not very useful (an artificial dEdx is per   * The "adcfl" option is not very useful (an artificial dEdx is per
321   * definition= 1 mip and not a real measurement), anyway left in the code   * definition= 1 mip and not a real measurement), anyway left in the code
322   * @param trk Pointer to TofTrkVar class   * @param trk Pointer to TofTrkVar object
323   * @param plane Plane index (0,1,2,3,4,5)   * @param plane Plane index (0,1,2,3,4,5)
324   * @param adcflag in the plane (100<-> independent of the adcflag; !=0&&!=100 <-> at least one PMT with adcflag!=0; )   * @param adcflag in the plane (100<-> independent of the adcflag; !=0&&!=100 <-> at least one PMT with adcflag!=0; )
325   */   */
# Line 453  Int_t ToFLevel2::GetPlaneIndex(Int_t pmt Line 453  Int_t ToFLevel2::GetPlaneIndex(Int_t pmt
453   */   */
454  Int_t ToFLevel2::GetPMTid(Int_t hh, Int_t kk){  Int_t ToFLevel2::GetPMTid(Int_t hh, Int_t kk){
455    //    //
456    short tof[4][24] = {    static const short tof[4][24] = {
457      {4, 4,  4,  4,  1,  1, 2, 2,  3,  3, 3, 3,  3,  3, 1, 1,  1,  1, 2, 3,  3, 3, 3,  4},      {4, 4,  4,  4,  1,  1, 2, 2,  3,  3, 3, 3,  3,  3, 1, 1,  1,  1, 2, 3,  3, 3, 3,  4},
458      {1, 3,  5,  7, 10, 12, 2, 4,  2,  4, 6, 8, 10, 12, 1, 5,  3,  9, 7, 9, 11, 1, 5,  9},      {1, 3,  5,  7, 10, 12, 2, 4,  2,  4, 6, 8, 10, 12, 1, 5,  3,  9, 7, 9, 11, 1, 5,  9},
459      {2, 2,  2,  2,  1,  1, 1, 1,  4,  4, 4, 4,  4,  4, 2, 1,  2,  1, 2, 2,  2, 3, 3,  4},      {2, 2,  2,  2,  1,  1, 1, 1,  4,  4, 4, 4,  4,  4, 2, 1,  2,  1, 2, 2,  2, 3, 3,  4},
# Line 489  Int_t ToFLevel2::GetPMTid(Int_t hh, Int_ Line 489  Int_t ToFLevel2::GetPMTid(Int_t hh, Int_
489   */   */
490  void ToFLevel2::GetPMTIndex(Int_t ind, Int_t &hb, Int_t &ch){  void ToFLevel2::GetPMTIndex(Int_t ind, Int_t &hb, Int_t &ch){
491    //    //
492    short tof[4][24] = {    static const short tof[4][24] = {
493      {4, 4,  4,  4,  1,  1, 2, 2,  3,  3, 3, 3,  3,  3, 1, 1,  1,  1, 2, 3,  3, 3, 3,  4},      {4, 4,  4,  4,  1,  1, 2, 2,  3,  3, 3, 3,  3,  3, 1, 1,  1,  1, 2, 3,  3, 3, 3,  4},
494      {1, 3,  5,  7, 10, 12, 2, 4,  2,  4, 6, 8, 10, 12, 1, 5,  3,  9, 7, 9, 11, 1, 5,  9},      {1, 3,  5,  7, 10, 12, 2, 4,  2,  4, 6, 8, 10, 12, 1, 5,  3,  9, 7, 9, 11, 1, 5,  9},
495      {2, 2,  2,  2,  1,  1, 1, 1,  4,  4, 4, 4,  4,  4, 2, 1,  2,  1, 2, 2,  2, 3, 3,  4},      {2, 2,  2,  2,  1,  1, 1, 1,  4,  4, 4, 4,  4,  4, 2, 1,  2,  1, 2, 2,  2, 3, 3,  4},
# Line 649  TString ToFLevel2::GetPMTName(Int_t ind, Line 649  TString ToFLevel2::GetPMTName(Int_t ind,
649        
650    TString pmtname = " ";    TString pmtname = " ";
651        
652    TString photoS[48] = {    static const TString photoS[48] = {
653      "S11_1A", "S11_1B", "S11_2A", "S11_2B", "S11_3A", "S11_3B", "S11_4A",      "S11_1A", "S11_1B", "S11_2A", "S11_2B", "S11_3A", "S11_3B", "S11_4A",
654      "S11_4B",      "S11_4B",
655      "S11_5A", "S11_5B", "S11_6A", "S11_6B", "S11_7A", "S11_7B", "S11_8A",      "S11_5A", "S11_5B", "S11_6A", "S11_6B", "S11_7A", "S11_7B", "S11_8A",
# Line 1109  Int_t ToFLevel2::GetNPaddle(Int_t plane) Line 1109  Int_t ToFLevel2::GetNPaddle(Int_t plane)
1109   * @param cut on chi2   * @param cut on chi2
1110   */   */
1111    
 Float_t ToFLevel2::CalcBeta(Int_t notrack, Float_t resmax, Float_t qualitycut, Float_t chi2cut){  
1112    
1113  //  cout<<" in CalcBeta "<<resmax<<" "<<chi2cut<<" "<<qualitycut<<endl;  Float_t ToFTrkVar::CalcBeta( Float_t resmax, Float_t qualitycut, Float_t chi2cut){
1114    
1115    
1116    Float_t bxx = 100.;    Float_t bxx = 100.;
1117    //    //
1118    ToFTrkVar *trk = GetToFTrkVar(notrack);    ToFTrkVar *trk = this;
   if(!trk) return 0; //ELENA  
1119    
1120    
1121    Float_t chi2,xhelp,beta_mean;    Float_t chi2,xhelp,beta_mean;
# Line 1143  Float_t  w_il[6]; Line 1142  Float_t  w_il[6];
1142    for (Int_t i=0; i<trk->npmttdc; i++){    for (Int_t i=0; i<trk->npmttdc; i++){
1143      //      //
1144      pmt_id = (trk->pmttdc).At(i);      pmt_id = (trk->pmttdc).At(i);
1145      pmt_plane = GetPlaneIndex(pmt_id);      pmt_plane = ToFLevel2::GetPlaneIndex(pmt_id);
1146      tdcfl = (trk->tdcflag).At(i);      tdcfl = (trk->tdcflag).At(i);
1147      if (w_il[pmt_plane] != 1.) w_il[pmt_plane] = tdcfl; //tdcflag      if (w_il[pmt_plane] != 1.) w_il[pmt_plane] = tdcfl; //tdcflag
1148                                       };                                       };
# Line 1230  Int_t ibot[12] = {4,5,4,5,4,5,4,5,2,3,2, Line 1229  Int_t ibot[12] = {4,5,4,5,4,5,4,5,2,3,2,
1229    //    //
1230    return(bxx);    return(bxx);
1231  };  };
1232    ////////////////////////////////////////////////////
1233    ////////////////////////////////////////////////////
1234    /**
1235     * See ToFTrkVar::CalcBeta(Float_t,Float_t, Float_t).
1236     */
1237    Float_t ToFLevel2::CalcBeta(Int_t notrack, Float_t resmax, Float_t qualitycut, Float_t chi2cut){
1238    
1239    //  cout<<" in CalcBeta "<<resmax<<" "<<chi2cut<<" "<<qualitycut<<endl;
1240    
1241      ToFTrkVar *trk = GetToFTrkVar(notrack);
1242      if(!trk) return 0; //ELENA
1243    
1244      return trk->CalcBeta(resmax,qualitycut,chi2cut);
1245    
1246    };
1247    
1248    
1249  ////////////////////////////////////////////////////  ////////////////////////////////////////////////////

Legend:
Removed from v.1.44  
changed lines
  Added in v.1.45

  ViewVC Help
Powered by ViewVC 1.1.23