# TDC V1190 Set up file generated by Deltat : 16-Apr-2008 10:30:27
# bins are always in TDC channel units (195.3125 ps/channel)

INSTRUMENT=HighField

DESCRIPTION=No Veto -- 1port
TYPE=TDCV1190
RESOLUTION=100

MDELAY=0
PDELAY=2000
#REWINDTIMEBINS=10000000

MCOINCIDENCEW=50
PCOINCIDENCEW=50
VCOINCIDENCEW=100

MUONRATEFACTOR=0.954732
#MUONRATEFACTOR=1000
INFINITELYLOWMUONRATE

DATAWINDOWMIN=-2
DATAWINDOWMAX=10.0
PILEUPWINDOWMIN=-10.2
PILEUPWINDOWMAX=10.2

102; "M up";         M; 0.4;  2005; -51 ;
  1; "B1";           P; 0.4;  2005; ; B1;  1485; 1515; 50995;
  2; "B2";           P; 0.4;  2005; ; B2;  1485; 1515; 50995;
  3; "B3";           P; 0.4;  2005; ; B3;  1485; 1515; 50995;
  4; "B4";           P; 0.4;  2005; ; B4;  1485; 1515; 50995;
  5; "B5";           P; 0.4;  2005; ; B5;  1485; 1515; 50995;
  6; "B6";           P; 0.4;  2005; ; B6;  1485; 1515; 50995;
  7; "B7";           P; 0.4;  2005; ; B7;  1485; 1515; 50995;
  8; "B8";           P; 0.4;  2005; ; B8;  1485; 1515; 50995;
 11; "F1";           P; 0.4;  2005; ; F11; 1485; 1515; 50995;
 12; "F2";           P; 0.4;  2005; ; F12; 1485; 1515; 50995;
 13; "F3";           P; 0.4;  2005; ; F13; 1485; 1515; 50995;
 14; "F4";           P; 0.4;  2005; ; F14; 1485; 1515; 50995;
 15; "F5";           P; 0.4;  2005; ; F15; 1485; 1515; 50995;
 16; "F6";           P; 0.4;  2005; ; F16; 1485; 1515; 50995;
 17; "F7";           P; 0.4;  2005; ; F17; 1485; 1515; 50995;
 18; "F8";           P; 0.4;  2005; ; F18; 1485; 1515; 50995;
 51; "Mveto";        V; 0.8;  2005; ; MV;  1485; 1515; 50995;
! 61; "PB1";          V; 0.1;  2005; ; PB1; 1485; 1515; 50995;
! 62; "PB2";          V; 0.1;  2005; ; PB2; 1485; 1515; 50995;
! 63; "PB3";          V; 0.1;  2005; ; PB3; 1485; 1515; 50995;
! 64; "PB4";          V; 0.1;  2005; ; PB4; 1485; 1515; 50995;
! 65; "PB5";          V; 0.1;  2005; ; PB5; 1485; 1515; 50995;
! 66; "PB6";          V; 0.1;  2005; ; PB6; 1485; 1515; 50995;
! 67; "PB7";          V; 0.1;  2005; ; PB7; 1485; 1515; 50995;
! 68; "PB8";          V; 0.1;  2005; ; PB8; 1485; 1515; 50995;
! 71; "PF1";          V; 0.1;  2005; ; PF1; 1485; 1515; 50995;
! 72; "PF2";          V; 0.1;  2005; ; PF2; 1485; 1515; 50995;
! 73; "PF3";          V; 0.1;  2005; ; PF3; 1485; 1515; 50995;
! 74; "PF4";          V; 0.1;  2005; ; PF4; 1485; 1515; 50995;
! 75; "PF5";          V; 0.1;  2005; ; PF5; 1485; 1515; 50995;
! 76; "PF6";          V; 0.1;  2005; ; PF6; 1485; 1515; 50995;
! 77; "PF7";          V; 0.1;  2005; ; PF7; 1485; 1515; 50995;
! 78; "PF8";          V; 0.1;  2005; ; PF8; 1485; 1515; 50995;
!30;  Ch30;          N;
!31;  Ch31;          N;

counterPhaseShifts 1  0  2 45  3 90  4 135  5 180  6 225  7 270  8 315
counterPhaseShifts 11 0 12 45 13 90 14 135 15 180 16 225 17 270 18 315
#counterPhaseShifts 1  0  8 45  7 90  6 135  5 180  4 225  3 270  2 315
#counterPhaseShifts 11 0 18 45 17 90 16 135 15 180 14 225 13 270 12 315

counterGrouping B 1 2 3 4 5 6 7 8
counterGrouping F 11 12 13 14 15 16 17 18
counterGrouping U 1 11
counterGrouping D 5 15
counterGrouping L 3 13
counterGrouping R 7 17

sampleID 201 202

musrTH1D hMuTargetPol_Theta  "Muon polarisation in the sample;#theta (deg);N"   300 60. 120. muTargetPol_Theta
musrTH1D hMuTargetPol_Phi    "Muon polarisation in the sample;#phi (deg);N"     1800 -180. 180. muTargetPol_Phi
musrTH1D hMuTargetPol_Phi360 "Muon polarisation in the sample;#phi+360 (deg);N" 1800    0. 360. muTargetPol_Phi360
musrTH1D hPos_Phi_MINUS_muDecayPol_Phi    ";#phi_{e ini} - #phi_{#mu decay spin} (deg);N" 360 -180. 180. pos_Phi_MINUS_muDecayPol_Phi
musrTH1D hPos_Phi_MINUS_muDecayPol_Phi360 ";#phi_{e ini} - #phi_{#mu decay spin} (deg);N" 360    0. 360. pos_Phi_MINUS_muDecayPol_Phi360
musrTH1D hdetP_phi_MINUS_pos_Phi    ";#phi_{det} - #phi_{e ini}  (deg);N" 360 -180. 180. detP_phi_MINUS_pos_Phi
musrTH1D hdetP_phi_MINUS_pos_Phi360 ";#phi_{det} - #phi_{e ini}  (deg);N" 360    0. 360. detP_phi_MINUS_pos_Phi360
musrTH1D hdet_time1_MINUS_muDecayTime ";TOF_{e} + TDC smearing;N" 500 0. 500. det_time1_MINUS_muDecayTime
musrTH1D hdetP_time_start_MINUS_muDecayTime ";TOF_{e};N" 500 0. 500. detP_time_start_MINUS_muDecayTime
musrTH2D hMuDecayMap "Muon decay map;z [mm]; r[mm]" 100 -80. 20. 40 0. 20. muDecayPosZ muDecayPosR
musrTH1D hMuDecayPosZall "Z of muons when they decay;z[mm];N" 4002 -2001 2001 muDecayPosZ
musrTH1D hMuDecayPosZ "Penetration of muons into the sample;z[mm];N" 100 -5.0 5. muDecayPosZ
musrTH1D hMuDecayPosX "X of decayed muons;x[mm];N" 100 -5.0 5. muDecayPosX
musrTH1D hPosMom      "Momentum of the produced positrons;P [MeV];N" 55 0. 55. pos_Momentum
musrTH1D hdet_m0edep  "Energy deposited in the trigger;E[MeV];N" 100 0. 2 det_m0edep
musrTH1D hdet_posEdep  "Energy deposited in the positron Counters;E[MeV];N" 100 0. 2 det_posEdep
#musrTH1D hdet_time0  "detected muSR spectra;time[#mus];N" 220 -11. 11. det_time0
#musrTH1D hdet_time1  "detected muSR spectra;time[#mus];N" 220 -11. 11. det_time1
#musrTH1D hdet_time10  "detected muSR spectra;time[#mus];N" 220 -11. 11. det_time10
#musrTH1D hdet_time10  "detected muSR spectra;time[#mus];N" 240 -1. 11. det_time10
musrTH1D hdet_time10  "detected muSR spectra;time[#mus];N" 120 0.386 0.398 det_time10
musrTH1D hdet_time20  "detected muSR spectra (phase shifted);time[#mus];N" 120 0.386 0.398 det_time20
musrTH1D hdet_time10_bgr1  "detected muSR spectra (phase shifted);time[#mus];N" 280 -3. 11. det_time10
musrTH1D hdet_time10_bgr3  "detected muSR spectra (phase shifted);time[#mus];N" 280 -3. 11. det_time10
#musrTH1D hdet_time20  "detected muSR spectra (phase shifted);time[#mus];N" 240 -1. 11. det_time20
musrTH1D hgen_time10  "generated muSR spectra;time[#mus];N" 240 -11. 11. gen_time10
musrTH1D hdet_time10_MINUS_gen_time10   "detected - generated ;time_{det}-time_{gen} [ps];N" 100 -500. 500. det_time10_MINUS_gen_time10
#musrTH1D hMuDecayDetID "Detector ID where the muons decay;Detector ID; N" 4000 -2000. 2000. muDecayDetID
musrTH1D hMuDecayDetID "Detector ID where the muons decay;Detector ID; N" 2002 -1001. 1001. muDecayDetID
musrTH1D hMuDecayDetIDpileup "Detector ID where the pileup muons decay;Detector ID; N" 2002 -1001. 1001. pileup_muDecayDetID
humanDecayHistograms hMuDecayDetID hMuDecayDetIDpileup 201 Sample 202 Sample 165 Holder 166 Holder 245 CollimB 246 CollimB 241 CollimA 242 CollimA 102 M0 109 M0hold 1 BC 2 BC 3 BC 4 BC 5 BC 6 BC 7 BC 8 BC 11 FC 12 FC 13 FC 14 FC 15 FC 16 FC 17 FC 18 FC 511 Shield1 512 Shield1 513 Shield1 515 Shield1 516 Shield1  521 Shield2 522 Shield2 523 Shield2 525 Shield2 526 Shield2  531 Shield3 532 Shield3 533 Shield3 535 Shield3 536 Shield3  541 Shield4 542 Shield4 543 Shield4 545 Shield4 546 Shield4 51 Veto0 61 Veto1 62 Veto1 63 Veto1 64 Veto1 -1 World 231 World 233 World -1000 Escaped
musrTH1D hdet_time20_rotref "rot ref frame;time[#mus];N" 240 -1.0 11. det_time20 rotreference 1354 0
#musrTH1D hdet_time20_rotrefTwo "rot ref frame 2;time[#mus];N" 240 -1.0 11. det_time20 rotreference -1353 0
musrTH1D hdet_time10_exp "hdet_time10_exp;time[#mus];N" 240 -1.0 11. det_time10 correctexpdecay
musrTH2D hMuTargetPolPhi_pInit ";#phi_{#mu spin}  (deg); p_{#mu init}  (MeV/c)" 100 0. 360. 100 25.7 28.9 muTargetPol_Phi360 muIniMomZ
musrTH2D hMuTargetPolPhi_RInit ";#phi_{#mu spin}  (deg); R_{#mu init}  (mm)" 100 0. 360. 100 0. 40. muTargetPol_Phi360 muIniPosR



condition 0 alwaysTrue
condition 1 oncePerEvent
condition 2 muonDecayedInSample_gen
condition 3 muonTriggered_gen
condition 4 muonTriggered_det
condition 5 positronHit_det
condition 6 goodEvent_det
condition 7 goodEvent_gen
condition 8 goodEvent_det_AND_goodEvent_gen
condition 9 pileupEvent
condition 10 goodEvent_det_AND_muonDecayedInSample_gen
condition 11 goodEvent_F_det
condition 12 goodEvent_B_det
condition 13 goodEvent_U_det
condition 14 goodEvent_D_det
condition 15 goodEvent_L_det
condition 16 goodEvent_R_det
condition 17 goodEvent_F_det_AND_pileupEvent
condition 18 goodEvent_B_det_AND_pileupEvent
condition 19 goodEvent_U_det_AND_pileupEvent
condition 20 goodEvent_D_det_AND_pileupEvent
condition 21 goodEvent_L_det_AND_pileupEvent
condition 22 goodEvent_R_det_AND_pileupEvent
condition 29 muonTriggered_gen_AND_muonDecayedInSample_gen
fit hMuTargetPol_Phi gaus "" -180. 180. 1000. 0. 10.
fit hMuTargetPol_Phi360 gaus "" 0. 360. 1000. 0. 10.
fit hMuTargetPol_Theta gaus "" 60. 120. 1000. 0. 10.
fit hdet_time20 funct1 "" 0.388 0.3967 0 0 0.3 100
#fit hdet_time20 simpleExpoPLUSconst "" 0.1 9.9 100 1
fit hdet_time20_rotref rotFrameTime20 "" 0.2 9.8 0 0 100
fit hdet_time10 simpleExpoPLUSconst "" 0.2 9.8 100 1
fit hdet_time10_exp TFieldCosPLUSbg "" 0.2 9.8 1 0 0.3 300 1
fit hdet_time10_bgr1 pol0 "" 0.2 9.8
fit hdet_time10_bgr3 pol0 "" -1.9 -0.1
#fit hdet_time20_rotrefTwo rotFrameTime20 "" 0.1 9.9 0 0 100

#draw hMuDecayPosZ 0
#draw hMuDecayPosZall 1
#draw hMuDecayPosZ 1
#draw hMuDecayPosZ 2
#draw hMuDecayPosZ 3
#draw hMuDecayPosZ 4
#draw hMuDecayMap 0
#draw hMuDecayMap 1
#draw hdet_m0edep 0
#draw hdet_m0edep 1
#draw hdet_m0edep 2
#draw hdet_m0edep 3
#draw hdet_m0edep 4
#draw hdet_m0edep 5
#draw hdet_m0edep 6
draw hdet_time10 6
draw hgen_time10 7
draw hdet_time20 6
draw hgen_time20 7
draw hdet_time20_rotref 6
draw hdet_time20_bgr 6
#draw hdet_time20_rotrefTwo 6
draw hdet_time10_MINUS_gen_time10 8
#draw hdet_posEdep 5
#draw hMuDecayDetID 1
#draw hdet_m0edep 9
#draw hdet_time10 9
#draw hMuDecayDetIDpileup 1
#draw hMuDecayDetIDpileup 9
#draw humanDecayHistograms 1
#draw humanDecayHistograms 6
#draw humanDecayHistograms 9
#draw humanDecayPileupHistograms 1
#draw humanDecayPileupHistograms 6
#draw humanDecayPileupHistograms 9
$
