/[PAMELA software]/DarthVader/OrbitalInfo/src/OrbitalInfoCore.cpp
ViewVC logotype

Diff of /DarthVader/OrbitalInfo/src/OrbitalInfoCore.cpp

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

revision 1.45 by mocchiut, Fri Jan 29 20:45:52 2010 UTC revision 1.46 by mocchiut, Sat Jan 30 09:22:04 2010 UTC
# Line 883  int OrbitalInfoCore(UInt_t run, TFile *f Line 883  int OrbitalInfoCore(UInt_t run, TFile *f
883              if ( debug ) printf(" ik %i j3 %i eh eh eh \n",ik,j3);              if ( debug ) printf(" ik %i j3 %i eh eh eh \n",ik,j3);
884              mcmdrc = (pamela::McmdRecord*)mcmdev->Records->At(j3);              mcmdrc = (pamela::McmdRecord*)mcmdev->Records->At(j3);
885              if ( mcmdrc ){ // missing inclination bug [8RED 090116]              if ( mcmdrc ){ // missing inclination bug [8RED 090116]
886                  if ( debug ) printf(" pluto \n");
887                if ((int)mcmdrc->ID1 == 226 && mcmdrc->Mcmd_Block_crc_ok == 1){ //Check that it is Inclination Packet                if ((int)mcmdrc->ID1 == 226 && mcmdrc->Mcmd_Block_crc_ok == 1){ //Check that it is Inclination Packet
888                  L_QQ_Q_l_upper->fill(mcmdrc->McmdData);                  L_QQ_Q_l_upper->fill(mcmdrc->McmdData);
889                  for (UInt_t ui = 0; ui < 6; ui++){                  for (UInt_t ui = 0; ui < 6; ui++){
890                    if (ui>0){                    if (ui>0){
891                      if (L_QQ_Q_l_upper->time[ui]>L_QQ_Q_l_upper->time[0]){                      if (L_QQ_Q_l_upper->time[ui]>L_QQ_Q_l_upper->time[0]){
892                            if ( debug ) printf(" here1 %i \n",ui);
893                        Double_t u_time = dbtime->DBabsTime((UInt_t)(L_QQ_Q_l_upper->time[ui]*1000-DeltaOBT*1000));                        Double_t u_time = dbtime->DBabsTime((UInt_t)(L_QQ_Q_l_upper->time[ui]*1000-DeltaOBT*1000));
894                        Int_t recSize = recqtime.size();                        Int_t recSize = recqtime.size();
895                        for(Int_t mu = nt;mu<recSize;mu++){                        for(Int_t mu = nt;mu<recSize;mu++){
# Line 927  int OrbitalInfoCore(UInt_t run, TFile *f Line 929  int OrbitalInfoCore(UInt_t run, TFile *f
929                        }                        }
930                      }                      }
931                    }else{                    }else{
932                            if ( debug ) printf(" here2 %i \n",ui);
933                      Double_t u_time = dbtime->DBabsTime((UInt_t)(L_QQ_Q_l_upper->time[0]*1000-DeltaOBT*1000));                      Double_t u_time = dbtime->DBabsTime((UInt_t)(L_QQ_Q_l_upper->time[0]*1000-DeltaOBT*1000));
934                      if(lowerqtime>u_time)nt=0;                      if(lowerqtime>u_time)nt=0;
935                      Int_t recSize = recqtime.size();                      Int_t recSize = recqtime.size();
# Line 970  int OrbitalInfoCore(UInt_t run, TFile *f Line 973  int OrbitalInfoCore(UInt_t run, TFile *f
973                  }                  }
974                }                }
975              }              }
976                if ( debug ) printf(" ciccio \n");
977            }            }
978          }          }
979            if ( debug ) printf(" fuffi \n");
980          sineparam(q0sine,qtime,q0,qRoll,qPitch,0.58);          sineparam(q0sine,qtime,q0,qRoll,qPitch,0.58);
981          sineparam(q1sine,qtime,q1,qRoll,qPitch,0.79);          sineparam(q1sine,qtime,q1,qRoll,qPitch,0.79);
982          sineparam(q2sine,qtime,q2,qRoll,qPitch,0.79);          sineparam(q2sine,qtime,q2,qRoll,qPitch,0.79);
983          sineparam(q3sine,qtime,q3,qRoll,qPitch,0.58);          sineparam(q3sine,qtime,q3,qRoll,qPitch,0.58);
984          sineparam(Yawsine,qtime,qYaw,qRoll,qPitch,4);          sineparam(Yawsine,qtime,qYaw,qRoll,qPitch,4);
985            if ( debug ) printf(" puffi \n");
986          Double_t tmin = 9999999999.;          Double_t tmin = 9999999999.;
987          Double_t tmax = 0.;          Double_t tmax = 0.;
988          for(UInt_t tre = 0;tre<qtime.size();tre++){          for(UInt_t tre = 0;tre<qtime.size();tre++){
989            if(qtime[tre]>tmax)tmax = qtime[tre];            if(qtime[tre]>tmax)tmax = qtime[tre];
990            if(qtime[tre]<tmin)tmin = qtime[tre];            if(qtime[tre]<tmin)tmin = qtime[tre];
991          }          }
992                    if ( debug ) printf(" gnfuffi \n");
993    
994          //q0testing->SetName("q0testing");          //q0testing->SetName("q0testing");
995          //q1testing->SetName("q1testing");          //q1testing->SetName("q1testing");
996          //q2testing->SetName("q2testing");          //q2testing->SetName("q2testing");
# Line 1010  int OrbitalInfoCore(UInt_t run, TFile *f Line 1016  int OrbitalInfoCore(UInt_t run, TFile *f
1016                
1017        //Filling Inclination information        //Filling Inclination information
1018        Double_t incli = 0;        Double_t incli = 0;
1019          if ( qtime.size() > 1 ){
1020        for(UInt_t mu = must;mu<qtime.size()-1;mu++){        for(UInt_t mu = must;mu<qtime.size()-1;mu++){
1021            if ( debug ) printf(" ??grfuffi %i sixe %i must %i \n",mu,qtime.size()-1,must);
1022          if(qtime[mu+1]>qtime[mu]){          if(qtime[mu+1]>qtime[mu]){
1023              if ( debug ) printf(" grfuffi2 %i \n",mu);
1024            if(atime<=qtime[mu+1] && atime>=qtime[mu]){            if(atime<=qtime[mu+1] && atime>=qtime[mu]){
1025              must = mu;              must = mu;
1026              incli = (qPitch[mu+1]-qPitch[mu])/(qtime[mu+1]-qtime[mu]);              incli = (qPitch[mu+1]-qPitch[mu])/(qtime[mu+1]-qtime[mu]);
# Line 1087  int OrbitalInfoCore(UInt_t run, TFile *f Line 1096  int OrbitalInfoCore(UInt_t run, TFile *f
1096            }            }
1097          }          }
1098        }        }
1099          }
1100        //        //
1101        // ops no inclination information        // ops no inclination information
1102        //        //

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

  ViewVC Help
Powered by ViewVC 1.1.23