How to have a particle system Ignore collision with objects

I have a particle system that I want to collide with all objects in the world except what I decide. I made a script for this, but I need a little help with it.
Here is the script

    {
        public Collider box1;
        public Collider box2;
        public Collider box3;
        public Collider Ewire;
        public Collider Ewire1;
        public Collider Ewire2;
        public Collider Ewire3;
        public Collider Ewire4;
        public Collider Ewire5;
        public Collider Ewire6;
        public ParticleSystem spark;
    
        void OnCollisionEnter(Collision col)
        {
    
            if (col.gameObject.tag == "Phys" | col.gameObject.tag == "EWire")
            {
                Physics.IgnoreCollision(box1, Spark);
                Physics.IgnoreCollision(box2, Spark);
                Physics.IgnoreCollision(box3, Spark);
                Physics.IgnoreCollision(Ewire, Spark);
                Physics.IgnoreCollision(Ewire1, Spark);
                Physics.IgnoreCollision(Ewire2, Spark);
                Physics.IgnoreCollision(Ewire3, Spark);
                Physics.IgnoreCollision(Ewire4, Spark);
                Physics.IgnoreCollision(Ewire5, Spark);
                Physics.IgnoreCollision(Ewire6, Spark);
            }
    
        }
        void OnCollisionExit(Collision col)
        {
    
            if (col.gameObject.tag == "Phys" | col.gameObject.tag == "EWire")
            {
                Physics.IgnoreCollision(box1, Spark);
                Physics.IgnoreCollision(box2, Spark);
                Physics.IgnoreCollision(box3, Spark);
                Physics.IgnoreCollision(Ewire, Spark);
                Physics.IgnoreCollision(Ewire1, Spark);
                Physics.IgnoreCollision(Ewire2, Spark);
                Physics.IgnoreCollision(Ewire3, Spark);
                Physics.IgnoreCollision(Ewire4, Spark);
                Physics.IgnoreCollision(Ewire5, Spark);
                Physics.IgnoreCollision(Ewire6, Spark);
            }
    
        }

I am aware that IgnoreCollision is for 1 collider to another collider, but I want it to be between a collider and the particle system. I left in the Sparkvariable in the code to show what I wanted.

Any help would be awesome.
Thank you

In the particle system is a option that make collisions and excludes that you want without coding a script