/[PAMELA software]/PamelaLevel2/src/PamLevel2.cpp
ViewVC logotype

Diff of /PamelaLevel2/src/PamLevel2.cpp

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

revision 1.46 by mocchiut, Wed Sep 12 09:25:22 2007 UTC revision 1.49 by pam-fi, Wed Oct 24 08:41:25 2007 UTC
# Line 962  void PamLevel2::SortTracks(){ Line 962  void PamLevel2::SortTracks(){
962              if ( nphit_p != nphit_i ){              if ( nphit_p != nphit_i ){
963                totp_score += nphit_p;                totp_score += nphit_p;
964                toti_score += nphit_i;                toti_score += nphit_i;
965                  tp_score+=nphit_p;
966                  ti_score+=nphit_i;
967              };              };
968              if     ( nphit_p > nphit_i) tp_score++;              //      if     ( nphit_p > nphit_i) tp_score+=nphit_p;
969              else if( nphit_p < nphit_i) ti_score++;              //      else if( nphit_p < nphit_i) ti_score+=nphit_i;
970              else ;//niente              //      else ;//niente
971            };            };
972          };          };
973          //      cout << "TOF "<<tp_score<<ti_score<<endl;          //      cout << "TOF "<<tp_score<<ti_score<<endl;
# Line 1031  void PamLevel2::SortTracks(){ Line 1033  void PamLevel2::SortTracks(){
1033          ts = ti;//its image!!          ts = ti;//its image!!
1034          cs = ci;          cs = ci;
1035          os = oi;          os = oi;
1036            Int_t totis = toti_score;
1037    
1038          ti = tp;//its image!!          ti = tp;//its image!!
1039          ci = cp;          ci = cp;
# Line 1040  void PamLevel2::SortTracks(){ Line 1043  void PamLevel2::SortTracks(){
1043          cp = cs;          cp = cs;
1044          op = os;          op = os;
1045    
1046            toti_score = totp_score;
1047            totp_score = totis;
1048    
1049                                    
1050        }else {        }else {
1051    
# Line 1069  void PamLevel2::SortTracks(){ Line 1075  void PamLevel2::SortTracks(){
1075      new(ttimage[i])  PamTrack(ti,ci,oi);      new(ttimage[i])  PamTrack(ti,ci,oi);
1076    
1077      ((PamTrack*)(ttsorted[i]))->SetPScore(totp_score);      ((PamTrack*)(ttsorted[i]))->SetPScore(totp_score);
1078        ((PamTrack*)(ttsorted[i]))->SetIScore(toti_score);
1079        ((PamTrack*)(ttimage[i]))->SetPScore(totp_score);
1080      ((PamTrack*)(ttimage[i]))->SetIScore(toti_score);      ((PamTrack*)(ttimage[i]))->SetIScore(toti_score);
1081    };    };
1082    
# Line 1967  Bool_t PamLevel2::UpdateRunInfo(TChain * Line 1975  Bool_t PamLevel2::UpdateRunInfo(TChain *
1975    //    //
1976    // check if we have already called once GetEntry, if not call it    // check if we have already called once GetEntry, if not call it
1977    //    //
1978      cout << "Bool_t PamLevel2::UpdateRunInfo(TChain *run, Long64_t iev) --- NON FUNZIONA BENISSIMO.... "<<endl;      cout << "Bool_t PamLevel2::UpdateRunInfo(TChain *run, Long64_t iev) --- ATTENZIONE --- NON E` MANTENUTA!!!!!!!.... "<<endl;
1979      if(!run){      if(!run){
1980            cout << "Bool_t PamLevel2::UpdateRunInfo(TChain *run, ULong64_t iev) -- ERROR -- missing RunInfo tree "<<endl;            cout << "Bool_t PamLevel2::UpdateRunInfo(TChain *run, ULong64_t iev) -- ERROR -- missing RunInfo tree "<<endl;
1981            return(false);                    return(false);        
# Line 2153  Bool_t PamLevel2::UpdateRunInfo(Long64_t Line 2161  Bool_t PamLevel2::UpdateRunInfo(Long64_t
2161          };                };      
2162    
2163          // -----------------------------------------------------------------------          // -----------------------------------------------------------------------
2164          // if it is simulation, assigh abstime by hand (temporaneo!!!)          // if it is simulation, assign abstime by hand (temporaneo!!!)
2165          // -----------------------------------------------------------------------          // -----------------------------------------------------------------------
2166          if(ISGP){          if(ISGP){
2167              abstime = GetRunInfo()->RUNHEADER_TIME; // BARBATRUCCO              abstime = GetRunInfo()->RUNHEADER_TIME; // BARBATRUCCO
# Line 2178  Bool_t PamLevel2::UpdateRunInfo(Long64_t Line 2186  Bool_t PamLevel2::UpdateRunInfo(Long64_t
2186                        obt <= GetRunInfo()->RUNTRAILER_OBT)                        obt <= GetRunInfo()->RUNTRAILER_OBT)
2187                      )                      )
2188                  || GetRunInfo()->NEVENTS==0                  || GetRunInfo()->NEVENTS==0
2189                  || !(irunentry < GetRunInfo()->NEVENTS-1-prevshift)  //              || !(irunentry < GetRunInfo()->NEVENTS-1-prevshift) // ERRORE!!! fa saltare i run con 1 evento
2190                    || !(irunentry <= GetRunInfo()->NEVENTS-1-prevshift)
2191                  )                  )
2192                  && irun < run_tree->GetEntries() ){                  && irun < run_tree->GetEntries() ){
2193    
2194                // - - - - - - - - - - - - -
2195                // irunentry = position of current entry, relative to the run
2196                // prevshift = shift needed to synchronize l0 and l2 data (nested events)
2197                // - - - - - - - - - - - - -
2198    
2199              // -----------------------------------------              // -----------------------------------------
2200              // store dead and live-time of previous run              // store dead and live-time of previous run

Legend:
Removed from v.1.46  
changed lines
  Added in v.1.49

  ViewVC Help
Powered by ViewVC 1.1.23