OFFICER RAY HEIM, a 12-year Philadelphia policeman, was critically injured when the car in which he was riding was hit by another car yesterday afternoon in Logan, authorities said.

Heim and two other plainclothes officers, all assigned to the 39th District, were riding in an unmarked green Ford on 18th Street near Windrim Avenue when they were hit by a black Pontiac Grand Prix about 2:35 p.m., police said.

Deputy Police Commissioner Thomas Wright said the officers, who were returning to the district headquarters on Hunting Park Avenue near Erie, were traveling west on Windrim Avenue when their vehicle was struck by a northbound car on 18th Street.

The officers were rushed to the Albert Einstein Medical Center. Heim, 40, was the most seriously injured, suffering a head contusion and a broken femur, Wright said.

He was expected to have surgery last night and was listed in critical condition but was expected to recover from his injuries.

The other officers, who were not identified, were treated for minor injuries and expected to be released last night, police said.

The driver of the Pontiac was also taken to the hospital with minor injuries.

Both vehicles were seriously damaged and were towed away.

Wright did not have details about the cause of the accident.

Officer Jillian Russell, a police spokeswoman, said that the crash is still under investigation, and that charges had not been filed against the driver of the Grand Prix as of last night.