LISTSERV mailing list manager LISTSERV 16.5

Help for HPS-SOFTWARE Archives


HPS-SOFTWARE Archives

HPS-SOFTWARE Archives


HPS-SOFTWARE@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

HPS-SOFTWARE Home

HPS-SOFTWARE Home

HPS-SOFTWARE  December 2014

HPS-SOFTWARE December 2014

Subject:

Re: DST files from Data

From:

Rafayel Paremuzyan <[log in to unmask]>

Reply-To:

Software for the Heavy Photon Search Experiment <[log in to unmask]>

Date:

Fri, 19 Dec 2014 14:59:53 -0500

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (183 lines)

Ok Omar, sorry,
I should have been first sent to hps-software list.
Anyway this modification was done locally in my computer just
to be able to have a look into new data files.

Thanks Jaeremy, I didn't realize that before.
Sure I will try to use that.

Rafo


On 12/19/2014 02:53 PM, McCormick, Jeremy I. wrote:
> Hi, Rafyel et al.
>
> There is an alternative way of getting the LCIO data into ROOT.
>
> https://confluence.slac.stanford.edu/display/hpsg/Loading+LCIO+Files+into+ROOT
>
> You can just load directly an LCIO file into a .C script using this setup.
>
> First you need to install the standalone LCIO C++ binding, which is easy to do (installation instructions in the above link).
>
> This way there isn't any requirement that certain collections be present.
>
> There is a standard LCIO example that was modified to histogram track information from LCIO using ROOT.
>
> https://confluence.slac.stanford.edu/download/attachments/127607696/anajob.C
>
> This could very easily be adapted for ECAL data.  All you need to do it replace the Track class with CalorimeterHit or Cluster and get the data from the event using the correct collection name.
>
> e.g. the line from that script
>
> tracks = evt->getCollection("MatchedTracks");
>
> becomes this to get clusters
>
> collection = evt->getCollection("EcalClustersIC");
>
> or this to get hits
>
> collection = evt->getCollection("EcalCalHits");
>
> The last part is getting object pointers, and of course you gotta do an on-the-fly cast because this is C++!
>
> e.g. to get a cluster
>
> EVENT::Cluster* cluster = (EVENT::Cluster*)collection->getElementAt(i);
>
> or to get a hit
>
> EVENT::CalorimeterHit* calHit = (EVENT::CalorimeterHit*)collection->getElementAt(i);
>
> The just fill your H1D or whatever from the object information using the LCIO API e.g.
>
> CalorimeterHit API
>
> http://lcio.desy.de/v02-04-03/doc/doxygen_api/html/classEVENT_1_1CalorimeterHit.html
>
> calHit->getEnergy();
> calHit->getTime();
> etc.
>
> Note that there is some ID magic that needs to happen for getting layer number etc. and that's a bit more advanced!  (Not in the example.)
>
> Cluster API
>
> http://lcio.desy.de/v02-04-03/doc/doxygen_api/html/classEVENT_1_1Cluster.html
>
> cluster->getEnergy();
> cluster->getPosition()[0]; // cluster X pos
> etc.
>
> If you know C++ I believe you should easily be able to modify this script to get at the LCIO collection you want to analyze.
>
> --Jeremy
>
> -----Original Message-----
> From: [log in to unmask] [mailto:[log in to unmask]] On Behalf Of Mathew Graham
> Sent: Friday, December 19, 2014 11:19 AM
> To: Omar Moreno; Rafayel Paremuzyan
> Cc: hps-software
> Subject: Re: DST files from Data
>
>
>
>
> 	On 12/19/2014 11:15:29 AM, Omar Moreno <[log in to unmask]> wrote:
>
>
>
> 	On Wed, Dec 17, 2014 at 7:08 PM, Rafayel Paremuzyan <[log in to unmask] <mailto:[log in to unmask]> > wrote:
>
> 		Hi,
> 		
> 		I tried to convert some recon files from data into dst root files.
> 		Since it only contains ecal information, in the
> 		HpsEventBuilder.cxx I only let ecal_writer-writeData(event, hps_event),
> 		and commented other writers (svt, particle etc)
> 		
>
>
> 	It's a terrible idea to start hacking up the DST maker.  There are some collections which are dependent on others and if you just comment out the writers, it will likely break things.  Furthermore, whatever DST files you generate will not be backwards compatible because the class versions will have likely changed.  If you want DST files and you see the DST maker isn't working correctly, please send an email to the software list first.
> 	
> 	
> 	That said, I was assuming that we were already making DST's as part of the recon chain.  Matt is this being done?
>
> Mathew Graham:
>
> No...there's no chain yet as we still haven't started "production".
>
>
>
> 	I'm going to begin cleaning up the DST writer so it makes it easier to run over recon files containing ECal data only.  Once it's done, I'll generate some DST's and put them in the volatile area under the appropriate folder.  It's probably going to take me a while due to the holiday, but I'll try to get it done ASAP.
> 	
> 	​
> 	
>
>
> 		With this I was able to convert 2 files from run 3258,
> 		and on the 3th file about in the middle I got an exception
> 		
> 		 A runtime error has occured : lcio::DataNotAvailableException: LCEventImpl::getCollection: collection not in event:EcalClusters
> 		 the program will have to be terminated - sorry.
> 		
> 		However when I tried to convert files from more recent run 3340,
> 		I got the same exception at the beginning.
> 		
> 		Looking into the slcio file through JAS, it shows that some portion of events have no any collection in it
> 		except "TriggerBank".
> 		
> 		The question is, is it possible to skip these events in the dst maker.
> 		From first sight I didn't find a way, but if there is a possibility please point me there,
> 		I will try to do it.
> 		
>
>
> 	​There is a way to skip events, but we shouldn't.  The DST writers were specifically designed to throw exceptions if expected collections aren't found.  The error you are seeing is indicating that either the collection name has changed or, as you mention above, the collection is missing in the recon file, so as far as I'm concerned, the DST maker did it's job.  This is a problem with the reconstruction that should be fixed in hps-java and not at the DST level.
> 	
> 	
> 	Can someone more familiar with the ECal recon take a look at why empty collections aren't being added for some events?​
> 	
>
>
> 		Rafo
> 		
>
> ________________________________
>
>
> 		Use REPLY-ALL to reply to list
>
> 		To unsubscribe from the HPS-SOFTWARE list, click the following link:
> 		https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=HPS-SOFTWARE&A=1
>
>
> ________________________________
>
> 	Use REPLY-ALL to reply to list
>
> 	To unsubscribe from the HPS-SOFTWARE list, click the following link:
> 	https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=HPS-SOFTWARE&A=1
>
>
> ________________________________
>
> Use REPLY-ALL to reply to list
>
> To unsubscribe from the HPS-SOFTWARE list, click the following link:
> https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=HPS-SOFTWARE&A=1
>
>
> ########################################################################
> Use REPLY-ALL to reply to list
>
> To unsubscribe from the HPS-SOFTWARE list, click the following link:
> https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=HPS-SOFTWARE&A=1

########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the HPS-SOFTWARE list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=HPS-SOFTWARE&A=1

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

April 2024
March 2024
February 2024
January 2024
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
December 2022
November 2022
October 2022
September 2022
August 2022
June 2022
April 2022
March 2022
February 2022
January 2022
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011

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