/[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.30 by mocchiut, Fri Oct 2 11:12:41 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 2727  void FEVdetector::ShowTOF(){ Line 2776  void FEVdetector::ShowTOF(){
2776    //    //
2777    Bool_t repeat = true;    Bool_t repeat = true;
2778    Int_t numtr = 1;    Int_t numtr = 1;
2779  //  Int_t numtr = 0;    //Int_t numtr = 0;
2780    Int_t repuntil = 0;    Int_t repuntil = 0;
2781      Int_t repuntiltr = 0;
2782    //      //  
2783    //    //
2784    var.tofraw = 0;    var.tofraw = 0;
2785    //    //
2786    if ( level.file == 2 ) repuntil = L2->GetToFLevel2()->ntrk();        if ( level.file == 2 ) repuntil = L2->GetToFLevel2()->ntrk();    
2787    //  printf("repuntil = %i \n",repuntil);    //  printf("repuntil = %i \n",repuntil);
2788    //if ( level.file == 2 ) repuntil = L2->GetTrkLevel2()->GetNTracks();        if ( level.file == 2 ) repuntiltr = L2->GetTrkLevel2()->GetNTracks();    
2789    //repuntil = L2->GetNTracks();        //  repuntiltr = L2->GetNTracks();    
2790    //    //
2791    while ( repeat ){    while ( repeat ){
2792      //    printf("B repuntil = %i \n",repuntil);      //    printf("B repuntil = %i \n",repuntil);
# Line 2745  void FEVdetector::ShowTOF(){ Line 2795  void FEVdetector::ShowTOF(){
2795        //        //
2796        //        //
2797        ToFTrkVar *ptt = 0;        ToFTrkVar *ptt = 0;
2798  //      PamTrack *ptrack = 0;        PamTrack *ptrack = 0;
2799        Float_t adc[4][12];        Float_t adc[4][12];
2800        Float_t tdc[4][12];        Float_t tdc[4][12];
2801        memset(adc,0,4*12*sizeof(Float_t));        memset(adc,0,4*12*sizeof(Float_t));
# Line 2760  void FEVdetector::ShowTOF(){ Line 2810  void FEVdetector::ShowTOF(){
2810        } else {        } else {
2811          //          //
2812          //          //
2813          if ( numtr >= repuntil-1 ) repeat = false;          if ( numtr >= (repuntiltr+1-1) ) repeat = false;
2814          //          //
2815          //      printf(" numtr is %i \n",numtr);          //      printf(" numtr is %i \n",numtr);
2816          ptt = L2->GetToFLevel2()->GetToFTrkVar(numtr);            // ptt = L2->GetToFLevel2()->GetToFTrkVar(numtr);      
2817          //ptrack = L2->GetTrack(numtr);          ptrack = L2->GetTrack(numtr);
2818          //ptt = ptrack->GetToFTrack();          ptt = ptrack->GetToFTrack();
2819        };        };
2820        //        //
2821        xp11[0] = 0.;        xp11[0] = 0.;
# Line 5198  void FEVdetector::ShowTRK(Bool_t upd){ Line 5248  void FEVdetector::ShowTRK(Bool_t upd){
5248              trkpad[planepad]->Range(-8.1,0.,8.1,8.);              trkpad[planepad]->Range(-8.1,0.,8.1,8.);
5249              //              //
5250              x = track->xm[plane];              x = track->xm[plane];
5251              Float_t xsig = track->dedx_x[plane];              Float_t xsig = fabs(track->dedx_x[plane]);
5252              if ( track->XGood(plane) ){              if ( track->XGood(plane) ){
5253                //if ( x > -100 ){                //if ( x > -100 ){
5254                if ( xsig > 8. ) xsig = 8.;                if ( xsig > 8. ) xsig = 8.;
# Line 5207  void FEVdetector::ShowTRK(Bool_t upd){ Line 5257  void FEVdetector::ShowTRK(Bool_t upd){
5257                } else {                } else {
5258                  sigcol2 = 1;                  sigcol2 = 1;
5259                };                };
5260                ColorTRKMIP(track->dedx_x[plane],sigcol2,0);                ColorTRKMIP(fabs(track->dedx_x[plane]),sigcol2,0);
5261                linea = new TLine(x,0.01,x,xsig);                linea = new TLine(x,0.01,x,xsig);
5262                linea->SetLineWidth(2);                linea->SetLineWidth(2);
5263                linea->SetLineColor(sigcol2);                linea->SetLineColor(sigcol2);
# Line 5228  void FEVdetector::ShowTRK(Bool_t upd){ Line 5278  void FEVdetector::ShowTRK(Bool_t upd){
5278              trkpad[planepad]->cd();              trkpad[planepad]->cd();
5279              trkpad[planepad]->Range(-7.05,0.,7.05,8.);              trkpad[planepad]->Range(-7.05,0.,7.05,8.);
5280              x = -track->ym[plane];              x = -track->ym[plane];
5281              xsig = track->dedx_y[plane];              xsig = fabs(track->dedx_y[plane]);
5282              if ( track->YGood(plane) ){              if ( track->YGood(plane) ){
5283                //            if ( x > -100 ){                //            if ( x > -100 ){
5284                if ( xsig > 8. ) xsig = 8.;                if ( xsig > 8. ) xsig = 8.;
# Line 5237  void FEVdetector::ShowTRK(Bool_t upd){ Line 5287  void FEVdetector::ShowTRK(Bool_t upd){
5287                } else {                } else {
5288                  sigcol2 = 1;                  sigcol2 = 1;
5289                };                };
5290                ColorTRKMIP(track->dedx_y[plane],sigcol2,0);                ColorTRKMIP(fabs(track->dedx_y[plane]),sigcol2,0);
5291                linea = new TLine(x,0.01,x,xsig);                linea = new TLine(x,0.01,x,xsig);
5292                linea->SetLineWidth(2);                linea->SetLineWidth(2);
5293                linea->SetLineColor(sigcol2);                linea->SetLineColor(sigcol2);
# Line 5290  void FEVdetector::ShowTRK(Bool_t upd){ Line 5340  void FEVdetector::ShowTRK(Bool_t upd){
5340              //              //
5341              x = track->xm[plane];              x = track->xm[plane];
5342              Float_t y = -track->ym[plane];              Float_t y = -track->ym[plane];
5343              Float_t xsig = track->dedx_x[plane];              Float_t xsig = fabs(track->dedx_x[plane]);
5344              Float_t ysig = track->dedx_y[plane];              Float_t ysig = fabs(track->dedx_y[plane]);
5345              //    if ( x > -100 && y > -100. ){              //    if ( x > -100 && y > -100. ){
5346              if ( track->XGood(plane) && track->YGood(plane) ){              if ( track->XGood(plane) && track->YGood(plane) ){
5347                if ( var.bw ){                if ( var.bw ){
# Line 5756  void FEVdetector::ShowTrack(){ Line 5806  void FEVdetector::ShowTrack(){
5806        //        //
5807        Trajectory *tr = new Trajectory(npoint,zin);                                      Trajectory *tr = new Trajectory(npoint,zin);                              
5808        //        //
5809        ifail = track->DoTrack2(tr);        //      ifail = track->DoTrack2(tr);
5810          ifail = track->DoTrack(tr);
5811        //        //
5812        if ( !ifail ){        if ( !ifail ){
5813          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 6383  void FEVdetector::ShowCalo(Bool_t upd){
6383        Int_t l;        Int_t l;
6384        Int_t m;        Int_t m;
6385        Int_t n;        Int_t n;
6386        Float_t mip = L2->GetCaloLevel1()->DecodeEstrip(ii,l,m,n);        Bool_t satura = false;
6387          Float_t mip = L2->GetCaloLevel1()->DecodeEstrip(ii,l,m,n,satura);
6388        if ( var.bw ){        if ( var.bw ){
6389          colo = -1;          colo = -1;
6390        } else {        } else {
6391          colo = 1;          colo = 1;
6392        };        };      
6393        ColorMIP(mip,colo);        ColorMIP(mip,colo);
6394        if ( l == 0 ) {        if ( l == 0 ) {
6395          xvev.str("");          xvev.str("");
# Line 6346  void FEVdetector::ShowCalo(Bool_t upd){ Line 6398  void FEVdetector::ShowCalo(Bool_t upd){
6398          xvev << " " << l;          xvev << " " << l;
6399          gDirectory->Delete(xvev.str().c_str());          gDirectory->Delete(xvev.str().c_str());
6400          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);
6401          Xview->SetFillColor(colo);          if ( satura ){
6402              Xview->SetFillColor(kBlack);
6403            } else {
6404              Xview->SetFillColor(colo);
6405            };
6406          Xview->Fill(n,21-m,1.);          Xview->Fill(n,21-m,1.);
6407          pd1->cd();                                            pd1->cd();                                  
6408          Xview->Draw("box same");          Xview->Draw("box same");
# Line 6358  void FEVdetector::ShowCalo(Bool_t upd){ Line 6414  void FEVdetector::ShowCalo(Bool_t upd){
6414          yvev << " " << l;          yvev << " " << l;
6415          gDirectory->Delete(yvev.str().c_str());          gDirectory->Delete(yvev.str().c_str());
6416          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);                  
6417          Yview->SetFillColor(colo);          if ( satura ){
6418              Yview->SetFillColor(kBlack);
6419            } else {
6420              Yview->SetFillColor(colo);
6421            };
6422          Yview->Fill(96-n,21-m,1.);          Yview->Fill(96-n,21-m,1.);
6423          pd2->cd();          pd2->cd();
6424          Yview->Draw("box same");          Yview->Draw("box same");

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

  ViewVC Help
Powered by ViewVC 1.1.23