/[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.47 by mocchiut, Wed Sep 12 09:39:32 2007 UTC revision 1.50 by mocchiut, Fri Oct 26 09:08:51 2007 UTC
# Line 145  void PamLevel2::Initialize(){ Line 145  void PamLevel2::Initialize(){
145      dbc     = 0;      dbc     = 0;
146    
147      prevshift = 0;      prevshift = 0;
148        maxshift = 10; //EMILIANO
149            
150      run_tree = NULL;      run_tree = NULL;
151      run_tree_clone = NULL;      run_tree_clone = NULL;
# Line 1033  void PamLevel2::SortTracks(){ Line 1034  void PamLevel2::SortTracks(){
1034          ts = ti;//its image!!          ts = ti;//its image!!
1035          cs = ci;          cs = ci;
1036          os = oi;          os = oi;
1037            Int_t totis = toti_score;
1038    
1039          ti = tp;//its image!!          ti = tp;//its image!!
1040          ci = cp;          ci = cp;
# Line 1042  void PamLevel2::SortTracks(){ Line 1044  void PamLevel2::SortTracks(){
1044          cp = cs;          cp = cs;
1045          op = os;          op = os;
1046    
1047            toti_score = totp_score;
1048            totp_score = totis;
1049    
1050                                    
1051        }else {        }else {
1052    
# Line 1071  void PamLevel2::SortTracks(){ Line 1076  void PamLevel2::SortTracks(){
1076      new(ttimage[i])  PamTrack(ti,ci,oi);      new(ttimage[i])  PamTrack(ti,ci,oi);
1077    
1078      ((PamTrack*)(ttsorted[i]))->SetPScore(totp_score);      ((PamTrack*)(ttsorted[i]))->SetPScore(totp_score);
1079        ((PamTrack*)(ttsorted[i]))->SetIScore(toti_score);
1080        ((PamTrack*)(ttimage[i]))->SetPScore(totp_score);
1081      ((PamTrack*)(ttimage[i]))->SetIScore(toti_score);      ((PamTrack*)(ttimage[i]))->SetIScore(toti_score);
1082    };    };
1083    
# Line 1969  Bool_t PamLevel2::UpdateRunInfo(TChain * Line 1976  Bool_t PamLevel2::UpdateRunInfo(TChain *
1976    //    //
1977    // check if we have already called once GetEntry, if not call it    // check if we have already called once GetEntry, if not call it
1978    //    //
1979      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;
1980      if(!run){      if(!run){
1981            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;
1982            return(false);                    return(false);        
# Line 2155  Bool_t PamLevel2::UpdateRunInfo(Long64_t Line 2162  Bool_t PamLevel2::UpdateRunInfo(Long64_t
2162          };                };      
2163    
2164          // -----------------------------------------------------------------------          // -----------------------------------------------------------------------
2165          // if it is simulation, assigh abstime by hand (temporaneo!!!)          // if it is simulation, assign abstime by hand (temporaneo!!!)
2166          // -----------------------------------------------------------------------          // -----------------------------------------------------------------------
2167          if(ISGP){          if(ISGP){
2168              abstime = GetRunInfo()->RUNHEADER_TIME; // BARBATRUCCO              abstime = GetRunInfo()->RUNHEADER_TIME; // BARBATRUCCO
# Line 2180  Bool_t PamLevel2::UpdateRunInfo(Long64_t Line 2187  Bool_t PamLevel2::UpdateRunInfo(Long64_t
2187                        obt <= GetRunInfo()->RUNTRAILER_OBT)                        obt <= GetRunInfo()->RUNTRAILER_OBT)
2188                      )                      )
2189                  || GetRunInfo()->NEVENTS==0                  || GetRunInfo()->NEVENTS==0
2190                  || !(irunentry < GetRunInfo()->NEVENTS-1-prevshift)  //              || !(irunentry < GetRunInfo()->NEVENTS-1-prevshift) // ERRORE!!! fa saltare i run con 1 evento
2191                    || !(irunentry <= GetRunInfo()->NEVENTS-1-prevshift)
2192                  )                  )
2193                  && irun < run_tree->GetEntries() ){                  && irun < run_tree->GetEntries() ){
2194    
2195                // - - - - - - - - - - - - -
2196                // irunentry = position of current entry, relative to the run
2197                // prevshift = shift needed to synchronize l0 and l2 data (nested events)
2198                // - - - - - - - - - - - - -
2199    
2200              // -----------------------------------------              // -----------------------------------------
2201              // store dead and live-time of previous run              // store dead and live-time of previous run
# Line 3425  Int_t PamLevel2::GetYodaEntry(){ Line 3435  Int_t PamLevel2::GetYodaEntry(){
3435      Int_t answer = 0;      Int_t answer = 0;
3436      Int_t shift =0;      Int_t shift =0;
3437      //    printf(" siamo qui %i %i \n",shift,prevshift);      //    printf(" siamo qui %i %i \n",shift,prevshift);
3438      Int_t maxshift = 10;      //    Int_t maxshift = 50; // EMILIANO
3439      do{      do{
3440          if(shift>0){              if(shift>0){    
3441              cout << " PKTNUM  L2 --- "<< pktn << " --- L0 --- "<< GetEventHeader()->GetPscuHeader()->GetCounter()<<endl;              cout << " PKTNUM  L2 --- "<< pktn << " --- L0 --- "<< GetEventHeader()->GetPscuHeader()->GetCounter()<<endl;

Legend:
Removed from v.1.47  
changed lines
  Added in v.1.50

  ViewVC Help
Powered by ViewVC 1.1.23