Ignore:
Timestamp:
06/29/00 13:37:09 (24 years ago)
Author:
harald
Message:
Able to read in all photons of one event. So this may be the start point
for a clever gui to display some properties of the shower.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Simulation/Corsika/Simone/simone.cxx

    r324 r405  
    2424             
    2525    //    char  path[100] = "/hd61/Maggi/Data/mcMAGIC-1-30:30000-1" ;
    26     char  path[100] = "/hd31/Data/mmcs_prod_1009_30:30000_14" ;
     26    char  path[100] = "/hd02/Maggi/Data/prot_15/" ;
    2727    //    char  path[100] = "/data/mmcs/" ;
    2828    char  cername[120] ;
     
    3232
    3333    COREventHeader Event ;   
     34    CORParticle    Photon ;
     35
     36    MSimone    Infos ;
    3437   
    35     MSimone    Infos ;
    36     Infos.Print() ;
     38    Int_t iPhotonInShower ;
     39
     40    Float_t lambda ;
    3741    //
    3842    //    now create a root-file for the ntuple output
     
    4347    TNtuple *Ntup = new TNtuple("simone",
    4448                               "Simone info of mmcs",
    45                                "PartId:Energy:Theta:Phi");
     49                               "fPartId:fEnergy:fTheta:fPhi");
    4650
    4751
    48     for (int i_cer = 1; i_cer < 1000; i_cer++ ) {
     52    for (int i_cer = 1; i_cer <= 100; i_cer++ ) {
     53
     54      //
     55      //   info of progress
     56      //
     57      if (!( i_cer %10) )
     58        {
     59          cout << i_cer << endl ;
     60        }
    4961
    5062      //
     
    6880      }
    6981         
    70       cout << " Read event " << endl ;
     82      //   
     83      //    cout << " Read event " << endl ;
     84      //
     85
    7186      Event.read( cerfile );
    72      
    7387      Infos.Transfer ( &Event ) ;
    7488
    75       Infos.Print() ;
    76 
     89      //
     90      //   fill the ntuple
     91      //
    7792      Infos.NtupFill ( Ntup ) ;
    7893 
     94      //
     95      //   loop over the particles (cerenkov photons) in
     96      //   the file
     97      //
     98
     99      iPhotonInShower = 0 ;
     100     
     101      while( ! (cerfile.eof() || cerfile.bad() )) {
     102       
     103        //
     104        //   read in the particles
     105        //
     106
     107        Photon.read ( cerfile ) ;
     108       
     109        //
     110        //   only if the wavelength lambda is greater than
     111        //   1.0 it is a real cerenkov photon
     112        //
     113        lambda = Photon.get_wl() ;
     114
     115        if ( lambda < 1.0 )
     116          break ;
     117
     118        iPhotonInShower++ ;
     119
     120        Photon.print() ;
     121
     122      }
     123
     124      cout << iPhotonInShower << endl ;       
     125
     126
     127
    79128      cerfile.close();
     129     
     130
    80131
    81132    }
     
    87138    outfile->Write() ;
    88139
    89   }
     140
     141    //
     142    //
     143    //
     144   
     145  }
    90146
    91147
Note: See TracChangeset for help on using the changeset viewer.