LISTSERV mailing list manager LISTSERV 16.5

Help for LCD-SIM Archives


LCD-SIM Archives

LCD-SIM Archives


LCD-SIM@LISTSERV.SLAC.STANFORD.EDU


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

LCD-SIM Home

LCD-SIM Home

LCD-SIM  April 1999

LCD-SIM April 1999

Subject:

Re: Skipping events in JAS

From:

"Michael T. Ronan" <[log in to unmask]>

Date:

21 Apr 1999 11:33:12 -0700Wed, 21 Apr 1999 11:33:12 -0700

Content-Type:

MULTIPART/MIXED

Parts/Attachments:

Parts/Attachments

text/plain (71 lines) , Reconstruction.java (27 lines) , Reconstruction.class (27 lines)

Gene,

  I was writing the following reply when I received Tony's response to
your query. His solution of using a predicate is elegant. However, it
won't work for you if you've added the TrackReco processes to the
driver's list. Please also look over the approach that I've outlined
below.

  I use a Reconstruction class to select how many (or which) events I
analyze. I've modified it to also allow selecting events. I've attached
the modified version which includes the following elements and methods:

    static int FirstEvent=1;
    static int LastEvent=1000000;

    static boolean GoodEvent = true;

    public static int getFirstEvent() { return FirstEvent; }
    public static int getLastEvent()  { return LastEvent; }
    public static void setFirstEvent(int first) { FirstEvent = first; }
    public static void setLastEvent(int last)   { LastEvent  = last; }

    public static boolean isGoodEvent() { return GoodEvent; }
    public static void setGoodEvent(boolean good) { GoodEvent = good; }

I use it in each process with a line like

    if
(nEvt<Reconstruction.getFirstEvent()||nEvt>Reconstruction.getLastEvent())
return;

However, this version with GoodEvent is not know by the server, and it's
not easy to fool the server unless you're willing to rebuild its code. I
would suggest the following.

  In your main process, TrackJetAna, execute TrackReco's processes. That
is, take out the

        add(new TrackReco());

line in your driver JetFinderTestV5, and in TrackJetAna's constructor
and processor methods add

  public TrackJetAna()
  {
    // Finds tracks in main tracker.
    tracker = new hep.lcd.recon.tracking.tpc.TPCReco();
    // Add reconstructed tracks to event
    addReconTrks = new AddReconTrks(tracker);
    // Turn off track fitting
    addReconTrks.setNoFitting();
    ...
  }

  public void process(LCDEvent event)
  {
    ...
    if (!Reconstruction.isGoodEvent()) return;
    tracker.process(event);
    addReconTrks.process(event);
    ...
  }
  hep.lcd.recon.tracking.Tracker tracker;
  hep.lcd.recon.tracking.AddReconTrks addReconTrks;

It would be more direct to modifiy the base Driver class to check flags
or whatever, but we'll need to review the design after Sitges.

Mike



/* Reconstruction.java */ public class Reconstruction {     static int FirstEvent=1;     static int LastEvent=1000000;     static boolean GoodEvent = true;     public static boolean Hist = true;     public static boolean MCHist = true;     public static boolean TrkHist = true;     public static boolean CalHist = true;     public static boolean PIDHist = true;     public static boolean EvtHist = true;     public static boolean AnlHist = true;     public static int getFirstEvent() { return FirstEvent; }     public static int getLastEvent() { return LastEvent; }     public static void setFirstEvent(int first) { FirstEvent = first; }     public static void setLastEvent(int last) { LastEvent = last; }     public static boolean isGoodEvent() { return GoodEvent; }     public static void setGoodEvent(boolean good) { GoodEvent = good; } }

Top of Message | Previous Page | Permalink

Advanced Options


Options

Log In

Log In

Get Password

Get Password


Search Archives

Search Archives


Subscribe or Unsubscribe

Subscribe or Unsubscribe


Archives

May 2015
March 2015
February 2015
January 2013
November 2012
June 2012
July 2011
April 2011
September 2010
June 2010
February 2010
October 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
December 2008
November 2008
October 2008
September 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
December 2006
November 2006
September 2006
August 2006
July 2006
April 2006
March 2006
February 2006
January 2006
December 2005
November 2005
October 2005
August 2005
July 2005
June 2005
May 2005
March 2005
February 2005
January 2005
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
April 2003
March 2003
February 2003
January 2003
July 2002
October 2001
June 2001
May 2001
March 2001
February 2001
December 2000
November 2000
October 2000
June 2000
April 2000
March 2000
February 2000
January 2000
November 1999
October 1999
September 1999
August 1999
July 1999
June 1999
May 1999
April 1999
March 1999
February 1999
January 1999

ATOM RSS1 RSS2



LISTSERV.SLAC.STANFORD.EDU

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager

Privacy Notice, Security Notice and Terms of Use