using box2d userData in animated spritesheet

As we are using box2d for collision detection in our project. we want to use the following code for the sprite sheet

CCSpriteFrameCache::sharedSpriteFrameCache()>addSpriteFramesWithFile;
pSprite1= CCSprite::spriteWithSpriteFrame
> spriteFrameByName);
//pSprite1 = CCSprite::spriteWithFile);// it is working for single sprite but how to work with the sprite sheet
// how we can make a CCRect on the animated spritesheet
b2BodyDef ballBodyDef;
ballBodyDef.userData = pSprite1;

//this is our timer/update function
void InGameLayer::timerFunc
{
_world~~>Step;

for;b;b=b~~>GetNext())
{
if(b~~>GetUserData!=NULL)
{
CCLOG ("%ld\n",b->GetPosition().y);
CCSprite *ballData =b~~>GetUserData();

ballData~~>setPosition .x*PTM_RATIO,b~~>GetPosition().y*PTM_RATIO));
// ballData->setRotation(–1*CC_RADIANS_TO_DEGREES(b->GetAngle()));
}
}
}