How to solve and understand this opamp circuit

Hello guys
Here I have this portion of the circuit which I cant really understand what it is doing and I want to solve it, so I can understand it. The inverting input is having a 2 signals and there peak is 5V, while on this inverting input we have this transistor with analog switch,this analog switch is being switched by a delay signal whose on time is 50us, this is the portion I am confused in. So I want tips/suggestions to how to understand this circuit and how to solve it, So I could understand why they used this transistor and switch part in this circuit. The value of capacitor is 100nf.

opamp rail voltages 10.6V and ground

It integrates the input signal with respect to time, with switched discharge for the integrating cap.

You could try simulating it in LTSPICE
Introduction to Switched Capacitor circuits

what is the purpose of this analog switch and transistor ?

I tried but the analog switch does not workin ltspice

To discharge the integrating capacitor.

To simulate this circuit in LTSpice, you can use a voltage controlled switch, or model as two circuits (one with switch open, the other closed) with appropriate initial conditions.

Why dont you show the whole diagram and tell us what its ALL supposed to do?
I see the title of this pic is "3rd stage understanding"

this is the main portion of the circuit there are other part but those are digital only responsible for generating pwm wave

and what is the whole thing supposed to do? what activates the switches, are they manually operated?

This is sheet 4 of 5 - must be a complicated gizmo.

this is a metal detector. switches are activated by pwm signal and there ON time can be controlled by potentiometer, but for minimum ON time is 50us.

other sheets are not complicated,I have understanding of them what they are doing. this part is the one which is most complicated.