alcap-org / AlcapDAQ

Alcap DAQ
alcap-org.github.io
8 stars 0 forks source link

Removing Whole TME Events #259

Open AndrewEdmonds11 opened 9 years ago

AndrewEdmonds11 commented 9 years ago

Hi Everyone

So I'm trying to remove the scattered muons (and their possible proton emissions) from the dE/dx plots. The plan is to remove any events where there is a hit in the Si detectors with t < 200ns.

Currently, the way I add time cuts is to loop through all pulses and only add it to the plot if it passes the time cuts. However, the problem here is that I would want to cut the initial muon (t < 200ns) and any other hits in the same TME (which would have t > 200ns) and at the moment only the first would be cut.

My plan is to just quit the loop when I come across the first t < 200ns hit but do we guarantee that TDPs are time-ordered in a TME?

If this is not the case, then we need another solution. Currently, we have the TMuonEvent::HasMuonPileup() function which is really useful and makes it easy to veto a whole TME but I'm not sure adding another function to the TMEs is the correct thing to do in this situation.

The third idea I had is to write a module that goes between MakeMuonEvents and the plotting modules that just loops through and removes the TMEs from the container.

Any ideas of the best way to do this?

jrquirk commented 9 years ago

I took C++ for Physicists weeklong class at Fermilab taught by a guy who used to work on CDF and developed their tracking algorithm. He advocated the third option (we came up with tons of track candidates, went through and pruned redundant ones, went through again and pruned insane ones, etc.) because of its logical ease.

I would say that's probably also going to be the easiest one to debug, because everything will be contained in some "PruneScatteredMuons" static function or something.