/[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.30 by mocchiut, Wed Oct 1 15:25:44 2008 UTC revision 1.34 by mocchiut, Fri Nov 28 09:05:21 2008 UTC
# Line 71  int OrbitalInfoCore(UInt_t run, TFile *f Line 71  int OrbitalInfoCore(UInt_t run, TFile *f
71    //    //
72    Bool_t verbose = false;    Bool_t verbose = false;
73    //    //
74    Bool_t standalone = true;    Bool_t standalone = false;
75    //    //
76    if ( OrbitalInfoargc > 0 ){    if ( OrbitalInfoargc > 0 ){
77      i = 0;      i = 0;
# Line 623  int OrbitalInfoCore(UInt_t run, TFile *f Line 623  int OrbitalInfoCore(UInt_t run, TFile *f
623        //        //
624        // paranoid check        // paranoid check
625        //        //
626        if ( (atime > runinfo->RUNTRAILER_TIME) || (atime < runinfo->RUNHEADER_TIME)  ) {        if ( (atime > (runinfo->RUNTRAILER_TIME+1)) || (atime < (runinfo->RUNHEADER_TIME-1))  ) {
627          if (verbose) printf(" OrbitalInfo - WARNING: event at time outside the run time window, skipping it\n");          if (verbose) printf(" OrbitalInfo - WARNING: event at time outside the run time window, skipping it\n");
628          jumped++;          jumped++;
629  //      debug = true;  //      debug = true;
# Line 981  int OrbitalInfoCore(UInt_t run, TFile *f Line 981  int OrbitalInfoCore(UInt_t run, TFile *f
981          orbitalinfo->BB0 = babs/bequ;          orbitalinfo->BB0 = babs/bequ;
982          orbitalinfo->L = xl;                orbitalinfo->L = xl;      
983          // Set Stormer vertical cutoff using L shell.          // Set Stormer vertical cutoff using L shell.
984          orbitalinfo->cutoff[0] = 14.9/(xl*xl);          orbitalinfo->cutoffsvl = 14.9/(xl*xl);
985          //          //
986        };              };      
987        //        //
# Line 997  int OrbitalInfoCore(UInt_t run, TFile *f Line 997  int OrbitalInfoCore(UInt_t run, TFile *f
997          TMatrixD Dij = PO->GreenwichtoGEO(orbitalinfo->lat,orbitalinfo->lon,Fij);          TMatrixD Dij = PO->GreenwichtoGEO(orbitalinfo->lat,orbitalinfo->lon,Fij);
998          TMatrixD Iij = PO->ColPermutation(Dij);          TMatrixD Iij = PO->ColPermutation(Dij);
999          //          //
1000            orbitalinfo->Iij.ResizeTo(Iij);
1001            orbitalinfo->Iij = Iij;
1002            //
1003          A1 = Iij(0,2);          A1 = Iij(0,2);
1004          A2 = Iij(1,2);          A2 = Iij(1,2);
1005          A3 = Iij(2,2);          A3 = Iij(2,2);
1006          //                //      
1007          orbitalinfo->pamzenitangle = (Float_t)PO->GetPitchAngle(1,0,0,A1,A2,A3);                        // Angle between zenit and Pamela's main axiz          //      orbitalinfo->pamzenitangle = (Float_t)PO->GetPitchAngle(1,0,0,A1,A2,A3);                        // Angle between zenit and Pamela's main axiz
1008          orbitalinfo->pamBangle = (Float_t)PO->GetPitchAngle(A1,A2,A3,Bx,By,Bz);                 // Angle between Pamela's main axiz and B          //      orbitalinfo->pamBangle = (Float_t)PO->GetPitchAngle(A1,A2,A3,Bx,By,Bz);                 // Angle between Pamela's main axiz and B
1009          //          //
1010          if ( !standalone && tof->ntrk() > 0 ){          if ( !standalone && tof->ntrk() > 0 ){
1011            //            //
# Line 1016  int OrbitalInfoCore(UInt_t run, TFile *f Line 1019  int OrbitalInfoCore(UInt_t run, TFile *f
1019              Double_t E22x = ptt->xtr_tof[3];//tr->x[3];              Double_t E22x = ptt->xtr_tof[3];//tr->x[3];
1020              Double_t E22y = ptt->ytr_tof[3];//tr->y[3];              Double_t E22y = ptt->ytr_tof[3];//tr->y[3];
1021              Double_t E22z = zin[3];              Double_t E22z = zin[3];
1022              if ( E11x < 100. && E11y < 100. && E22x < 100. && E22y < 100.  ){              if ( (E11x < 100. && E11y < 100. && E22x < 100. && E22y < 100.) || ptt->trkseqno != -1  ){
1023                Double_t norm = sqrt(pow(E22x-E11x,2)+pow(E22y-E11y,2)+pow(E22z-E11z,2));                Double_t norm = sqrt(pow(E22x-E11x,2)+pow(E22y-E11y,2)+pow(E22z-E11z,2));
1024                Double_t MyAzim = TMath::RadToDeg()*atan(TMath::Abs(E22y-E11y)/TMath::Abs(E22x-E11x));                Double_t MyAzim = TMath::RadToDeg()*atan(TMath::Abs(E22y-E11y)/TMath::Abs(E22x-E11x));
1025                if(E22x-E11x>=0 && E22y-E11y <0) MyAzim =  360. - MyAzim;                if(E22x-E11x>=0 && E22y-E11y <0) MyAzim =  360. - MyAzim;
# Line 1027  int OrbitalInfoCore(UInt_t run, TFile *f Line 1030  int OrbitalInfoCore(UInt_t run, TFile *f
1030                Py = (E22y-E11y)/norm;                Py = (E22y-E11y)/norm;
1031                Pz = (E22z-E11z)/norm;                Pz = (E22z-E11z)/norm;
1032                //                //
               TMatrixD Eij = PO->PamelatoGEO(Iij,Px,Py,Pz);              
               //              
1033                t_orb->trkseqno = ptt->trkseqno;                t_orb->trkseqno = ptt->trkseqno;
1034                  //
1035                  TMatrixD Eij = PO->PamelatoGEO(Iij,Px,Py,Pz);
1036                  t_orb->Eij.ResizeTo(Eij);
1037                  t_orb->Eij = Eij;
1038                  //
1039                  TMatrixD Sij = PO->PamelatoGEO(Fij,Px,Py,Pz);
1040                  t_orb->Sij.ResizeTo(Sij);
1041                  t_orb->Sij = Sij;
1042                  //            
1043                t_orb->pitch = (Float_t)PO->GetPitchAngle(Eij(0,0),Eij(1,0),Eij(2,0),Bx,By,Bz);                t_orb->pitch = (Float_t)PO->GetPitchAngle(Eij(0,0),Eij(1,0),Eij(2,0),Bx,By,Bz);
1044                  //
1045                  //
1046                  Double_t omega = PO->GetPitchAngle(Eij(0,0),Eij(1,0),Eij(2,0),cos(orbitalinfo->lon+TMath::Pi()/2)-sin(orbitalinfo->lon+TMath::Pi()/2),cos(orbitalinfo->lon+TMath::Pi()/2)+sin(orbitalinfo->lon+TMath::Pi()/2),1);
1047                  //
1048                  t_orb->cutoff = 59.3/(pow(orbitalinfo->L,2)*pow((1+sqrt(1-pow(orbitalinfo->L,-3/2)*cos(omega))),2));
1049                  //
1050                  if ( debug ) printf(" orbitalinfo->cutoffsvl %f vitaly %f \n",orbitalinfo->cutoffsvl,t_orb->cutoff);
1051                //                //
1052                new(tor[nn]) OrbitalInfoTrkVar(*t_orb);                new(tor[nn]) OrbitalInfoTrkVar(*t_orb);
1053                nn++;                nn++;

Legend:
Removed from v.1.30  
changed lines
  Added in v.1.34

  ViewVC Help
Powered by ViewVC 1.1.23