Author: [log in to unmask] Date: Mon Jan 23 11:07:45 2017 New Revision: 4687 Log: smear ecal hit time in mc matches data Modified: java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/cluster/HitTMCSmearDriver.java Modified: java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/cluster/HitTMCSmearDriver.java ============================================================================= --- java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/cluster/HitTMCSmearDriver.java (original) +++ java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/cluster/HitTMCSmearDriver.java Mon Jan 23 11:07:45 2017 @@ -30,9 +30,10 @@ // Time resolution as derived for 2016 data + // Factor is reduced by 2.0 through MC testing to match data private static double calcSmear(double energy, double time){ Random r = new Random(); - double sigT = r.nextGaussian()*Math.sqrt(Math.pow(0.188/energy, 2) + Math.pow(0.152, 2)); + double sigT = r.nextGaussian()*Math.sqrt(Math.pow(0.188/energy, 2) + Math.pow(0.152, 2))/2.0; return time + sigT; } @@ -42,15 +43,14 @@ if (event.hasCollection(CalorimeterHit.class, inputHitCollection)){ //Get the hits in the event List<CalorimeterHit> hits = event.get(CalorimeterHit.class, inputHitCollection); - for (CalorimeterHit iHit : hits){ double oldT = iHit.getTime(); double energy = iHit.getRawEnergy(); double newT = calcSmear(energy, oldT); - + ((BaseCalorimeterHit) iHit).setTime(newT); } } } -} +}