Ignore:
Timestamp:
07/17/00 12:43:16 (24 years ago)
Author:
harald
Message:
In the tab frame for EventDistributions, now the informations about the
shower are available.
Location:
trunk/MagicSoft/Simulation
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Simulation/Corsika/GuiSimone/MainFrameSimone.cxx

    r425 r426  
    44#define  START_DIRECTORY  "/dat1"
    55#define S_ISDIR(m) (((m)&(0170000)) == (0040000)) 
     6#define PI 3.1415926
    67
    78#include <TApplication.h>
     
    261262
    262263 
    263   fCanvasEvt =  new TRootEmbeddedCanvas("fCanvasEvt", fTabF3b, 300, 300 ) ;
    264   fTabF3b->AddFrame(fCanvasEvt, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandY | kLHintsExpandX, 5, 5, 5, 5 ) ) ;
     264  fTabF3bI = new TGCompositeFrame (fTabF3b, 300, 300, kVerticalFrame) ;
     265  fTabF3b->AddFrame(fTabF3bI,
     266                   new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandY, 5, 5, 5, 5 ) ) ;
     267 
     268  fTabF3bII = new TGCompositeFrame (fTabF3b, 300, 300, kVerticalFrame) ;
     269  fTabF3b->AddFrame(fTabF3bII,
     270                   new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX | kLHintsExpandY, 5, 5, 5, 5 ) ) ;
     271
     272  fLabelId = new TGLabel(fTabF3bI, new TGString("PartId: ------------") );       
     273  fTabF3bI->AddFrame( fLabelId, new TGLayoutHints(kLHintsTop | kLHintsLeft , 5, 5, 5, 5 ) ) ;   
     274
     275  fLabelEner = new TGLabel(fTabF3bI, new TGString("Energy: ------------") );       
     276  fTabF3bI->AddFrame( fLabelEner, new TGLayoutHints(kLHintsTop | kLHintsLeft , 5, 5, 5, 5 ) ) ;   
     277 
     278  fLabelNbPhot = new TGLabel(fTabF3bI, new TGString("NbPhot: ------------") );       
     279  fTabF3bI->AddFrame( fLabelNbPhot, new TGLayoutHints(kLHintsTop | kLHintsLeft , 5, 5, 5, 5 ) ) ;   
     280 
     281  fLabelCoreX = new TGLabel(fTabF3bI, new TGString("CoreX: ------------") );       
     282  fTabF3bI->AddFrame( fLabelCoreX, new TGLayoutHints(kLHintsTop | kLHintsLeft , 5, 5, 5, 5 ) ) ;   
     283
     284  fLabelCoreY = new TGLabel(fTabF3bI, new TGString("CoreY: ------------") );       
     285  fTabF3bI->AddFrame( fLabelCoreY, new TGLayoutHints(kLHintsTop | kLHintsLeft , 5, 5, 5, 5 ) ) ;   
     286
     287  fLabelTheta = new TGLabel(fTabF3bI, new TGString("Theta: ------------") );       
     288  fTabF3bI->AddFrame( fLabelTheta, new TGLayoutHints(kLHintsTop | kLHintsLeft , 5, 5, 5, 5 ) ) ;   
     289
     290  fLabelPhi = new TGLabel(fTabF3bI, new TGString("Phi: ------------") );       
     291  fTabF3bI->AddFrame( fLabelPhi, new TGLayoutHints(kLHintsTop | kLHintsLeft , 5, 5, 5, 5 ) ) ;   
     292
     293  fLabelDireX = new TGLabel(fTabF3bI, new TGString("DireX: ------------") );       
     294  fTabF3bI->AddFrame( fLabelDireX, new TGLayoutHints(kLHintsTop | kLHintsLeft , 5, 5, 5, 5 ) ) ;   
     295
     296  fLabelDireY = new TGLabel(fTabF3bI, new TGString("DireY: ------------") );       
     297  fTabF3bI->AddFrame( fLabelDireY, new TGLayoutHints(kLHintsTop | kLHintsLeft , 5, 5, 5, 5 ) ) ;   
     298
     299
     300  fCanvasEvt =  new TRootEmbeddedCanvas("fCanvasEvt", fTabF3bII, 300, 300 ) ;
     301  fTabF3bII->AddFrame(fCanvasEvt, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandY | kLHintsExpandX, 5, 5, 5, 5 ) ) ;
    265302
    266303
     
    617654Bool_t MainFrameSimone::ReadinEvt()
    618655{
     656  Char_t  wort[256] ;
    619657  FILE  *unit ;
    620658  Char_t  filename[256] ;
     
    665703  Event.read( cerfile );
    666704 
     705
     706  //
     707  //   fill the information labels
     708  //
     709 
     710  sprintf( wort,"PartId: %5.0f", Event.get_primary() ) ;
     711  fLabelId->SetText(new TGString(wort) )  ;
     712
     713  sprintf( wort,"Energy: %9.1f", Event.get_energy() ) ;
     714  fLabelEner->SetText(new TGString(wort) )  ;
     715
     716  sprintf( wort,"CoreX: %9.1f", Event.get_coreX() ) ;
     717  fLabelCoreX->SetText(new TGString(wort) )  ;
     718
     719  sprintf( wort,"CoreY: %9.1f", Event.get_coreY() ) ;
     720  fLabelCoreY->SetText(new TGString(wort) )  ;
     721
     722
     723  sprintf( wort,"Theta: %9.1f", Event.get_theta()*180./PI ) ;
     724  fLabelTheta->SetText(new TGString(wort) )  ;
     725
     726  sprintf( wort,"Phi: %9.1f", Event.get_phi()*180./PI ) ;
     727  fLabelPhi->SetText(new TGString(wort) )  ;
     728
     729  sprintf( wort,"DireX: %9.3f", Event.get_direX()  ) ;
     730  fLabelDireX->SetText(new TGString(wort) )  ;
     731
     732  sprintf( wort,"DireY: %9.3f", Event.get_direY()  ) ;
     733  fLabelDireY->SetText(new TGString(wort) )  ;
     734 
     735
    667736  //
    668737  //   loop over the particles
     
    710779  cerfile.close();
    711780 
    712 
    713   cout << fNtupEvt->GetEntries()  << endl ;
    714  
     781  sprintf( wort,"NbPhot: %8d", iPhotonInShower ) ;
     782  fLabelNbPhot->SetText(new TGString(wort) )  ;
     783
    715784  return (kTRUE) ;
    716785
     
    870939
    871940        ReadinEvt() ;
     941
    872942        break; 
    873943
     
    883953
    884954        ReadinEvt() ;
    885        
     955
    886956        break; 
    887957
  • trunk/MagicSoft/Simulation/Corsika/GuiSimone/MainFrameSimone.hxx

    r425 r426  
    8383
    8484  TGCompositeFrame  *fTabF3a, *fTabF3b, *fTabF3c ;
     85  TGCompositeFrame  *fTabF3bI, *fTabF3bII ;   
    8586  TGLabel           *fLabel3, *fLabel4 ;
    8687  TGListBox         *fDir3, *fDirEvtNb ;
     88  TGLabel           *fLabelId, *fLabelEner ;
     89  TGLabel           *fLabelNbPhot ;
     90  TGLabel           *fLabelCoreX, *fLabelCoreY ;
     91  TGLabel           *fLabelTheta, *fLabelPhi, *fLabelDireX, *fLabelDireY ;
     92
     93
    8794  TRootEmbeddedCanvas    *fCanvasEvt ; 
    8895  TGTextButton      *fButtonPrev, *fButtonNext ;
  • trunk/MagicSoft/Simulation/Detector/include-CORSIKA/COREventHeader.hxx

    r421 r426  
    207207  inline Float_t get_firstInt () {
    208208    return ( zFirstInt ) ;
     209  }
     210
     211  // get the xDirection part of the normalized direction vector
     212  inline Float_t get_direX () {
     213    return ( (Float_t) ( p[0] / sqrt( p[0]*p[0] + p[1]*p[1] + p[2]*p[2] )) ) ;
     214  }
     215
     216  // get the xDirection part of the normalized direction vector
     217  inline Float_t get_direY () {
     218    return ( (Float_t) ( p[1] / sqrt( p[0]*p[0] + p[1]*p[1] + p[2]*p[2] )) ) ;
    209219  }
    210220
Note: See TracChangeset for help on using the changeset viewer.