
73 Cal.Rptr.3d 189 (2008)
160 Cal.App.4th 882
The PEOPLE, Plaintiff and Respondent,
v.
Orlando CHAVEZ, Defendant and Appellant.
No. B185907.
Court of Appeal of California, Second District, Division One.
March 4, 2008.
*190 Julie Sullwold Hernandez, Rolling Hills Estate, under appointment by the Court of Appeal, for Defendant and Appellant.
Bill Lockyer and Edmund G. Brown, Jr., Attorneys General, Mary Jo Graves, Chief Assistant Attorney General, Pamela C. Hamanaka, Senior Assistant Attorney General, Margaret E. Maxwell and Robert David Breton, Deputy Attorneys General, for Plaintiff and Respondent.
Certified for Partial Publication.[*]
*191 JACKSON, J.[*]

INTRODUCTION
In an amended information, the People charged defendant Orlando Chavez with two sets of crimes. The first set of crimes was committed on April 24, 2001; the second set of crimes was committed on November 19, 2001, while defendant was in county jail. As to all crimes, defendant pled not guilty by reason of insanity.
With regard to the April 2001 offenses, a jury convicted defendant of three counts of assault with a deadly weapon (Pen.Code,[1] § 245, subd. (a)(1); counts 1, 4 & 5) committed because of the victim's race or color (§ 422.75), vandalism resulting in more than $400 in damage (§ 594, subd. (a); count 6), exhibiting a deadly weapon to a police officer to resist arrest (§ 417.8; count 7) and resisting an executive officer while personally using a deadly and dangerous weapon (§§ 69; 12022, subd. (b)(1); count 8).[2]
With regard to the crimes alleged to have been committed in November 2001, the jury convicted defendant of assault upon a peace officer during which he personally inflicted great bodily injury (§§ 245, subd. (c), 12022.7, subd. (a); count 9), battery with injury upon a peace officer (§ 243, subd. (c)(2); count 10) and battery with serious bodily injury (§ 243, subd. (d); count 11).
Defendant waived his right to a jury trial on the prior conviction allegations contained in the amended information. Following a court trial on these allegations, the court found that defendant suffered a prior felony strike conviction (§§ 667, subd. (b), 1170.12), a prior serious felony conviction (§ 667, subd. (a)), and served four prior prison terms (§ 667.5, subd. (b)).
During the sanity phase of the trial, conflicting evidence was received. The jury found that defendant was insane at the time he committed the April 2001 offenses (counts, 1, 4, 5, 6, 7 and 8) but found him sane at the time he committed the November 2001 offenses (counts 9, 10 and 11).
The trial court selected count 9 as the principal base term and ordered the sentences on counts 10 and 11 to run concurrently to that imposed on count 9. For these counts, the court sentenced defendant to state prison for a total term of 20 years.[3] On counts 1, 4, 5, 6, 7 and 8, the court committed defendant to a state mental hospital, calculated his maximum term of commitment to be 16 years and 4 *192 months[4] and ordered this commitment to be served after completion of his state prison term.
On appeal, defendant challenges the sufficiency of the evidence to support the jury's determination that he was sane at the time he committed the November 2001 offenses and the trial court's order directing him to serve his state prison sentence before his state hospital commitment. He contends that the court should have committed him to the state hospital first and ordered his state prison sentence to run concurrently with that commitment. He further maintains that the sentences imposed on counts 10 and 11 should be stayed under section 654 and that the trial court violated Blakely v. Washington (2004) 542 U.S. 296, 124 S.Ct. 2531, 159 L.Ed.2d 403 and his constitutional right to a jury trial and due process when, in calculating his maximum term of commitment, it imposed consecutive sentences for all but one of his November 2001 offenses. We agree with defendant that the sentences imposed on counts 10 and 11 must be stayed pursuant to section 654 and that the trial court should have ordered him to serve his state hospital commitment first, but we reject defendant's other contentions.

FACTS

Guilt Phase

April 24, 2001 OffensesCounts 1, 4, 5, 6, 7 and 8
Around 6:30 p.m. on April 24, 2001, Francisco Blackwood (Blackwood) was driving his Honda Accord. His wife and two minor daughters accompanied him. While Blackwood was stopped at a red light at the intersection of El Molino Avenue and Mountain Street in Pasadena, defendant, who was carrying a metal pole, passed in front of Blackwood's car, looking "kind of crazy."
Defendant approached Blackwood, yelled, "Is this your car? Is this your car?" and jabbed the pole into the car. Blackwood grabbed the pole, which hit him in his left arm. Blackwood's wife and children were screaming and crying. After speeding away, Blackwood called 911.
Around 6:45 p.m. on April 24, 2001, Stalaus Grundy (Grundy) was in his Ford Mustang behind two other cars waiting for the red light at El Molino Avenue to turn green when he saw defendant step off the sidewalk and walk toward him with a pipe. Defendant looked angry and stared at Grundy as if Grundy had done something. When defendant raised the pipe, Grundy *193 drove out of the line of waiting cars. Defendant managed to hit the window of Grundy's car, however.
Frank Phillips (Phillips) also had stopped for the red light at the intersection of Mountain Street and El Molino Avenue. As he sat in his Cadillac, he observed defendant run kitty-corner across the intersection toward him, holding a metal pipe. Believing defendant was "evil looking" and was going to hit him with the pipe, Phillips quickly drove away against the red light. Defendant managed to hit the rear window of the Cadillac as Phillips drove away. Defendant did not say a word to Phillips.
Also on April 24, 2001, Owen Murray (Murray) was at a stop sign at Madison Avenue, preparing to turn right onto Mountain Street, when the back window of his Honda Accord shattered. He turned and saw defendant holding "a black pipe of some sort" and preparing to hit his car again. Murray yelled at defendant who looked angry and enraged. Defendant then struck Murray's car a second time, after which Murray drove away. Defendant never said anything to Murray.
Pasadena Police Officer Grant Curry responded to a report of vandalism at the intersection of El Molino Avenue and Mountain Street. Blackwood and Grundy flagged him down and reported that they had been attacked by someone with a pipe. They identified defendant as their assailant after he walked out of a yard on El Molino.
Officer Curry drove toward defendant. When the officer got out of his car, defendant began to approach. Officer Curry drew his baton and ordered defendant to stop when he saw that defendant was carrying a pipe. Defendant did not heed Officer Curry's command and continued to approach while holding the pipe like a baseball bat. At this point, Officer Curry drew his handgun.
Officer Curry repeatedly ordered defendant to stop and put down the pipe, but these orders fell on deaf ears. When defendant was 10 to 15 feet away, defendant told Officer Curry to shoot him as he was going to smash him with the pipe. Officer Curry was prepared to fire, when defendant stopped and began walking away. Police backup then arrived. Defendant, who appeared angry throughout the entire incident, dropped the pipe "when an officer "racked" a shotgun. Defendant's arrest followed.
Pasadena Police Officer Dennis Beene arrived on scene as defendant was being taken into custody by Officer Curry. Defendant was placed in the backseat of Officer Beene's patrol car. Officer Beene then entered his vehicle and advised defendant of his Miranda[5] rights. Defendant waived his rights and elected to speak with Officer Beene without the presence of an attorney.
When Officer Beene inquired about defendant's parole status, defendant said that upon being paroled, he was assigned "a counselor who was a Black man." Defendant became upset with his counselor because he wanted to send defendant to Los Angeles. Defendant further stated, "`The Blacks are at war with us.'" He explained that he had been at his girlfriend's house and "guys" tried to kill him by running him down. Defendant picked up a black bar and attempted to hit them with it. He was only able to hit the car, however.
Defendant also told Officer Beene that Crips killed and raped his daughter in Los Angeles. When asked if the suspects were apprehended, defendant said, "`No. That's what I'm out here doing. I'm fucking them up.'" Defendant continued that *194 "Blacks are not welcome here, not by us." He explained that he "went after the low rider because they were Black." According to Officer Beene, defendant stated "that they drove by him and called him a dirty fucking Mexican, and he said, `I took it to those Black niggers. I'm not playing games. I'll blast them. I ain't going down for bullshit. I [am] going for murder." The conversation between Officer Beene and defendant then ended.

November 19, 2001 OffensesCounts 9, 10 and 11
On November 19, 2001, defendant was in county jail. Around 5:00 a.m., Deputy Sheriff James Lamb heard tapping coming from defendant's cell. The deputy observed defendant standing in the middle of his cell, looking bored, and asked him what was wrong. Defendant gestured that he could not hear. Deputy Lamb opened the cell door and repeated his inquiry. Defendant sarcastically replied, "I don't know. You tell me what the problem is."
Deputy Lamb informed defendant that the inmate in the adjoining cell was unable to sleep because of defendant's tapping and asked if there was something he could do. Defendant shrugged his shoulders. Deputy Lamb, who was holding the cell door open, directed defendant to sit on his bunk so they could talk. Defendant replied, "You don't tell me what to do. I tell me what to do." While making this statement, defendant charged at Deputy Lamb. The latter kicked defendant, but the kick had no effect. The deputy then tried to slam the cell door shut but was unable to do so, in that defendant managed to wedge his right leg and shoulder between the door and the door jamb.
Deputy Lamb then let go of the door and backed up. Defendant came out of his cell swinging. Deputy Lamb hit defendant in the mouth, but it did not seem to faze defendant. A struggle ensued during which Deputy Lamb tripped, hit his head against the wall and fell down. Defendant jumped on top of Deputy Lamb and repeatedly struck him. The deputy managed to punch defendant in the groin area, but the punch had no immediate effect.
After being hit, defendant ran back into his cell and slammed the cell door, which flew back open. Deputy Lamb managed to get up and walk toward the*cell. When defendant again started to approach, the deputy sprayed him with pepper spray, at which point defendant gave up.
Deputy Lamb, who was taken to the hospital, suffered a broken finger, a fractured foot and recurring headaches. He was placed off duty for four and one-half months.

Sanity Phase

Defense Evidence
Following a review of defendant's mental health records and an examination of defendant, Dr. Gordon Plotkin opined that defendant suffered from schizoaffective disorder of a bipolar type. Defendant experienced mood swings, anxiety, depression, mania, irritability and hypersensitivity.
In Dr. Plotkin's view, defendant was unable to distinguish right from wrong on April 24, 2001 when he attacked the motorists. On that date, defendant was experiencing a manic episode. He was psychotic and delusional. He remained psychotic until placed back on medication' at the county jail.
Neuropsychologist, Kyle Boone, tested defendant in jail. Test results revealed that defendant had a brain dysfunction in the frontal lobe and that he had an IQ of 79. A PET scan of defendant's brain revealed certain abnormalities in the left lateral frontal area.
*195 In the two years following his attack on Deputy Lamb, defendant has not displayed any violent behavior due to the newer anti-psychotic drugs and mood stabilizers he was taking. If defendant were to stop taking this medication, he eventually would revert back to being irritable, hostile and aggressive.

Prosecution's Evidence
Dr. Kory Knapke opined that defendant was sane at the time he committed the instant offenses. Although defendant was delusional and suffered from a bipolar type of schizoaffective disorder, his mental illness had no impact on his ability to understand the nature and quality of his acts and to know that they were wrong when he committed them.
In Dr. Knapke's view, defendant's attacks on the motorists were fueled by his uncontrolled anger toward the victims. Defendant did not believe the victims posed an imminent threat of harm. Rather, he felt they did not like Mexicans. His attacks on the motorists were acts of racist revenge! While defendant was delusional when he committed his attacks, he knew what he was doing was wrong.
Defendant informed Dr. Knapke that he became violent when he was drunk and that he was drunk when he attacked the motorists. Defendant acknowledged that his actions were wrong at the time of the attacks.
With regard to the incident involving Deputy Lamb, Dr. Knapke noted that defendant did not like being told what to do and sought revenge and retaliation against the deputy. Defendant was well aware that Deputy Lamb was trying to retreat yet intended to "beat him." Defendant therefore intentionally attacked the deputy. This demonstrated defendant's awareness of what he was doing and that it was wrong.
According to Dr. Knapke, defendant was mentally ill, not insane. This illness gave rise to defendant's impulse restraint, anger management, and behavior control problems. He was not insane, however. Without psychiatric medication, defendant tended to be violent. When medicated, defendant was better able to control his behavior.

DISCUSSION

I. Defendant's sanity finding must be upheld.

Defendant contends that the jury's finding that he was sane at the time he committed the November 19, 2001 crimes (counts 9, 10 and 11) must be reversed, in that the evidence of insanity was of such weight that a jury could not reasonably reject it. In support of his contention, defendant relies upon People v. Duckett (1984) 162 Cal.App.3d 1115, 209 Cal.Rptr. 96. This reliance is misplaced.
In Duckett, three psychiatrists testified that defendant, who suffered from chronic paranoid schizophrenia, could not substantially appreciate the criminality of his conduct or conform his conduct to the requirements of the law. Despite this uncontradicted testimony, the jury found that defendant was sane at the time he murdered the victim. (162 Cal.App.3d at p. 1119, 209 Cal.Rptr. 96.) In reversing the jury's determination that defendant was legally sane, the appellate court determined that "there were no circumstances present that could have permitted the jury to reject the expert opinion" that the defendant was insane. (Id. at p. 1123, 209 Cal.Rptr. 96.) That is not a conclusion we can reach in this case, in that there is no merit to defendant's assertion that this case is almost identical to Duckett.
*196 Here, the evidence regarding defendant's sanity at the time he committed his crimes is quite conflicting. While Dr. Ploktin opined that defendant was insane, Dr. Knapke opined that defendant was sane. It was for the jury to evaluate the testimony of the experts, examine the bases for their opinions and determine whom to believe. The jury's determination that defendant was sane on November 19, 2001 when he attacked Deputy Lamb, is amply supported by the testimony of Dr. Knapke. Inasmuch as the substantial evidence test applies to appellate review of a sanity determination (People v. Belcher (1969) 269 Cal.App.2d 215, 219-221, 74 Cal.Rptr. 602), and defendant has failed to demonstrate that Dr. Plotkin's opinion was of such weight that the jury could not reasonably reject it (People v. Duckett, supra, 162 Cal.App.3d at p. 1123, 209 Cal.Rptr. 96), there is no basis on which we may disturb the jury's sanity finding with respect to counts 9,10 and 11.

II.-III.[**]

IV. A defendant who is found not guilty by reason of insanity as to some crimes and convicted of others and who has not fully regained his sanity at the time of sentencing must be confined in a state mental hospital until his sanity is restored.

Defendant contends the trial court should have committed him to a state mental hospital first based upon its determination that he had not regained his sanity under section 1026. We agree.
Subdivision (a) of section 1026 provides: "When a defendant pleads not guilty by reason of insanity, and also joins with it another plea or pleas, the defendant shall first be tried as if only such other plea or pleas had been entered, and in that trial the defendant shall be conclusively presumed to have been sane at the time the offense is alleged to have been committed. If the jury shall find the defendant guilty, or if the defendant pleads only not guilty by reason of insanity, then the question whether the defendant was sane or insane at the time the offense was committed shall be promptly tried, either before the same jury or before a new jury in the discretion of the court. In that trial, the jury shall return a verdict either that the defendant was sane at the time the offense was committed or was insane at the time the offense was committed. If the verdict or finding is that the defendant was sane at the time the offense was committed, the court shall sentence the defendant as provided by law. If the verdict or finding be that the defendant was insane at the time the offense was committed, the court, unless it shall appear to the court that the sanity of the defendant has been recovered fully, shall direct that the defendant be confined in a state hospital for the care and treatment of the mentally disordered or any other appropriate public or private treatment facility approved by the community program director, or the court may order the defendant placed on outpatient status pursuant to Title 15 (commencing with Section 1600) of Part 2."
While section 1026 makes it clear that the court must sentence defendant as provided by law if the jury finds him sane, and must order him confined in a state mental hospital if the jury finds him insane and he has not regained his sanity fully, it does not tell the court what to do when a jury finds defendant sane as to some crimes and insane as to others. The parties are in agreement that there is no controlling law on this issue.
*197 In People v. Yeckley (1981) 118 Cal. App.3d 874, 173 Cal.Rptr. 645, the defendant was found guilty on five counts. During the sanity phase of the trial, the jury found that he was insane when he committed counts one through four but sane when he committed count five. The trial court committed defendant Yeckley to Atascadero State Hospital and ordered execution of sentence on count five stayed until such time as his sanity might be restored. (At p. 876, 173 Cal.Rptr. 645.) On appeal, defendant did not challenge his commitment to Atascadero. (Id. at p. 880, 173 Cal.Rptr. 645.) Yeckley, therefore, does not aid us.
People v. Cleveland (1972) 27 Cal.App.3d 820, 104 Cal.Rptr. 161 (Cleveland I) was cited by the trial court during the sentencing hearing[7] and is cited by both parties on appeal. A jury convicted defendant Cleveland of four crimes and found that he was insane during the commission of one of them. (Id. at p. 824, 104 Cal.Rptr. 161.) At the sentencing hearing, the trial court sentenced Cleveland to state prison on the counts committed while sane but made no mention of the count committed while insane. (Id. at p. 831, 104 Cal.Rptr. 161.) Concluding that the trial court's omission ran afoul of section 1026, the appellate court vacated the sentence and ordered the trial court to sentence defendant anew. Before doing so, however, the court observed: "If the trial court should find that defendant has fully recovered his sanity ..., and a hearing sustains that finding, then a resentencing in the form used will become proper. However, if the trial court does not make such a finding, or if the hearing determines that he has not recovered, a dilemma will arise. Section 1026 requires that the defendant be committed on count III to the state hospital for the criminally insane, whereas other statutes require that he be sentenced to state prison on counts I, II and IV. Obviously he cannot be confined in two places at once. Since the purpose of the confinement under sections 1026 and 1026a is to protect society and to afford an opportunity for psychiatric treatment, and since the Department of Corrections has facilities that can be utilized for both purposes, we *198 conclude that, in the eventuality under consideration, it would serve the purposes of all the statutes if the confinement, under all counts, were in the state prison." (Cleveland I, supra, at pp. 832-833, 104 Cal.Rptr. 161; fn. omitted.)
On remand, the trial court dismissed the count on which the jury found defendant Cleveland insane and sentenced him anew to state prison for the crimes he committed while sane. (People v. Cleveland (1974) 37 Cal.App.3d 547, 550, 112 Cal.Rptr. 508 (Cleveland II.)) In a second appeal, defendant Cleveland challenged the trial court's dismissal order. The appellate court rejected the challenge, emphasizing the power of the trial court to dismiss a charge at anytime before the judgment is executed. The court explained that while its "earlier opinion discussed the possibility of the trial court conducting a section 1026 hearing," it did not limit its mandate to that disposition. (Ibid.) The court further noted that "[n]ot only was the action `proper' in that sense, but it was a disposition consistent with good public policy. Defendant's sentence on renumbered count I was life imprisonment; by virtue of section 669 of the Penal Code the sentences on the other counts run concurrently with that sentence. Had defendant been committed under section 1026, that commitment would, also, have run concurrently. Since, as we point out below, all of the objectives of a section 1026 commitment can, in the case at bench, be accomplished under the disposition now made by the trial court, we cannot say that it erred in electing not to impose on defendant, the People and a busy court, the holding of a hearing which would have had no discoverable public or private value." (Id. at p. 550, 112 Cal. Rptr. 508.)
In response to defendant Cleveland's assertion that he had been deprived of the right to psychiatric treatment by the dismissal of the count he committed while insane, the court stated its disagreement as follows: "Had the trial court held a section 1026 hearing and at that hearing found that defendant had recovered his sanity ..., defendant would have been released from custody on the [count committed while insane], but would still have been in custody on [the three counts committed while sane]. He would, however, have on his record the findings of guilt and past insanity resulting from the original trial. As it is, with the [dismissal of the count committed while insane], those findings become moot. If anything, defendant is better off than otherwise." (Cleveland II, supra, 37 Cal.App.3d at p. 551, 112 Cal. Rptr. 508.)
The court in Cleveland II continued: "If the section 1026 hearing had resulted in a finding that defendant had not recovered his sanity, the result, as we have pointed out, would have been to commit defendant to the Director of Corrections. He now stands committed to that director on three counts. If, in fact, he is still insane ..., or if, for any reason, he needs psychiatric care and treatment, that treatment is available to him, under section 6102 of the Penal Code, in the same institutions to which a section 1026 hearing would, under our language above-quoted in footnote number 1, have committed him. Assuming that defendant has a `right' to psychiatric treatment (a matter which we do not determine) such right still exists. He has suffered no loss." (Cleveland II, supra, 37 Cal.App.3d at p. 551, 112 Cal.Rptr. 508.)
The Cleveland court's reasoning appears to be faulty. The bases for the Cleveland court's conclusion that the then Department of Corrections had facilities that could be used for both confinement and treatment were sections 6100, 6101 and 6102. (Cleveland I, supra, at p. 833 and *199 fn. 5, 104 Cal.Rptr. 161.) Section 6100, which was enacted in 1945, established "an institution under the jurisdiction of the Department of Corrections to be known as the Medical Facility." The Legislature directed this facility to be located in Northern California (§ 6101). At the time of the Cleveland I decision, section 6102 provided that "[t]he primary purpose of the Medical Facility shall be the receiving, segregation, confinement, treatment and care of males under the custody of the Department of Corrections or any agency thereof who are either: [¶] 1. Mentally ill, or [¶] 2. Mentally defective, or [¶] 3. Epileptic, or [¶] 4. Addicted to the use of narcotics, or [¶] 5. Otherwise physically or mentally abnormal, including but not limited to psychopaths and sex offenders, or [¶] 6. Suffering from any chronic disease or condition."[8]
In accordance with sections 6100 and 6101, the California Medical Facility (CMF) was constructed in the City of Vacaville, Solano County. The facility was "established in 1955 by the Legislature to provide a centrally located medical psychiatric institution for the health care needs of the male felon population in California's prisons. [¶] ... [¶] CMF houses a general acute care hospital, correctional treatment center (CTC), licensed elderly care unit, in-patient and out-patient psychiatric facilities, a hospice unit for terminally ill inmates, housing and treatment for inmates identified with AIDS/HIV, general population, and other special inmate housing. Additionally, the Department of Mental Health operates a licensed, acute care psychiatric hospital within CMF." (.) The California Supreme Court has described CMF as "`a state hospital for the care and treatment of [among others] the insane.'" (In re Cathey (1961) 55 Cal.2d 679, 690, 12 Cal.Rptr. 762, 361 P.2d 426 disapproved on another ground in In re Barnett (2003) 31 Cal.4th 466, 477, fn. 8, 3 Cal.Rptr.3d 108, 73 P.3d 1106.)
The court in Cleveland I and Cleveland II concluded that a state hospital commitment and a state prison term could be served at the same time and in the same place. We do not agree. Treatment and punishment are two separate and distinct concepts. The state legislature has declared "that the purpose of imprisonment for crime is punishment." (§ 1170, subd. (a)(1).) In contrast, a commitment to a state hospital under section 1026 is "in lieu of criminal punishment" (In re Moye (1978) 22 Cal.3d 457, 463, 149 Cal.Rptr. 491, 584 P.2d 1097) and "is for purposes of treatment, not punishment" (id. at p. 466, 149 Cal.Rptr. 491, 584 P.2d 1097). (Accord, People v. Juarez (1986) 184 Cal.App.3d 570, 575, 229 Cal.Rptr. 145.) An individual found not guilty by reason of insanity is not subject to punishment in prison but rather must be committed to a state hospital for treatment. (§ 1026; People v. Buttes (1982) 134 Cal. App.3d 116, 122, 184 Cal.Rptr. 497.) The language of section 1026 is mandatory (People v. De Anda (1980) 114 Cal.App.3d 480, 490, 170 Cal.Rptr. 830; People v. Froom (1980) 108 Cal.App.3d 820, 833, 166 Cal.Rptr. 786) and "allows no discretion" for defendants who have been acquitted of criminal charges due to insanity. (Froom, supra, at p. 833, 166 Cal.Rptr. 786.) The establishment of the CMF does not alter this.
*200 In addition, section 1026, subdivision (g), requires the trial court to select the state hospital to which a defendant found not guilty by reason of insanity is to be committed. We are unaware of any statutory authority which gives the trial court the power to sentence a defendant to a particular prison. In practice, the trial court commits a convicted felon to the Department of Corrections and Rehabilitation, which, in turn, decides where to house the individual.
We therefore conclude that a defendant who is convicted of certain crimes and acquitted by reason of insanity as to others and whose sanity has not been restored fully at the time of sentencing must first be committed to a state hospital for the care and treatment of the mentally disordered.

V. If defendant has not fully regained his sanity and is committed to a state hospital for the care and treatment of the mentally disordered, his state prison sentence must be stayed until his sanity is restored.

Having determined that defendant must be committed to a state hospital first if he has not yet regained his sanity, we turn to his assertion that his state prison term should run concurrently with his state hospital commitment.[9]
The question whether to impose concurrent or consecutive sentences applies only when there are multiple convictions and multiple terms of imprisonment. (§§ 669, 1170.1.) In this case, a single term of imprisonment was imposed on defendant for the crimes he committed in November 2001. As to his April 2001 offenses, he was found not guilty by reason of insanity and thus subject to a state mental hospital commitment because he had not regained his sanity at the time of sentencing. Inasmuch as this is not a case involving multiple terms of imprisonment stemming from crimes committed on separate occasions, we conclude that there is no legal basis to order a state hospital commitment and a state prison sentence to run concurrently with or consecutively to one another.
Section 1026.2 sets forth the applicable procedures for restoration of sanity. One of these steps involves placing the person applying for restoration of sanity into a "forensic conditional release program for one year." (§ 1026.2, subd. (e).) By virtue of section 1026.2, subdivision (m), an individual such as defendant, who is subject to a term of imprisonment, is not eligible for participation in the one-year forensic conditional release program. Subdivision (m) of section 1026.2 provides: "This subdivision shall apply only to persons who, at the time of the petition or recommendation for restoration of sanity, are subject to a term of imprisonment with prison time remaining to serve or are subject to the imposition of a previously stayed sentence to a term of imprisonment. Any person to whom this subdivision applies who petitions or is recommended for restoration of sanity may not be placed in a forensic conditional release program for one year, and a finding of restoration of sanity may be made without the person being in a forensic conditional release program for one year. If a finding of restoration of sanity is made, the person shall be transferred to the custody of the California Department of Corrections to serve the *201 term of imprisonment remaining or shall be transferred to the appropriate court for imposition of the sentence that is pending, whichever is applicable." (Italics added.)
On remand, if the trial court orders defendant to be confined in a state mental hospital, it is to stay execution of defendant's state prison term until such time as defendant regains his sanity. He shall then be transferred to the trial court for imposition of the stayed prison term. We believe this result is compelled by the language of subdivision (m) of section 1026, and we note that it is the result that defendant requested below at the sentencing hearing.

DISPOSITION
The judgment of conviction is affirmed. The sentences imposed on counts 10 and 11 are stayed pursuant to section 654. The sentence is vacated to the extent it commits defendant to state prison and orders his state hospital commitment to commence upon the completion of his prison term. On remand, the trial court must first determine if defendant has regained his sanity within the meaning of section 1026. If the court determines that defendant has regained his sanity, then it shall transfer defendant to the Department of Corrections and Rehabilitation to serve his 20-year state prison term. If, on the other hand, the trial court determines that defendant has not regained his sanity, then it shall order defendant to be confined in a state hospital for the care and treatment of the mentally disordered (§ 1026, subd. (a)), which it "shall select ... in accordance with the policies established by the State Department of Mental Health" (§ 1026, subd. (g)), and it shall stay defendant's prison sentence. When defendant regains his sanity, he is to be transferred to the trial court for imposition of his stayed state prison sentence (§ 1026.2, subd. (m)). The clerk of the superior court is directed to prepare an amended abstract of judgment and to forward a copy to the Department of Corrections and Rehabilitation.
We concur: MALLANO, Acting P.J., and VOGEL, J.
NOTES
[*]   Pursuant to California Rules of Court, rules 8.1100 and 8.1110, this opinion is certified for publication with the exception of parts II and III of the Discussion.
[*]   Judge of the Los Angeles Superior Court assigned by the Chief Justice pursuant to article VI, section 6 of the California Constitution.
[1]  All further statutory references are to the Penal Code.
[2]  Following the presentation of its case, the prosecution successfully moved to dismiss counts 2 and 3, in which defendant had been charged with child abuse (§ 273a, subd. (a)).
[3]  Defendant's 20-year state prison term was calculated as follows: on count 9, the court imposed the midterm of four years, which it doubled to eight years pursuant to the three strikes law. The court then imposed an additional three years pursuant to section 12022.7, subdivision (a), five years pursuant to section 667, subdivision (a), and four years for the four prior prison terms pursuant to section 667.5, subdivision (b). On count 10, the court imposed the midterm of two years and doubled it to four years in accordance with the three strikes law. On count 11, the court imposed a six-year sentence comprised of the midterm of three years doubled pursuant to the three strikes law. As previously noted, the sentences imposed on counts 10 and 11 were ordered to be served concurrently with the 20-year sentence imposed on count 9.
[4]  The trial court calculated defendant's "maximum term of commitment" (§ 1026.5, subd. (a)(1)) as follows: As to count 1, the trial court selected the three-year midterm, doubled it to six years pursuant to the three strikes law and added two more years pursuant to section 442.75, subdivision (a), for a total of eight years. On count 4, the court imposed one-third of the three-year midtermi.e., one yeardoubled it to two years under the three strikes law and added one-third of the two-year midterm enhancement, or eight months, pursuant to section 422.75, for a total of two years and eight months. The court imposed the identical term on count 5. On count 6, the court imposed one-third of the two-year midterm, i.e., eight months, and then doubled it, for a total of one year and four months. On count 8, the court imposed one-third of the two-year midterm, namely eight months, doubled it and added one-third of the one-year midterm enhancement, or four months, for a total of one year and eight months. The commitment terms on counts 4, 5, 6 and 8 were ordered to run consecutively to the commitment term on count 1, in that each of these counts involved a different victim. On count 7, the court selected the midterm of three years, doubled it to six years under the three strikes law, and ordered the six-year term to run concurrently with the term of commitment imposed on count 8.
[5]  Miranda v. Arizona (1966) 384 U.S. 436, 86 S.Ct. 1602, 16 L.Ed.2d 694.
[**]   See footnote *, ante.
[7]  At the sentencing hearing, the trial court observed: "[W]here we have an individual who, in my opinion, and, I believe, in the opinion of the jurors, was insane at the time he committed [the first set of] offenses ... [t]hen ... spends a period of time in incarceration, ... and ... got better[, and then] was legally sane [when he committed the last set of offenses], I have the responsibility to sentence [him] for the crimes he committed while he was sane, [and to] cause him to serve that sentence, and then direct that he be placed in a mental hospital for the acts that occurred when he was legally insane so he [can] receive treatment."

After noting that its "overwhelming concern" was public safety, the trial court stated: "My view is, based upon the case law we do have, People v. Cleveland, supra, 27 Cal. App.3d 820, 104 Cal.Rptr. 161], I first have to make the finding [that defendant is] sane for purposes of sentencing.... I do make a finding that [defendant] is acting completely appropriate[ly] today, is sane for purposes of sentencing. [1] However, I am not making the finding that he's recovered [his] sanity [within the meaning of section] 1026 to such an extent that he's no longer a menace to the health and safety of others. I believe he still is mentally ill to the extent that he is a menace to the health and safety of others. [¶] I also am going to order [him] sentenced to the Department of Corrections as to the counts involving Deputy Lamb[, a]nd that sentence is to be served first. [¶] ... [¶] ... The total prison sentence will be 20 years.... [¶] As to the other counts, 1, 4, 5, 6, 7, 8, ... [t]he court directs, upon completion of the above sentence, that ... defendant be paroled to and confined in the state hospital for the care and treatment of the mentally disordered.... [¶] ... [¶] [Defendant's] maximum time in custody then on the counts on which he was found not guilty [by reason of insanity] is 16 years, four months."
[8]  Section 6102 currently provides: "The primary purpose of the medical facility shall be the receiving, segregation, confinement, treatment and care of males under the custody of the Department of Corrections or any agency thereof who are any of the following: [¶] (a) Mentally disordered, [¶] (b) Developmentally disabled. [¶] (c) Addicted to the use of controlled substances. [¶] (d) Suffering from any other chronic disease or condition."
[9]  In support of this assertion, defendant relies upon language in Cleveland II to the effect that if Cleveland had been committed under section 1026, his commitment would have run concurrently to his state prison term. (Cleveland II, supra, 37 Cal.App.3d at p. 550, 112 Cal.Rptr. 508.) For reasons previously detailed, we do not believe a state prison term and state hospital commitment can run concurrently or consecutively to one another.
