/[PAMELA software]/eventviewer/flight/src/FEVdetector.cpp
ViewVC logotype

Diff of /eventviewer/flight/src/FEVdetector.cpp

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

revision 1.25 by mocchiut, Thu Nov 29 15:53:10 2007 UTC revision 1.29 by mocchiut, Tue Aug 11 13:03:42 2009 UTC
# Line 97  FEVdetector::FEVdetector(TString filenam Line 97  FEVdetector::FEVdetector(TString filenam
97    var.showac = false;    var.showac = false;
98  }  }
99    
100    void FEVdetector::Reset(){
101      L2 = NULL;
102    }
103    
104  void FEVdetector::checkctrlword(){  void FEVdetector::checkctrlword(){
105    var.SHOWDEC = 0;    var.SHOWDEC = 0;
106    var.TOF = 0;    var.TOF = 0;
# Line 206  void FEVdetector::ClearVariables(){ Line 210  void FEVdetector::ClearVariables(){
210  void FEVdetector::GetEntry(Int_t i){  void FEVdetector::GetEntry(Int_t i){
211    thisentry = i;      thisentry = i;  
212    if ( level.file == 2 ){    if ( level.file == 2 ){
213      L2->Clear();      //    L2->Clear();
214      //    printf("qui\n");      //    printf("qui\n");
215      L2->GetEntry(i);      L2->GetEntry(i);
216      if ( var.showall ){      if ( var.showall ){
# Line 394  void FEVdetector::ShowInfo(TString detec Line 398  void FEVdetector::ShowInfo(TString detec
398    Int_t dlen = 10;    Int_t dlen = 10;
399    //    //
400    char o[200000];    char o[200000];
401      char zz[200000];
402    char col[13];    char col[13];
403    char col2[13];    char col2[13];
404    //    //
405    setcolor(col,RESET, GREEN, WHITE);    setcolor(col,RESET, GREEN, WHITE);
406    sprintf(o,"%s======> EVENT:%i\n",col, thisentry);    sprintf(o,"%s======> EVENT:%i\n",col, thisentry);
407      sprintf(zz,"======> EVENT:%i\n", thisentry);
408    //    //
409    setcolor(col,RESET, RED, WHITE);    setcolor(col,RESET, RED, WHITE);
410    sprintf(o,"%s%sBranch %s\n",o,col,b1->GetName());    sprintf(o,"%s%sBranch %s\n",o,col,b1->GetName());
411      sprintf(zz,"%sBranch %s\n",zz,b1->GetName());
412    setcolor(col,RESET, BLACK, WHITE);    setcolor(col,RESET, BLACK, WHITE);
413    sprintf(o,"%s%s",o,col);    sprintf(o,"%s%s",o,col);
414    //    //
# Line 429  void FEVdetector::ShowInfo(TString detec Line 436  void FEVdetector::ShowInfo(TString detec
436        setcolor(col,RESET, BLUE, WHITE);        setcolor(col,RESET, BLUE, WHITE);
437        setcolor(col2,RESET, BLACK, WHITE);        setcolor(col2,RESET, BLACK, WHITE);
438        sprintf(o,"%s%s %-15s%s =",o,col,((TBranch*)branch_array->At(l))->GetName(),col2);        sprintf(o,"%s%s %-15s%s =",o,col,((TBranch*)branch_array->At(l))->GetName(),col2);
439          sprintf(zz,"%s %-15s =",zz,((TBranch*)branch_array->At(l))->GetName());
440        //        //
441        j = 0;        j = 0;
442        //        //
# Line 441  void FEVdetector::ShowInfo(TString detec Line 449  void FEVdetector::ShowInfo(TString detec
449          while ( j < length ){          while ( j < length ){
450            if ( j < length -1 ){            if ( j < length -1 ){
451              sprintf(o,"%s %i ,",o,(Int_t)tb->GetValue(j,0));              sprintf(o,"%s %i ,",o,(Int_t)tb->GetValue(j,0));
452                sprintf(zz,"%s %i ,",zz,(Int_t)tb->GetValue(j,0));
453            } else {            } else {
454              sprintf(o,"%s %i",o,(Int_t)tb->GetValue(j,0));              sprintf(o,"%s %i",o,(Int_t)tb->GetValue(j,0));
455                sprintf(zz,"%s %i",zz,(Int_t)tb->GetValue(j,0));
456            };            };
457            j++;            j++;
458          };          };
# Line 454  void FEVdetector::ShowInfo(TString detec Line 464  void FEVdetector::ShowInfo(TString detec
464          while ( j < length ){          while ( j < length ){
465            if ( j < length -1 ){            if ( j < length -1 ){
466              sprintf(o,"%s %u ,",o,(UInt_t)tb->GetValue(j,0));              sprintf(o,"%s %u ,",o,(UInt_t)tb->GetValue(j,0));
467                sprintf(zz,"%s %u ,",zz,(UInt_t)tb->GetValue(j,0));
468            } else {            } else {
469              sprintf(o,"%s %u",o,(UInt_t)tb->GetValue(j,0));              sprintf(o,"%s %u",o,(UInt_t)tb->GetValue(j,0));
470                sprintf(zz,"%s %u",zz,(UInt_t)tb->GetValue(j,0));
471            };            };
472            j++;            j++;
473          };          };
# Line 467  void FEVdetector::ShowInfo(TString detec Line 479  void FEVdetector::ShowInfo(TString detec
479          while ( j < length ){          while ( j < length ){
480            if ( j < length -1 ){            if ( j < length -1 ){
481              sprintf(o,"%s %f ,",o,tb->GetValue(j,0));              sprintf(o,"%s %f ,",o,tb->GetValue(j,0));
482                sprintf(zz,"%s %f ,",zz,tb->GetValue(j,0));
483            } else {            } else {
484              sprintf(o,"%s %f",o,tb->GetValue(j,0));              sprintf(o,"%s %f",o,tb->GetValue(j,0));
485                sprintf(zz,"%s %f",zz,tb->GetValue(j,0));
486            };            };
487            j++;            j++;
488          };          };
# Line 503  void FEVdetector::ShowInfo(TString detec Line 517  void FEVdetector::ShowInfo(TString detec
517  //        printf("ciao %s \n",pr->Data());  //        printf("ciao %s \n",pr->Data());
518  //      };  //      };
519          sprintf(o,"%s TString - not implemented yet -",o);          sprintf(o,"%s TString - not implemented yet -",o);
520            sprintf(zz,"%s TString - not implemented yet -",zz);
521        };        };
522        //        //
523        // TArray        // TArray
# Line 603  void FEVdetector::ShowInfo(TString detec Line 618  void FEVdetector::ShowInfo(TString detec
618  //      sprintf(o,"%s\n",o);  //      sprintf(o,"%s\n",o);
619          //                //      
620          sprintf(o,"%s TArray - not implemented yet -",o);          sprintf(o,"%s TArray - not implemented yet -",o);
621            sprintf(zz,"%s TArray - not implemented yet -",zz);
622          //          //
623        };        };
624        //        //
625        sprintf(o,"%s\n",o);        sprintf(o,"%s\n",o);
626          sprintf(zz,"%s\n",zz);
627        break;        break;
628      case 3:      case 3:
629        //        //
# Line 615  void FEVdetector::ShowInfo(TString detec Line 632  void FEVdetector::ShowInfo(TString detec
632        setcolor(col,RESET, BLUE, WHITE);        setcolor(col,RESET, BLUE, WHITE);
633        setcolor(col2,RESET, BLACK, WHITE);        setcolor(col2,RESET, BLACK, WHITE);
634        sprintf(o,"%s%s %-15s%s = %d\n",o,col,tb->GetName(), col2, tb->GetNdata());        sprintf(o,"%s%s %-15s%s = %d\n",o,col,tb->GetName(), col2, tb->GetNdata());
635          sprintf(zz,"%s %-15s = %d\n",zz,tb->GetName(), tb->GetNdata());
636    
637        //        //
638        if ( tb->GetNdata() ){        if ( tb->GetNdata() ){
# Line 665  void FEVdetector::ShowInfo(TString detec Line 683  void FEVdetector::ShowInfo(TString detec
683                  setcolor(col,RESET, BLUE, WHITE);                  setcolor(col,RESET, BLUE, WHITE);
684                  setcolor(col2,RESET, BLACK, WHITE);                  setcolor(col2,RESET, BLACK, WHITE);
685                  sprintf(o,"%s%s %-15s%s = ",o,col,foglia->GetName(),col2);                  sprintf(o,"%s%s %-15s%s = ",o,col,foglia->GetName(),col2);
686                    sprintf(zz,"%s %-15s = ",zz,foglia->GetName());
687                  while ( j < cl->GetEntriesFast() ){                  while ( j < cl->GetEntriesFast() ){
688                    if ( j < cl->GetEntriesFast() -1 ){                    if ( j < cl->GetEntriesFast() -1 ){
689                      sprintf(o,"%s %i ,",o,(Int_t)stb->GetValue(j,slength));                      sprintf(o,"%s %i ,",o,(Int_t)stb->GetValue(j,slength));
690                        sprintf(zz,"%s %i ,",zz,(Int_t)stb->GetValue(j,slength));
691                    } else {                    } else {
692                      sprintf(o,"%s %i",o,(Int_t)stb->GetValue(j,slength));                      sprintf(o,"%s %i",o,(Int_t)stb->GetValue(j,slength));
693                        sprintf(zz,"%s %i",zz,(Int_t)stb->GetValue(j,slength));
694                    };                    };
695                    j++;                    j++;
696                  };                  };
# Line 682  void FEVdetector::ShowInfo(TString detec Line 703  void FEVdetector::ShowInfo(TString detec
703                  setcolor(col,RESET, BLUE, WHITE);                  setcolor(col,RESET, BLUE, WHITE);
704                  setcolor(col2,RESET, BLACK, WHITE);                  setcolor(col2,RESET, BLACK, WHITE);
705                  sprintf(o,"%s%s %-15s%s = ",o,col,foglia->GetName(),col2);                  sprintf(o,"%s%s %-15s%s = ",o,col,foglia->GetName(),col2);
706                    sprintf(zz,"%s %-15s = ",zz,foglia->GetName());
707                  while ( j < cl->GetEntriesFast() ){                  while ( j < cl->GetEntriesFast() ){
708                    if ( j < cl->GetEntriesFast() -1 ){                    if ( j < cl->GetEntriesFast() -1 ){
709                      sprintf(o,"%s %f ,",o,stb->GetValue(j,slength));                      sprintf(o,"%s %f ,",o,stb->GetValue(j,slength));
710                        sprintf(zz,"%s %f ,",zz,stb->GetValue(j,slength));
711                    } else {                    } else {
712                      sprintf(o,"%s %f",o,stb->GetValue(j,slength));                      sprintf(o,"%s %f",o,stb->GetValue(j,slength));
713                        sprintf(zz,"%s %f",zz,stb->GetValue(j,slength));
714                    };                    };
715                    j++;                    j++;
716                  };                  };
# Line 699  void FEVdetector::ShowInfo(TString detec Line 723  void FEVdetector::ShowInfo(TString detec
723                  setcolor(col,RESET, BLUE, WHITE);                  setcolor(col,RESET, BLUE, WHITE);
724                  setcolor(col2,RESET, BLACK, WHITE);                  setcolor(col2,RESET, BLACK, WHITE);
725                  sprintf(o,"%s%s %-15s%s = ",o,col,foglia->GetName(),col2);                  sprintf(o,"%s%s %-15s%s = ",o,col,foglia->GetName(),col2);
726                    sprintf(zz,"%s %-15s = ",zz,foglia->GetName());
727                  Bool_t bold = true;                  Bool_t bold = true;
728                  while ( j < tb->GetNdata() ){                  while ( j < tb->GetNdata() ){
729                    if ( bold ){                    if ( bold ){
# Line 712  void FEVdetector::ShowInfo(TString detec Line 737  void FEVdetector::ShowInfo(TString detec
737                    while ( jj < slength ){                                      while ( jj < slength ){                  
738                      if ( jj < slength-1 ){                      if ( jj < slength-1 ){
739                        sprintf(o,"%s %f ,",o,stb->GetValue(j,jj,true));                        sprintf(o,"%s %f ,",o,stb->GetValue(j,jj,true));
740                          sprintf(zz,"%s %f ,",zz,stb->GetValue(j,jj,true));
741                      } else {                      } else {
742                        sprintf(o,"%s %f",o,stb->GetValue(j,jj,true));                        sprintf(o,"%s %f",o,stb->GetValue(j,jj,true));
743                          sprintf(zz,"%s %f",zz,stb->GetValue(j,jj,true));
744                      };                      };
745                      jj++;                      jj++;
746                    };                    };
747                    if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o);                    if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o);
748                      if ( j < tb->GetNdata() -1 ) sprintf(zz,"%s ,",zz);
749                    if ( !bold ){                    if ( !bold ){
750                      bold = true;                      bold = true;
751                    } else {                    } else {
# Line 738  void FEVdetector::ShowInfo(TString detec Line 766  void FEVdetector::ShowInfo(TString detec
766                  setcolor(col,RESET, BLUE, WHITE);                  setcolor(col,RESET, BLUE, WHITE);
767                  setcolor(col2,RESET, BLACK, WHITE);                  setcolor(col2,RESET, BLACK, WHITE);
768                  sprintf(o,"%s%s %-15s%s = ",o,col,foglia->GetName(),col2);                  sprintf(o,"%s%s %-15s%s = ",o,col,foglia->GetName(),col2);
769                    sprintf(zz,"%s %-15s = ",zz,foglia->GetName());
770                  while ( j < tb->GetNdata() ){                  while ( j < tb->GetNdata() ){
771                    Int_t jj = 0;                    Int_t jj = 0;
772                    while ( jj < slength ){                    while ( jj < slength ){
773                      if ( jj < slength-1 ){                      if ( jj < slength-1 ){
774                        sprintf(o,"%s %i ,",o,(Int_t)stb->GetValue(j,jj,true));                        sprintf(o,"%s %i ,",o,(Int_t)stb->GetValue(j,jj,true));
775                          sprintf(zz,"%s %i ,",zz,(Int_t)stb->GetValue(j,jj,true));
776                      } else {                      } else {
777                        sprintf(o,"%s %i",o,(Int_t)stb->GetValue(j,jj,true));                        sprintf(o,"%s %i",o,(Int_t)stb->GetValue(j,jj,true));
778                          sprintf(zz,"%s %i",zz,(Int_t)stb->GetValue(j,jj,true));
779                      };                      };
780                      jj++;                      jj++;
781                    };                    };
782                    if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o);                    if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o);
783                      if ( j < tb->GetNdata() -1 ) sprintf(zz,"%s ,",zz);
784                    j++;                    j++;
785                  };                  };
786                };                };
# Line 781  void FEVdetector::ShowInfo(TString detec Line 813  void FEVdetector::ShowInfo(TString detec
813                    setcolor(col,RESET, BLUE, WHITE);                    setcolor(col,RESET, BLUE, WHITE);
814                    setcolor(col2,RESET, BLACK, WHITE);                    setcolor(col2,RESET, BLACK, WHITE);
815                    sprintf(o,"%s%s %s[%i]%s = ",o,col,foglia->GetName(),arr->GetSize(),col2);                    sprintf(o,"%s%s %s[%i]%s = ",o,col,foglia->GetName(),arr->GetSize(),col2);
816                      sprintf(zz,"%s %s[%i] = ",zz,foglia->GetName(),arr->GetSize());
817                    //                    //
818                    while ( j < tb->GetNdata() ){                    while ( j < tb->GetNdata() ){
819                      //                      //
# Line 791  void FEVdetector::ShowInfo(TString detec Line 824  void FEVdetector::ShowInfo(TString detec
824                      while ( jj < arlen ){                      while ( jj < arlen ){
825                        if ( jj < arlen-1 ){                        if ( jj < arlen-1 ){
826                          sprintf(o,"%s %i ,",o,arr->At(jj));                          sprintf(o,"%s %i ,",o,arr->At(jj));
827                            sprintf(zz,"%s %i ,",zz,arr->At(jj));
828                        } else {                        } else {
829                          sprintf(o,"%s %i",o,arr->At(jj));                          sprintf(o,"%s %i",o,arr->At(jj));
830                            sprintf(zz,"%s %i",zz,arr->At(jj));
831                        };                        };
832                        jj++;                        jj++;
833                      };                      };
834                      if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o);                      if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o);
835                        if ( j < tb->GetNdata() -1 ) sprintf(zz,"%s ,",zz);
836                      j++;                      j++;
837                    };                    };
838                  };                  };
# Line 814  void FEVdetector::ShowInfo(TString detec Line 850  void FEVdetector::ShowInfo(TString detec
850                    setcolor(col,RESET, BLUE, WHITE);                    setcolor(col,RESET, BLUE, WHITE);
851                    setcolor(col2,RESET, BLACK, WHITE);                    setcolor(col2,RESET, BLACK, WHITE);
852                    sprintf(o,"%s%s %s[%i]%s = ",o,col,foglia->GetName(),arr->GetSize(),col2);                    sprintf(o,"%s%s %s[%i]%s = ",o,col,foglia->GetName(),arr->GetSize(),col2);
853                      sprintf(zz,"%s %s[%i] = ",zz,foglia->GetName(),arr->GetSize());
854                    //                    //
855                    while ( j < tb->GetNdata() ){                    while ( j < tb->GetNdata() ){
856                      //                      //
# Line 824  void FEVdetector::ShowInfo(TString detec Line 861  void FEVdetector::ShowInfo(TString detec
861                      while ( jj < arlen ){                      while ( jj < arlen ){
862                        if ( jj < arlen-1 ){                        if ( jj < arlen-1 ){
863                          sprintf(o,"%s %f ,",o,arr->At(jj));                          sprintf(o,"%s %f ,",o,arr->At(jj));
864                            sprintf(zz,"%s %f ,",zz,arr->At(jj));
865                        } else {                        } else {
866                          sprintf(o,"%s %f",o,arr->At(jj));                          sprintf(o,"%s %f",o,arr->At(jj));
867                            sprintf(zz,"%s %f",zz,arr->At(jj));
868                        };                        };
869                        jj++;                        jj++;
870                      };                      };
871                      if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o);                      if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o);
872                        if ( j < tb->GetNdata() -1 ) sprintf(zz,"%s ,",zz);
873                      j++;                      j++;
874                    };                    };
875                  };                  };
876                };                };
877                sprintf(o,"%s\n",o);                sprintf(o,"%s\n",o);
878                  sprintf(zz,"%s\n",zz);
879                break;                        break;        
880              };              };
881            };            };
# Line 843  void FEVdetector::ShowInfo(TString detec Line 884  void FEVdetector::ShowInfo(TString detec
884        break;        break;
885      };      };
886    };      };  
   //  pamgui->DIALOG(0,o);  
887    printf("%s\n",o);    printf("%s\n",o);
888      pamgui->DIALOG(4,zz);
889  };  };
890    
891    
# Line 1016  int FEVdetector::SelectEvent(){ Line 1057  int FEVdetector::SelectEvent(){
1057        //        //
1058        if ( level.file == 2 ){        if ( level.file == 2 ){
1059          cintcom.str("");          cintcom.str("");
1060          cintcom << "PamLevel2 *L2 = (PamLevel2*)0x" << hex;          cintcom << "PamLevel2 *L2 = (PamLevel2*)" << hex; //con const e l2 funziona
1061          cintcom << L2;          cintcom << L2;
1062          gROOT->ProcessLine(cintcom.str().c_str());          gROOT->ProcessLine(cintcom.str().c_str());
1063            //      printf(" comando: %s \n",cintcom.str().c_str());
1064        } else {        } else {
1065          cintcom.str("");          cintcom.str("");
1066          cintcom << "TTree *otr = (TTree*)0x" << hex;          cintcom << "TTree *otr = (TTree*)" << hex;
1067          cintcom << otr;          cintcom << otr;
1068          gROOT->ProcessLine(cintcom.str().c_str());          gROOT->ProcessLine(cintcom.str().c_str());
1069          //          //
1070          cintcom.str("");          cintcom.str("");
1071          cintcom << "struct Variables &var = (struct Variables &)0x" << hex;          cintcom << "struct Variables &var = (struct Variables &)" << hex;
1072          cintcom << &var;          cintcom << &var;
1073          gROOT->ProcessLine(cintcom.str().c_str());          gROOT->ProcessLine(cintcom.str().c_str());
1074        };        };
# Line 1057  TChain* FEVdetector::Load(TString file){ Line 1099  TChain* FEVdetector::Load(TString file){
1099    //    //
1100    if ( level.file == 2 ){    if ( level.file == 2 ){
1101      //      //
1102      printf(" %s \n",ddec.Data());      //    printf(" %s \n",ddec.Data());
1103      if ( !L2 ){      if ( !L2 ){
1104        L2 = new PamLevel2("",file.Data(),ddec.Data());        L2 = new PamLevel2("",file.Data(),ddec.Data());
1105        otr = L2->GetPamTree();        otr = L2->GetPamTree();
1106        printf(" l2 constructor\n");        //      printf(" l2 constructor\n");
1107        //      printf(" abst %u obt %u qtot %f \n",L2->GetOrbitalInfo()->absTime,L2->GetOrbitalInfo()->OBT,L2->GetCaloLevel2()->qtot);            //      printf(" abst %u obt %u qtot %f \n",L2->GetOrbitalInfo()->absTime,L2->GetOrbitalInfo()->OBT,L2->GetCaloLevel2()->qtot);    
1108      } else {      } else {
1109        //        //
1110        printf(" l2 already exist \n");        //      printf(" l2 already exist \n");
1111        otr = L2->GetPamTree(gSystem->DirName(file.Data()),file.Data(),ddec.Data());        otr = L2->GetPamTree(gSystem->DirName(file.Data()),file.Data(),ddec.Data());
1112        L2->GetRunTree(gSystem->DirName(file.Data()),file.Data());        L2->GetRunTree(gSystem->DirName(file.Data()),file.Data());
1113        //        //
# Line 1943  void FEVdetector::ShowTOF(){ Line 1985  void FEVdetector::ShowTOF(){
1985      Float_t mt31[2][3];      Float_t mt31[2][3];
1986      Float_t mt32[2][3];      Float_t mt32[2][3];
1987      //      //
1988        memset(mt11,0,2*8*sizeof(Float_t));
1989        memset(mt12,0,2*6*sizeof(Float_t));
1990        memset(mt21,0,2*2*sizeof(Float_t));
1991        memset(mt22,0,2*2*sizeof(Float_t));
1992        memset(mt31,0,2*3*sizeof(Float_t));
1993        memset(mt32,0,2*3*sizeof(Float_t));
1994        //
1995      Int_t S3 = 0;      Int_t S3 = 0;
1996      Int_t S2 = 0;      Int_t S2 = 0;
1997      Int_t S12 = 0;      Int_t S12 = 0;
# Line 5198  void FEVdetector::ShowTRK(Bool_t upd){ Line 5247  void FEVdetector::ShowTRK(Bool_t upd){
5247              trkpad[planepad]->Range(-8.1,0.,8.1,8.);              trkpad[planepad]->Range(-8.1,0.,8.1,8.);
5248              //              //
5249              x = track->xm[plane];              x = track->xm[plane];
5250              Float_t xsig = track->dedx_x[plane];              Float_t xsig = fabs(track->dedx_x[plane]);
5251              if ( track->XGood(plane) ){              if ( track->XGood(plane) ){
5252                //if ( x > -100 ){                //if ( x > -100 ){
5253                if ( xsig > 8. ) xsig = 8.;                if ( xsig > 8. ) xsig = 8.;
# Line 5207  void FEVdetector::ShowTRK(Bool_t upd){ Line 5256  void FEVdetector::ShowTRK(Bool_t upd){
5256                } else {                } else {
5257                  sigcol2 = 1;                  sigcol2 = 1;
5258                };                };
5259                ColorTRKMIP(track->dedx_x[plane],sigcol2,0);                ColorTRKMIP(fabs(track->dedx_x[plane]),sigcol2,0);
5260                linea = new TLine(x,0.01,x,xsig);                linea = new TLine(x,0.01,x,xsig);
5261                linea->SetLineWidth(2);                linea->SetLineWidth(2);
5262                linea->SetLineColor(sigcol2);                linea->SetLineColor(sigcol2);
# Line 5228  void FEVdetector::ShowTRK(Bool_t upd){ Line 5277  void FEVdetector::ShowTRK(Bool_t upd){
5277              trkpad[planepad]->cd();              trkpad[planepad]->cd();
5278              trkpad[planepad]->Range(-7.05,0.,7.05,8.);              trkpad[planepad]->Range(-7.05,0.,7.05,8.);
5279              x = -track->ym[plane];              x = -track->ym[plane];
5280              xsig = track->dedx_y[plane];              xsig = fabs(track->dedx_y[plane]);
5281              if ( track->YGood(plane) ){              if ( track->YGood(plane) ){
5282                //            if ( x > -100 ){                //            if ( x > -100 ){
5283                if ( xsig > 8. ) xsig = 8.;                if ( xsig > 8. ) xsig = 8.;
# Line 5237  void FEVdetector::ShowTRK(Bool_t upd){ Line 5286  void FEVdetector::ShowTRK(Bool_t upd){
5286                } else {                } else {
5287                  sigcol2 = 1;                  sigcol2 = 1;
5288                };                };
5289                ColorTRKMIP(track->dedx_y[plane],sigcol2,0);                ColorTRKMIP(fabs(track->dedx_y[plane]),sigcol2,0);
5290                linea = new TLine(x,0.01,x,xsig);                linea = new TLine(x,0.01,x,xsig);
5291                linea->SetLineWidth(2);                linea->SetLineWidth(2);
5292                linea->SetLineColor(sigcol2);                linea->SetLineColor(sigcol2);
# Line 5290  void FEVdetector::ShowTRK(Bool_t upd){ Line 5339  void FEVdetector::ShowTRK(Bool_t upd){
5339              //              //
5340              x = track->xm[plane];              x = track->xm[plane];
5341              Float_t y = -track->ym[plane];              Float_t y = -track->ym[plane];
5342              Float_t xsig = track->dedx_x[plane];              Float_t xsig = fabs(track->dedx_x[plane]);
5343              Float_t ysig = track->dedx_y[plane];              Float_t ysig = fabs(track->dedx_y[plane]);
5344              //    if ( x > -100 && y > -100. ){              //    if ( x > -100 && y > -100. ){
5345              if ( track->XGood(plane) && track->YGood(plane) ){              if ( track->XGood(plane) && track->YGood(plane) ){
5346                if ( var.bw ){                if ( var.bw ){
# Line 5756  void FEVdetector::ShowTrack(){ Line 5805  void FEVdetector::ShowTrack(){
5805        //        //
5806        Trajectory *tr = new Trajectory(npoint,zin);                                      Trajectory *tr = new Trajectory(npoint,zin);                              
5807        //        //
5808        ifail = track->DoTrack2(tr);        //      ifail = track->DoTrack2(tr);
5809          ifail = track->DoTrack(tr);
5810        //        //
5811        if ( !ifail ){        if ( !ifail ){
5812          for ( Int_t e = 0; e < npoint ; e++) {          for ( Int_t e = 0; e < npoint ; e++) {
# Line 6332  void FEVdetector::ShowCalo(Bool_t upd){ Line 6382  void FEVdetector::ShowCalo(Bool_t upd){
6382        Int_t l;        Int_t l;
6383        Int_t m;        Int_t m;
6384        Int_t n;        Int_t n;
6385        Float_t mip = L2->GetCaloLevel1()->DecodeEstrip(ii,l,m,n);        Bool_t satura = false;
6386          Float_t mip = L2->GetCaloLevel1()->DecodeEstrip(ii,l,m,n,satura);
6387        if ( var.bw ){        if ( var.bw ){
6388          colo = -1;          colo = -1;
6389        } else {        } else {
6390          colo = 1;          colo = 1;
6391        };        };      
6392        ColorMIP(mip,colo);        ColorMIP(mip,colo);
6393        if ( l == 0 ) {        if ( l == 0 ) {
6394          xvev.str("");          xvev.str("");
# Line 6346  void FEVdetector::ShowCalo(Bool_t upd){ Line 6397  void FEVdetector::ShowCalo(Bool_t upd){
6397          xvev << " " << l;          xvev << " " << l;
6398          gDirectory->Delete(xvev.str().c_str());          gDirectory->Delete(xvev.str().c_str());
6399          TH2F *Xview = new TH2F(xvev.str().c_str(),"",96,-0.5,95.5,22,-0.5,21.5);          TH2F *Xview = new TH2F(xvev.str().c_str(),"",96,-0.5,95.5,22,-0.5,21.5);
6400          Xview->SetFillColor(colo);          if ( satura ){
6401              Xview->SetFillColor(kBlack);
6402            } else {
6403              Xview->SetFillColor(colo);
6404            };
6405          Xview->Fill(n,21-m,1.);          Xview->Fill(n,21-m,1.);
6406          pd1->cd();                                            pd1->cd();                                  
6407          Xview->Draw("box same");          Xview->Draw("box same");
# Line 6358  void FEVdetector::ShowCalo(Bool_t upd){ Line 6413  void FEVdetector::ShowCalo(Bool_t upd){
6413          yvev << " " << l;          yvev << " " << l;
6414          gDirectory->Delete(yvev.str().c_str());          gDirectory->Delete(yvev.str().c_str());
6415          TH2F *Yview = new TH2F(yvev.str().c_str(),"",96,-0.5,95.5,22,-0.5,21.5);                            TH2F *Yview = new TH2F(yvev.str().c_str(),"",96,-0.5,95.5,22,-0.5,21.5);                  
6416          Yview->SetFillColor(colo);          if ( satura ){
6417              Yview->SetFillColor(kBlack);
6418            } else {
6419              Yview->SetFillColor(colo);
6420            };
6421          Yview->Fill(96-n,21-m,1.);          Yview->Fill(96-n,21-m,1.);
6422          pd2->cd();          pd2->cd();
6423          Yview->Draw("box same");          Yview->Draw("box same");

Legend:
Removed from v.1.25  
changed lines
  Added in v.1.29

  ViewVC Help
Powered by ViewVC 1.1.23