@@ -41,8 +41,6 @@ public class FinalStateMonitoring extends DataQualityMonitor {
4141
4242 private static Logger LOGGER = Logger .getLogger (FinalStateMonitoring .class .getPackage ().getName ());
4343
44- String finalStateParticlesColName = "FinalStateParticles" ;
45-
4644 String [] fpQuantNames = {"nEle_per_Event" , "nPos_per_Event" , "nPhoton_per_Event" , "nUnAssociatedTracks_per_Event" ,
4745 "avg_delX_at_ECal" , "avg_delY_at_ECal" , "avg_E_Over_P" , "avg_mom_beam_elec" , "sig_mom_beam_elec" };
4846 // some counters
@@ -92,22 +90,20 @@ public class FinalStateMonitoring extends DataQualityMonitor {
9290 /* number of unassocaited tracks/event */
9391 IHistogram1D nUnAssTracksHisto ;
9492
95- public void setFinalStateParticlesColName (String fsp ) {
96- this .finalStateParticlesColName = fsp ;
97- }
98-
9993 @ Override
10094 protected void detectorChanged (Detector detector ) {
10195 super .detectorChanged (detector );
10296 double maxFactor = 1.5 ;
10397 double feeMomentumCut = 0.75 ; // this number, multiplied by the beam energy, is the actual cut
104- beamEnergy = 4.5 ;
105- System .out .println ("Using beamEnergy = " + beamEnergy );
98+ System .out .println (this .getClass ().getName ()+":: setting beamEnergy = " +beamEnergy );
10699 LOGGER .info ("Setting up the plotter" );
107100 aida .tree ().cd ("/" );
108101 String trkType = "SeedTrack/" ;
109102 if (isGBL )
110103 trkType = "GBLTrack/" ;
104+ if (isKF )
105+ trkType = "KFTrack/" ;
106+
111107
112108 /* Final State Particle Quantities */
113109 /* plot electron & positron momentum separately */
@@ -247,12 +243,6 @@ public void process(EventHeader event) {
247243 if (fsCluster == null )
248244 throw new RuntimeException ("isPhoton==true but no cluster found: should never happen" );
249245 double ene = fsPart .getEnergy ();
250- // TODO: mg-May 14, 2014....I would like to do this!!!!
251- // double xpos = fsCluster.getPositionAtShowerMax(false)[0];// false-->assume a photon instead of
252- // electron from calculating shower depth
253- // double ypos = fsCluster.getPositionAtShowerMax(false)[1];
254- // but I can't because ReconParticles don't know about HPSEcalClusters, and casting it as one doesn't
255- // seem to work
256246 Hep3Vector clusterPosition = new BasicHep3Vector (fsCluster .getPosition ());
257247 double xpos = clusterPosition .x ();
258248 double ypos = clusterPosition .y ();
@@ -271,9 +261,9 @@ public void process(EventHeader event) {
271261 double ene = fsPart .getEnergy ();
272262 double eOverP = ene / mom .magnitude ();
273263 Hep3Vector clusterPosition = new BasicHep3Vector (fsCluster .getPosition ());// this gets position at
274- // shower max assuming it's an
275- // electron/positron
276- Hep3Vector trackPosAtEcal = TrackUtils .extrapolateTrack (fsTrack , clusterPosition .z ());
264+ //get this from stored track state...don't do extrapolation by hand (commented out below)
265+ Hep3Vector trackPosAtEcal = new BasicHep3Vector ( TrackUtils . getTrackStateAtECal ( fsTrack ). getReferencePoint ());
266+ // Hep3Vector trackPosAtEcal = TrackUtils.extrapolateTrack(fsTrack, clusterPosition.z());
277267 double dx = trackPosAtEcal .x () - clusterPosition .x ();// remember track vs detector coords
278268 double dy = trackPosAtEcal .y () - clusterPosition .y ();// remember track vs detector coords
279269
0 commit comments