Good question, bad case against you. If its true or not, its unfortunately your problem now. I feel for you. The ultimate decision of whether a search or seizure or warrant is valid/legal is ultimately up to a judge. When you fight your case, your lawyer can attack the search with a motion to suppress under PC 1538.5. If you are successful, the evidence from the search can not be used as evidence against you. That would probably make the case go away.
Interesting how your ex knew right where to find the pipe, she could get charged. Someone had to tell the police who owned the shed and/or who has control of it. Police like when people confess to things, it makes their job easier. Which is why i recommend not making statements.
If you have a warrant you should be looking for an attorney.
A search is reasonable where police officer has a warrant or has probable cause + an exception to the warrant requirement. There are dozen or so exceptions. Only items that were found by the police or government can be suppressed.
The above information does not establish an attorney client relationship nor is it meant to provide legal advice.
Sign up to receive a 3-part series of useful information and advice about personal injury law.