Commit in mcd-analysis/src/main/java/org/lcsim/mcd/analysis/DRCorrection/alexDRCorr on MAIN | |||
backgroundAnalysisDriver.java | +21 | added 1.1 | |
DualCorrection.java | +12 | -6 | 1.1 -> 1.2 |
Resolution.java | +14 | -8 | 1.1 -> 1.2 |
proton_resolution_steering.xml | +1 | -1 | 1.1 -> 1.2 |
proton_calibration_steering.xml | +1 | -1 | 1.1 -> 1.2 |
electronCorrection.java | +12 | -6 | 1.1 -> 1.2 |
+61 | -22 |
Updated alexDRCorr files to use updated energy cut method. Previously it cut based on the energy of each MC contribution. Now it adds the energy in a cell that falls within a time cut, and then does the energy cut.
diff -N backgroundAnalysisDriver.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ backgroundAnalysisDriver.java 18 Apr 2014 22:02:58 -0000 1.1 @@ -0,0 +1,21 @@
+package org.lcsim.mcd.analysis.DRCorrection.alexDRCorr; + +import org.lcsim.event.EventHeader; +import org.lcsim.util.Driver; + +/** + * Driver to look at machine backgrounds of a single event. + * Each event in the file is a single interaction from the beam crossing + * Use this driver to find how timing cuts and energy cuts affect background + * + * Time cuts use time-of-flight correction + * Energy cuts depend on the sum + * @author aconway + */ +public class backgroundAnalysisDriver extends Driver { + + @Override + protected void process(EventHeader event) { + + } +}
diff -u -r1.1 -r1.2 --- DualCorrection.java 18 Apr 2014 20:52:20 -0000 1.1 +++ DualCorrection.java 18 Apr 2014 22:02:58 -0000 1.2 @@ -161,15 +161,18 @@
for (SimCalorimeterHit calorimeterHit : simCalorimeterHits) { if (cutCon.T_thresh > 0.0 || cutCon.S_thresh > 0.0) { Hep3Vector diffvec = VecOp.sub(calorimeterHit.getPositionVec(), origin);
+ double E_contrib = 0.0;
int ncontribs = calorimeterHit.getMCParticleCount(); for (int i=0; i<ncontribs; i++) { double tdep = calorimeterHit.getContributedTime(i); double tofl = tdep - (diffvec.magnitude()+dif_curv)/299.79;
- double edep = calorimeterHit.getContributedEnergy(i); - if ( (tofl < cutCon.T_thresh) && (edep > cutCon.S_thresh/1000.0) ) { - sumEEdep += edep;
+ if (tofl < cutCon.T_thresh) { + E_contrib += calorimeterHit.getContributedEnergy(i);
} }
+ if (E_contrib > cutCon.S_thresh) { + sumEEdep += E_contrib; + }
} else { sumEEdep = sumEEdep + calorimeterHit.getRawEnergy();
@@ -180,15 +183,18 @@
for (SimCalorimeterHit calorimeterHit : simCalorimeterHits) { if (cutCon.T_thresh > 0.0 || cutCon.C_thresh > 0.0) { Hep3Vector diffvec = VecOp.sub(calorimeterHit.getPositionVec(), origin);
+ double E_contrib = 0.0;
int ncontribs = calorimeterHit.getMCParticleCount(); for (int i=0; i<ncontribs; i++) { double tdep = calorimeterHit.getContributedTime(i); double tofl = tdep - (diffvec.magnitude()+dif_curv)/299.79;
- double edep = calorimeterHit.getContributedEnergy(i); - if ( (tofl < cutCon.T_thresh) && (edep > cutCon.C_thresh) ) { - sumECeren += edep;
+ if (tofl < cutCon.T_thresh) { + E_contrib += calorimeterHit.getContributedEnergy(i);
} }
+ if (E_contrib > cutCon.C_thresh) { + sumEEdep += E_contrib; + }
} else { sumECeren = sumECeren + calorimeterHit.getRawEnergy();
diff -u -r1.1 -r1.2 --- Resolution.java 18 Apr 2014 20:52:20 -0000 1.1 +++ Resolution.java 18 Apr 2014 22:02:58 -0000 1.2 @@ -173,15 +173,18 @@
for (SimCalorimeterHit calorimeterHit : simCalorimeterHits) { if (cutCon.T_thresh > 0.0 || cutCon.S_thresh > 0.0) { Hep3Vector diffvec = VecOp.sub(calorimeterHit.getPositionVec(), origin);
+ double E_contrib = 0.0;
int ncontribs = calorimeterHit.getMCParticleCount(); for (int i=0; i<ncontribs; i++) { double tdep = calorimeterHit.getContributedTime(i); double tofl = tdep - (diffvec.magnitude()+dif_curv)/299.79;
- double edep = calorimeterHit.getContributedEnergy(i); - if ( (tofl < cutCon.T_thresh) && (edep > cutCon.S_thresh/1000.0) ) { - sumEEdep += edep;
+ if (tofl < cutCon.T_thresh) { + E_contrib += calorimeterHit.getContributedEnergy(i);
} }
+ if (E_contrib > cutCon.S_thresh) { + sumEEdep += E_contrib; + }
} else { sumEEdep = sumEEdep + calorimeterHit.getRawEnergy();
@@ -192,15 +195,18 @@
for (SimCalorimeterHit calorimeterHit : simCalorimeterHits) { if (cutCon.T_thresh > 0.0 || cutCon.C_thresh > 0.0) { Hep3Vector diffvec = VecOp.sub(calorimeterHit.getPositionVec(), origin);
+ double E_contrib = 0.0;
int ncontribs = calorimeterHit.getMCParticleCount(); for (int i=0; i<ncontribs; i++) { double tdep = calorimeterHit.getContributedTime(i); double tofl = tdep - (diffvec.magnitude()+dif_curv)/299.79;
- double edep = calorimeterHit.getContributedEnergy(i); - if ( (tofl < cutCon.T_thresh) && (edep > cutCon.C_thresh) ) { - sumECeren += edep;
+ if (tofl < cutCon.T_thresh) { + E_contrib += calorimeterHit.getContributedEnergy(i);
} }
+ if (E_contrib > cutCon.C_thresh) { + sumEEdep += E_contrib; + }
} else { sumECeren = sumECeren + calorimeterHit.getRawEnergy();
@@ -300,8 +306,8 @@
double mean = result[1]; dp_DCorrFrac.coordinate(0).setValue(Ein_prev); dp_DCorrFrac.coordinate(1).setValue(mean/Ein_prev);
- dp_DCorrFrac.coordinate(1).setErrorMinus(sigma); - dp_DCorrFrac.coordinate(1).setErrorPlus(sigma);
+ dp_DCorrFrac.coordinate(1).setErrorMinus(sigma/Ein_prev); + dp_DCorrFrac.coordinate(1).setErrorPlus(sigma/Ein_prev);
IHistogram1D Edep_scor_conv; if (Edep_scor.isConverted()) {
diff -u -r1.1 -r1.2 --- proton_resolution_steering.xml 18 Apr 2014 20:52:20 -0000 1.1 +++ proton_resolution_steering.xml 18 Apr 2014 22:02:58 -0000 1.2 @@ -24,7 +24,7 @@
<driver name="DRResolutionDriver" type="org.lcsim.mcd.analysis.DRCorrection.alexDRCorr.DRResolutionDriver"> <myP_name>proton</myP_name>
- <myS_thresh>0.0</myS_thresh>
+ <myS_thresh>1.0</myS_thresh>
<myC_thresh>0.0</myC_thresh> <myT_thresh>3.0</myT_thresh> <myTag>default</myTag>
diff -u -r1.1 -r1.2 --- proton_calibration_steering.xml 18 Apr 2014 20:52:20 -0000 1.1 +++ proton_calibration_steering.xml 18 Apr 2014 22:02:58 -0000 1.2 @@ -24,7 +24,7 @@
<driver name="DRCalibrationDriver" type="org.lcsim.mcd.analysis.DRCorrection.alexDRCorr.DRCalibrationDriver"> <myP_name>proton</myP_name>
- <myS_thresh>0.0</myS_thresh>
+ <myS_thresh>1.0</myS_thresh>
<myC_thresh>0.0</myC_thresh> <myT_thresh>3.0</myT_thresh> <myTag>default</myTag>
diff -u -r1.1 -r1.2 --- electronCorrection.java 18 Apr 2014 20:52:20 -0000 1.1 +++ electronCorrection.java 18 Apr 2014 22:02:58 -0000 1.2 @@ -141,15 +141,18 @@
for (SimCalorimeterHit calorimeterHit : simCalorimeterHits) { if (cutCon.T_thresh > 0.0 || cutCon.S_thresh > 0.0) { Hep3Vector diffvec = VecOp.sub(calorimeterHit.getPositionVec(), origin);
+ double E_contrib = 0.0;
int ncontribs = calorimeterHit.getMCParticleCount(); for (int i=0; i<ncontribs; i++) { double tdep = calorimeterHit.getContributedTime(i); double tofl = tdep - (diffvec.magnitude()+dif_curv)/299.79;
- double edep = calorimeterHit.getContributedEnergy(i); - if ( (tofl < cutCon.T_thresh) && (edep > cutCon.S_thresh/1000.0) ) { - sumEEdep += edep;
+ if (tofl < cutCon.T_thresh) { + E_contrib += calorimeterHit.getContributedEnergy(i);
} }
+ if (E_contrib > cutCon.S_thresh) { + sumEEdep += E_contrib; + }
} else { sumEEdep = sumEEdep + calorimeterHit.getRawEnergy();
@@ -160,15 +163,18 @@
for (SimCalorimeterHit calorimeterHit : simCalorimeterHits) { if (cutCon.T_thresh > 0.0 || cutCon.C_thresh > 0.0) { Hep3Vector diffvec = VecOp.sub(calorimeterHit.getPositionVec(), origin);
+ double E_contrib = 0.0;
int ncontribs = calorimeterHit.getMCParticleCount(); for (int i=0; i<ncontribs; i++) { double tdep = calorimeterHit.getContributedTime(i); double tofl = tdep - (diffvec.magnitude()+dif_curv)/299.79;
- double edep = calorimeterHit.getContributedEnergy(i); - if ( (tofl < cutCon.T_thresh) && (edep > cutCon.C_thresh) ) { - sumECeren += edep;
+ if (tofl < cutCon.T_thresh) { + E_contrib += calorimeterHit.getContributedEnergy(i);
} }
+ if (E_contrib > cutCon.C_thresh) { + sumEEdep += E_contrib; + }
} else { sumECeren = sumECeren + calorimeterHit.getRawEnergy();
Use REPLY-ALL to reply to list
To unsubscribe from the LCD-CVS list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=LCD-CVS&A=1