Index: /trunk/Mars/resmc/hawcseye/absorption-length.txt
===================================================================
--- /trunk/Mars/resmc/hawcseye/absorption-length.txt	(revision 19660)
+++ /trunk/Mars/resmc/hawcseye/absorption-length.txt	(revision 19660)
@@ -0,0 +1,73 @@
+# Aborpstion length alpha / mm
+# Tim Niggemann, PhD
+245.9125418735214 0.0552725751364207
+260.0952104309799 1.478763146944928
+268.6047769053169 2.3329557515215313
+273.4233887399258 3.1043945902354935
+277.8227272820405 3.9543037216456227
+281.438802159428 4.804426359506408
+285.4047607328435 5.772798210652972
+288.97108098199556 6.763975219561246
+290.6611370436206 7.8010561153625915
+292.9340657155625 8.850947398203886
+294.3521298095005 9.826498403754066
+295.0395443283396 10.653101971658742
+297.0324745406945 11.664161768785235
+298.5948842457431 12.785577712599462
+300.6902213021136 14.06139885270435
+301.6419263059551 15.248908387152717
+303.4337791931654 16.45996590388907
+304.9115488409859 17.821336409944994
+306.6889900427762 19.258279303434396
+307.6399325235796 20.447950590695754
+309.30940046317625 21.54339881244779
+310.92442425785316 22.515653812165834
+313.20650320625214 23.539604061251257
+314.7963637406721 24.583196903797912
+315.27614323623897 25.443361016916562
+318.876014499067 26.33942090205335
+322.446337994169 27.319248708693436
+326.78276838564113 28.34750244717509
+330.5632051038891 29.286744011958973
+334.1992962110265 30.08012063847882
+338.8049353610967 30.90025229209769
+343.6334599952008 31.643588344242815
+349.7232304138665 32.458992355025515
+354.60098135667255 33.30066528447046
+365.11105425440724 34.034269636341946
+380.5061765297411 34.79587764678732
+399.8534656143977 35.454787668057065
+421.167578895396 36.08859855032529
+442.50456786753693 36.65755684820385
+463.9476168622488 36.92583498209406
+485.44993469310316 37.02608596552018
+506.9896854731002 37.02021453812688
+528.4982421288117 37.1027784530831
+549.9371319069521 37.38284796595324
+571.3729022726641 37.67176101305833
+592.8024338135189 37.97836112863333
+614.2288459419451 38.29380477844328
+635.6833327822284 38.52965662013867
+657.17005355094 38.674125274739545
+678.6661325569372 38.79206332663557
+700.3109035553622 38.48845957999889
+722.0284608437869 37.978506701213334
+743.3727284449278 38.526830085877016
+764.8261754810682 38.76562977231738
+786.2889807544942 38.97789885605289
+807.7705025024916 39.13710673437869
+829.3903182014882 38.904251261621624
+845.2685433844875 38.2962625288356
+855.3086842270329 37.58670052835513
+864.3823271187977 36.84173648952368
+868.6303429640033 35.900306483620476
+870.684351271709 35.07295564313848
+878.0940163897517 34.04960588094555
+886.2373811750455 33.16655654514619
+882.5078809957419 32.6379946382174
+896.3508767338551 34.4693729071071
+900.1496140050174 35.35673240437927
+907.0931487898748 36.02491863394118
+906.9894456566944 36.78148763797651
+913.0475005635685 37.647156214276386
+928.8102155040372 38.43410968399316
Index: /trunk/Mars/resmc/hawcseye/ceres.rc
===================================================================
--- /trunk/Mars/resmc/hawcseye/ceres.rc	(revision 19660)
+++ /trunk/Mars/resmc/hawcseye/ceres.rc	(revision 19660)
@@ -0,0 +1,267 @@
+# ==========================================================================
+#############################################################################
+# ==========================================================================
+#                              General
+# ==========================================================================
+#############################################################################
+# ==========================================================================
+
+# -------------------------------------------------------------------------
+# Use this if you want to setup the logging stream for the jobs
+# (overwrites command line options)
+# -------------------------------------------------------------------------
+MLog.VerbosityLevel: 4
+#MLog.DebugLevel:     1
+#MLog.NoColors:       yes
+
+# ==========================================================================
+#############################################################################
+# ==========================================================================
+#                                   Ceres
+# ==========================================================================
+#############################################################################
+# ==========================================================================
+
+# -------------------------------------------------------------------------
+# Use this if you want to write the MJStar output somewhere
+# If you don't want it, it is written to the calibration output anyhow.
+# -------------------------------------------------------------------------
+#PathOut: .
+#PathIn: .
+
+
+# -------------------------------------------------------------------------
+# Configure Eventloop
+# -------------------------------------------------------------------------
+#MaxEvents: 10000
+#Overwrite: yes,no
+
+
+# -------------------------------------------------------------------------
+# Use this to setup binnings. For more details see: MBinning::ReadEnv
+# -------------------------------------------------------------------------
+# BinningEnergy.Raw:      100      1    100000  log
+# BinningSize.Raw:        100      1  10000000  log
+BinningImpact.Raw:       60   0       600
+# BinningHeight.Raw:       50      0        12
+# BinningAz.Raw:          360   -360       360
+# BinningZd.Raw:           70      0        70
+BinningViewCone.Raw:     56      0        14
+BinningTrigPos.Raw:     100     -5        45
+BinningTotLength.Raw:   150      0       150
+# BinningEvtWidth.Raw:    150      0        25
+# BinningDist.Raw:        100      0       2.5
+# BinningDistC.Raw:       100      0       2.5
+# BinningThreshold.Raw:    35    0.9     90000  log
+# BinningEnergyEst.Raw:   100    0.9     90000  log
+
+#BinningAlpha.Raw:        36    0    90
+BinningWidth.Raw:        50    0    3
+BinningLength.Raw:       25    0    3
+BinningDist.Raw:         25    0    15
+
+
+# -------------------------------------------------------------------------
+# Initialize random number generator (see MJob::InitRandomNumberGenerator)
+# -------------------------------------------------------------------------
+RandomNumberGenerator: TRandom3
+#RandomNumberSeedValue: 0
+
+
+MRead.CorsikaInputCard: <your-corsika-input-card>
+
+# -------------------------------------------------------------------------
+# Ceres general setup
+# -------------------------------------------------------------------------
+
+# Switch off the camera "electronics"
+#Camera: Off
+
+# Force the use of the "hardware" trigger for calibration data
+#ForceTrigger: Yes
+
+
+# -------------------------------------------------------------------------
+# Some setup for the atmosphere. The default should be well suited.
+# -------------------------------------------------------------------------
+#MSimAtmosphere.FileAerosols: resmc/fact/atmopshere-aerosols.txt
+#MSimAtmosphere.FileOzone:    resmc/fact/atmopshere-ozone.txt
+
+
+# -------------------------------------------------------------------------
+# Here you can control the poiting of the telescope. To switch on
+# off-target observations set a value for the distance !=0 [deg].
+# For details see MSimPointingPos
+# -------------------------------------------------------------------------
+#MSimPointingPos.OffTargetDistance: 0.4
+#MSimPointingPos.OffTargetPhi: -1
+
+
+# -------------------------------------------------------------------------
+# Setup the reflector and camera geometry
+# -------------------------------------------------------------------------
+#Reflector.Constructor: MReflector();
+Reflector.Constructor: MFresnelLens();
+
+# For the file definition see MReflector::ReadFile
+
+Reflector.FileName: resmc/hawcseye/fake-reflector.txt
+# Units mm: ~0.02° 
+#Reflector.SetSigmaPSF: 1.8
+# Units mm: ~0.03°
+#Reflector.SetSigmaPSF: 2.6
+#Reflector.SetSigmaPSF: 1.66
+
+# new Value from 7.12.2012:
+# 0.95 of the reflected light was inside a circle with a radius of 2.25mm. 
+# This corresponds to a SigmaPSF of 1.3 mm
+# This value is based on a direct measurement of the mirrors. There
+# is no way it can be wrong. Only the ray-tracing algorithm could be wrong.
+Reflector.SetSigmaPSF: 5
+
+# --- DWARF ---
+# distance from mirror to camera [cm]
+#focal_distance     489.73
+# TRUE focal of the paraboloid (must correspond to that of the mirror positions defined below!)
+#paraboloid_focal   488.87
+
+#MGeomCam.Constructor:   MGeomCamDwarf(189.8,  9.5,  4.8887);
+MGeomCam.Constructor:   MGeomCamFAMOUS(0.502);
+
+#MSimBundlePhotons.FileName: resmc/fact/dwarf-fact.txt
+
+# Set the APD type (1: 30x30 <default>, 2: 60x60, 3:60x60(ct=15%))
+MSimAPD.Type: 5
+MSimExcessNoise.ExcessNoise: 0.12
+
+# -------------------------------------------------------------------------
+# Setup the absorption, conversion efficiency and angular acceptance
+# -------------------------------------------------------------------------
+MirrorReflectivity.FileName:           resmc/hawcseye/reflectivity.txt
+PhotonDetectionEfficiency.FileName:    resmc/hawcseye/pde.txt
+ConesAngularAcceptance.FileName:       resmc/hawcseye/cones-angular-acceptance.txt
+ConesTransmission.FileName:            resmc/fact/Transmittance_1439Cones_FACT_bearbeitet.txt
+
+# Skipped otherwise due to CEFFIC option
+SimPhotonDetectionEfficiency.Force: Yes
+SimMirrorReflectivity.Force: Yes
+
+
+# A backward motivated overall PDE adjustment. Introduced by Fabian T. to produce the ICRC2015 Crab spectrum. Fabian, please comment a bit more on this. In case this is only about the additional shielding of our camera support structure, then we schould actually name it like this.
+
+AdditionalPhotonAcceptance.Function.Name:  0.8
+AdditionalPhotonAcceptance.Function.Npx:   100
+AdditionalPhotonAcceptance.Function.Xmin:  290
+AdditionalPhotonAcceptance.Function.Xmax:  900
+
+# -------------------------------------------------------------------------
+# Setup what in MMCS would be called "additional spot size"
+# -------------------------------------------------------------------------
+#MSimPSF.Sigma: -1
+#MSimReflector.DetectorMargin: 0
+
+# -------------------------------------------------------------------------
+# Setup the dark counts (FrequencyFixed) and the NSB noise per cm^2
+# -------------------------------------------------------------------------
+# Turn off some checks: ONLY(!!!) for testing purposes
+MSimRandomPhotons.Force: Yes
+# Dark Counts per APD: ~4MHz
+#MSimRandomPhotons.FrequencyFixed: 0.004
+# NSB photon rate per cm^2 ~40MHz (folded with the cones' angular
+# acceptance and the wavelength acceptance of the camera (window, apd, etc)
+# 0.040 1/ns/cm^2 NSB-rate:
+#MSimRandomPhotons.FrequencyNSB:   0.025
+
+# FIXME: With a class describing the cones we could give NSB as
+# per sr and cm^2
+
+# -------------------------------------------------------------------------
+# Setup the trigger
+# -------------------------------------------------------------------------
+# This line could be omitted but then the discriminator would be
+# evaluated for all pixels not just for the pixels which are
+# later "connected" in the trigger (used in the coincidence map)
+# MSimTrigger.FileNameRouteAC:         resmc/fact/magic-trigger-1NN.txt
+
+MSimTrigger.FileNameRouteAC: resmc/hawcseye/trigger.txt
+
+# DiscriminatorThreshold is 9*offset(-1850)+21*gain(22.375)=16180.125
+MSimTrigger.DiscriminatorThreshold: -16180.125
+
+# Every Pixel(!) should see the same signal independant of its size
+MSimCalibrationSignal.NumPhotons: 24
+MSimCalibrationSignal.NumEvents:  1000
+
+# This is in nano-seconds (Mars-new) to be independent of the sampling frequency
+# This is in samples      (Mars-new2) to be independent of the sampling frequency
+IntendedPulsePos.Val: 150
+
+#PulseShape.Function.Name: exp(-(x/2)^2/2)
+#PulseShape.FileName: resmc/fact/dwarf-pulse.txt
+
+# -------------------------------------------------------------------------
+# Description how a pedestal/calibration signal is produced
+# -------------------------------------------------------------------------
+
+#MSimCalibrationSignal.NumEvents:  1000
+#MSimCalibrationSignal.NumPhotons:    5
+#MSimCalibrationSignal.TimeJitter:  1.0
+
+
+# -------------------------------------------------------------------------
+# Setup the FADC
+# -------------------------------------------------------------------------
+
+MRawRunHeader.SamplingFrequency: 2000
+MRawRunHeader.NumSamples:        1024
+MRawRunHeader.NumBytesPerSample:    2
+MRawRunHeader.FadcResolution:      12
+
+MSimCamera.DefaultOffset: -1850.0
+MSimCamera.DefaultNoise:    2.8125
+MSimCamera.DefaultGain:    22.375
+
+# Value for the fudgefactor in the calculation of the accoupling:
+MSimCamera.ACFudgeFactor: 0.3367
+MSimCamera.ACTimeConstant: 20
+
+#MSimReadout.fConversionFactor: 1
+
+# The number of sampling points is almost irrelevant because they
+# are equidistant, i.e. calculated and no search is necessary.
+# Nevertheless, you must make sure that there are enough points
+# to sample the function accuratly enough.
+# Attention: x in the function is given in slices, so if you change the sampling
+# frequency you have to change also this function
+PulseShape.Function.Name:  (1.626*(1-exp(-0.3803*0.5*x))*exp(-0.0649*0.5*x))
+PulseShape.Function.Npx:   900
+PulseShape.Function.Xmin:   0
+PulseShape.Function.Xmax:   300
+
+# -------------------------------------------------------------------------
+# Setup an image cleaning on the pure gamma signal (without noise)
+# -------------------------------------------------------------------------
+
+#MImgCleanStd.CleanLevel1:   6.0
+#MImgCleanStd.CleanLevel2:   6.0
+
+# -------------------------------------------------------------------------
+# This is a cut executed after the calculation of the image parameters
+# -------------------------------------------------------------------------
+Cut.Inverted: Yes
+
+#Cut.Condition: MNewImagePar.fNumUsedPixels>3 && MHillas.fSize>6
+Cut.Condition: MHillas.fSize>10
+#&& MHillas.fSize>30
+#MSimTrigger.SimulateElectronics: Off
+
+# Does not trigger anyway
+ContEmpty3.Condition: MPhotonEvent.GetNumPhotons<10
+
+MFixTimeOffset.FileName: resmc/fact/pixel_delays_ALL_ZERO.csv
+# MFixTimeOffset.FileName: resmc/fact/AllPhidoFiles_delays.csv
+
+ResidualTimeSpread.Val: 0.0
+GapdTimeJitter.Val: 0.0
+
+# last line comment
Index: /trunk/Mars/resmc/hawcseye/cones-angular-acceptance.txt
===================================================================
--- /trunk/Mars/resmc/hawcseye/cones-angular-acceptance.txt	(revision 19660)
+++ /trunk/Mars/resmc/hawcseye/cones-angular-acceptance.txt	(revision 19660)
@@ -0,0 +1,21 @@
+0.0 0.93
+5.5 0.93
+10.5 0.93
+15.5 0.93
+20.5 0.93
+25.5 0.93
+30.5 0.93
+35.5 0.87
+37.5 0.8
+39.5 0.6
+41.5 0.4
+44.5 0.2
+#51.5 0.05
+52.5 0.013
+#53.5 0.0013
+56.5 0
+58.5 0
+65.5 0
+70.5 0
+80.5 0
+88.5 0
Index: /trunk/Mars/resmc/hawcseye/fake-reflector.txt
===================================================================
--- /trunk/Mars/resmc/hawcseye/fake-reflector.txt	(revision 19660)
+++ /trunk/Mars/resmc/hawcseye/fake-reflector.txt	(revision 19660)
@@ -0,0 +1,20 @@
+0 0 0 0 0 1 50.21 Disk 54.97
+
+#########################################################################################		
+# x y z nx ny nz F Type fD  								#
+#											#
+# x, y and z describe the x-, y- and z-coordinate of the center of the mirror		#
+#											#
+# nx, ny and nz describe the x-, y- and z- component of the normal vector of the mirror #
+# which is normed									#
+#											#
+# F is the focal distance of the spherical mirror					#
+#											#
+# Type: Hex is a hexagonal mirror							#
+#											#
+# fD = 60.6 is the distance of two parallel sides of the hexagon in cm			#
+#										  	#
+# the normalvectors point to (0,0,978.132)						#
+#											#
+# Ann-Kristin Overkemping, 03 2012							#
+#########################################################################################
Index: /trunk/Mars/resmc/hawcseye/pde.txt
===================================================================
--- /trunk/Mars/resmc/hawcseye/pde.txt	(revision 19660)
+++ /trunk/Mars/resmc/hawcseye/pde.txt	(revision 19660)
@@ -0,0 +1,59 @@
+# several points are outcomment, for a faster calculation of the spline
+# 20120415, 10:45, ftemme: Multiply the pde-values for an overvoltage of 1.4 V (from file fact-pde-1.4V.txt) with k = 0.843306985
+# 2 artificial points        
+250.014 0          
+280 0          
+290 0.01       
+#           
+320 0.105098129          
+360 0.1863992011          
+369.655 0.2048325318          
+380.359 0.2276281527          
+392.682 0.2463550079          
+400 0.2572654815          
+410 0.2702522085          
+420 0.2845908742          
+429.652 0.2962930004          
+440 0.3044849204          
+450 0.3086132544          
+460 0.3101896529          
+469.397 0.3107836081          
+480 0.3096647623          
+487.328 0.3072224668          
+500 0.3041844896          
+#509.192 0.2980765926          
+520 0.2904466855          
+#530 0.2804625402          
+540 0.2728050073          
+#550 0.2627457543          
+560 0.2528367167          
+#570 0.2439783237          
+580 0.2337688553          
+#590 0.224234493          
+600 0.2137245937          
+610 0.2046408776          
+616.74 0.196416152          
+626.822 0.188389987          
+636.905 0.1812564813          
+646.987 0.1723385202          
+#660 0.1645540811          
+#670 0.1575725175          
+680 0.1522424602          
+#690 0.1451106812          
+#700 0.1386548716          
+710 0.1334750296          
+#720 0.1275441107          
+#730 0.1213136241          
+740 0.1145573837          
+#750 0.1099024324          
+#760 0.1035968382          
+770 0.0981916732          
+#780 0.0924860773          
+790 0.0869315602          
+846.399 0.04
+# artificial          
+880 0.0086330699          
+890 0.000863307          
+900 0          
+925 0          
+950 0          
Index: /trunk/Mars/resmc/hawcseye/reflectivity.txt
===================================================================
--- /trunk/Mars/resmc/hawcseye/reflectivity.txt	(revision 19660)
+++ /trunk/Mars/resmc/hawcseye/reflectivity.txt	(revision 19660)
@@ -0,0 +1,10 @@
+ 100 1.0
+ 200 1.0
+ 300 1.0
+ 400 1.0
+ 500 1.0
+ 600 1.0
+ 700 1.0
+ 800 1.0
+ 900 1.0
+1000 1.0
Index: /trunk/Mars/resmc/hawcseye/transmission-pmma-3mm.txt
===================================================================
--- /trunk/Mars/resmc/hawcseye/transmission-pmma-3mm.txt	(revision 19660)
+++ /trunk/Mars/resmc/hawcseye/transmission-pmma-3mm.txt	(revision 19660)
@@ -0,0 +1,71 @@
+250.58364278170546 2.010118609808302
+252.49697751965863 6.434059596684008
+252.6188737031914 3.857934149112495
+252.7467558600228 9.342545080711972
+253.91402065322796 11.954353855061981
+254.24052828769095 15.55840448928889
+252.60799011537603 13.974426906972255
+254.5343851587076 19.23458362821991
+252.934497749839 17.57847754119919
+254.769470655521 23.040594075618287
+253.26100538430205 21.1825281754261
+255.0437370684699 26.760050317371764
+253.4569099649798 25.075092828469394
+255.0159839195406 30.281628091384547
+253.65281454565763 28.967657481512703
+255.31800348141883 33.93977510413956
+255.0894481372947 32.282006796434274
+255.84041569655966 37.111054710141886
+255.61186035243554 35.45328640243662
+256.7056609278865 40.60631893706818
+256.1342725675763 38.62456600843896
+257.0680844021404 43.91476143205719
+255.67716187932814 41.79703291493025
+257.63620768610605 46.9850611314738
+258.3953379362325 49.84967586243483
+258.7463336432802 53.183363334070286
+257.3750015785357 51.02235771412088
+259.50546389340667 56.04797806503131
+259.8760500585222 59.33838843384431
+258.4851275357098 57.220659916717366
+260.47682410593404 62.33655962855681
+261.1167790694815 65.24817661762441
+261.3828827915689 68.12059784930032
+262.1909891868648 70.66075303914181
+263.33703098382983 73.31944534154948
+263.78543480182566 75.78914908862754
+265.2356728782321 77.99211093960542
+266.32947345368314 79.90114171328608
+268.6231895857856 82.4034517000421
+271.49645676905993 84.70681464861735
+274.4840016243963 86.75772783072829
+280.39378980817634 88.8411433637244
+293.2973715221537 90.6133080735406
+313.3265371206024 91.78308508664401
+334.62373964125646 92.3143211031459
+356.06935472302996 92.51770028008372
+377.5476205682499 92.64895095231742
+399.034791167137 92.7605302141773
+420.53086651969113 92.85243806566334
+442.0803703942484 92.82631745490629
+463.62987426880574 92.80019684414926
+485.17937814336295 92.77407623339221
+506.7051360081411 92.80041271696543
+528.213084365585 92.86609202128633
+549.753683486475 92.85964282090313
+571.2705365975858 92.9056507148502
+592.7962944623641 92.9319871984234
+614.3309570808094 92.93865227162277
+635.8626514480322 92.95187448161343
+657.4121553225896 92.92575387085638
+679.009151216705 92.79471907143885
+700.5586550912622 92.7685984606818
+722.0695716999285 92.82772062821142
+743.5982978159291 92.84749997499335
+765.1270239319294 92.86727932177529
+786.6765278064868 92.84115871101825
+808.2586824444902 92.74290959555711
+829.9417576240553 92.4217178291924
+851.8385468916322 91.62841221385543
+873.1535589196205 92.12030540960964
+894.4745074500538 92.59908433178127
Index: /trunk/Mars/resmc/hawcseye/trigger.txt
===================================================================
--- /trunk/Mars/resmc/hawcseye/trigger.txt	(revision 19660)
+++ /trunk/Mars/resmc/hawcseye/trigger.txt	(revision 19660)
@@ -0,0 +1,8 @@
+#FACT Trigger-Patches (SoftIDs)
+ 0  1  2  3  4  5  6
+32 55 56 16 33 57 17 34 58
+35 59 60 18 36 37  7 19 38
+20 39 40  8 21 41  9 22 42
+23 43 44 10 24 45 11 25 46
+48 47 26 49 27 12 50 28 13
+52 51 29 53 30 14 54 31 15
