Needs["ErrorBarPlots`"]

HOM dip by delaying one photon with respect to the other

summary : 
N123, N124 and N134 are the measured 3 fold coincidences between the trigger (1) and the respective detectors in the HOM interferometer.
An event is registered if after the detection of the trigger, we get clicks on 2 of the HOM detectors within 80 ns from the detection of the trigger (after correcting for cable delays).
The events are normalized to the total number of triggers. Thus, the y-axis in the plots is the probability of a coincidence in HOM given a trigger event.
A123, A124 and A134 : background due to accidental 3-fold coincidences.

plotdata1={};error1={};plotdata2={};error2={};

Perpendicular polarisation

N123=320;
N124=290;
N134=186;
A123=69.7;
A124=64.7;
A134=41.4;

p=170090+108123+97506;
ti=32198490;

perpcross=((N123+N124)/ti)//N
Δperpcross=((Sqrt[N123+N124])/ti);
perpwithin=((N123+N124-A123-A124)/ti);

0 ns Delay

N123=115;
N124=83;
N134=232;
A123=55.1;
A124=47.5;
A134=31.4;

p=130321+86767+71671;

ti=24582417;

cross=((N123+N124)/ti);
Δcross=((Sqrt[N123+N124])/ti);
within=((N123+N124-A123-A124)/ti);

plotdata1=Append[plotdata1,{0,cross}];
error1=Append[error1,Δcross];
plotdata2=Append[plotdata2,{0,within}];

3 ns Delay

N123=39;
N124=44;
N134=94;
A123=23.4;
A124=21.2;
A134=14.0;

p=53329+34936+28910;

ti=9753034;

cross=((N123+N124)/ti);
Δcross=((Sqrt[N123+N124])/ti);
within=((N123+N124-A123-A124)/ti);

plotdata1=Append[plotdata1,{3,cross}];
error1=Append[error1,Δcross];
plotdata2=Append[plotdata2,{3,within}];

8 ns Delay

N123=83;
N124=58;
N134=84;
A123=25.1;
A124=24.4;
A134=13.7;
ti=3981972+2176773+5122298;

cross=((N123+N124)/ti);
Δcross=((Sqrt[N123+N124])/ti);
within=((N123+N124-A123-A124)/ti);

plotdata1=Append[plotdata1,{8,cross}];
error1=Append[error1,Δcross];
plotdata2=Append[plotdata2,{8,within}];

19 ns

N123=81;
N124=83;
N134=110;
A123=31.8;
A124=27.0;
A134=18.1;

p=67345+43694+36158;

ti=11431718;

cross=((N123+N124)/ti);
Δcross=((Sqrt[N123+N124])/ti);
within=((N123+N124-A123-A124)/ti);

plotdata1=Append[plotdata1,{19,cross}];
error1=Append[error1,Δcross];
plotdata2=Append[plotdata2,{19,within}];

39 ns

N123=127;
N124=103;
N134=88;
A123=33.9;
A124=28.7;
A134=18.9;

p=75956+48831+41052;

ti=13334451;

cross=((N123+N124)/ti);
Δcross=((Sqrt[N123+N124])/ti);
within=((N123+N124-A123-A124)/ti);

plotdata1=Append[plotdata1,{39,cross}];
error1=Append[error1,Δcross];
plotdata2=Append[plotdata2,{39,within}];

-6 ns

N123=59;
N124=59;
N134=112;
A123=24.6;
A124=21.2;
A134=13.9;
p=58518+37221+31428;
ti=10490505;

cross=((N123+N124)/ti);
Δcross=((Sqrt[N123+N124])/ti);
within=((N123+N124-A123-A124)/ti);

plotdata1=Append[plotdata1,{-6,cross}];
error1=Append[error1,Δcross];
plotdata2=Append[plotdata2,{-6,within}];

-14 ns

N123=147;
N124=101;
N134=115;
A123=35.1;
A124=29.9;
A134=19.6;

p=81326+52417+43805;

ti=14995206;

cross=((N123+N124)/ti);
Δcross=((Sqrt[N123+N124])/ti);
within=((N123+N124-A123-A124)/ti);

plotdata1=Append[plotdata1,{-14,cross}];
error1=Append[error1,Δcross];
plotdata2=Append[plotdata2,{-14,within}];

-30 ns

N123=127;
N124=122;
N134=91;
A123=32;
A124=27.6;
A134=17.8;

p=76255+48895+41001;

ti=14030586

cross=((N123+N124)/ti);
Δcross=((Sqrt[N123+N124])/ti);
within=((N123+N124-A123-A124)/ti);

plotdata1=Append[plotdata1,{-30,cross}];
error1=Append[error1,Δcross];
plotdata2=Append[plotdata2,{-30,within}];

26 ns

N123=109;
N124=94;
N134=96;
A123=30.5;
A124=26.9;
A134=17.6;

p=68538+44511+37547;

ti=12965463;

cross=((N123+N124)/ti);
Δcross=((Sqrt[N123+N124])/ti);
within=((N123+N124-A123-A124)/ti);

plotdata1=Append[plotdata1,{26,cross}];
error1=Append[error1,Δcross];
plotdata2=Append[plotdata2,{26,within}];

-50 ns

N123=166;
N124=168;
N134=97;
A123=43.3;
A124=37.3;
A134=24.0;
p=95328+60959+51212;

ti=17765583;

cross=((N123+N124)/ti);
Δcross=((Sqrt[N123+N124])/ti);
within=((N123+N124-A123-A124)/ti);

plotdata1=Append[plotdata1,{-50,cross}];
error1=Append[error1,Δcross];
plotdata2=Append[plotdata2,{-50,within}];

Plot - Not corrected for accidentals

errorplot1=Transpose[{Transpose[{plotdata1[[All,1]],plotdata1[[All,2]]}],ErrorBar[1,#]&/@error1}];

Xi1[t_,t0_]=(1/(Sqrt[τ1])) HeavisideTheta[t-t0]*Exp[((-(t-t0))/(2 τ1))];
Xi2[t_,t0_]=(1/(Sqrt[τ2]))HeavisideTheta[t-t0]*Exp[((-(t-t0))/(2 τ2))]/. τ2->26;

((Δperpcross)/perpcross)//N

J[Δ_]=A(∫_0^∞)Xi2[x,0]Xi1[x,Δ]\[DifferentialD]x;

plot3=Plot[perpcross(1-((J[t+1])^2))/.{τ1->13,A->0.82},{t,-52,55},PlotRange->{{-50,50},{0,perpcross}},PlotStyle->{Thickness[0.004]}];

plot2=ErrorListPlot[errorplot1,PlotRange->{{-52,55},{0,1.1 perpcross}},PlotStyle->{Red,Thick},PlotMarkers->{"■",12}];

plot4=ErrorListPlot[{{{0,perpcross},ErrorBar[Δperpcross]}},PlotStyle->{Darker[Green],Thickness[0.004]},PlotMarkers->{"●",12}];

plot5=Plot[perpcross,{x,-52,55},PlotStyle->{Dashed,Black}];

Show[plot2,plot3,plot4,plot5,Frame->{True,True,False,False},AxesOrigin->{-50,0},FrameLabel->{"Delay between the photons (ns)","Normalized coincidences ( (Subscript[N, ||])/N⊥ )"}]

(* 
Export["HOM_nocorrection.dat",Transpose[{plotdata1[[All,1]],plotdata1[[All,2]],error1}]//N]
*)

theorynocorr=Table[{t,(1-((J[t+1])^2))}/.{τ1->13,A->0.82},{t,-52,55,0.5}]//FullSimplify;

(*
 Export["HOM_nocorrection_theory.dat",Transpose[{theorynocorr[[All,1]],perpcross theorynocorr[[All,2]]}]];
*)

Plot - corrected for accidentals

errorplot2=Transpose[{Transpose[{plotdata2[[All,1]],plotdata2[[All,2]]}],ErrorBar[1,#]&/@error1}];

plot3=Plot[perpwithin(1-((J[t+1])^2))/.{τ1->13,A->0.94},{t,-52,55},PlotRange->{{-50,50},{0,perpwithin}},PlotStyle->{Thickness[0.004]}];

plot2=ErrorListPlot[errorplot2,PlotRange->{{-52,55},{0,1.1 perpwithin}},PlotStyle->{Red,Thick},PlotMarkers->{"■",12}];

plot4=ErrorListPlot[{{{0,perpwithin},ErrorBar[Δperpwithin]}},PlotStyle->{Darker[Green],Thickness[0.004]},PlotMarkers->{"●",12}];

plot5=Plot[perpwithin,{x,-52,55},PlotStyle->{Dashed,Black}];

Show[plot2,plot3,plot4,plot5,Frame->{True,True,False,False},AxesOrigin->{-50,0},FrameLabel->{"Delay between the photons (ns)","Normalized coincidences ( (Subscript[N, ||])/N⊥ )"}]

(*
Export["HOM_withcorrection.dat",Transpose[{plotdata2[[All,1]],plotdata2[[All,2]],error1}]//N]
*)

theorywithcorr=Table[{t,(1-((J[t+1])^2))}/.{τ1->13,A->0.94},{t,-52,55,0.5}]//FullSimplify;

(*
Export["HOM_withcorrection_theory.dat",Transpose[{theorywithcorr[[All,1]],perpwithin theorywithcorr[[All,2]]}]];
*)

((Δperpcross)/perpwithin)

perpwithin//N