lcsim-contrib/src/main/java/org/lcsim/contrib/Cassell/recon/analysis
diff -u -r1.3 -r1.4
--- QqbarAnalysisDriver.java 7 Nov 2010 12:21:56 -0000 1.3
+++ QqbarAnalysisDriver.java 12 Nov 2010 19:38:51 -0000 1.4
@@ -17,8 +17,8 @@
List<String> rplnames;
double[] ctl = {.1,.2,.3,.4,.5,.6,.7,.8,.9,.925,.95,.975,1.};
String[] ctname;
- double[] cscl = {1.005,1.02,1.05,1.1,1.2,1.4,1.67};
- String[] cscname;
+ String[] phiname;
+ double[] phil = {3.333,6.667,10.,13.333,16.667,20.,23.333,26.667,30.};
double[] cutval = {.8,.95,.95};
String[] cutname;
double ZE;
@@ -46,7 +46,7 @@
calc = new RMS90Calculator();
rplnames = new ArrayList<String>();
ctname = new String[ctl.length];
- cscname = new String[cscl.length];
+ phiname = new String[phil.length];
cutname = new String[cutval.length];
double ll = 0.;
for(int i=0;i<ctl.length;i++)
@@ -58,13 +58,13 @@
ctname[i] = lls+"<ct<"+uls;
}
ll = 0.;
- for(int i=0;i<cscl.length;i++)
+ for(int i=0;i<phil.length;i++)
{
- if(i > 0)ll = cscl[i-1];
- double ul = cscl[i];
+ if(i > 0)ll = phil[i-1];
+ double ul = phil[i];
double lls = ((int)(ll*1000. + .5))/1000.;
double uls = ((int)(ul*1000. + .5))/1000.;
- cscname[i] = lls+"<csc<"+uls;
+ phiname[i] = lls+"<csc<"+uls;
}
cutname[0] = "barrel";
cutname[1] = "forward";
@@ -79,6 +79,7 @@
double Zmass = 0.;
ZE = 0.;
double ct = 0.;
+ double phi = 0.;
for(MCParticle p:mcl)
{
int id = Math.abs(p.getPDGID());
@@ -90,6 +91,11 @@
ZE = p.getParents().get(0).getEnergy();
Hep3Vector pp = p.getMomentum();
ct = Math.abs(pp.z()/pp.magnitude());
+ double ph = Math.atan2(pp.y(),pp.x());
+ if(ph < 0.)ph += 2.*Math.PI;
+ double phideg = ph*180./Math.PI;
+ int n12 = (int) (phideg/30.);
+ phi = phideg - 30.*n12;
}
}
}
@@ -133,12 +139,11 @@
if(ct < ctl[i])break;
ctb++;
}
- double csct = 1./Math.sqrt(1. - ct*ct);
- int cscb = 0;
- for(int i=0;i<cscl.length;i++)
+ int phib = 0;
+ for(int i=0;i<phil.length;i++)
{
- if(csct < cscl[i])break;
- cscb++;
+ if(phi < phil[i])break;
+ phib++;
}
List<List<ReconstructedParticle>> all = event.get(ReconstructedParticle.class);
for(List<ReconstructedParticle> rl:all)
@@ -210,8 +215,8 @@
aida.cloud1D(rname+"/"+ctname[ctb]+"/dM",nmax).fill(dM);
if(ct < .8)
{
- aida.cloud1D(rname+"/"+cscname[cscb]+"/dE",nmax).fill(dE);
- aida.cloud1D(rname+"/"+cscname[cscb]+"/dM",nmax).fill(dM);
+ aida.cloud1D(rname+"/"+phiname[phib]+"/dE",nmax).fill(dE);
+ aida.cloud1D(rname+"/"+phiname[phib]+"/dM",nmax).fill(dM);
}
}
}
@@ -319,20 +324,20 @@
dp5.coordinate(1).setErrorPlus(err5);
dp5.coordinate(1).setErrorMinus(err5);
}
- IDataPointSet dps3 = dpsf.create(rname+":alpha90 vs csct",rname+":alph vs csct",2);
- IDataPointSet dps4 = dpsf.create(rname+":dEoE vs csct",rname+":res vs csct",2);
- IDataPointSet dps6 = dpsf.create(rname+":mean dE vs csct",rname+":m90 vs csct",2);
+ IDataPointSet dps3 = dpsf.create(rname+":alpha90 vs phi",rname+":alph vs phi",2);
+ IDataPointSet dps4 = dpsf.create(rname+":dEoE vs phi",rname+":res vs phi",2);
+ IDataPointSet dps6 = dpsf.create(rname+":mean dE vs phi",rname+":m90 vs phi",2);
ll=1.;
- for(int i=0;i<cscl.length;i++)
+ for(int i=0;i<phil.length;i++)
{
- ICloud1D thisc = aida.cloud1D(rname+"/"+cscname[i]+"/dE");
+ ICloud1D thisc = aida.cloud1D(rname+"/"+phiname[i]+"/dE");
double r90 = calc.calculateRMS90(thisc);
double m90 = calc.getMEAN90();
int ent = thisc.entries();
double alpha = r90/Math.sqrt(ZE+m90);
double dEoE = r90/(ZE+m90);
- if(i > 0)ll = cscl[i-1];
- double x = (cscl[i]+ll)/2.;
+ if(i > 0)ll = phil[i-1];
+ double x = (phil[i]+ll)/2.;
double err = (1.1*r90/Math.sqrt(1.8*ent))/Math.sqrt(ZE+m90);
double err2 = (1.1*r90/Math.sqrt(1.8*ent))/(ZE+m90);
double err6 = (1.1*r90/Math.sqrt(.9*ent));