The answer--under the law--is most definitely no.
Under the U.S. Constitution, the following rules apply to "stop and frisk" detentions in California:
First, police may only "stop" you if they have a "reasonable suspicion" that you have been or will be involved in criminal activity.
Second, police may only "frisk" you (pat you down) if they have reason to think you are armed and presently dangerous.
This is what the law says. But in reality police can play fast and loose with the "reasonable suspicion" requirement.
As a result, many people deal with "stop-and-frisk" searches that feel as if they are being done for no reason--or for an illegitimate reason such as racial profiling.
The good news is that, if you are charged with a crime because of a "stop-and-frisk" that did not comply with California law, then anything the police find on you cannot be used as evidence to charge you with a crime under California's search & seizure laws.