Boundary condition, mode expansion and partition function of a free fermion CFT on a torus I've been following Ginsparg's notes (http://arxiv.org/abs/hep-th/9108028) and Francesco et al's big yellow book on modular invariance of CFT on a torus, particularly on the $c=1/2$ (free fermion) case.
I thought I understood the derivation of the modular-invariant partition function, but then I realized I did not. For example, in Ginsparg's notes, the computation of the partition function relies on the mode expansion of the free fermion field (let's say antiperiodic case) $$\psi(z)=\sum_{n\in\mathbb{Z}} b_n z^{-n-1/2},$$ where $[L_0, b_{-n}]=nb_n$, and then the partition function is just summing over the $b_{-n}|0\rangle$ states. Taking this, I can follow the rest of his derivation. 
However, this mode expansion is for a plane (which can be transformed into a cylinder, but not into a torus) -- it is only anti-periodic (periodic if you drop the $1/2$) in one direction (here angular direction). The above expansion can never satisfy the periodic or anti-periodic boundary condition in the other direction, which in $z$ plane is the radial direction. 
So to be specific, when Mr Ginsparg was calculating the Virasoro character for (A,A) sector (note the second A), say in Eq. (7.13 a), what are his eigenbases for $L_0$?
 A: First of all, it is not correct to say that the plane can not be transformed into a torus. This is precisely what the trace in equation (7.13a) does. Let me be more precise. When you compute the partition function for the free fermion on the torus, you need to specify two kinds of periodicity. 


*

*The first one is the "spatial" periodicity, if you think of the CFT as a worldsheet CFT in string theory. It is the periodicity along the angular direction, if you think on the plane. Depending on this, $L_0$ takes two slightly different forms: 


*

*If the fermion is periodic along the angular direction on the plane (this is the Ramond condition), then $$L_0^R = \frac{1}{24} + \sum\limits_{m=1}^{\infty} m b_{-m} b_m$$

*If the fermion is anti-periodic along the angular direction on the plane (this is the Neveu-Schwarz condition), then (here the sum runs over half-integers $r$) $$L_0^{NS} = -\frac{1}{48} + \sum\limits_{r=1/2}^{\infty} r b_{-r} b_r$$


*The second periodicity that you have to choose is the "temporal" periodicity (in the worldsheet point of view), or radial direction on the plane. This is imposed by the way you take the trace, denoted by $\mathrm{tr}_P$ or $\mathrm{tr}_A$ in Ginsparg's notes, and it boils down to adding a $(-1)^F$ for periodic conditions, and nothing for anti-periodic conditions. 
Now you can compute, say, the partition function on the torus with anti-periodic conditions in the two directions, as in (7.13a). So you need no $(-1)^F$, and you have to use $L_0^{NS}$. This gives $$\mathrm{tr} \, q^{L_0^{NS}} = q^{-1/48} \prod\limits_{r=1/2}^{\infty} \sum\limits_{N_r \in \{0,1\}} q^{rN_r} = q^{-1/48} \prod\limits_{r=1/2}^{\infty} (1+q^r) = \frac{\theta_3^4}{\eta} \, . $$
