/[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.37 by mocchiut, Thu Jan 16 15:52:35 2014 UTC
# Line 72  char* operator+( std::streampos&, char* Line 72  char* operator+( std::streampos&, char*
72  #include <color.h>  #include <color.h>
73  //  //
74  extern Bool_t existfile(TString);  extern Bool_t existfile(TString);
75    extern Bool_t NODB;
76  //  //
77    
78  using namespace std;  using namespace std;
# Line 97  FEVdetector::FEVdetector(TString filenam Line 98  FEVdetector::FEVdetector(TString filenam
98    var.showac = false;    var.showac = false;
99  }  }
100    
101    void FEVdetector::Reset(){
102      L2 = NULL;
103    }
104    
105  void FEVdetector::checkctrlword(){  void FEVdetector::checkctrlword(){
106    var.SHOWDEC = 0;    var.SHOWDEC = 0;
107    var.TOF = 0;    var.TOF = 0;
# Line 112  void FEVdetector::checkctrlword(){ Line 117  void FEVdetector::checkctrlword(){
117    var.INFOS = 0;    var.INFOS = 0;
118    var.VINFOS = 0;    var.VINFOS = 0;
119    var.PALETTE = 0;    var.PALETTE = 0;
120      var.PATTRIG = 1;
121    if ( *ctrlword & (1<<0) ) {    if ( *ctrlword & (1<<0) ) {
122      var.PALETTE = 1;      var.PALETTE = 1;
123    };    };
# Line 139  void FEVdetector::checkctrlword(){ Line 145  void FEVdetector::checkctrlword(){
145    if ( *ctrlword & (1<<8) ) {    if ( *ctrlword & (1<<8) ) {
146      var.TOF = 1;      var.TOF = 1;
147    };    };
148      if ( *ctrlword & (1<<9) ) {
149        var.PATTRIG = 1;
150      };
151  }  }
152    
153  void FEVdetector::SetDDEC(TString de){  void FEVdetector::SetDDEC(TString de){
# Line 206  void FEVdetector::ClearVariables(){ Line 215  void FEVdetector::ClearVariables(){
215  void FEVdetector::GetEntry(Int_t i){  void FEVdetector::GetEntry(Int_t i){
216    thisentry = i;      thisentry = i;  
217    if ( level.file == 2 ){    if ( level.file == 2 ){
218      L2->Clear();      //    L2->Clear();
219      //    printf("qui\n");      //    printf("qui\n");
220      L2->GetEntry(i);      L2->GetEntry(i);
221      if ( var.showall ){      if ( var.showall ){
# Line 394  void FEVdetector::ShowInfo(TString detec Line 403  void FEVdetector::ShowInfo(TString detec
403    Int_t dlen = 10;    Int_t dlen = 10;
404    //    //
405    char o[200000];    char o[200000];
406      char zz[200000];
407    char col[13];    char col[13];
408    char col2[13];    char col2[13];
409    //    //
410    setcolor(col,RESET, GREEN, WHITE);    setcolor(col,RESET, GREEN, WHITE);
411    sprintf(o,"%s======> EVENT:%i\n",col, thisentry);    sprintf(o,"%s======> EVENT:%i\n",col, thisentry);
412      sprintf(zz,"======> EVENT:%i\n", thisentry);
413    //    //
414    setcolor(col,RESET, RED, WHITE);    setcolor(col,RESET, RED, WHITE);
415    sprintf(o,"%s%sBranch %s\n",o,col,b1->GetName());    sprintf(o,"%s%sBranch %s\n",o,col,b1->GetName());
416      sprintf(zz,"%sBranch %s\n",zz,b1->GetName());
417    setcolor(col,RESET, BLACK, WHITE);    setcolor(col,RESET, BLACK, WHITE);
418    sprintf(o,"%s%s",o,col);    sprintf(o,"%s%s",o,col);
419    //    //
# Line 429  void FEVdetector::ShowInfo(TString detec Line 441  void FEVdetector::ShowInfo(TString detec
441        setcolor(col,RESET, BLUE, WHITE);        setcolor(col,RESET, BLUE, WHITE);
442        setcolor(col2,RESET, BLACK, WHITE);        setcolor(col2,RESET, BLACK, WHITE);
443        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);
444          sprintf(zz,"%s %-15s =",zz,((TBranch*)branch_array->At(l))->GetName());
445        //        //
446        j = 0;        j = 0;
447        //        //
# Line 441  void FEVdetector::ShowInfo(TString detec Line 454  void FEVdetector::ShowInfo(TString detec
454          while ( j < length ){          while ( j < length ){
455            if ( j < length -1 ){            if ( j < length -1 ){
456              sprintf(o,"%s %i ,",o,(Int_t)tb->GetValue(j,0));              sprintf(o,"%s %i ,",o,(Int_t)tb->GetValue(j,0));
457                sprintf(zz,"%s %i ,",zz,(Int_t)tb->GetValue(j,0));
458            } else {            } else {
459              sprintf(o,"%s %i",o,(Int_t)tb->GetValue(j,0));              sprintf(o,"%s %i",o,(Int_t)tb->GetValue(j,0));
460                sprintf(zz,"%s %i",zz,(Int_t)tb->GetValue(j,0));
461            };            };
462            j++;            j++;
463          };          };
# Line 454  void FEVdetector::ShowInfo(TString detec Line 469  void FEVdetector::ShowInfo(TString detec
469          while ( j < length ){          while ( j < length ){
470            if ( j < length -1 ){            if ( j < length -1 ){
471              sprintf(o,"%s %u ,",o,(UInt_t)tb->GetValue(j,0));              sprintf(o,"%s %u ,",o,(UInt_t)tb->GetValue(j,0));
472                sprintf(zz,"%s %u ,",zz,(UInt_t)tb->GetValue(j,0));
473            } else {            } else {
474              sprintf(o,"%s %u",o,(UInt_t)tb->GetValue(j,0));              sprintf(o,"%s %u",o,(UInt_t)tb->GetValue(j,0));
475                sprintf(zz,"%s %u",zz,(UInt_t)tb->GetValue(j,0));
476            };            };
477            j++;            j++;
478          };          };
# Line 467  void FEVdetector::ShowInfo(TString detec Line 484  void FEVdetector::ShowInfo(TString detec
484          while ( j < length ){          while ( j < length ){
485            if ( j < length -1 ){            if ( j < length -1 ){
486              sprintf(o,"%s %f ,",o,tb->GetValue(j,0));              sprintf(o,"%s %f ,",o,tb->GetValue(j,0));
487                sprintf(zz,"%s %f ,",zz,tb->GetValue(j,0));
488            } else {            } else {
489              sprintf(o,"%s %f",o,tb->GetValue(j,0));              sprintf(o,"%s %f",o,tb->GetValue(j,0));
490                sprintf(zz,"%s %f",zz,tb->GetValue(j,0));
491            };            };
492            j++;            j++;
493          };          };
# Line 503  void FEVdetector::ShowInfo(TString detec Line 522  void FEVdetector::ShowInfo(TString detec
522  //        printf("ciao %s \n",pr->Data());  //        printf("ciao %s \n",pr->Data());
523  //      };  //      };
524          sprintf(o,"%s TString - not implemented yet -",o);          sprintf(o,"%s TString - not implemented yet -",o);
525            sprintf(zz,"%s TString - not implemented yet -",zz);
526        };        };
527        //        //
528        // TArray        // TArray
# Line 603  void FEVdetector::ShowInfo(TString detec Line 623  void FEVdetector::ShowInfo(TString detec
623  //      sprintf(o,"%s\n",o);  //      sprintf(o,"%s\n",o);
624          //                //      
625          sprintf(o,"%s TArray - not implemented yet -",o);          sprintf(o,"%s TArray - not implemented yet -",o);
626            sprintf(zz,"%s TArray - not implemented yet -",zz);
627          //          //
628        };        };
629        //        //
630        sprintf(o,"%s\n",o);        sprintf(o,"%s\n",o);
631          sprintf(zz,"%s\n",zz);
632        break;        break;
633      case 3:      case 3:
634        //        //
# Line 615  void FEVdetector::ShowInfo(TString detec Line 637  void FEVdetector::ShowInfo(TString detec
637        setcolor(col,RESET, BLUE, WHITE);        setcolor(col,RESET, BLUE, WHITE);
638        setcolor(col2,RESET, BLACK, WHITE);        setcolor(col2,RESET, BLACK, WHITE);
639        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());
640          sprintf(zz,"%s %-15s = %d\n",zz,tb->GetName(), tb->GetNdata());
641    
642        //        //
643        if ( tb->GetNdata() ){        if ( tb->GetNdata() ){
# Line 665  void FEVdetector::ShowInfo(TString detec Line 688  void FEVdetector::ShowInfo(TString detec
688                  setcolor(col,RESET, BLUE, WHITE);                  setcolor(col,RESET, BLUE, WHITE);
689                  setcolor(col2,RESET, BLACK, WHITE);                  setcolor(col2,RESET, BLACK, WHITE);
690                  sprintf(o,"%s%s %-15s%s = ",o,col,foglia->GetName(),col2);                  sprintf(o,"%s%s %-15s%s = ",o,col,foglia->GetName(),col2);
691                    sprintf(zz,"%s %-15s = ",zz,foglia->GetName());
692                  while ( j < cl->GetEntriesFast() ){                  while ( j < cl->GetEntriesFast() ){
693                    if ( j < cl->GetEntriesFast() -1 ){                    if ( j < cl->GetEntriesFast() -1 ){
694                      sprintf(o,"%s %i ,",o,(Int_t)stb->GetValue(j,slength));                      sprintf(o,"%s %i ,",o,(Int_t)stb->GetValue(j,slength));
695                        sprintf(zz,"%s %i ,",zz,(Int_t)stb->GetValue(j,slength));
696                    } else {                    } else {
697                      sprintf(o,"%s %i",o,(Int_t)stb->GetValue(j,slength));                      sprintf(o,"%s %i",o,(Int_t)stb->GetValue(j,slength));
698                        sprintf(zz,"%s %i",zz,(Int_t)stb->GetValue(j,slength));
699                    };                    };
700                    j++;                    j++;
701                  };                  };
# Line 682  void FEVdetector::ShowInfo(TString detec Line 708  void FEVdetector::ShowInfo(TString detec
708                  setcolor(col,RESET, BLUE, WHITE);                  setcolor(col,RESET, BLUE, WHITE);
709                  setcolor(col2,RESET, BLACK, WHITE);                  setcolor(col2,RESET, BLACK, WHITE);
710                  sprintf(o,"%s%s %-15s%s = ",o,col,foglia->GetName(),col2);                  sprintf(o,"%s%s %-15s%s = ",o,col,foglia->GetName(),col2);
711                    sprintf(zz,"%s %-15s = ",zz,foglia->GetName());
712                  while ( j < cl->GetEntriesFast() ){                  while ( j < cl->GetEntriesFast() ){
713                    if ( j < cl->GetEntriesFast() -1 ){                    if ( j < cl->GetEntriesFast() -1 ){
714                      sprintf(o,"%s %f ,",o,stb->GetValue(j,slength));                      sprintf(o,"%s %f ,",o,stb->GetValue(j,slength));
715                        sprintf(zz,"%s %f ,",zz,stb->GetValue(j,slength));
716                    } else {                    } else {
717                      sprintf(o,"%s %f",o,stb->GetValue(j,slength));                      sprintf(o,"%s %f",o,stb->GetValue(j,slength));
718                        sprintf(zz,"%s %f",zz,stb->GetValue(j,slength));
719                    };                    };
720                    j++;                    j++;
721                  };                  };
# Line 699  void FEVdetector::ShowInfo(TString detec Line 728  void FEVdetector::ShowInfo(TString detec
728                  setcolor(col,RESET, BLUE, WHITE);                  setcolor(col,RESET, BLUE, WHITE);
729                  setcolor(col2,RESET, BLACK, WHITE);                  setcolor(col2,RESET, BLACK, WHITE);
730                  sprintf(o,"%s%s %-15s%s = ",o,col,foglia->GetName(),col2);                  sprintf(o,"%s%s %-15s%s = ",o,col,foglia->GetName(),col2);
731                    sprintf(zz,"%s %-15s = ",zz,foglia->GetName());
732                  Bool_t bold = true;                  Bool_t bold = true;
733                  while ( j < tb->GetNdata() ){                  while ( j < tb->GetNdata() ){
734                    if ( bold ){                    if ( bold ){
# Line 712  void FEVdetector::ShowInfo(TString detec Line 742  void FEVdetector::ShowInfo(TString detec
742                    while ( jj < slength ){                                      while ( jj < slength ){                  
743                      if ( jj < slength-1 ){                      if ( jj < slength-1 ){
744                        sprintf(o,"%s %f ,",o,stb->GetValue(j,jj,true));                        sprintf(o,"%s %f ,",o,stb->GetValue(j,jj,true));
745                          sprintf(zz,"%s %f ,",zz,stb->GetValue(j,jj,true));
746                      } else {                      } else {
747                        sprintf(o,"%s %f",o,stb->GetValue(j,jj,true));                        sprintf(o,"%s %f",o,stb->GetValue(j,jj,true));
748                          sprintf(zz,"%s %f",zz,stb->GetValue(j,jj,true));
749                      };                      };
750                      jj++;                      jj++;
751                    };                    };
752                    if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o);                    if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o);
753                      if ( j < tb->GetNdata() -1 ) sprintf(zz,"%s ,",zz);
754                    if ( !bold ){                    if ( !bold ){
755                      bold = true;                      bold = true;
756                    } else {                    } else {
# Line 738  void FEVdetector::ShowInfo(TString detec Line 771  void FEVdetector::ShowInfo(TString detec
771                  setcolor(col,RESET, BLUE, WHITE);                  setcolor(col,RESET, BLUE, WHITE);
772                  setcolor(col2,RESET, BLACK, WHITE);                  setcolor(col2,RESET, BLACK, WHITE);
773                  sprintf(o,"%s%s %-15s%s = ",o,col,foglia->GetName(),col2);                  sprintf(o,"%s%s %-15s%s = ",o,col,foglia->GetName(),col2);
774                    sprintf(zz,"%s %-15s = ",zz,foglia->GetName());
775                  while ( j < tb->GetNdata() ){                  while ( j < tb->GetNdata() ){
776                    Int_t jj = 0;                    Int_t jj = 0;
777                    while ( jj < slength ){                    while ( jj < slength ){
778                      if ( jj < slength-1 ){                      if ( jj < slength-1 ){
779                        sprintf(o,"%s %i ,",o,(Int_t)stb->GetValue(j,jj,true));                        sprintf(o,"%s %i ,",o,(Int_t)stb->GetValue(j,jj,true));
780                          sprintf(zz,"%s %i ,",zz,(Int_t)stb->GetValue(j,jj,true));
781                      } else {                      } else {
782                        sprintf(o,"%s %i",o,(Int_t)stb->GetValue(j,jj,true));                        sprintf(o,"%s %i",o,(Int_t)stb->GetValue(j,jj,true));
783                          sprintf(zz,"%s %i",zz,(Int_t)stb->GetValue(j,jj,true));
784                      };                      };
785                      jj++;                      jj++;
786                    };                    };
787                    if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o);                    if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o);
788                      if ( j < tb->GetNdata() -1 ) sprintf(zz,"%s ,",zz);
789                    j++;                    j++;
790                  };                  };
791                };                };
# Line 781  void FEVdetector::ShowInfo(TString detec Line 818  void FEVdetector::ShowInfo(TString detec
818                    setcolor(col,RESET, BLUE, WHITE);                    setcolor(col,RESET, BLUE, WHITE);
819                    setcolor(col2,RESET, BLACK, WHITE);                    setcolor(col2,RESET, BLACK, WHITE);
820                    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);
821                      sprintf(zz,"%s %s[%i] = ",zz,foglia->GetName(),arr->GetSize());
822                    //                    //
823                    while ( j < tb->GetNdata() ){                    while ( j < tb->GetNdata() ){
824                      //                      //
# Line 791  void FEVdetector::ShowInfo(TString detec Line 829  void FEVdetector::ShowInfo(TString detec
829                      while ( jj < arlen ){                      while ( jj < arlen ){
830                        if ( jj < arlen-1 ){                        if ( jj < arlen-1 ){
831                          sprintf(o,"%s %i ,",o,arr->At(jj));                          sprintf(o,"%s %i ,",o,arr->At(jj));
832                            sprintf(zz,"%s %i ,",zz,arr->At(jj));
833                        } else {                        } else {
834                          sprintf(o,"%s %i",o,arr->At(jj));                          sprintf(o,"%s %i",o,arr->At(jj));
835                            sprintf(zz,"%s %i",zz,arr->At(jj));
836                        };                        };
837                        jj++;                        jj++;
838                      };                      };
839                      if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o);                      if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o);
840                        if ( j < tb->GetNdata() -1 ) sprintf(zz,"%s ,",zz);
841                      j++;                      j++;
842                    };                    };
843                  };                  };
# Line 814  void FEVdetector::ShowInfo(TString detec Line 855  void FEVdetector::ShowInfo(TString detec
855                    setcolor(col,RESET, BLUE, WHITE);                    setcolor(col,RESET, BLUE, WHITE);
856                    setcolor(col2,RESET, BLACK, WHITE);                    setcolor(col2,RESET, BLACK, WHITE);
857                    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);
858                      sprintf(zz,"%s %s[%i] = ",zz,foglia->GetName(),arr->GetSize());
859                    //                    //
860                    while ( j < tb->GetNdata() ){                    while ( j < tb->GetNdata() ){
861                      //                      //
# Line 824  void FEVdetector::ShowInfo(TString detec Line 866  void FEVdetector::ShowInfo(TString detec
866                      while ( jj < arlen ){                      while ( jj < arlen ){
867                        if ( jj < arlen-1 ){                        if ( jj < arlen-1 ){
868                          sprintf(o,"%s %f ,",o,arr->At(jj));                          sprintf(o,"%s %f ,",o,arr->At(jj));
869                            sprintf(zz,"%s %f ,",zz,arr->At(jj));
870                        } else {                        } else {
871                          sprintf(o,"%s %f",o,arr->At(jj));                          sprintf(o,"%s %f",o,arr->At(jj));
872                            sprintf(zz,"%s %f",zz,arr->At(jj));
873                        };                        };
874                        jj++;                        jj++;
875                      };                      };
876                      if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o);                      if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o);
877                        if ( j < tb->GetNdata() -1 ) sprintf(zz,"%s ,",zz);
878                      j++;                      j++;
879                    };                    };
880                  };                  };
881                };                };
882                sprintf(o,"%s\n",o);                sprintf(o,"%s\n",o);
883                  sprintf(zz,"%s\n",zz);
884                break;                        break;        
885              };              };
886            };            };
# Line 843  void FEVdetector::ShowInfo(TString detec Line 889  void FEVdetector::ShowInfo(TString detec
889        break;        break;
890      };      };
891    };      };  
   //  pamgui->DIALOG(0,o);  
892    printf("%s\n",o);    printf("%s\n",o);
893      pamgui->DIALOG(4,zz);
894  };  };
895    
896    
# Line 1016  int FEVdetector::SelectEvent(){ Line 1062  int FEVdetector::SelectEvent(){
1062        //        //
1063        if ( level.file == 2 ){        if ( level.file == 2 ){
1064          cintcom.str("");          cintcom.str("");
1065          cintcom << "PamLevel2 *L2 = (PamLevel2*)0x" << hex;          cintcom << "PamLevel2 *L2 = (PamLevel2*)" << hex; //con const e l2 funziona
1066          cintcom << L2;          cintcom << L2;
1067          gROOT->ProcessLine(cintcom.str().c_str());          gROOT->ProcessLine(cintcom.str().c_str());
1068            //      printf(" comando: %s \n",cintcom.str().c_str());
1069        } else {        } else {
1070          cintcom.str("");          cintcom.str("");
1071          cintcom << "TTree *otr = (TTree*)0x" << hex;          cintcom << "TTree *otr = (TTree*)" << hex;
1072          cintcom << otr;          cintcom << otr;
1073          gROOT->ProcessLine(cintcom.str().c_str());          gROOT->ProcessLine(cintcom.str().c_str());
1074          //          //
1075          cintcom.str("");          cintcom.str("");
1076          cintcom << "struct Variables &var = (struct Variables &)0x" << hex;          cintcom << "struct Variables &var = (struct Variables &)" << hex;
1077          cintcom << &var;          cintcom << &var;
1078          gROOT->ProcessLine(cintcom.str().c_str());          gROOT->ProcessLine(cintcom.str().c_str());
1079        };        };
# Line 1057  TChain* FEVdetector::Load(TString file){ Line 1104  TChain* FEVdetector::Load(TString file){
1104    //    //
1105    if ( level.file == 2 ){    if ( level.file == 2 ){
1106      //      //
1107      printf(" %s \n",ddec.Data());      //    printf(" %s \n",ddec.Data());
1108      if ( !L2 ){      if ( !L2 ){
1109        L2 = new PamLevel2("",file.Data(),ddec.Data());        L2 = new PamLevel2("",file.Data(),ddec.Data());
1110          if ( NODB ) L2->NoDBconnections();
1111        otr = L2->GetPamTree();        otr = L2->GetPamTree();
1112        printf(" l2 constructor\n");        //      printf(" l2 constructor\n");
1113        //      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);    
1114      } else {      } else {
1115        //        //
1116        printf(" l2 already exist \n");        //      printf(" l2 already exist \n");
1117        otr = L2->GetPamTree(gSystem->DirName(file.Data()),file.Data(),ddec.Data());        otr = L2->GetPamTree(gSystem->DirName(file.Data()),file.Data(),ddec.Data());
1118        L2->GetRunTree(gSystem->DirName(file.Data()),file.Data());        L2->GetRunTree(gSystem->DirName(file.Data()),file.Data());
1119        //        //
# Line 1216  TChain* FEVdetector::Load(TString file){ Line 1264  TChain* FEVdetector::Load(TString file){
1264    //        //    
1265  }  }
1266    
1267    bool bit(int decimal, char pos)
1268    {
1269      return( (decimal>>pos)%2 );
1270    }
1271    //
1272    // THE PATTERN TRIGGER
1273    //
1274    void FEVdetector::ShowTRG(){
1275      //
1276      if ( level.file != 2 ) return;
1277      //
1278      if ( !var.TRG ) return;
1279      //
1280      int S11[8];
1281      S11[0] = 0;
1282      S11[1] = 0;
1283      S11[2] = 0;
1284      S11[3] = 0;
1285      S11[4] = 0;
1286      S11[5] = 0;
1287      S11[6] = 0;
1288      S11[7] = 0;
1289    
1290      int S12[6];
1291      S12[0] = 0;
1292      S12[1] = 0;
1293      S12[2] = 0;
1294      S12[3] = 0;
1295      S12[4] = 0;
1296      S12[5] = 0;
1297    
1298      int S21[2];
1299      S21[0] = 0;
1300      S21[1] = 0;
1301    
1302      int S22[2];
1303      S22[0] = 0;
1304      S22[1] = 0;
1305    
1306      int S31[3];
1307      S31[0] = 0;
1308      S31[1] = 0;
1309      S31[2] = 0;
1310    
1311      int S32[3];
1312      S32[0] = 0;
1313      S32[1] = 0;
1314      S32[2] = 0;
1315    
1316      //S3
1317      if ( bit(L2->GetTrigLevel2()->patterntrig[2],0) ) S31[0]++;
1318      if ( bit(L2->GetTrigLevel2()->patterntrig[2],1) ) S31[1]++;
1319      if ( bit(L2->GetTrigLevel2()->patterntrig[2],2) ) S31[2]++;
1320      if ( bit(L2->GetTrigLevel2()->patterntrig[2],3) ) S31[0]++;
1321      if ( bit(L2->GetTrigLevel2()->patterntrig[2],4) ) S31[1]++;
1322      if ( bit(L2->GetTrigLevel2()->patterntrig[2],5) ) S31[2]++;
1323      if ( bit(L2->GetTrigLevel2()->patterntrig[2],6) ) S32[0]++;
1324      if ( bit(L2->GetTrigLevel2()->patterntrig[2],7) ) S32[1]++;
1325      if ( bit(L2->GetTrigLevel2()->patterntrig[2],8) ) S32[2]++;
1326      if ( bit(L2->GetTrigLevel2()->patterntrig[2],9) ) S32[0]++;
1327      if ( bit(L2->GetTrigLevel2()->patterntrig[2],10) ) S32[1]++;
1328      if ( bit(L2->GetTrigLevel2()->patterntrig[2],11) ) S32[2]++;
1329      //S2
1330      if ( bit(L2->GetTrigLevel2()->patterntrig[3],0) ) S21[0]++;
1331      if ( bit(L2->GetTrigLevel2()->patterntrig[3],1) ) S21[1]++;
1332      if ( bit(L2->GetTrigLevel2()->patterntrig[3],2) ) S21[0]++;
1333      if ( bit(L2->GetTrigLevel2()->patterntrig[3],3) ) S21[1]++;
1334      if ( bit(L2->GetTrigLevel2()->patterntrig[3],4) ) S22[0]++;
1335      if ( bit(L2->GetTrigLevel2()->patterntrig[3],5) ) S22[1]++;
1336      if ( bit(L2->GetTrigLevel2()->patterntrig[3],6) ) S22[0]++;
1337      if ( bit(L2->GetTrigLevel2()->patterntrig[3],7) ) S22[1]++;
1338      //S12
1339      if ( bit(L2->GetTrigLevel2()->patterntrig[4],0) ) S12[0]++;
1340      if ( bit(L2->GetTrigLevel2()->patterntrig[4],1) ) S12[1]++;
1341      if ( bit(L2->GetTrigLevel2()->patterntrig[4],2) ) S12[2]++;
1342      if ( bit(L2->GetTrigLevel2()->patterntrig[4],3) ) S12[3]++;
1343      if ( bit(L2->GetTrigLevel2()->patterntrig[4],4) ) S12[4]++;
1344      if ( bit(L2->GetTrigLevel2()->patterntrig[4],5) ) S12[5]++;
1345      if ( bit(L2->GetTrigLevel2()->patterntrig[4],6) ) S12[0]++;
1346      if ( bit(L2->GetTrigLevel2()->patterntrig[4],7) ) S12[1]++;
1347      if ( bit(L2->GetTrigLevel2()->patterntrig[4],8) ) S12[2]++;
1348      if ( bit(L2->GetTrigLevel2()->patterntrig[4],9) ) S12[3]++;
1349      if ( bit(L2->GetTrigLevel2()->patterntrig[4],10) ) S12[4]++;
1350      if ( bit(L2->GetTrigLevel2()->patterntrig[4],11) ) S12[5]++;
1351      //S11
1352      if ( bit(L2->GetTrigLevel2()->patterntrig[5],0) ) S11[0]++;
1353      if ( bit(L2->GetTrigLevel2()->patterntrig[5],1) ) S11[1]++;
1354      if ( bit(L2->GetTrigLevel2()->patterntrig[5],2) ) S11[2]++;
1355      if ( bit(L2->GetTrigLevel2()->patterntrig[5],3) ) S11[3]++;
1356      if ( bit(L2->GetTrigLevel2()->patterntrig[5],4) ) S11[4]++;
1357      if ( bit(L2->GetTrigLevel2()->patterntrig[5],5) ) S11[5]++;
1358      if ( bit(L2->GetTrigLevel2()->patterntrig[5],6) ) S11[6]++;
1359      if ( bit(L2->GetTrigLevel2()->patterntrig[5],7) ) S11[7]++;
1360      if ( bit(L2->GetTrigLevel2()->patterntrig[5],8) ) S11[0]++;
1361      if ( bit(L2->GetTrigLevel2()->patterntrig[5],9) ) S11[1]++;
1362      if ( bit(L2->GetTrigLevel2()->patterntrig[5],10) ) S11[2]++;
1363      if ( bit(L2->GetTrigLevel2()->patterntrig[5],11) ) S11[3]++;
1364      if ( bit(L2->GetTrigLevel2()->patterntrig[5],12) ) S11[4]++;
1365      if ( bit(L2->GetTrigLevel2()->patterntrig[5],13) ) S11[5]++;
1366      if ( bit(L2->GetTrigLevel2()->patterntrig[5],14) ) S11[6]++;
1367      if ( bit(L2->GetTrigLevel2()->patterntrig[5],15) ) S11[7]++;
1368    
1369    
1370      //
1371      Int_t rj = 0;
1372      Float_t xs2x = var.xxvc;
1373      Float_t ys2x = var.yxvc + 0.36*var.sfy;
1374      Float_t xs2y = var.xyvc;
1375      Float_t ys2y = var.yyvc + 0.36*var.sfy;
1376      Float_t ws2 = 0.005;
1377      Float_t ws13 = 0.007;
1378      Int_t noadc;
1379      if ( var.bw ){
1380        noadc=12;
1381      } else {
1382        noadc=kRed;
1383      };
1384      //
1385      // S11  X-view
1386      //
1387      Float_t s11p = 0.051;
1388      TPolyLine *ftrg11x[8];
1389      for ( Int_t j=0; j<8; j++){
1390        Float_t nxc1[5]={ (s11p*j),       (s11p*j),               s11p*(j+1),     s11p*(j+1), (s11p*j)};
1391        Float_t nyc1[5]={ 0.,                       ws13,     ws13,   0.,  0.};
1392        Float_t nxc[5];    
1393        Float_t nyc[5];
1394        for (Int_t i = 0; i<5 ; i++) {
1395          nxc[i]= xs2x + (-0.204+nxc1[i])*var.sfx;
1396          nyc[i] = ys2x + (0.295+nyc1[i])*var.sfy;
1397        };
1398        ftrg11x[j] = new TPolyLine(5,nxc,nyc);
1399        ftrg11x[j]->SetLineColor(noadc);
1400        ftrg11x[j]->SetLineWidth(S11[j]);
1401        if ( S11[j] )  ftrg11x[j]->Draw();
1402      };
1403      //
1404      // S12  Y-view
1405      //
1406      Float_t s12p = 0.055;
1407      TPolyLine *ftrg12y[6];
1408      rj = 6;
1409      for ( Int_t j=0; j<6; j++){
1410        rj--;
1411        Float_t nxc1[5]={ (s12p*j),       (s12p*j),               s12p*(j+1), s12p*(j+1),    (s12p*j)};
1412        Float_t nyc1[5]={      -ws13,     0.,  0., -ws13, -ws13};
1413        Float_t nxc[5];    
1414        Float_t nyc[5];
1415        for (Int_t i = 0; i<5 ; i++) {
1416          nxc[i]= xs2y + (-0.165+nxc1[i])*var.sfx;
1417          nyc[i] = ys2y + (0.295+nyc1[i])*var.sfy;
1418        };
1419        ftrg12y[j] = new TPolyLine(5,nxc,nyc);
1420        ftrg12y[j]->SetLineColor(noadc);
1421        ftrg12y[j]->SetLineWidth(S12[rj]);
1422        if ( S12[rj] ) ftrg12y[j]->Draw();
1423      };
1424    
1425      
1426      //
1427      // S21  Y-view
1428      //
1429      Float_t s21p = 0.075;
1430      TPolyLine *ftrg21y[2];
1431      rj=2;
1432      for ( Int_t j=0; j<2; j++){
1433        rj--;
1434        Float_t nxc1[5]={ s21p*(j-1),       s21p*(j-1),               s21p*j,s21p*j,     s21p*(j-1)};
1435        Float_t nyc1[5]={ 0.,                ws2,     ws2,  0.,  0.};
1436        Float_t nxc[5];    
1437        Float_t nyc[5];
1438        for (Int_t i = 0; i<5 ; i++) {
1439          nxc[i]= xs2y + nxc1[i]*var.sfx;
1440          nyc[i] = ys2y + nyc1[i]*var.sfy;
1441          //      printf(" TRG i %i x %f y %f \n",i,nxc[i],nyc[i]);
1442        };
1443        ftrg21y[j] = new TPolyLine(5,nxc,nyc);
1444        ftrg21y[j]->SetLineColor(noadc);
1445        ftrg21y[j]->SetLineWidth(S21[j]);
1446        if ( S21[j]) ftrg21y[j]->Draw();
1447      };
1448    
1449      //
1450      // S22  X-view
1451      //
1452      Float_t s22p = 0.090;
1453      TPolyLine *ftrg22x[2];
1454      for ( Int_t j=0; j<2; j++){
1455        Float_t nxc1[5]={ s22p*(j-1),       s22p*(j-1),               s22p*j, s22p*j,     s22p*(j-1)};
1456        Float_t nyc1[5]={                -ws2,   0., 0.,  -ws2,  -ws2};
1457        Float_t nxc[5];    
1458        Float_t nyc[5];
1459        for (Int_t i = 0; i<5 ; i++) {
1460          nxc[i]= xs2x + nxc1[i]*var.sfx;
1461          nyc[i] = ys2x + nyc1[i]*var.sfy;
1462        };
1463        ftrg22x[j] = new TPolyLine(5,nxc,nyc);
1464        ftrg22x[j]->SetLineColor(noadc);
1465        ftrg22x[j]->SetLineWidth(S22[j]);
1466        if ( S22[j] ) ftrg22x[j]->Draw();
1467      };
1468      //
1469      // S31  X-view
1470      //
1471      Float_t s31p = 0.060;
1472      TPolyLine *ftrg31x[3];
1473      for ( Int_t j=0; j<3; j++){
1474        Float_t nxc1[5]={ (s31p*j),       (s31p*j),               s31p*(j+1), s31p*(j+1),       (s31p*j)};
1475        Float_t nyc1[5]={ 0.,                       ws13,     ws13,    0.,    0.};
1476        Float_t nxc[5];    
1477        Float_t nyc[5];
1478        for (Int_t i = 0; i<5 ; i++) {
1479          nxc[i]= xs2x + (-0.090+nxc1[i])*var.sfx;
1480          nyc[i] = ys2x + (-0.488+nyc1[i])*var.sfy;
1481        };
1482        ftrg31x[j] = new TPolyLine(5,nxc,nyc);
1483        ftrg31x[j]->SetLineColor(noadc);
1484        ftrg31x[j]->SetLineWidth(S31[j]);
1485        if ( S31[j] ) ftrg31x[j]->Draw();
1486      };
1487    
1488      //
1489      // S32  Y-view
1490      //
1491      Float_t s32p = 0.050;
1492      TPolyLine *ftrg32y[3];
1493      rj = 3;
1494      for ( Int_t j=0; j<3; j++){
1495        rj--;
1496        Float_t nxc1[5]={ (s32p*j),       (s32p*j),               s32p*(j+1),s32p*(j+1),     (s32p*j)};
1497        Float_t nyc1[5]={     -ws13,     0.,    0., -ws13, -ws13};
1498        Float_t nxc[5];    
1499        Float_t nyc[5];
1500        for (Int_t i = 0; i<5 ; i++) {
1501          nxc[i]= xs2y + (-0.075+nxc1[i])*var.sfx;
1502          nyc[i] = ys2y + (-0.488+nyc1[i])*var.sfy;
1503        };
1504        ftrg32y[j] = new TPolyLine(5,nxc,nyc);
1505        ftrg32y[j]->SetLineColor(noadc);
1506        ftrg32y[j]->SetLineWidth(S32[rj]);
1507        if ( S32[rj] ) ftrg32y[j]->Draw();
1508      }
1509    }
1510    
1511  void FEVdetector::DisplayEvent(){  void FEVdetector::DisplayEvent(){
1512    TLatex *text=new TLatex();    TLatex *text=new TLatex();
1513    stringstream testo;    stringstream testo;
# Line 1231  void FEVdetector::DisplayEvent(){ Line 1523  void FEVdetector::DisplayEvent(){
1523    thefigure->cd();          thefigure->cd();      
1524    ShowTOF();    ShowTOF();
1525    //    //
1526      // show pattern trigger if the case
1527      //
1528      thefigure->cd();
1529      if ( var.PATTRIG ){
1530        ShowTRG();
1531        thefigure->Modified();
1532        thefigure->Update();
1533      }
1534      //
1535    // show anticounters    // show anticounters
1536    //    //
1537    thefigure->cd();          thefigure->cd();      
# Line 1327  void FEVdetector::DisplayEvent(){ Line 1628  void FEVdetector::DisplayEvent(){
1628      testo3 << "S4: ";// << setprecision(2);      testo3 << "S4: ";// << setprecision(2);
1629      testo3 << var.s4sig << " [MIP]   TOF: #beta = ";      testo3 << var.s4sig << " [MIP]   TOF: #beta = ";
1630      testo3 << setprecision(3) << var.beta[4];      testo3 << setprecision(3) << var.beta[4];
1631        if ( level.file == 2 ){
1632          testo3 << " SVL cutoff: ";
1633          testo3 << setprecision(3) << L2->GetOrbitalInfo()->GetCutoffSVL();//quiquiqui
1634        }
1635      text->DrawLatex(0.33,txthi,testo3.str().c_str());            text->DrawLatex(0.33,txthi,testo3.str().c_str());      
1636      txthi -= 0.03;      txthi -= 0.03;
1637      testo3.str("");      testo3.str("");
# Line 1943  void FEVdetector::ShowTOF(){ Line 2248  void FEVdetector::ShowTOF(){
2248      Float_t mt31[2][3];      Float_t mt31[2][3];
2249      Float_t mt32[2][3];      Float_t mt32[2][3];
2250      //      //
2251        memset(mt11,0,2*8*sizeof(Float_t));
2252        memset(mt12,0,2*6*sizeof(Float_t));
2253        memset(mt21,0,2*2*sizeof(Float_t));
2254        memset(mt22,0,2*2*sizeof(Float_t));
2255        memset(mt31,0,2*3*sizeof(Float_t));
2256        memset(mt32,0,2*3*sizeof(Float_t));
2257        //
2258      Int_t S3 = 0;      Int_t S3 = 0;
2259      Int_t S2 = 0;      Int_t S2 = 0;
2260      Int_t S12 = 0;      Int_t S12 = 0;
# Line 2726  void FEVdetector::ShowTOF(){ Line 3038  void FEVdetector::ShowTOF(){
3038    //    //
3039    //    //
3040    Bool_t repeat = true;    Bool_t repeat = true;
3041    Int_t numtr = 1;    //  Int_t numtr = 1;
3042  //  Int_t numtr = 0;    Int_t numtr = 0;
3043    Int_t repuntil = 0;    Int_t repuntil = 0;
3044      Int_t repuntiltr = 0;
3045    //      //  
3046    //    //
3047    var.tofraw = 0;    var.tofraw = 0;
3048    //    //
3049    if ( level.file == 2 ) repuntil = L2->GetToFLevel2()->ntrk();        if ( level.file == 2 ) repuntil = L2->GetToFLevel2()->ntrk();    
3050    //  printf("repuntil = %i \n",repuntil);    //  printf("repuntil = %i \n",repuntil);
3051    //if ( level.file == 2 ) repuntil = L2->GetTrkLevel2()->GetNTracks();        if ( level.file == 2 ) repuntiltr = L2->GetTrkLevel2()->GetNTracks();    
3052    //repuntil = L2->GetNTracks();        //  repuntiltr = L2->GetNTracks();    
3053    //    //
3054    while ( repeat ){    while ( repeat ){
3055      //    printf("B repuntil = %i \n",repuntil);      //    printf("B repuntil = %i \n",repuntil);
# Line 2745  void FEVdetector::ShowTOF(){ Line 3058  void FEVdetector::ShowTOF(){
3058        //        //
3059        //        //
3060        ToFTrkVar *ptt = 0;        ToFTrkVar *ptt = 0;
3061  //      PamTrack *ptrack = 0;        PamTrack *ptrack = 0;
3062        Float_t adc[4][12];        Float_t adc[4][12];
3063        Float_t tdc[4][12];        Float_t tdc[4][12];
3064        memset(adc,0,4*12*sizeof(Float_t));        memset(adc,0,4*12*sizeof(Float_t));
3065        memset(tdc,0,4*12*sizeof(Float_t));        memset(tdc,0,4*12*sizeof(Float_t));
3066        //              //      
3067        //        //
3068          Int_t myseq = 0;
3069        //      if ( repuntil == 0 || var.tofraw ){        //      if ( repuntil == 0 || var.tofraw ){
3070        if ( repuntil == 1 || var.tofraw ){        if ( repuntil == 1 || var.tofraw ){
3071          numtr = 0;          numtr = 0;
# Line 2759  void FEVdetector::ShowTOF(){ Line 3073  void FEVdetector::ShowTOF(){
3073          repeat = false;          repeat = false;
3074        } else {        } else {
3075          //          //
3076    //        printf(" deH_ \n");
3077          //          //
3078          if ( numtr >= repuntil-1 ) repeat = false;          if ( numtr == 0 ){
3079          //  //          printf(" ques \n");
3080          //      printf(" numtr is %i \n",numtr);            ptt = L2->GetToFLevel2()->GetToFTrkVar(0);
3081          ptt = L2->GetToFLevel2()->GetToFTrkVar(numtr);              myseq = 0;
3082          //ptrack = L2->GetTrack(numtr);  //          printf(" que \n");
3083          //ptt = ptrack->GetToFTrack();  
3084            } else {
3085              if ( numtr >= (repuntiltr-1) ) repeat = false;
3086              //
3087              printf(" numtr is %i \n",numtr);
3088              // ptt = L2->GetToFLevel2()->GetToFTrkVar(numtr);    
3089              ptrack = L2->GetTrack(numtr-1);
3090              ptt = ptrack->GetToFTrack();
3091              myseq = ptt->trkseqno + 1;
3092            };
3093        };        };
3094        //        //
3095        xp11[0] = 0.;        xp11[0] = 0.;
# Line 2779  void FEVdetector::ShowTOF(){ Line 3103  void FEVdetector::ShowTOF(){
3103        //        //
3104        ii = 2;        ii = 2;
3105        //        //
3106        Int_t myseq = ptt->trkseqno + 1;        //      Int_t myseq = ptt->trkseqno + 1;
3107          //
3108    //      printf(" qui \n");
3109        L2->GetToFLevel2()->GetMatrix(myseq,adc,tdc);        L2->GetToFLevel2()->GetMatrix(myseq,adc,tdc);
3110        //        //
3111        //      printf(" qua \n");  //      printf(" qua \n");
3112        //        //
3113        for ( Int_t i = 0; i<8; i++ ) {          //       for ( Int_t i = 0; i<8; i++ ) {  
3114          if ( adc[ch11a[i]][hb11a[i]] < 1000. ){        //        if ( adc[ch11a[i]][hb11a[i]] < 1000. ){
3115            ms11a[i] = adc[ch11a[i]][hb11a[i]];        //          ms11a[i] = adc[ch11a[i]][hb11a[i]];
3116          };              //        };      
3117          if ( adc[ch11b[i]][hb11b[i]] < 1000. ){        //        if ( adc[ch11b[i]][hb11b[i]] < 1000. ){
3118            ms11b[i] = adc[ch11b[i]][hb11b[i]];        //          ms11b[i] = adc[ch11b[i]][hb11b[i]];
3119          };        //        };
3120          //      xp11[i] = 0.;        //        xp11[i] = 0.;
3121        };        //    };
3122    
3123        Int_t nmtof = 0;        Int_t nmtof = 0;
3124        Float_t mtof = 0.;        Float_t mtof = 0.;
# Line 2909  void FEVdetector::ShowTOF(){ Line 3235  void FEVdetector::ShowTOF(){
3235        if ( level.file == -1 ){        if ( level.file == -1 ){
3236          ColorMIP(ms11a[j]+ms11b[j],colo);                ColorMIP(ms11a[j]+ms11b[j],colo);      
3237        } else {        } else {
3238          ColorTOFMIP(ms11a[j]+ms11b[j],colo);              ColorTOFMIP((ms11a[j]+ms11b[j])/2.,colo);      
3239        };        };
3240        //        //
3241        if ( colo != 10 ) ocolo = colo;        if ( colo != 10 ) ocolo = colo;
# Line 2954  void FEVdetector::ShowTOF(){ Line 3280  void FEVdetector::ShowTOF(){
3280          if ( higp > 0.164 ) higp = 0.164;          if ( higp > 0.164 ) higp = 0.164;
3281          if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp11[rj] != 0.))){          if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp11[rj] != 0.))){
3282            Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp};            Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp};
3283            Float_t nyc1[5]={ 0.0015,         0.0015,                ws13-0.0015,    ws13-0.0015,    0.0015};            Float_t nyc1[5]={ 0.0015,         0.0015,                (float)(ws13-0.0015),    (float)(ws13-0.0015),    0.0015};
3284            Float_t nxc[5];                Float_t nxc[5];    
3285            Float_t nyc[5];            Float_t nyc[5];
3286            for (Int_t i = 0; i<5 ; i++) {            for (Int_t i = 0; i<5 ; i++) {
# Line 2998  void FEVdetector::ShowTOF(){ Line 3324  void FEVdetector::ShowTOF(){
3324        if ( level.file == -1 ){        if ( level.file == -1 ){
3325          ColorMIP(ms12a[rj]+ms12b[rj],colo);          ColorMIP(ms12a[rj]+ms12b[rj],colo);
3326        } else {        } else {
3327          ColorTOFMIP(ms12a[rj]+ms12b[rj],colo);          ColorTOFMIP((ms12a[rj]+ms12b[rj])/2.,colo);
3328        };        };
3329        //        //
3330        if ( colo != 10 ) ocolo = colo;        if ( colo != 10 ) ocolo = colo;
# Line 3040  void FEVdetector::ShowTOF(){ Line 3366  void FEVdetector::ShowTOF(){
3366            if ( higp > 0.203 ) higp = 0.203;            if ( higp > 0.203 ) higp = 0.203;
3367            if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp12[j] != 0.))){            if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp12[j] != 0.))){
3368              Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp};              Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp};
3369              Float_t nyc1[5]={ -0.0015,         -0.0015,                -ws13+0.0015,    -ws13+0.0015,    -0.0015};              Float_t nyc1[5]={ -0.0015,         -0.0015,                (float)(-ws13+0.0015),    (float)(-ws13+0.0015),    -0.0015};
3370              Float_t nxc[5];                  Float_t nxc[5];    
3371              Float_t nyc[5];              Float_t nyc[5];
3372              for (Int_t i = 0; i<5 ; i++) {              for (Int_t i = 0; i<5 ; i++) {
# Line 3075  void FEVdetector::ShowTOF(){ Line 3401  void FEVdetector::ShowTOF(){
3401        for (Int_t i = 0; i<5 ; i++) {        for (Int_t i = 0; i<5 ; i++) {
3402          nxc[i]= xs2y + nxc1[i]*var.sfx;          nxc[i]= xs2y + nxc1[i]*var.sfx;
3403          nyc[i] = ys2y + nyc1[i]*var.sfy;          nyc[i] = ys2y + nyc1[i]*var.sfy;
3404            //        printf(" TOF i %i x %f y %f \n",i,nxc[i],nyc[i]);
3405        };        };
3406        ftof21y[j] = new TPolyLine(5,nxc,nyc);        ftof21y[j] = new TPolyLine(5,nxc,nyc);
3407        ftof21y[j]->SetLineColor(1);        ftof21y[j]->SetLineColor(1);
# Line 3086  void FEVdetector::ShowTOF(){ Line 3413  void FEVdetector::ShowTOF(){
3413        if ( level.file == -1 ){        if ( level.file == -1 ){
3414          ColorMIP(ms21a[rj]+ms21b[rj],colo);          ColorMIP(ms21a[rj]+ms21b[rj],colo);
3415        } else {        } else {
3416          ColorTOFMIP(ms21a[rj]+ms21b[rj],colo);          ColorTOFMIP((ms21a[rj]+ms21b[rj])/2.,colo);
3417        };        };
3418        //        //
3419        if ( colo != 10 ) ocolo = colo;        if ( colo != 10 ) ocolo = colo;
# Line 3128  void FEVdetector::ShowTOF(){ Line 3455  void FEVdetector::ShowTOF(){
3455            if ( higp > 0.089 ) higp = 0.089;            if ( higp > 0.089 ) higp = 0.089;
3456            if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp21[j] != 0.))){            if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp21[j] != 0.))){
3457              Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp};              Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp};
3458              Float_t nyc1[5]={ 0.0015,         0.0015,                ws2-0.0015,    ws2-0.0015,    0.};              Float_t nyc1[5]={ 0.0015,         0.0015,                (float)(ws2-0.0015),    (float)(ws2-0.0015),    0.};
3459              Float_t nxc[5];                  Float_t nxc[5];    
3460              Float_t nyc[5];              Float_t nyc[5];
3461              for (Int_t i = 0; i<5 ; i++) {              for (Int_t i = 0; i<5 ; i++) {
# Line 3172  void FEVdetector::ShowTOF(){ Line 3499  void FEVdetector::ShowTOF(){
3499        if ( level.file == -1 ){        if ( level.file == -1 ){
3500          ColorMIP(ms22a[j]+ms22b[j],colo);          ColorMIP(ms22a[j]+ms22b[j],colo);
3501        } else {        } else {
3502          ColorTOFMIP(ms22a[j]+ms22b[j],colo);          ColorTOFMIP((ms22a[j]+ms22b[j])/2.,colo);
3503        };        };
3504        //        //
3505        if ( colo != 10 ) ocolo = colo;        if ( colo != 10 ) ocolo = colo;
# Line 3219  void FEVdetector::ShowTOF(){ Line 3546  void FEVdetector::ShowTOF(){
3546            if ( higp > 0.074 ) higp = 0.074;            if ( higp > 0.074 ) higp = 0.074;
3547            if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp22[rj] != 0.))){            if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp22[rj] != 0.))){
3548              Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp};              Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp};
3549              Float_t nyc1[5]={ -0.0015,         -0.0015,                -ws2+0.0015,    -ws2+0.0015,    -0.0015};              Float_t nyc1[5]={ -0.0015,         -0.0015,                (float)(-ws2+0.0015),    (float)(-ws2+0.0015),    -0.0015};
3550              Float_t nxc[5];                  Float_t nxc[5];    
3551              Float_t nyc[5];              Float_t nyc[5];
3552              for (Int_t i = 0; i<5 ; i++) {              for (Int_t i = 0; i<5 ; i++) {
# Line 3263  void FEVdetector::ShowTOF(){ Line 3590  void FEVdetector::ShowTOF(){
3590        if ( level.file == -1 ){        if ( level.file == -1 ){
3591          ColorMIP(ms31a[j]+ms31b[j],colo);          ColorMIP(ms31a[j]+ms31b[j],colo);
3592        } else {        } else {
3593          ColorTOFMIP(ms31a[j]+ms31b[j],colo);          ColorTOFMIP((ms31a[j]+ms31b[j])/2.,colo);
3594        };        };
3595        //        //
3596        if ( colo != 10 ) ocolo = colo;        if ( colo != 10 ) ocolo = colo;
# Line 3310  void FEVdetector::ShowTOF(){ Line 3637  void FEVdetector::ShowTOF(){
3637            if ( higp > 0.074 ) higp = 0.074;            if ( higp > 0.074 ) higp = 0.074;
3638            if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp31[rj] != 0.))){            if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp31[rj] != 0.))){
3639              Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp};              Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp};
3640              Float_t nyc1[5]={ 0.0015,         0.0015,                ws13-0.0015,    ws13-0.0015,    0.0015};              Float_t nyc1[5]={ 0.0015,         0.0015,                (float)(ws13-0.0015),    (float)(ws13-0.0015),    0.0015};
3641              Float_t nxc[5];                  Float_t nxc[5];    
3642              Float_t nyc[5];              Float_t nyc[5];
3643              for (Int_t i = 0; i<5 ; i++) {              for (Int_t i = 0; i<5 ; i++) {
# Line 3356  void FEVdetector::ShowTOF(){ Line 3683  void FEVdetector::ShowTOF(){
3683        if ( level.file == -1 ){        if ( level.file == -1 ){
3684          ColorMIP(ms32a[rj]+ms32b[rj],colo);          ColorMIP(ms32a[rj]+ms32b[rj],colo);
3685        } else {        } else {
3686          ColorTOFMIP(ms32a[rj]+ms32b[rj],colo);          ColorTOFMIP((ms32a[rj]+ms32b[rj])/2.,colo);
3687        };        };
3688        //        //
3689        if ( colo != 10 ) ocolo = colo;        if ( colo != 10 ) ocolo = colo;
# Line 3398  void FEVdetector::ShowTOF(){ Line 3725  void FEVdetector::ShowTOF(){
3725            if ( higp > 0.089 ) higp = 0.089;            if ( higp > 0.089 ) higp = 0.089;
3726            if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp32[j] != 0.))){            if ( lowp < higp && ( level.file == -1 || (level.file == 2 && xp32[j] != 0.))){
3727              Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp};              Float_t nxc1[5]={ lowp, higp, higp, lowp, lowp};
3728              Float_t nyc1[5]={ -0.0015,         -0.0015,                -ws13+0.0015,    -ws13+0.0015,    -0.0015};              Float_t nyc1[5]={ -0.0015,         -0.0015,                (float)(-ws13+0.0015),    (float)(-ws13+0.0015),    -0.0015};
3729              Float_t nxc[5];                  Float_t nxc[5];    
3730              Float_t nyc[5];              Float_t nyc[5];
3731              for (Int_t i = 0; i<5 ; i++) {              for (Int_t i = 0; i<5 ; i++) {
# Line 3774  void FEVdetector::ShowAC(){ Line 4101  void FEVdetector::ShowAC(){
4101    //    //
4102    if ( true ){    if ( true ){
4103      // PMTs      // PMTs
4104      Float_t xc1[5]={ 0., 0.014*var.sfx, 0.014*var.sfx-var.sfx*var.sfx*pmt1*cos(apmt1), -var.sfx*var.sfx*pmt1*cos(apmt1), 0.};      Float_t xc1[5]={ 0., (float)(0.014*var.sfx), (float)(0.014*var.sfx-var.sfx*var.sfx*pmt1*cos(apmt1)), (float)(-var.sfx*var.sfx*pmt1*cos(apmt1)), 0.};
4105      Float_t yc1[5]={ 0., 0.011*var.sfy, 0.011*var.sfy+var.sfy*var.sfy*pmt1*sin(apmt1), var.sfy*var.sfy*pmt1*sin(apmt1), 0.};      Float_t yc1[5]={ 0., (float)(0.011*var.sfy), (float)(0.011*var.sfy+var.sfy*var.sfy*pmt1*sin(apmt1)), (float)(var.sfy*var.sfy*pmt1*sin(apmt1)), 0.};
4106      Float_t xc2[5]={ 0., 0.011*var.sfx, 0.011*var.sfx-pmt2*var.sfx*var.sfx*cos(apmt2), -pmt2*var.sfx*var.sfx*cos(apmt2), 0.};      Float_t xc2[5]={ 0., (float)(0.011*var.sfx), (float)(0.011*var.sfx-pmt2*var.sfx*var.sfx*cos(apmt2)), (float)(-pmt2*var.sfx*var.sfx*cos(apmt2)), 0.};
4107      Float_t yc2[5]={ 0., 0.015*var.sfy, 0.015*var.sfy+var.sfy*pmt2*var.sfy*sin(apmt2), var.sfy*pmt2*var.sfy*sin(apmt2), 0.};      Float_t yc2[5]={ 0., (float)(0.015*var.sfy), (float)(0.015*var.sfy+var.sfy*pmt2*var.sfy*sin(apmt2)), (float)(var.sfy*pmt2*var.sfy*sin(apmt2)), 0.};
4108      // SCINTs      // SCINTs
4109      Float_t xcc1[10]={-0.149, -0.090165, -0.090165, -0.149, -0.242, -0.257, -0.212,   -0.257,   -0.242,   -0.149};      Float_t xcc1[10]={-0.149, -0.090165, -0.090165, -0.149, -0.242, -0.257, -0.212,   -0.257,   -0.242,   -0.149};
4110      Float_t ycc1[10]={ 0.169,  0.108165, -0.108165, -0.169, -0.169, -0.158, 0.,   0.158,    0.169,    0.169};      Float_t ycc1[10]={ 0.169,  0.108165, -0.108165, -0.169, -0.169, -0.158, 0.,   0.158,    0.169,    0.169};
# Line 5198  void FEVdetector::ShowTRK(Bool_t upd){ Line 5525  void FEVdetector::ShowTRK(Bool_t upd){
5525              trkpad[planepad]->Range(-8.1,0.,8.1,8.);              trkpad[planepad]->Range(-8.1,0.,8.1,8.);
5526              //              //
5527              x = track->xm[plane];              x = track->xm[plane];
5528              Float_t xsig = track->dedx_x[plane];              Float_t xsig = fabs(track->dedx_x[plane]);
5529              if ( track->XGood(plane) ){              if ( track->XGood(plane) ){
5530                //if ( x > -100 ){                //if ( x > -100 ){
5531                if ( xsig > 8. ) xsig = 8.;                if ( xsig > 8. ) xsig = 8.;
# Line 5207  void FEVdetector::ShowTRK(Bool_t upd){ Line 5534  void FEVdetector::ShowTRK(Bool_t upd){
5534                } else {                } else {
5535                  sigcol2 = 1;                  sigcol2 = 1;
5536                };                };
5537                ColorTRKMIP(track->dedx_x[plane],sigcol2,0);                ColorTRKMIP(fabs(track->dedx_x[plane]),sigcol2,0);
5538                linea = new TLine(x,0.01,x,xsig);                linea = new TLine(x,0.01,x,xsig);
5539                linea->SetLineWidth(2);                linea->SetLineWidth(2);
5540                linea->SetLineColor(sigcol2);                linea->SetLineColor(sigcol2);
5541                linea->Draw();                linea->Draw();
5542                Float_t tx[5] = {x-0.3, x+0.3, x+0.3, x-0.3, x-0.3};                Float_t tx[5] = {(float)(x-0.3), (float)(x+0.3), (float)(x+0.3), (float)(x-0.3), (float)(x-0.3)};
5543                Float_t tz[5] = {0., 0., 0.5, 0.5, 0.};                Float_t tz[5] = {0., 0., 0.5, 0.5, 0.};
5544                TPolyLine *tlinea = new TPolyLine(5,tx,tz);                TPolyLine *tlinea = new TPolyLine(5,tx,tz);
5545                tlinea->SetLineWidth(1);                tlinea->SetLineWidth(1);
# Line 5228  void FEVdetector::ShowTRK(Bool_t upd){ Line 5555  void FEVdetector::ShowTRK(Bool_t upd){
5555              trkpad[planepad]->cd();              trkpad[planepad]->cd();
5556              trkpad[planepad]->Range(-7.05,0.,7.05,8.);              trkpad[planepad]->Range(-7.05,0.,7.05,8.);
5557              x = -track->ym[plane];              x = -track->ym[plane];
5558              xsig = track->dedx_y[plane];              xsig = fabs(track->dedx_y[plane]);
5559              if ( track->YGood(plane) ){              if ( track->YGood(plane) ){
5560                //            if ( x > -100 ){                //            if ( x > -100 ){
5561                if ( xsig > 8. ) xsig = 8.;                if ( xsig > 8. ) xsig = 8.;
# Line 5237  void FEVdetector::ShowTRK(Bool_t upd){ Line 5564  void FEVdetector::ShowTRK(Bool_t upd){
5564                } else {                } else {
5565                  sigcol2 = 1;                  sigcol2 = 1;
5566                };                };
5567                ColorTRKMIP(track->dedx_y[plane],sigcol2,0);                ColorTRKMIP(fabs(track->dedx_y[plane]),sigcol2,0);
5568                linea = new TLine(x,0.01,x,xsig);                linea = new TLine(x,0.01,x,xsig);
5569                linea->SetLineWidth(2);                linea->SetLineWidth(2);
5570                linea->SetLineColor(sigcol2);                linea->SetLineColor(sigcol2);
5571                linea->Draw();                linea->Draw();
5572                Float_t tx[5] = {x-0.3, x+0.3, x+0.3, x-0.3, x-0.3};                Float_t tx[5] = {(float)(x-0.3), (float)(x+0.3), (float)(x+0.3), (float)(x-0.3), (float)(x-0.3)};
5573                Float_t tz[5] = {0., 0., 0.5, 0.5, 0.};                Float_t tz[5] = {0., 0., 0.5, 0.5, 0.};
5574                TPolyLine *tlinea = new TPolyLine(5,tx,tz);                TPolyLine *tlinea = new TPolyLine(5,tx,tz);
5575                tlinea->SetLineColor(dcol);                tlinea->SetLineColor(dcol);
# Line 5290  void FEVdetector::ShowTRK(Bool_t upd){ Line 5617  void FEVdetector::ShowTRK(Bool_t upd){
5617              //              //
5618              x = track->xm[plane];              x = track->xm[plane];
5619              Float_t y = -track->ym[plane];              Float_t y = -track->ym[plane];
5620              Float_t xsig = track->dedx_x[plane];              Float_t xsig = fabs(track->dedx_x[plane]);
5621              Float_t ysig = track->dedx_y[plane];              Float_t ysig = fabs(track->dedx_y[plane]);
5622              //    if ( x > -100 && y > -100. ){              //    if ( x > -100 && y > -100. ){
5623              if ( track->XGood(plane) && track->YGood(plane) ){              if ( track->XGood(plane) && track->YGood(plane) ){
5624                if ( var.bw ){                if ( var.bw ){
# Line 5710  void FEVdetector::ShowTrack(){ Line 6037  void FEVdetector::ShowTrack(){
6037        //      printf("qua \n");        //      printf("qua \n");
6038        Int_t npoint = 100;        Int_t npoint = 100;
6039        Float_t zin[100];        Float_t zin[100];
6040        Double_t xout[100];        //      Double_t xout[100];
6041        Double_t yout[100];        //      Double_t yout[100];
6042        Int_t ifail = 0;        Int_t ifail = 0;
6043        Int_t trcol = 10;        Int_t trcol = 10;
6044        //        //
# Line 5729  void FEVdetector::ShowTrack(){ Line 6056  void FEVdetector::ShowTrack(){
6056        Float_t tzy1[15];        Float_t tzy1[15];
6057        //        //
6058        for ( Int_t e = 0; e < 100 ; e++) {        for ( Int_t e = 0; e < 100 ; e++) {
6059          xout[e] = 0.;          //      xout[e] = 0.;
6060          yout[e] = 0.;          //      yout[e] = 0.;
6061          //          //
6062          tx[e] = 0.;          tx[e] = 0.;
6063          ty[e] = 0.;          ty[e] = 0.;
# Line 5756  void FEVdetector::ShowTrack(){ Line 6083  void FEVdetector::ShowTrack(){
6083        //        //
6084        Trajectory *tr = new Trajectory(npoint,zin);                                      Trajectory *tr = new Trajectory(npoint,zin);                              
6085        //        //
6086        ifail = track->DoTrack2(tr);        //      ifail = track->DoTrack2(tr);
6087          ifail = track->DoTrack(tr);
6088        //        //
6089        if ( !ifail ){        if ( !ifail ){
6090          for ( Int_t e = 0; e < npoint ; e++) {          for ( Int_t e = 0; e < npoint ; e++) {
# Line 5904  void FEVdetector::ShowCalo(Bool_t upd){ Line 6232  void FEVdetector::ShowCalo(Bool_t upd){
6232      //      //
6233      stringstream xevent;      stringstream xevent;
6234      stringstream yevent;      stringstream yevent;
6235      Float_t sdexy[2][22][96];      //    Float_t sdexy[2][22][96];
6236      Float_t sdexyc[2][22][96];      //    Float_t sdexyc[2][22][96];
6237      //      //
6238      for (Int_t m = 0; m < 22; m++){      for (Int_t m = 0; m < 22; m++){
6239        for (Int_t l = 0; l < 2; l++){        for (Int_t l = 0; l < 2; l++){
# Line 5920  void FEVdetector::ShowCalo(Bool_t upd){ Line 6248  void FEVdetector::ShowCalo(Bool_t upd){
6248          //          //
6249          // determine what kind of event we are going to analyze          // determine what kind of event we are going to analyze
6250          //          //
6251          bool isCOMP = 0;          //      bool isCOMP = 0;
6252          bool isFULL = 0;          //      bool isFULL = 0;
6253          bool isRAW = 0;          bool isRAW = 0;
6254          if ( de->stwerr[se] & (1 << 16) ) isCOMP = 1;          //      if ( de->stwerr[se] & (1 << 16) ) isCOMP = 1;
6255          if ( de->stwerr[se] & (1 << 17) ) isFULL = 1;          //      if ( de->stwerr[se] & (1 << 17) ) isFULL = 1;
6256          if ( de->stwerr[se] & (1 << 3) ) isRAW = 1;              if ( de->stwerr[se] & (1 << 3) ) isRAW = 1;    
6257          //          //
6258          // save the prevoius energy deposit and calibration in sbase, sdexy, sdexyc          // save the prevoius energy deposit and calibration in sbase, sdexy, sdexyc
# Line 5934  void FEVdetector::ShowCalo(Bool_t upd){ Line 6262  void FEVdetector::ShowCalo(Bool_t upd){
6262            for (Int_t nn = 0; nn < 96; nn++){                            for (Int_t nn = 0; nn < 96; nn++){                
6263              if ( nn%16 == 0 ) pre++;                              if ( nn%16 == 0 ) pre++;                
6264              evento.base[l][m][pre] = calib.calbase[l][m][pre];              evento.base[l][m][pre] = calib.calbase[l][m][pre];
6265              sdexy[l][m][nn] = evento.dexy[l][m][nn];              //      sdexy[l][m][nn] = evento.dexy[l][m][nn];
6266              evento.dexy[l][m][nn] = de->dexy[l][m][nn] ;              evento.dexy[l][m][nn] = de->dexy[l][m][nn] ;
6267              sdexyc[l][m][nn] = evento.dexy[l][m][nn];              //      sdexyc[l][m][nn] = evento.dexy[l][m][nn];
6268              evento.dexyc[l][m][nn] = de->dexy[l][m][nn] ;              evento.dexyc[l][m][nn] = de->dexy[l][m][nn] ;
6269            };            };
6270          };          };
# Line 6032  void FEVdetector::ShowCalo(Bool_t upd){ Line 6360  void FEVdetector::ShowCalo(Bool_t upd){
6360      // Define variables      // Define variables
6361      //      //
6362      UInt_t etime = var.etime;      UInt_t etime = var.etime;
6363      Float_t estrip[2][22][96], ener, basel,sdexy[2][22][96],sdexyc[2][22][96];      Float_t estrip[2][22][96], ener, basel;//,sdexy[2][22][96],sdexyc[2][22][96];
6364      Int_t badstrip = 0;      Int_t badstrip = 0;
6365      qtot = 0.;      qtot = 0.;
6366      nstrip = 0;      nstrip = 0;
# Line 6128  void FEVdetector::ShowCalo(Bool_t upd){ Line 6456  void FEVdetector::ShowCalo(Bool_t upd){
6456          //          //
6457          // determine what kind of event we are going to analyze          // determine what kind of event we are going to analyze
6458          //          //
6459          bool isCOMP = 0;          //      bool isCOMP = 0;
6460          bool isFULL = 0;          //      bool isFULL = 0;
6461          bool isRAW = 0;          bool isRAW = 0;
6462          if ( de->stwerr[se] & (1 << 16) ) isCOMP = 1;          //      if ( de->stwerr[se] & (1 << 16) ) isCOMP = 1;
6463          if ( de->stwerr[se] & (1 << 17) ) isFULL = 1;          //      if ( de->stwerr[se] & (1 << 17) ) isFULL = 1;
6464          if ( de->stwerr[se] & (1 << 3) ) isRAW = 1;          if ( de->stwerr[se] & (1 << 3) ) isRAW = 1;
6465          //          //
6466          // save the prevoius energy deposit and calibration in sbase, sdexy, sdexyc          // save the prevoius energy deposit and calibration in sbase, sdexy, sdexyc
# Line 6142  void FEVdetector::ShowCalo(Bool_t upd){ Line 6470  void FEVdetector::ShowCalo(Bool_t upd){
6470            for (Int_t nn = 0; nn < 96; nn++){                            for (Int_t nn = 0; nn < 96; nn++){                
6471              if ( nn%16 == 0 ) pre++;                              if ( nn%16 == 0 ) pre++;                
6472              evento.base[l][m][pre] = calib.calbase[l][m][pre];              evento.base[l][m][pre] = calib.calbase[l][m][pre];
6473              sdexy[l][m][nn] = evento.dexy[l][m][nn];              //      sdexy[l][m][nn] = evento.dexy[l][m][nn];
6474              evento.dexy[l][m][nn] = de->dexy[l][m][nn] ;              evento.dexy[l][m][nn] = de->dexy[l][m][nn] ;
6475              sdexyc[l][m][nn] = evento.dexy[l][m][nn];              //      sdexyc[l][m][nn] = evento.dexy[l][m][nn];
6476              evento.dexyc[l][m][nn] = de->dexy[l][m][nn] ;              evento.dexyc[l][m][nn] = de->dexy[l][m][nn] ;
6477            };            };
6478          };          };
# Line 6153  void FEVdetector::ShowCalo(Bool_t upd){ Line 6481  void FEVdetector::ShowCalo(Bool_t upd){
6481          //          //
6482          Int_t done = 0;          Int_t done = 0;
6483          Int_t rdone = 0;          Int_t rdone = 0;
6484          Int_t fdone = 0;                      //      Int_t fdone = 0;            
6485          pre = -1;          pre = -1;
6486          for (Int_t n =0 ; n < 96; n++){                      for (Int_t n =0 ; n < 96; n++){            
6487            if ( n%16 == 0 ) {            if ( n%16 == 0 ) {
6488              pre++;              pre++;
6489              done = 0;              done = 0;
6490              rdone = 0;              rdone = 0;
6491              fdone = 0;              //      fdone = 0;
6492            };                };    
6493            //            //
6494            // baseline check and calculation            // baseline check and calculation
# Line 6327  void FEVdetector::ShowCalo(Bool_t upd){ Line 6655  void FEVdetector::ShowCalo(Bool_t upd){
6655      //      //
6656      stringstream xvev;      stringstream xvev;
6657      stringstream yvev;          stringstream yvev;    
6658      for (Int_t ii = 0; ii < L2->GetCaloLevel2()->nstrip; ii++){      //    for (Int_t ii = 0; ii < L2->GetCaloLevel2()->nstrip; ii++){
6659        for (Int_t ii = 0; ii < L2->GetCaloLevel1()->istrip; ii++){
6660        Int_t colo;        Int_t colo;
6661        Int_t l;        Int_t l;
6662        Int_t m;        Int_t m;
6663        Int_t n;        Int_t n;
6664        Float_t mip = L2->GetCaloLevel1()->DecodeEstrip(ii,l,m,n);        Bool_t satura = false;
6665          Float_t mip = L2->GetCaloLevel1()->DecodeEstrip(ii,l,m,n,satura);
6666        if ( var.bw ){        if ( var.bw ){
6667          colo = -1;          colo = -1;
6668        } else {        } else {
6669          colo = 1;          colo = 1;
6670        };        };      
6671        ColorMIP(mip,colo);        ColorMIP(mip,colo);
6672        if ( l == 0 ) {        if ( l == 0 ) {
6673          xvev.str("");          xvev.str("");
# Line 6346  void FEVdetector::ShowCalo(Bool_t upd){ Line 6676  void FEVdetector::ShowCalo(Bool_t upd){
6676          xvev << " " << l;          xvev << " " << l;
6677          gDirectory->Delete(xvev.str().c_str());          gDirectory->Delete(xvev.str().c_str());
6678          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);
6679          Xview->SetFillColor(colo);          if ( satura ){
6680              Xview->SetFillColor(kBlack);
6681            } else {
6682              Xview->SetFillColor(colo);
6683            };
6684          Xview->Fill(n,21-m,1.);          Xview->Fill(n,21-m,1.);
6685          pd1->cd();                                            pd1->cd();                                  
6686          Xview->Draw("box same");          Xview->Draw("box same");
# Line 6358  void FEVdetector::ShowCalo(Bool_t upd){ Line 6692  void FEVdetector::ShowCalo(Bool_t upd){
6692          yvev << " " << l;          yvev << " " << l;
6693          gDirectory->Delete(yvev.str().c_str());          gDirectory->Delete(yvev.str().c_str());
6694          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);                  
6695          Yview->SetFillColor(colo);          if ( satura ){
6696              Yview->SetFillColor(kBlack);
6697            } else {
6698              Yview->SetFillColor(colo);
6699            };
6700          Yview->Fill(96-n,21-m,1.);          Yview->Fill(96-n,21-m,1.);
6701          pd2->cd();          pd2->cd();
6702          Yview->Draw("box same");          Yview->Draw("box same");
# Line 6372  void FEVdetector::ShowCalo(Bool_t upd){ Line 6710  void FEVdetector::ShowCalo(Bool_t upd){
6710  }  }
6711    
6712  void FEVdetector::Calo1stcalib(){  void FEVdetector::Calo1stcalib(){
6713    Float_t estrip[2][22][96];    //  Float_t estrip[2][22][96];
6714    //        //    
6715    // this is the value of the mip for each strip. To be changed when we will have the real values    // this is the value of the mip for each strip. To be changed when we will have the real values
6716    //    //
# Line 6390  void FEVdetector::Calo1stcalib(){ Line 6728  void FEVdetector::Calo1stcalib(){
6728      for (Int_t k = 0; k < 22; k++ ){      for (Int_t k = 0; k < 22; k++ ){
6729        for (Int_t l = 0; l < 96; l++ ){        for (Int_t l = 0; l < 96; l++ ){
6730          calib.calped[m][k][l] = 0. ;          calib.calped[m][k][l] = 0. ;
6731          estrip[m][k][l] = 0.;          //      estrip[m][k][l] = 0.;
6732        };        };
6733      };      };
6734    }    }

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

  ViewVC Help
Powered by ViewVC 1.1.23