allpix-squared / allpix-squared

MIT License
10 stars 19 forks source link

CSADigitizer: make models modular #36

Closed stephanlachnit closed 2 years ago

stephanlachnit commented 3 years ago

Supersedes both #34 and #35 (in some way).

Early stage, two mains things I still need to figure out:

Also, the ToT from TS2 calculation is still missing. And I'm not entirely happy with all variable names. But nether the less it should give a good overview of my idea.

Regarding the modes without clocks: I thought about splitting the toa function in a pure clock function, and a time function. Both of them should be faster than the combined function, as we can get rid of some of the calculations. Only problem now is in the run function to differentiate between the cases, as we can't use the same variable now. I'll think of something.

~Some word about a new feature I would like to introduce: fast_amplification. I will create some plots when it works, but it should considerably increase simulation speed with only small differences. I think especially for the ToT with large TS2 clocks, this makes little difference.~ (This doesn't work in general)

stephanlachnit commented 3 years ago

@simonspa @schuetzepaul I think this is basically finished from my side and ready to review. There is one thing left regarding the impulse response graph (big commented part of code), where I would appreciate your input.

Some of the more advanced features of the MuPix10 (tot cap, second threshold, last threshold crossing etc) are missing, which I would add later.