/[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.29 by mocchiut, Tue Aug 11 13:03:42 2009 UTC revision 1.33 by mocchiut, Tue May 11 09:13:47 2010 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 1102  TChain* FEVdetector::Load(TString file){ Line 1103  TChain* FEVdetector::Load(TString file){
1103      //    printf(" %s \n",ddec.Data());      //    printf(" %s \n",ddec.Data());
1104      if ( !L2 ){      if ( !L2 ){
1105        L2 = new PamLevel2("",file.Data(),ddec.Data());        L2 = new PamLevel2("",file.Data(),ddec.Data());
1106          if ( NODB ) L2->NoDBconnections();
1107        otr = L2->GetPamTree();        otr = L2->GetPamTree();
1108        //      printf(" l2 constructor\n");        //      printf(" l2 constructor\n");
1109        //      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);    
# Line 2775  void FEVdetector::ShowTOF(){ Line 2777  void FEVdetector::ShowTOF(){
2777    //    //
2778    //    //
2779    Bool_t repeat = true;    Bool_t repeat = true;
2780    Int_t numtr = 1;    //  Int_t numtr = 1;
2781  //  Int_t numtr = 0;    Int_t numtr = 0;
2782    Int_t repuntil = 0;    Int_t repuntil = 0;
2783      Int_t repuntiltr = 0;
2784    //      //  
2785    //    //
2786    var.tofraw = 0;    var.tofraw = 0;
2787    //    //
2788    if ( level.file == 2 ) repuntil = L2->GetToFLevel2()->ntrk();        if ( level.file == 2 ) repuntil = L2->GetToFLevel2()->ntrk();    
2789    //  printf("repuntil = %i \n",repuntil);    //  printf("repuntil = %i \n",repuntil);
2790    //if ( level.file == 2 ) repuntil = L2->GetTrkLevel2()->GetNTracks();        if ( level.file == 2 ) repuntiltr = L2->GetTrkLevel2()->GetNTracks();    
2791    //repuntil = L2->GetNTracks();        //  repuntiltr = L2->GetNTracks();    
2792    //    //
2793    while ( repeat ){    while ( repeat ){
2794      //    printf("B repuntil = %i \n",repuntil);      //    printf("B repuntil = %i \n",repuntil);
# Line 2794  void FEVdetector::ShowTOF(){ Line 2797  void FEVdetector::ShowTOF(){
2797        //        //
2798        //        //
2799        ToFTrkVar *ptt = 0;        ToFTrkVar *ptt = 0;
2800  //      PamTrack *ptrack = 0;        PamTrack *ptrack = 0;
2801        Float_t adc[4][12];        Float_t adc[4][12];
2802        Float_t tdc[4][12];        Float_t tdc[4][12];
2803        memset(adc,0,4*12*sizeof(Float_t));        memset(adc,0,4*12*sizeof(Float_t));
# Line 2809  void FEVdetector::ShowTOF(){ Line 2812  void FEVdetector::ShowTOF(){
2812        } else {        } else {
2813          //          //
2814          //          //
2815          if ( numtr >= repuntil-1 ) repeat = false;          if ( numtr >= (repuntiltr-1) ) repeat = false;
2816          //          //
2817          //      printf(" numtr is %i \n",numtr);          //printf(" numtr is %i \n",numtr);
2818          ptt = L2->GetToFLevel2()->GetToFTrkVar(numtr);            // ptt = L2->GetToFLevel2()->GetToFTrkVar(numtr);      
2819          //ptrack = L2->GetTrack(numtr);          ptrack = L2->GetTrack(numtr);
2820          //ptt = ptrack->GetToFTrack();          ptt = ptrack->GetToFTrack();
2821        };        };
2822        //        //
2823        xp11[0] = 0.;        xp11[0] = 0.;
# Line 2829  void FEVdetector::ShowTOF(){ Line 2832  void FEVdetector::ShowTOF(){
2832        ii = 2;        ii = 2;
2833        //        //
2834        Int_t myseq = ptt->trkseqno + 1;        Int_t myseq = ptt->trkseqno + 1;
2835          //
2836        L2->GetToFLevel2()->GetMatrix(myseq,adc,tdc);        L2->GetToFLevel2()->GetMatrix(myseq,adc,tdc);
2837        //        //
2838        //      printf(" qua \n");        //      printf(" qua \n");
2839        //        //
2840        for ( Int_t i = 0; i<8; i++ ) {          //       for ( Int_t i = 0; i<8; i++ ) {  
2841          if ( adc[ch11a[i]][hb11a[i]] < 1000. ){        //        if ( adc[ch11a[i]][hb11a[i]] < 1000. ){
2842            ms11a[i] = adc[ch11a[i]][hb11a[i]];        //          ms11a[i] = adc[ch11a[i]][hb11a[i]];
2843          };              //        };      
2844          if ( adc[ch11b[i]][hb11b[i]] < 1000. ){        //        if ( adc[ch11b[i]][hb11b[i]] < 1000. ){
2845            ms11b[i] = adc[ch11b[i]][hb11b[i]];        //          ms11b[i] = adc[ch11b[i]][hb11b[i]];
2846          };        //        };
2847          //      xp11[i] = 0.;        //        xp11[i] = 0.;
2848        };        //    };
2849    
2850        Int_t nmtof = 0;        Int_t nmtof = 0;
2851        Float_t mtof = 0.;        Float_t mtof = 0.;
# Line 2958  void FEVdetector::ShowTOF(){ Line 2962  void FEVdetector::ShowTOF(){
2962        if ( level.file == -1 ){        if ( level.file == -1 ){
2963          ColorMIP(ms11a[j]+ms11b[j],colo);                ColorMIP(ms11a[j]+ms11b[j],colo);      
2964        } else {        } else {
2965          ColorTOFMIP(ms11a[j]+ms11b[j],colo);              ColorTOFMIP((ms11a[j]+ms11b[j])/2.,colo);      
2966        };        };
2967        //        //
2968        if ( colo != 10 ) ocolo = colo;        if ( colo != 10 ) ocolo = colo;
# Line 3047  void FEVdetector::ShowTOF(){ Line 3051  void FEVdetector::ShowTOF(){
3051        if ( level.file == -1 ){        if ( level.file == -1 ){
3052          ColorMIP(ms12a[rj]+ms12b[rj],colo);          ColorMIP(ms12a[rj]+ms12b[rj],colo);
3053        } else {        } else {
3054          ColorTOFMIP(ms12a[rj]+ms12b[rj],colo);          ColorTOFMIP((ms12a[rj]+ms12b[rj])/2.,colo);
3055        };        };
3056        //        //
3057        if ( colo != 10 ) ocolo = colo;        if ( colo != 10 ) ocolo = colo;
# Line 3135  void FEVdetector::ShowTOF(){ Line 3139  void FEVdetector::ShowTOF(){
3139        if ( level.file == -1 ){        if ( level.file == -1 ){
3140          ColorMIP(ms21a[rj]+ms21b[rj],colo);          ColorMIP(ms21a[rj]+ms21b[rj],colo);
3141        } else {        } else {
3142          ColorTOFMIP(ms21a[rj]+ms21b[rj],colo);          ColorTOFMIP((ms21a[rj]+ms21b[rj])/2.,colo);
3143        };        };
3144        //        //
3145        if ( colo != 10 ) ocolo = colo;        if ( colo != 10 ) ocolo = colo;
# Line 3221  void FEVdetector::ShowTOF(){ Line 3225  void FEVdetector::ShowTOF(){
3225        if ( level.file == -1 ){        if ( level.file == -1 ){
3226          ColorMIP(ms22a[j]+ms22b[j],colo);          ColorMIP(ms22a[j]+ms22b[j],colo);
3227        } else {        } else {
3228          ColorTOFMIP(ms22a[j]+ms22b[j],colo);          ColorTOFMIP((ms22a[j]+ms22b[j])/2.,colo);
3229        };        };
3230        //        //
3231        if ( colo != 10 ) ocolo = colo;        if ( colo != 10 ) ocolo = colo;
# Line 3312  void FEVdetector::ShowTOF(){ Line 3316  void FEVdetector::ShowTOF(){
3316        if ( level.file == -1 ){        if ( level.file == -1 ){
3317          ColorMIP(ms31a[j]+ms31b[j],colo);          ColorMIP(ms31a[j]+ms31b[j],colo);
3318        } else {        } else {
3319          ColorTOFMIP(ms31a[j]+ms31b[j],colo);          ColorTOFMIP((ms31a[j]+ms31b[j])/2.,colo);
3320        };        };
3321        //        //
3322        if ( colo != 10 ) ocolo = colo;        if ( colo != 10 ) ocolo = colo;
# Line 3405  void FEVdetector::ShowTOF(){ Line 3409  void FEVdetector::ShowTOF(){
3409        if ( level.file == -1 ){        if ( level.file == -1 ){
3410          ColorMIP(ms32a[rj]+ms32b[rj],colo);          ColorMIP(ms32a[rj]+ms32b[rj],colo);
3411        } else {        } else {
3412          ColorTOFMIP(ms32a[rj]+ms32b[rj],colo);          ColorTOFMIP((ms32a[rj]+ms32b[rj])/2.,colo);
3413        };        };
3414        //        //
3415        if ( colo != 10 ) ocolo = colo;        if ( colo != 10 ) ocolo = colo;
# Line 6377  void FEVdetector::ShowCalo(Bool_t upd){ Line 6381  void FEVdetector::ShowCalo(Bool_t upd){
6381      //      //
6382      stringstream xvev;      stringstream xvev;
6383      stringstream yvev;          stringstream yvev;    
6384      for (Int_t ii = 0; ii < L2->GetCaloLevel2()->nstrip; ii++){      //    for (Int_t ii = 0; ii < L2->GetCaloLevel2()->nstrip; ii++){
6385        for (Int_t ii = 0; ii < L2->GetCaloLevel1()->istrip; ii++){
6386        Int_t colo;        Int_t colo;
6387        Int_t l;        Int_t l;
6388        Int_t m;        Int_t m;

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

  ViewVC Help
Powered by ViewVC 1.1.23