Skip to Content.
Sympa Menu

sphenix-tracking-l - Re: [Sphenix-tracking-l] PHG4TpcDigitizer timing

sphenix-tracking-l AT lists.bnl.gov

Subject: sPHENIX tracking discussion

List archive

Chronological Thread  
  • From: pinkenburg <pinkenburg AT bnl.gov>
  • To: sphenix-tracking <sphenix-tracking-l AT lists.bnl.gov>
  • Subject: Re: [Sphenix-tracking-l] PHG4TpcDigitizer timing
  • Date: Mon, 5 Sep 2022 10:05:31 -0400

HI Tony,

I ran callgrind over it, by adding macros one can restrict it to small parts of the code:
https://wiki.sphenix.bnl.gov/index.php/Tools#Advanced_Usage

It spends 77% of its time in

void
TrkrHitTruthAssocv1::removeAssoc(const TrkrDefs::hitsetkey hitsetkey, const TrkrDefs::hitkey hitkey)

 which is 6 lines of code removing an entry from a multimap. Does anyone know how to speed this up? This is by far the most severe limitation on how many events we can run through the simulation chain till the run starts.

Chris

On 9/4/2022 11:29 AM, Anthony Frawley wrote:
Hi Chris,
This may be due to a change I made to the TPC digitizer to properly handle non-zero bunch crossings. It was merged on August 4, I think. The digitizer previously assumed that if a hit had a nominal z position that was negative, it was read out on the south side of the TPC. When I switched to storing TPC time of arrival, I also modified the digitizer code to not make that assumption - the assumption is just wrong if the crossing number is not zero. Now the hits are assigned during hit reconstruction to the readout direction corresponding to their true location in the TPC, and they keep that forever.
The result is that the digitizer previously looped over half of the TPC time bin range for a given hit. The half was chosen based on its nominal z position. Now it loops over the entire range of time(z) bins, so the loop is twice as long. This change is needed to get the correct response for out of time events, which occur even in triggered Au+Au running.

It is very possible that the digitization loop over time bins could be better optimized.

Tony

From: sPHENIX-tracking-l <sphenix-tracking-l-bounces AT lists.bnl.gov> on behalf of pinkenburg via sPHENIX-tracking-l <sphenix-tracking-l AT lists.bnl.gov>
Sent: Sunday, September 4, 2022 9:24 AM
To: sphenix-tracking <sphenix-tracking-l AT lists.bnl.gov>
Subject: [Sphenix-tracking-l] PHG4TpcDigitizer timing
 
Hi folks,

until fairly recently the clustering (which I tend to call electron
drift) took about as much time as the G4 simulations themselves. As of
recently the time of this pass has increased by at least a factor of 2
and I see hijing jobs with 400 MinBias events exceeding the 3 day limit
which evicts those jobs so we only get calorimeter clusters from these
sims. You can see the timers in a log from a jobs which finished today:
/direct/sphenix+u/sphnxpro/MDC2/submit/JS_pp200_signal/pass3trk_embed/condor/log/condor_Jet30-0000000040-00175.out

The PHG4TpcDigitizer is by far the biggest contributor now.

Chris

--
*************************************************************

Christopher H. Pinkenburg       ;    pinkenburg AT bnl.gov
                                ;    https://urldefense.com/v3/__http://www.phenix.bnl.gov/*pinkenbu__;fg!!PhOWcWs!xe8FYrNmsJulJp9oBu13WteweyGO1vSpcnB1taOCGMEm8CZmAW-zqiaFMW5F9QITuO1kZ3Z6bazeMWDFX4Uz7NQaAkyskfRdMw$ 

Brookhaven National Laboratory  ;    phone: (631) 344-5692
Physics Department Bldg 510 C   ;    fax:   (631) 344-3253
Upton, NY 11973-5000

*************************************************************

_______________________________________________
sPHENIX-tracking-l mailing list
sPHENIX-tracking-l AT lists.bnl.gov
https://urldefense.com/v3/__https://lists.bnl.gov/mailman/listinfo/sphenix-tracking-l__;!!PhOWcWs!xe8FYrNmsJulJp9oBu13WteweyGO1vSpcnB1taOCGMEm8CZmAW-zqiaFMW5F9QITuO1kZ3Z6bazeMWDFX4Uz7NQaAky4M3DbZA$ 

-- 
*************************************************************

Christopher H. Pinkenburg	;    pinkenburg AT bnl.gov
				;    http://www.phenix.bnl.gov/~pinkenbu

Brookhaven National Laboratory	;    phone: (631) 344-5692
Physics Department Bldg 510 C	;    fax:   (631) 344-3253
Upton, NY 11973-5000

*************************************************************

Attachment: output.png
Description: PNG image




Archive powered by MHonArc 2.6.24.

Top of Page