Changeset 415 for trunk/MagicSoft/Simulation/Corsika
- Timestamp:
- 07/06/00 11:24:00 (24 years ago)
- Location:
- trunk/MagicSoft/Simulation/Corsika/Simone
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Simulation/Corsika/Simone/MSimone.cxx
r324 r415 27 27 CoreY = 0. ; 28 28 29 FirstInt = 0. ; 29 FirstInt = 0. ; 30 31 NumCerPhot = 0. ; 30 32 } 31 33 … … 55 57 56 58 FirstInt= 0. ; 59 60 NumCerPhot = 0. ; 57 61 } 58 62 … … 77 81 Phi = e->Phi; 78 82 83 Float_t x, y ; 84 85 CoreD = e->get_core(&x, &y, 0 ) ; 86 87 CoreX = x ; 88 CoreY = y ; 89 79 90 FirstInt = e->zFirstInt; 91 80 92 } 81 93 94 void MSimone::SetNumCerPhot( Int_t iN ) 95 { 96 NumCerPhot = (Float_t) iN ; 97 } 82 98 83 99 void MSimone::NtupFill( TNtuple *n ) 84 100 { 85 n->Fill(PartId,Energy,Theta,Phi ) ;101 n->Fill(PartId,Energy,Theta,Phi,CoreX, CoreY, CoreD, NumCerPhot ) ; 86 102 } 87 103 -
trunk/MagicSoft/Simulation/Corsika/Simone/MSimone.hxx
r324 r415 29 29 Float_t FirstInt ; // First interaction in cm above sea level 30 30 31 31 Float_t NumCerPhot ; // Number of Cerenkov photons in shower 32 32 33 public: 33 34 MSimone() ; … … 43 44 void NtupFill ( TNtuple *n ) ; 44 45 46 void SetNumCerPhot( Int_t iN ) ; 47 45 48 // ClassDef(MSimone, 1) //Stores Montecarlo Information 46 49 -
trunk/MagicSoft/Simulation/Corsika/Simone/Makefile
r324 r415 19 19 # 20 20 # $RCSfile: Makefile,v $ 21 # $Revision: 1. 1.1.1$21 # $Revision: 1.2 $ 22 22 # $Author: harald $ 23 # $Date: 1999-11-18 09:39:14$23 # $Date: 2000-07-06 10:24:00 $ 24 24 # 25 25 ################################################################## … … 168 168 ../../Detector/include-CORSIKA/COREventHeader.o: ../../Detector/include-CORSIKA/COREventHeader.hxx 169 169 ../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/stdlib.h 170 ../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/standards.h 171 ../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/getopt.h 170 ../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/features.h 171 ../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/sys/cdefs.h 172 ../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/gnu/stubs.h 173 ../../Detector/include-CORSIKA/COREventHeader.o: /usr/lib/gcc-lib/i486-linux/2.7.2.3/include/stddef.h 172 174 ../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/sys/types.h 173 ../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/mach/machine/vm_types.h 175 ../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/bits/types.h 176 ../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/time.h 177 ../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/endian.h 178 ../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/bits/endian.h 174 179 ../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/sys/select.h 180 ../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/bits/select.h 181 ../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/bits/sigset.h 182 ../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/sys/sysmacros.h 183 ../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/alloca.h 175 184 ../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/math.h 185 ../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/bits/huge_val.h 186 ../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/bits/mathdef.h 187 ../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/bits/mathcalls.h 188 ../../Detector/include-CORSIKA/COREventHeader.o: /usr/lib/gcc-lib/i486-linux/2.7.2.3/include/float.h 176 189 ../../Detector/include-CORSIKA/CORParticle.o: ../../Detector/include-CORSIKA/CORParticle.hxx 177 190 ../../Detector/include-CORSIKA/CORParticle.o: /usr/include/stdlib.h 178 ../../Detector/include-CORSIKA/CORParticle.o: /usr/include/standards.h 179 ../../Detector/include-CORSIKA/CORParticle.o: /usr/include/getopt.h 191 ../../Detector/include-CORSIKA/CORParticle.o: /usr/include/features.h 192 ../../Detector/include-CORSIKA/CORParticle.o: /usr/include/sys/cdefs.h 193 ../../Detector/include-CORSIKA/CORParticle.o: /usr/include/gnu/stubs.h 194 ../../Detector/include-CORSIKA/CORParticle.o: /usr/lib/gcc-lib/i486-linux/2.7.2.3/include/stddef.h 180 195 ../../Detector/include-CORSIKA/CORParticle.o: /usr/include/sys/types.h 181 ../../Detector/include-CORSIKA/CORParticle.o: /usr/include/mach/machine/vm_types.h 196 ../../Detector/include-CORSIKA/CORParticle.o: /usr/include/bits/types.h 197 ../../Detector/include-CORSIKA/CORParticle.o: /usr/include/time.h 198 ../../Detector/include-CORSIKA/CORParticle.o: /usr/include/endian.h 199 ../../Detector/include-CORSIKA/CORParticle.o: /usr/include/bits/endian.h 182 200 ../../Detector/include-CORSIKA/CORParticle.o: /usr/include/sys/select.h 201 ../../Detector/include-CORSIKA/CORParticle.o: /usr/include/bits/select.h 202 ../../Detector/include-CORSIKA/CORParticle.o: /usr/include/bits/sigset.h 203 ../../Detector/include-CORSIKA/CORParticle.o: /usr/include/sys/sysmacros.h 204 ../../Detector/include-CORSIKA/CORParticle.o: /usr/include/alloca.h 183 205 ../../Detector/include-CORSIKA/CORParticle.o: /usr/include/math.h 206 ../../Detector/include-CORSIKA/CORParticle.o: /usr/include/bits/huge_val.h 207 ../../Detector/include-CORSIKA/CORParticle.o: /usr/include/bits/mathdef.h 208 ../../Detector/include-CORSIKA/CORParticle.o: /usr/include/bits/mathcalls.h 209 ../../Detector/include-CORSIKA/CORParticle.o: /usr/lib/gcc-lib/i486-linux/2.7.2.3/include/float.h 184 210 ../../Detector/include-CORSIKA/CORStatfile.o: ../../Detector/include-CORSIKA/CORStatfile.hxx 185 211 ../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/stdlib.h 186 ../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/standards.h 187 ../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/getopt.h 212 ../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/features.h 213 ../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/sys/cdefs.h 214 ../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/gnu/stubs.h 215 ../../Detector/include-CORSIKA/CORStatfile.o: /usr/lib/gcc-lib/i486-linux/2.7.2.3/include/stddef.h 188 216 ../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/sys/types.h 189 ../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/mach/machine/vm_types.h 217 ../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/bits/types.h 218 ../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/time.h 219 ../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/endian.h 220 ../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/bits/endian.h 190 221 ../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/sys/select.h 222 ../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/bits/select.h 223 ../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/bits/sigset.h 224 ../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/sys/sysmacros.h 225 ../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/alloca.h 191 226 ../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/math.h 192 MSimone.o: MSimone.hxx /usr/include/stdlib.h /usr/include/standards.h 193 MSimone.o: /usr/include/getopt.h /usr/include/sys/types.h 194 MSimone.o: /usr/include/mach/machine/vm_types.h /usr/include/sys/select.h 195 MSimone.o: /usr/include/stdio.h /usr/include/sys/seek.h 196 MSimone.o: /usr/include/va_list.h /usr/include/sys/limits.h 197 MSimone.o: /usr/include/sys/machine/machlimits.h /usr/include/sys/syslimits.h 198 MSimone.o: /usr/include/sys/machine/machtime.h /usr/include/sys/rt_limits.h 199 MSimone.o: /usr/include/string.h /usr/include/strings.h /usr/include/unistd.h 200 MSimone.o: /usr/include/sys/access.h /usr/include/fcntl.h 201 MSimone.o: /usr/include/sys/fcntl.h /usr/include/sys/mode.h 227 ../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/bits/huge_val.h 228 ../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/bits/mathdef.h 229 ../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/bits/mathcalls.h 230 ../../Detector/include-CORSIKA/CORStatfile.o: /usr/lib/gcc-lib/i486-linux/2.7.2.3/include/float.h 231 MSimone.o: MSimone.hxx /usr/include/stdlib.h /usr/include/features.h 232 MSimone.o: /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h 233 MSimone.o: /usr/lib/gcc-lib/i486-linux/2.7.2.3/include/stddef.h 234 MSimone.o: /usr/include/sys/types.h /usr/include/bits/types.h 235 MSimone.o: /usr/include/time.h /usr/include/endian.h 236 MSimone.o: /usr/include/bits/endian.h /usr/include/sys/select.h 237 MSimone.o: /usr/include/bits/select.h /usr/include/bits/sigset.h 238 MSimone.o: /usr/include/sys/sysmacros.h /usr/include/alloca.h 239 MSimone.o: /usr/include/stdio.h 240 MSimone.o: /usr/lib/gcc-lib/i486-linux/2.7.2.3/include/stdarg.h 241 MSimone.o: /usr/include/libio.h /usr/include/_G_config.h 242 MSimone.o: /usr/include/bits/stdio_lim.h /usr/include/string.h 243 MSimone.o: /usr/include/unistd.h /usr/include/bits/posix_opt.h 244 MSimone.o: /usr/include/bits/confname.h /usr/include/getopt.h 245 MSimone.o: /usr/include/fcntl.h /usr/include/bits/fcntl.h 202 246 MSimone.o: ../../Detector/include-CORSIKA/COREventHeader.hxx 203 MSimone.o: /usr/include/math.h 204 simone.o: /usr/include/stdlib.h /usr/include/standards.h 205 simone.o: /usr/include/getopt.h /usr/include/sys/types.h 206 simone.o: /usr/include/mach/machine/vm_types.h /usr/include/sys/select.h 247 MSimone.o: /usr/include/math.h /usr/include/bits/huge_val.h 248 MSimone.o: /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h 249 MSimone.o: /usr/lib/gcc-lib/i486-linux/2.7.2.3/include/float.h 250 simone.o: /usr/include/stdlib.h /usr/include/features.h 251 simone.o: /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h 252 simone.o: /usr/lib/gcc-lib/i486-linux/2.7.2.3/include/stddef.h 253 simone.o: /usr/include/sys/types.h /usr/include/bits/types.h 254 simone.o: /usr/include/time.h /usr/include/endian.h 255 simone.o: /usr/include/bits/endian.h /usr/include/sys/select.h 256 simone.o: /usr/include/bits/select.h /usr/include/bits/sigset.h 257 simone.o: /usr/include/sys/sysmacros.h /usr/include/alloca.h 207 258 simone.o: ../../Detector/include-CORSIKA/COREventHeader.hxx 208 simone.o: /usr/include/math.h ../../Detector/include-CORSIKA/CORParticle.hxx 259 simone.o: /usr/include/math.h /usr/include/bits/huge_val.h 260 simone.o: /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h 261 simone.o: /usr/lib/gcc-lib/i486-linux/2.7.2.3/include/float.h 262 simone.o: ../../Detector/include-CORSIKA/CORParticle.hxx 209 263 simone.o: ../../Detector/include-CORSIKA/CORStatfile.hxx MSimone.hxx 210 simone.o: /usr/include/stdio.h /usr/include/sys/seek.h /usr/include/va_list.h211 simone.o: /usr/ include/sys/limits.h /usr/include/sys/machine/machlimits.h212 simone.o: /usr/include/ sys/syslimits.h /usr/include/sys/machine/machtime.h213 simone.o: /usr/include/ sys/rt_limits.h /usr/include/string.h214 simone.o: /usr/include/ strings.h /usr/include/unistd.h215 simone.o: /usr/include/ sys/access.h /usr/include/fcntl.h216 simone.o: /usr/include/ sys/fcntl.h /usr/include/sys/mode.h264 simone.o: /usr/include/stdio.h 265 simone.o: /usr/lib/gcc-lib/i486-linux/2.7.2.3/include/stdarg.h 266 simone.o: /usr/include/libio.h /usr/include/_G_config.h 267 simone.o: /usr/include/bits/stdio_lim.h /usr/include/string.h 268 simone.o: /usr/include/unistd.h /usr/include/bits/posix_opt.h 269 simone.o: /usr/include/bits/confname.h /usr/include/getopt.h 270 simone.o: /usr/include/fcntl.h /usr/include/bits/fcntl.h -
trunk/MagicSoft/Simulation/Corsika/Simone/config.mk.linux-gnu
r324 r415 18 18 #--------------------------------------------------------------- 19 19 # $RCSfile: config.mk.linux-gnu,v $ 20 # $Revision: 1. 1.1.1$20 # $Revision: 1.2 $ 21 21 # $Author: harald $ 22 # $Date: 1999-11-18 09:39:14$22 # $Date: 2000-07-06 10:24:00 $ 23 23 ################################################################## 24 24 # @maintitle … … 52 52 53 53 54 ROOTLIBS = -L$(ROOTSYS)/lib -lNew -lBase -lCint -lClib \ 55 -lCont -lFunc -lGraf -lGraf3d -lHist -lHtml \ 56 -lMatrix -lMeta -lMinuit -lNet -lPostscript \ 57 -lProof -lTree -lUnix -lZip -lRint 54 ROOTLIBS = -L/cern/root/lib -lNew -lCore -lCint -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lm -ldl -lpthread -rdynamic 58 55 59 56 ROOTGLIBS = -lGpad -lGui -lGX11 -lX3d -lX11 -
trunk/MagicSoft/Simulation/Corsika/Simone/simone.cxx
r405 r415 7 7 #include <stdlib.h> 8 8 #include "TROOT.h" 9 #include "TApplication.h" 10 11 #include "TCanvas.h" 12 #include "TView.h" 13 14 #include "TSPHE.h" 15 #include "TBRIK.h" 16 17 #include "TNode.h" 9 18 10 19 #include "TFile.h" … … 17 26 #include "MSimone.hxx" 18 27 19 main() 20 21 28 int main(int argc, char **argv) 29 { 30 // initialise ROOT 22 31 23 TROOT simple("simple", "SIMONE - statistic of MonteCarlo"); 24 25 // char path[100] = "/hd61/Maggi/Data/mcMAGIC-1-30:30000-1" ; 26 char path[100] = "/hd02/Maggi/Data/prot_15/" ; 27 // char path[100] = "/data/mmcs/" ; 28 char cername[120] ; 29 char datname[120] ; 32 TROOT simple("simple", "SIMONE - statistic of MonteCarlo"); 30 33 31 ifstream cerfile ; 34 TApplication theApp("App", &argc, argv); 35 36 char path[100] = "/dat1/Mmcs/Gamm/" ; 37 // char path[100] = "/hd02/Maggi/Data/prot_15/" ; 38 // char path[100] = "/data/mmcs/" ; 39 char cername[120] ; 40 char datname[120] ; 41 42 ifstream cerfile ; 43 44 COREventHeader Event ; 45 CORParticle Photon ; 46 47 MSimone Infos ; 48 49 Int_t iPhotonInShower ; 50 51 Float_t lambda ; 52 53 cout << " SImulated MONte carlo Events" << endl ; 32 54 33 COREventHeader Event ; 34 CORParticle Photon ; 55 // 56 // now create a root-file for the ntuple output 57 // 58 59 TFile *outfile = new TFile("simone.root","RECREATE"); 60 61 TNtuple *Ntup = new TNtuple("simone", 62 "Simone info of mmcs", 63 "fPartId:fEnergy:fTheta:fPhi:fCoreX:fCoreY:fCoreD:fNumCerPhot"); 64 65 66 for (int i_cer = 1; i_cer <= 100; i_cer++ ) { 67 // 68 // info of progress 69 // 70 if (!( i_cer %10) ) 71 { 72 cout << i_cer << endl ; 73 } 35 74 36 MSimone Infos ; 75 // 76 // create the file names 77 // 78 sprintf ( cername, "%s/cer%06d", path, i_cer ) ; 79 sprintf ( datname, "%s/dat%06d", path, i_cer ) ; 37 80 38 Int_t iPhotonInShower ; 81 // cout << cername << endl ; 82 // cout << datname << endl ; 83 84 // 85 // try to open the files 86 // 87 88 cerfile.open( cername ); 89 90 if ( cerfile.bad() ) { 91 cout << "Cannot open input file: " << cername << endl ; 92 continue ; 93 } 94 95 // 96 // cout << " Read event " << endl ; 97 // 98 99 Event.read( cerfile ); 100 Infos.Transfer ( &Event ) ; 101 102 // 103 // loop over the particles (cerenkov photons) in 104 // the file 105 // 106 107 iPhotonInShower = 0 ; 108 109 while( ! (cerfile.eof() || cerfile.bad() )) { 110 111 // 112 // read in the particles 113 // 114 115 Photon.read ( cerfile ) ; 116 117 // 118 // only if the wavelength lambda is greater than 119 // 1.0 it is a real cerenkov photon 120 // 121 lambda = Photon.get_wl() ; 122 123 if ( lambda < 1.0 ) 124 break ; 125 126 iPhotonInShower++ ; 127 128 //Photon.print() ; 129 } 130 131 Infos.SetNumCerPhot( iPhotonInShower ) ; 132 133 // 134 // fill the ntuple 135 // 136 137 Infos.NtupFill ( Ntup ) ; 138 139 140 cerfile.close(); 141 142 143 144 } 145 146 147 // 148 // write all to file 149 // 150 outfile->Write() ; 39 151 40 Float_t lambda ;41 42 // now create a root-file for the ntuple output43 //152 153 // 154 // 155 // 44 156 45 TFile *outfile = new TFile("simone.root","RECREATE"); 46 47 TNtuple *Ntup = new TNtuple("simone", 48 "Simone info of mmcs", 49 "fPartId:fEnergy:fTheta:fPhi"); 157 Ntup->Draw("fEnergy") ; 50 158 51 159 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 } 61 62 // 63 // create the file names 64 // 65 sprintf ( cername, "%s/cer%06d", path, i_cer ) ; 66 sprintf ( datname, "%s/dat%06d", path, i_cer ) ; 67 68 // cout << cername << endl ; 69 // cout << datname << endl ; 70 71 // 72 // try to open the files 73 // 74 75 cerfile.open( cername ); 76 77 if ( cerfile.bad() ) { 78 cout << "Cannot open input file: " << cername << endl ; 79 continue ; 80 } 81 82 // 83 // cout << " Read event " << endl ; 84 // 85 86 Event.read( cerfile ); 87 Infos.Transfer ( &Event ) ; 88 89 // 90 // fill the ntuple 91 // 92 Infos.NtupFill ( Ntup ) ; 93 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 ; 160 theApp.Run(); 161 return 0; 162 163 164 } 125 165 126 166 127 128 cerfile.close();129 130 131 132 }133 134 135 //136 // write all to file137 //138 outfile->Write() ;139 140 141 //142 //143 //144 145 }146 147
Note:
See TracChangeset
for help on using the changeset viewer.