Ok got the solution..
First get current position of the current layer
OffsetX = this~~>getPosition.x;
OffsetY = this~~>getPosition().y;
Second adding that Offset to the touch location
cocos2d::CCTouch *myTouch = (CCTouch *)touches~~>anyObject;
cocos2d::CCPoint location = myTouch~~>locationInView();
location = cocos2d::CCDirector::sharedDirector()->convertToGL(location);
location.x = (-OffsetX + location.x);
location.y = (-OffsetY + location.y);
Still this is the temporary solution.If anybody know how to get it proper with the Z coordinate also then it would be appreciable.